Skip to content
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

ValueError: need at least one array to concatenate while training on custom data #14

Open
assia855 opened this issue Jan 27, 2023 · 1 comment

Comments

@assia855
Copy link

Hi, thanks for sharing this work. I would like to train the model on custom data and I have a data with coco annotation format and I have this error while launching the training with coco weight:
Traceback (most recent call last): File "tools/train.py", line 191, in <module> main() File "tools/train.py", line 187, in main meta=meta) File "/mmdet/apis/train.py", line 172, in train_detector runner.run(data_loaders, cfg.workflow) File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 47, in train for i, data_batch in enumerate(self.data_loader): File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 352, in __iter__ return self._get_iterator() File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 294, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 827, in __init__ self._reset(loader, first_iter=True) File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 857, in _reset self._try_put_index() File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1091, in _try_put_index index = self._next_index() File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 227, in __iter__ for idx in self.sampler: File "/work/boxlevelset/mmdet/datasets/samplers/group_sampler.py", line 36, in __iter__ indices = np.concatenate(indices) File "<__array_function__ internals>", line 6, in concatenate ValueError: need at least one array to concatenate

@assia855 assia855 changed the title train on custom data ValueError: need at least one array to concatenate while training on custom data Jan 27, 2023
@LiWentomng
Copy link
Owner

Hi, have you solved this problem? I guess your data may be something wrong ? Please check the your annotations with the standard coco.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants