Open FindOne1 opened 5 months ago
Co-DETR with LSJ augmentation adopts copy-paste technique, which requires mask segmentation annotation. Please refer to this link for more details: https://github.com/Sense-X/Co-DETR/blob/bf3d49d7c02929788dfe2f251b6b01cbe196b736/projects/configs/co_dino/co_dino_5scale_lsj_r50_1x_coco.py#L68
When I train on my own dataset, it reported an error, there are the details: Traceback (most recent call last): File "tools/train.py", line 253, in
main()
File "tools/train.py", line 249, in main
meta=meta)
File "Co-DETR-main\mmdet\apis\train.py", line 245, in train_detector
runner.run(data_loaders, cfg.workflow)
File "\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 136, in run
epoch_runner(data_loaders[i], **kwargs)
File "\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 49, in train
for i, data_batch in enumerate(self.data_loader):
File "\lib\site-packages\torch\utils\data\dataloader.py", line 628, in next
data = self._next_data()
File "\lib\site-packages\torch\utils\data\dataloader.py", line 671, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "Co-DETR-main\mmdet\datasets\custom.py", line 220, in getitem
data = self.prepare_train_img(idx)
File "Co-DETR-main\mmdet\datasets\custom.py", line 243, in prepare_train_img
return self.pipeline(results)
File "Co-DETR-main\mmdet\datasets\pipelines\compose.py", line 41, in call
data = t(data)
File "Co-DETR-main\mmdet\datasets\pipelines\loading.py", line 398, in call
results = self._load_masks(results)
File "Co-DETR-main\mmdet\datasets\pipelines\loading.py", line 354, in _load_masks
w)
File "Co-DETR-main\mmdet\core\mask\structures.py", line 595, in init
assert isinstance(masks[0][0], np.ndarray)
IndexError: list index out of range
I have no idea about this error, and what's the meaning of the 'masks'?