ylshaooo / keras-zero-shot-detection

Keras implementation of zero-shot detection based on YOLOv3 model.
45 stars 15 forks source link

invalid literal for int() in voc_annotation #3

Open aplusc98 opened 5 years ago

aplusc98 commented 5 years ago

When I download the VOC2012dataset and use the voc_annotation.py to generate train.txt and test.txt, I'm getting Traceback (most recent call last): File "voc_annotation.py", line 37, in convert_annotation(img_id, train_file) File "voc_annotation.py", line 26, in convert_annotation b = (int(xmlbox.find('xmin').text), int(xmlbox.find('ymin').text), int(xmlbox.find('xmax').text), ValueError: invalid literal for int() with base 10: '45.70000076293945' How can this be avoided ?

jjwwczy commented 5 years ago
    b = (int(float(xmlbox.find('xmin').text)), int(float(xmlbox.find('ymin').text)), int(float(xmlbox.find('xmax').text)),
         int(float(xmlbox.find('ymax').text)))