-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: list index out of range #10
Comments
@ccdongxu Hello, the annotaion json file needs the coco format. |
@LiWentomng Thank you for your answer.The coco-style json file contains segmentation fields and bbox fields. Does this mean that both segmentation annotation and target box annotation are required in my json? |
@ccdongxu The training process only needs the |
Do you mean that my val.json file must include |
But my dataset is marked by myself, labeled with |
I ran into this problem when training with a custom data set.How to solve it?
Traceback (most recent call last):
File "tools/train.py", line 191, in
main()
File "tools/train.py", line 187, in main
meta=meta)
File "/content/drive/MyDrive/boxlevelset/mmdet/apis/train.py", line 172, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/usr/local/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "/usr/local/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/usr/local/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/content/drive/MyDrive/boxlevelset/mmdet/core/evaluation/eval_hooks.py", line 147, in after_train_epoch
key_score = self.evaluate(runner, results)
File "/content/drive/MyDrive/boxlevelset/mmdet/core/evaluation/eval_hooks.py", line 177, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/content/drive/MyDrive/boxlevelset/mmdet/datasets/dcm.py", line 482, in evaluate
cocoEval.evaluate()
File "/usr/local/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 149, in evaluate
self._prepare()
File "/usr/local/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 110, in _prepare
_toMask(gts, self.cocoGt)
File "/usr/local/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 95, in _toMask
rle = coco.annToRLE(ann)
File "/usr/local/lib/python3.7/site-packages/pycocotools/coco.py", line 497, in annToRLE
rles = maskUtils.frPyObjects(segm, h, w)
File "pycocotools/_mask.pyx", line 292, in pycocotools._mask.frPyObjects
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: