r3det-on-mmdetection
r3det-on-mmdetection copied to clipboard
ValueError: need at least one array to concatenate
when I run sh rtools/train.sh, I meet the problem .How I can do to solve the error!
Traceback (most recent call last):
File "tools/train.py", line 161, in
have you solved that problem?
change image path can solve this problem: data_root = ‘data/dota/’
Thanks for your help! I have solved the problem.
Did you met the error? 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 @DingShengLin
you should change the class
you should change the class Which the file that i should change the class? thank you
@Miki-lin @why228430 I have encountered with the same error,too.Could you give me some advice?
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
can you tell me the way to deal with this problem ,in detail,thanks!!!
when I run sh rtools/train.sh, I meet the problem .How I can do to solve the error!
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/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+unknown-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 27, in train for i, data_batch in enumerate(data_loader): File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 291, in iter return _MultiProcessingDataLoaderIter(self) File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 764, in init self._try_put_index() File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 994, in _try_put_index index = self._next_index() File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 357, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 208, in iter for idx in self.sampler: File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+unknown-py3.7-linux-x86_64.egg/mmdet/datasets/samplers/group_sampler.py", line 36, in iter indices = np.concatenate(indices,0) ValueError: need at least one array to concatenate