-
Notifications
You must be signed in to change notification settings - Fork 42
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 #12
Comments
Have you solved this problem? |
Hi,@why228430 |
I also encountered this problem. And I have checked the class num repeatedly. Have you solved your problem? |
same problem, i met this when just finishing the first epoch |
I met the same problem before. Now, I have already fixed it. Error: num_classes = len(det_results[0]) # positive class num My problem is due to the det_results is an empty list, because the test.txt is empty. After training the first epoch, there are no data to validate. |
In my ieda,it's maybe the error of dataset |
Sorry, I don't quite understand this error. If I want to fix this error, do I need to add the relevant files? |
when I run "sh rtools/train.sh",I meet the error. How I can do to solve the problem?
2020-10-17 10:25:11,392 - mmdet - INFO - Saving checkpoint at 1 epochs
completed: 0, elapsed: 0sTraceback (most recent call last):
File "tools/train.py", line 161, in
main()
File "tools/train.py", line 157, in main
meta=meta)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/apis/train.py", line 179, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 46, in train
self.call_hook('after_train_epoch')
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 282, in call_hook
getattr(hook, fn_name)(self)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/core/evaluation/eval_hooks.py", line 28, in after_train_epoch
self.evaluate(runner, results)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/core/evaluation/eval_hooks.py", line 32, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/datasets/dotav1.py", line 187, in evaluate
logger=logger)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/core/evaluation/rmean_ap.py", line 196, in reval_map
num_classes = len(det_results[0]) # positive class num
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: