Downloading AI-suggested IDs for observations

I am wondering if there is a way to download the top suggested identifications for an observation? In other words, I would like to download the metadata for an observation, but as well as the ID supplied by the user, I would like to know the IDs suggested by the AI algorithm.

Or to put it another way, is there a way to query iNaturalist using a command-line interface, such that one could query a photo and retrieve the suggestions?

Thanks!

1 Like

why do you want to know this information? are you trying to do some sort of analysis?

5 Likes

you might want to take a look at the API documentation: https://api.inaturalist.org/v1/docs/

maybe you find there what you are looking for. You can use it to write your own code to retive data.
If I see correctly you would need an API key to post images however.

1 Like

Thank you! That looks very promising.

potentially, but at present I was just wondering what was possible. For example, say I have a bunch of images on my local disk, I would like to be able to ask the AI for a list of suggestions using batch scripts, which I could then use to flag certain images.

I was looking at pyNaturalist which seems to have capabilities along these lines - it looks like one can create records on iNaturalist, but you have to provide the ID rather than choosing from suggestions.

the last time i checked, iNat had two computer vision API endpoints - one which returns suggestions based on a photo (and other information like location, etc.) and another which returns suggestions for an observation. neither of these are officially documented, and as far as I’ve seen, the stance of the staff is that neither the CV endpoints nor the CV models are meant to be used directly by the general public, though they’ve indicated in the past that they have made these available to third parties for certain special purposes in the past.

the official stance is that if you want to get CV suggestions, you should either upload an observation and get suggestions via the system, or you can train your own CV using the publicly available photos in either the Amazon Web Services open data set or in one of the past Visipedia competition sets.

that said, i believe it is technically possible to use the CV API endpoints directly, though it would be an unsanctioned use.

the last time i checked, the pyiNaturalist developers had looked into adding support for the CV API, but they decided against doing so because it’s not meant to be used directly by the general public. so unless something changed, i don’t think pyiNat supports this functionality.

it’s worth noting that computer vision suggestions may vary depending on how you request suggestions, what inputs you provide at the time of the request, and which model is available at the time. so if you actually plan to do some sort of analysis in the future, you may have to take this into consideration.

3 Likes

Thank you @pisum - that’s incredibly helpful!