fathomnet / fathomnet-py

FathomNet Python client
https://fathomnet-py.readthedocs.io
MIT License
24 stars 3 forks source link

using fathomnet-generate for getting VOC annotations of specific classes together #19

Closed Sidd1609 closed 1 year ago

Sidd1609 commented 1 year ago

Hello, @hohonuuli @eor314 I am trying to generate PASCAL VOC format annotations for certain classes in the dataset and was hoping to see if it is possible using fathomnet-generate.

Also, do you have an estimate of the total dataset size and do you have complete annotations for the original dataset with all classes in PASCAL VOC?

thank you for your support!

hohonuuli commented 1 year ago

@Sidd1609 PASCAL VOC is the default output format, although you can explicitly pass a --format voc flag to fathomnet_generate.py too.

hohonuuli commented 1 year ago

@Sidd1609

Also, do you have an estimate of the total dataset size

ATM there are 176K localizations on 84K images in FathomNet.

and do you have complete annotations for the original dataset with all classes in PASCAL VOC?

Not sure what you're asking here. If you want all annotations in FathomNet as VOC ... yes, you can do that using fathomnet_generate.py

Sidd1609 commented 1 year ago

@hohonuuli I am looking to download only certain classes and not the entire datasets. Is it possible to download the annotations only for certain classes in the images they are present ?

hohonuuli commented 1 year ago

@Sidd1609 You can download specific classes. If you're using the python API you can see all the options using:

python -m pip install fathomnet
fathomnet-generate -h

An example to download all types of Bathochordaeus (and other annotations on the same image as the Bathos ...)

fathomnet-generate -t fathomnet -c Bathochordaeus -o . -a
hohonuuli commented 1 year ago

If you're not using python, you run the same query using the FathomNet API and convert the JSON to Pascal VOC yourself. Example: https://fathomnet.org/api/images/query?concept=Bathochordaeus&taxProviderName=fathomnet

Sidd1609 commented 1 year ago

@hohonuuli Thank you so much!

kevinsbarnard commented 1 year ago

Closing this issue as completed. By the way, if you're pulling the image entities via the Python API, you can use AImageDTO.to_pascal_voc to encode an image as VOC. This is the method that fathomnet-generate calls.