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 #3791

Open
handsome-me opened this issue Oct 10, 2024 · 0 comments
Open

ValueError: need at least one array to concatenate #3791

handsome-me opened this issue Oct 10, 2024 · 0 comments

Comments

@handsome-me
Copy link

Traceback (most recent call last):
File "tools/train.py", line 104, in
main()
File "tools/train.py", line 100, in main
runner.train()
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\runner\runner.py", line 1728, in train
self._train_loop = self.build_train_loop(
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\runner\runner.py", line 1520, in build_train_loop
loop = LOOPS.build(
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\registry\registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\registry\build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\runner\loops.py", line 220, in init
super().init(runner, dataloader)
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\runner\base_loop.py", line 26, in init
self.dataloader = runner.build_dataloader(
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\runner\runner.py", line 1370, in build_dataloader
dataset = DATASETS.build(dataset_cfg)
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\registry\registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\registry\build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmsegmentation-1.2.2-py3.8.egg\mmseg\datasets\pidray.py", line 45, in init
super().init(
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmsegmentation-1.2.2-py3.8.egg\mmseg\datasets\basesegdataset.py", line 142, in init
self.full_init()
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\dataset\base_dataset.py", line 307, in full_init
self.data_bytes, self.data_address = self._serialize_data()
File "D:\anaconda3\envs\mmpretrain\lib\site-packages\mmengine\dataset\base_dataset.py", line 768, in _serialize_data
data_bytes = np.concatenate(data_list)
File "<array_function internals>", line 200, in concatenate
ValueError: need at least one array to concatenate
在训练自己数据集时报出这个错误,我的数据集按格式分好了训练和验证的图片png格式,并注册了mydatasets。不知道怎么解决这个错误

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

1 participant