mahyarnajibi / SNIPER

SNIPER / AutoFocus is an efficient multi-scale object detection training / inference algorithm
Other
2.69k stars 451 forks source link

Error when i train my own dataset. #89

Open JeasonUESTC opened 5 years ago

JeasonUESTC commented 5 years ago

I have removed cache from the VOCdevkit folder,and the pascal_voc.py have modified to my own label. self.classes = ['background', #always index 0 'DiaoChe','TaDiao', 'ShiGongJiXie', 'DaoXianYiWu', 'YanHuo'] When I run my data set, I always report an error: Traceback (most recent call last): File "main_train.py", line 72, in for image_set in image_sets] File "lib/data_utils/load_data.py", line 29, in load_proposal_roidb roidb = imdb.gt_roidb() File "lib/dataset/pascal_voc.py", line 105, in gt_roidb gt_roidb = [self.load_pascal_annotation(index) for index in self.image_set_index] File "lib/dataset/pascal_voc.py", line 168, in load_pascal_annotation cls = class_to_index[obj.find('name').text.lower().strip()] KeyError: 'yanhuo' Can you give me a hand?

FatherOfHam commented 5 years ago

In "text.lower().strip()", remove the lower() function.