Hi,
Im trying to run the code with the COCO dataset, but I get an error when trying to extract the images from the data loader, specifically:
`
Loading the dataset...
Training SSD on: MS COCO
Using the specified args:
Loading the backbone pretrained in Imagenet...
0
Traceback (most recent call last):
File "/home/esteban/Promotion/ComputerVision/AL-SSL/train.py", line 255, in train
images, targets, semis = next(batch_iterator)
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 634, in next
data = self._next_data()
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1326, in _next_data
return self._process_data(data)
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
data.reraise()
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/_utils.py", line 644, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 1.
Original Traceback (most recent call last):
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/esteban/Promotion/ComputerVision/AL-SSL/data/coco.py", line 132, in getitem
im, gt, h, w, semi = self.pull_item(index)
File "/home/esteban/Promotion/ComputerVision/AL-SSL/data/coco.py", line 171, in pull_item
img, boxes, labels = self.transform(img, target[:, :4],
File "/home/esteban/Promotion/ComputerVision/AL-SSL/utils/augmentations.py", line 425, in call
return self.augment(img, boxes, labels)
File "/home/esteban/Promotion/ComputerVision/AL-SSL/utils/augmentations.py", line 52, in call
img, boxes, labels = t(img, boxes, labels)
File "/home/esteban/Promotion/ComputerVision/AL-SSL/utils/augmentations.py", line 238, in call
mode = random.choice(self.sample_options)
File "mtrand.pyx", line 920, in numpy.random.mtrand.RandomState.choice
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.
`
I have only changed the paths of the datasets, but somehow this error appears, do you know what It could be?
Hi, Im trying to run the code with the COCO dataset, but I get an error when trying to extract the images from the data loader, specifically:
` Loading the dataset... Training SSD on: MS COCO Using the specified args: Loading the backbone pretrained in Imagenet... 0 Traceback (most recent call last): File "/home/esteban/Promotion/ComputerVision/AL-SSL/train.py", line 255, in train images, targets, semis = next(batch_iterator) File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 634, in next data = self._next_data() File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1326, in _next_data return self._process_data(data) File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data data.reraise() File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/_utils.py", line 644, in reraise raise exception ValueError: Caught ValueError in DataLoader worker process 1. Original Traceback (most recent call last): File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop data = fetcher.fetch(index) File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/esteban/anaconda3/envs/ki/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/esteban/Promotion/ComputerVision/AL-SSL/data/coco.py", line 132, in getitem
im, gt, h, w, semi = self.pull_item(index)
File "/home/esteban/Promotion/ComputerVision/AL-SSL/data/coco.py", line 171, in pull_item
img, boxes, labels = self.transform(img, target[:, :4],
File "/home/esteban/Promotion/ComputerVision/AL-SSL/utils/augmentations.py", line 425, in call
return self.augment(img, boxes, labels)
File "/home/esteban/Promotion/ComputerVision/AL-SSL/utils/augmentations.py", line 52, in call
img, boxes, labels = t(img, boxes, labels)
File "/home/esteban/Promotion/ComputerVision/AL-SSL/utils/augmentations.py", line 238, in call
mode = random.choice(self.sample_options)
File "mtrand.pyx", line 920, in numpy.random.mtrand.RandomState.choice
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.
`
I have only changed the paths of the datasets, but somehow this error appears, do you know what It could be?