How to really run Instance Segmentation using MMDet_InstanceSeg_Tutorial.ipynb fro
<p>After looking here and there for the solutions it seems build_dataset and build_detector were there in previous versions but now in newer versions it has been removed. Okay so what’s the solution?. If you see in later codes we’re not using these two modules so we can simply skip it by commenting it out or just remove these two lines.</p>
<pre>
# from mmdet.datasets import build_dataset
# from mmdet.models import build_detector
from mmengine.runner import Runner
# build the runner from config
runner = Runner.from_cfg(cfg)</pre>
<p>3. After inferencing the model I found one more issue which is <em>ValueError: need at least one array to concatenate </em>while executing</p>
<pre>
# start training
runner.train()</pre>
<p>This issue can be resolved by changing below lines</p>
<pre>
from mmengine.runner import set_random_seed
# Modify dataset classes and color
cfg.metainfo = {
'CLASSES': ('balloon', ),
'PALETTE': [
(220, 20, 60),
]
}</pre>
<p>to</p>
<pre>
from mmengine.runner import set_random_seed
# Modify dataset classes and color
cfg.metainfo = {
'classes': ('balloon', ),
'palette': [
(220, 20, 60),
]
}</pre>
<p>just change the case of ‘CLASSES’ and ‘PALETTE’ from uppercase to lowercase and this should work.</p>
<p>Thank you.</p>
<p><a href="https://medium.com/@MeerAjaz/how-to-really-run-instance-segmentation-using-mmdet-instanceseg-tutorial-ipynb-from-mmdetection-1501b16c19d1">Read More</a></p>