EscVM / OIDv4_ToolKit

Download and visualize single or multiple classes from the huge Open Images v4 dataset
GNU General Public License v3.0
809 stars 635 forks source link

wrong txt format for classes with underscore #39

Closed ohlr closed 5 years ago

ohlr commented 5 years ago

python main.py downloader --classes Human_face --type_csv 'validation' --multiclasses 1

The txt label files look like the following: Human face 272.903578 214.58227200000002 448.06849 435.37612800000005

According to the documentation there should be a underscore between human and face.

However, in order to accomodate a more intuitive representation and give the maximum flexibility, every .txt annotation is made like:

name_of_the_class left top right bottom

This also causes the OID_to_yolo_gist to fail

ohlr commented 5 years ago

quick fix for the to_yolo_gist in line 177:

class_name = l.pop(0)
try:
    float(l[0])
except ValueError:
    class_name += ' ' + l.pop(0)
EscVM commented 5 years ago

Thank you for the hint! I'm sure it will be helpful for all yolo users.