语义分割的可用的自定义数据集格式:原图为jpg,标注数据集为png
我把自定义数据集原图的格式调成png后会报这个错,5月份碰过这个问题,但是8月再弄的时候又忘记了,,,,
报错信息
Traceback (most recent call last):
File "tools/train.py", line 104, in <module>
main()
File "tools/train.py", line 100, in main
runner.train()
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/runner/runner.py", line 1729, in train
self._train_loop) # type: ignore
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/runner/runner.py", line 1523, in build_train_loop
runner=self, dataloader=self._train_dataloader))
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/runner/loops.py", line 220, in __init__
super().__init__(runner, dataloader)
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/runner/base_loop.py", line 27, in __init__
dataloader, seed=runner.seed, diff_rank_seed=diff_rank_seed)
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/runner/runner.py", line 1370, in build_dataloader
dataset = DATASETS.build(dataset_cfg)
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/home/featurize/work/MMSeg_test/mmsegmentation/mmseg/datasets/Alberta_river_ice_segmentation_dataset.py", line 22, in __init__
**kwargs)
File "/home/featurize/work/MMSeg_test/mmsegmentation/mmseg/datasets/basesegdataset.py", line 142, in __init__
self.full_init()
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/dataset/base_dataset.py", line 307, in full_init
self.data_bytes, self.data_address = self._serialize_data()
File "/home/featurize/work/.local/lib/python3.7/site-packages/mmengine/dataset/base_dataset.py", line 768, in _serialize_data
data_bytes = np.concatenate(data_list)
File "<__array_function__ internals>", line 6, in concatenate
ValueError: need at least one array to concatenate