openimages / dataset

The Open Images dataset
https://storage.googleapis.com/openimages/web/index.html
Apache License 2.0
4.26k stars 603 forks source link

there are no cat and dog coarse-grain category. #101

Open PapaMadeleine2022 opened 3 years ago

PapaMadeleine2022 commented 3 years ago

Hello, I want to get some images of cat and dog coarse-grain category. But when I check the circle.html, I find there no cat and dog coarse-grain category. You know it is more difficult if I see every fine-grained category to check that whether this category is cat/dog category or not.

So how can I easily get all the images of cat and dog coarse-grain category. Can you give some advises?

jponttuset commented 3 years ago

Dear @IvyGongoogle

I understand you are interested in getting all the images of dogs and all the images of cats (they are both in the class hierarchy, under Carnivore). If that's the case, you need to find all annotations of Dog (/m/0bt9lr) or Cat (/m/01yrx) in the CSV of bounding boxes, that is, filter the rows whose LabelName is either /m/0bt9lr or /m/01yrx and take the values of the ImageID column. Pandas is a good tool to do this in Python.

If you save all image IDs in a text file, then you can use the image downloader as described here.

I hope this helps.