Hello, I am following this tutorial: tutorial in order to train my custom object detector model. I have followed what the guy says. However, when I try to execute the code, with the command that he suggests
Update: I copied-pasted it right this time....
Any help??
python engine.pyI get the below error which I cannot understand how to handle it...
Error: File "/home/UbuntuUser/Desktop/Custom_Object_Detection_using_PyTorch_Faster_RCNN/datasets.py", line 52, in __getitem__
labels.append(self.classes.index(member.find('name').text))
ValueError: 'car_001' is not in listThe code in the above link is the datasets.py and part of the code that hits error is depicted below:
. . .
# box coordinates for xml files are extracted and corrected for image size given
for member in root.findall('object'):
# map the current object name to `classes` list to get...
# ... the label index and append to `labels` list
labels.append(self.classes.index(member.find('name').text))
# xmin = left corner x-coordinates
xmin = int(member.find('bndbox').find('xmin').text)
# xmax = right corner x-coordinates
xmax = int(member.find('bndbox').find('xmax').text)
# ymin = left corner y-coordinates
ymin = int(member.find('bndbox').find('ymin').text)
# ymax = right corner y-coordinates
ymax = int(member.find('bndbox').find('ymax').text)
# resize the bounding boxes according to the...
# ... desired `width`, `height`
xmin_final = (xmin/image_width)*self.width
xmax_final = (xmax/image_width)*self.width
ymin_final = (ymin/image_height)*self.height
yamx_final = (ymax/image_height)*self.height
boxes.append([xmin_final, ymin_final, xmax_final, yamx_final])
. . .Any ideas???Update: I copied-pasted it right this time....
Any help??
