mmdetection
mmdetection copied to clipboard
data['category_id'] = self.cat_ids[label] IndexError: list index out of range
Hey, I need help to figure this out. Been stack on it for days now.
我也遇到了同样的问题
我也遇到了同样的问题 I also encountered this problem, after debugging, I found that the array self.cat_ids may not be able to read all the ids, in my case, my category ids should have been 1-12,but during debugging I had self.cat_ids=[1,2,3,4,5,6,7,8,9,11,12], which was missing the 10 element, so it results in the label and the read ids not being aligned, what I do at this point is create another origin_cat_ids array equal to [1,2.... .12] and assign it to self.cat_ids to force the labels to be aligned. i have successfully resolved this error by doing this. (If you want to change the dataset, you'll have to rethink the missing labels, but if the error message is the same and your num_classes parameter in the HEAD section is not set incorrectly, you can change it the way I said)