Closed we1pingyu closed 4 years ago
I meet the same error. After taking a lot of time to debug, I found that I have to commend these 2 lines (file: datasets/custom.py, line number: 73-74). I still don't know is that a bug?
# self.data_infos = self.get_subset_by_classes()
Same error here. I think that the change of pycocotools broke some things. I've been using this repository with no problems for the past months, but with that change I'm facing a few bugs. :cry:
I could reproduce @VoThanhDanh95 's bug and solution, so this should be a bug in self.get_subset_by_classes()
. I am still checking the problem.
Just wanted to quickly check, has there been any updates on the above?
Same problem, any update?
The background no longer counts as a class, so for COCO rather than num_classes=81, it is now num_classes=80
Same problem, any update?
mmdet: v2.2 @ZwwWayne
A quick workaround is to comment these two lines. We will try to solve this bug ASAP.
Checklist
Describe the bug Cannot modify classes in config.py. Have to modify hard code. And if you modify the config, the training will start with a evaluation. Only happens in mmdet v2.0. Reproduction
Did you make any modifications on the code or config? Did you understand what you have modified?
sys.platform: linux Python: 3.7.7 (default, May 7 2020, 21:25:33) [GCC 7.3.0] CUDA available: True CUDA_HOME: /usr/local/cuda-10.1 NVCC: Cuda compilation tools, release 10.1, V10.1.243 GPU 0,1: GeForce GTX 1080 Ti GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.3.1 PyTorch compiling details: PyTorch built with:
TorchVision: 0.4.2 OpenCV: 4.2.0 MMCV: 0.5.9 MMDetection: 2.0.0+204f751 MMDetection Compiler: GCC 7.5 MMDetection CUDA Compiler: 10.1
Traceback (most recent call last): File "./tools/train.py", line 161, in
main()
File "./tools/train.py", line 157, in main
meta=meta)
File "/home/omnisky/yuweiping/mmdetection/mmdet/apis/train.py", line 179, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/omnisky/anaconda3/envs/mmdet2/lib/python3.6/site-packages/mmcv/runner/runner.py", line 384, in run
epoch_runner(data_loaders[i], kwargs)
File "/home/omnisky/anaconda3/envs/mmdet2/lib/python3.6/site-packages/mmcv/runner/runner.py", line 293, in train
self.call_hook('after_train_epoch')
File "/home/omnisky/anaconda3/envs/mmdet2/lib/python3.6/site-packages/mmcv/runner/runner.py", line 245, in call_hook
getattr(hook, fn_name)(self)
File "/home/omnisky/yuweiping/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 74, in after_train_epoch
self.evaluate(runner, results)
File "/home/omnisky/yuweiping/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 32, in evaluate
results, logger=runner.logger, self.eval_kwargs)
File "/home/omnisky/yuweiping/mmdetection/mmdet/datasets/coco.py", line 343, in evaluate
result_files, tmp_dir = self.format_results(results, jsonfile_prefix)
File "/home/omnisky/yuweiping/mmdetection/mmdet/datasets/coco.py", line 306, in format_results
result_files = self.results2json(results, jsonfile_prefix)
File "/home/omnisky/yuweiping/mmdetection/mmdet/datasets/coco.py", line 240, in results2json
if isinstance(results[0], list):
IndexError: list index out of range