ssd.pytorch
ssd.pytorch copied to clipboard
img, boxes, labels = self.transform(img, target[:, :4], target[:, 4]) IndexError: too many indices for array
i meet the same error have you solve it?
I remember it seems that there is a problem with the annotation of an original image,you can try to print the image index to determine which image has the problem.
If the training test has no objects, then the negative samples are not labeled, showing how to resolve this error
I checked the index when IndexError was raised, and found out that it's parameter #difficult#'s fault in my case. If you click "difficult" when labeling your data, you'll have difficult = int(obj.find('difficult').text) == 1 True, and it turns out " res = []"