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

Add function to get additional labels for downloaded images. #40

Closed yu-jingrui closed 5 years ago

yu-jingrui commented 5 years ago

I could not find a way to generate labels for other classes rather than the download class, so I implemented one. For example I want to download images of the class Tableware, but also want the annotations for Person in these images.

Also I did some changes to import so it is easier to debug.

keldrom commented 5 years ago

Why you don't have used the --multiclass option?

yu-jingrui commented 5 years ago

Why you don't have used the --multiclass option?

'--multiclass' option downloads images of all these classes

keldrom commented 5 years ago

I've don't actually understood your problem

yu-jingrui commented 5 years ago

I've don't actually understood your problem

For example, if I use python main.py downloader --classes Apple Orange --type_csv train --multiclass 1 then all images of classes Apple and Orange will be downloaded and labels for Apple and Orange are created as .txt in Label folder. Some of these images contain other objects, such as Person. I want to create labels in the .txt files for class Person, but I do not want to download other images of class Person that do not have Apple or Orange in them.

keldrom commented 5 years ago

Ok, I'm in. But maybe this is a custom solution, maybe we can make another "downloader" or option capable of this action.

yu-jingrui commented 5 years ago

I added the option '--additional_label_classes' to parser.py. It is optional. If it is not used downloader works just as was.

no-1ne commented 5 years ago

nice feature, looking forward to the merge and also v5 support (maybe rethink the name the repo OID_ToolKit )