Closed itruonghai closed 3 years ago
@itruonghai maybe the name of your classes in your dataset should match the name of classes in config file.
@cuong12ly1 thank you. It was fix. But now, I face up with other error:
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/mmdetection/mmdet/datasets/custom.py", line 191, in __getitem__
data = self.prepare_train_img(idx)
File "/content/mmdetection/mmdet/datasets/custom.py", line 214, in prepare_train_img
return self.pipeline(results)
File "/content/mmdetection/mmdet/datasets/pipelines/compose.py", line 40, in __call__
data = t(data)
File "/content/mmdetection/mmdet/datasets/pipelines/loading.py", line 371, in __call__
results = self._load_masks(results)
File "/content/mmdetection/mmdet/datasets/pipelines/loading.py", line 323, in _load_masks
[self._poly2mask(mask, h, w) for mask in gt_masks], h, w)
File "/content/mmdetection/mmdet/datasets/pipelines/loading.py", line 323, in <listcomp>
[self._poly2mask(mask, h, w) for mask in gt_masks], h, w)
File "/content/mmdetection/mmdet/datasets/pipelines/loading.py", line 279, in _poly2mask
rles = maskUtils.frPyObjects(mask_ann, img_h, img_w)
File "pycocotools/_mask.pyx", line 292, in pycocotools._mask.frPyObjects
IndexError: list index out of range
I just want to detection only, not segmentation. And the error is about mask. I also try to delete all of "segment head" but it was not work. Please help me.
Hi, I notice you didn't change all the 'num_classes' to your own dataset. The 'num_classes' in 'HTCMaskHead' and 'FusedSemanticHead' is defalutly COCO setting while you didn't change to your own dataset setting.
Hi, I notice you didn't change all the 'num_classes' to your own dataset. The 'num_classes' in 'HTCMaskHead' and 'FusedSemanticHead' is defalutly COCO setting while you didn't change to your own dataset setting.
Because I think that I just train the detector, not train the segmentation?
So I guess the semantic segmentation related properties should not be included in your config file.
Here is my config. I want to train an object detector with 7 classes.
And the error is
I also read a lot on the issue but I can't catch the key idea to deal with this problem. I also check my annotations and it was ok (I train with other object detector and it still fine). Here is the annotations file: