I’m trying to train a model based off of images i’ve labeled. I had it working before, and added a few hundred more images to it and now i’m getting an error when running the command. Here is the command.
python3 train_ssd.py --dataset-type=voc --data=/mnt/cifs/NAS/ImageTraining/TrainingData/ --model-dir=models/Home --batch-size=4 --workers=2 --epochs=30
And the error
Traceback (most recent call last):
File "train_ssd.py", line 344, in <module>
device=DEVICE, debug_steps=args.debug_steps, epoch=epoch)
File "train_ssd.py", line 113, in train
for i, data in enumerate(loader):
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1179, in _next_data
return self._process_data(data)
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/home/keith/.local/lib/python3.6/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 1.
Original Traceback (most recent call last):
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/keith/.local/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 219, in __getitem__
return self.datasets[dataset_idx][sample_idx]
File "/home/keith/jetson-inference/python/training/detection/ssd/vision/datasets/voc_dataset.py", line 81, in __getitem__
image, boxes, labels = self.transform(image, boxes, labels)
File "/home/keith/jetson-inference/python/training/detection/ssd/vision/ssd/data_preprocessing.py", line 34, in __call__
return self.augment(img, boxes, labels)
File "/home/keith/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 55, in __call__
img, boxes, labels = t(img, boxes, labels)
File "/home/keith/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 357, in __call__
boxes[:, 0::2] = width - boxes[:, 2::-2]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
I’ve seen this error reported in various places but nothing seems to fix the problem for me. Not really sure where to start with this. Any suggestions?
I’ve tried narrowing it down to a specific xml file, which i believe i have, but nothing stands out within it. Looks just like the other files.