When running the model on our own app, how do we find the taxon_name given the taxon_id? Is there a way to download the taxon database, with names indexed by id?
This will be more authoritatively answered by a developer, but maybe I can help get you started.
Check out the API reference for āget taxa IDā . https://api.inaturalist.org/v1/docs/#/Taxa
As an example if you know the taxon ID is 64350. You can get a taxon results page for this ID using this API string:
https://api.inaturalist.org/v1/taxa/64350
Within the results returned you will find the common name in the āpreferred_common_nameā slot and you the latin name in the ānameā slot.
Does that help?
This is helpful, thank you. Is there any way to download the taxon_id and taxon_name table itself? Am looking to id and label in realtime, so calls out over the WAN would greatly slow the response.
I donāt know how to do this. Maybe one of the developers (@tiwane?) can tell you.
You could download all the taxon information through the route I described above, parse it yourself and then save a table with the information you want. Keep in mind there are hundreds of thousands of taxon_ids (at least). Also taxa ID and names change over time as curators add taxa, split taxa, swap taxa and lump taxa depending on the taxonomic authority they use.
Iām going to defer to others on this question.
What āmodelā are you referring to, @willstewart? Because if youāre referring to our vision model, we donāt distribute that so Iām not sure how you got a hold of it. If so, Iād like to know where and how you retrieved your copy.
@kueda, what Iām referring to is right out in the open;
Including @tiwane ;
I can extract the following from the output;
- num_detections
- detection_classes
- detection_boxes
- detection_scores
by using the following;
[sess.graph.get_tensor_by_name(ānum_detections:0ā),
sess.graph.get_tensor_by_name(ādetection_scores:0ā),
sess.graph.get_tensor_by_name(ādetection_boxes:0ā),
sess.graph.get_tensor_by_name(ādetection_classes:0ā)]
When I print out the resulting 5 sets of detection_classes and scores;
350
0.9786933660507202358
0.018166758120059967323
0.01589692384004593360
0.010653774254024029348
0.003607431659474969
Yet there are no matches found (aside from a couple of birds, though this evaluated an image of a coyote) for any of the detection_classes above using the /taxa/{id} API call, which leads me to believe there is some other detection id that I have not found yet. What is the tensor output name for taxon id?
Ah, cool. Thatās not our model, thatās a model the folks at tensorflow trained on a version of our dataset we published in 2017 (among other things). I have no idea what a detection_class
is in the model they trained, so youāll have to consult them about it.
If you can get a mapping to iNaturalist taxon IDs, I think the only regularly-updated archive that includes all our taxon identifiers is https://www.inaturalist.org/observations/inaturalist-dwca-with-taxa.zip. That should work, but itās a 1.2G file.
@willstewart if you follow the model zoo link that you posted, youāll see a link to the GitHub repo for the iNaturalist Species Detection Dataset. In the Readme of that GitHub repo, there are a bunch of links to download the contest dataset. Inside that dataset are json files that contain categories. Most likely, the detection classes youāre seeing are the indices of the entries in the ācategoriesā part of the json dataset.
The tensorflow team typically puts models into the model zoo to act as a helpful starting point for training up your own models on your own custom dataset.
Any further questions on the contest dataset should be posted to that GitHub.
Thanks,
alex
Thank you both, youāve been quite helpful steering me in the right direction. Cheers!
FYI, this is for a capstone project for a Deep Learning certification, and the problem Iām trying to solve is detecting Eastern Coyotes (coywolves) on my sheep farm, and distinguishing them from my English Shepherds, who look quite similar. There is significant variation in the Eastern Coyote due to varying levels of interbreeding with wolves and dogs, and hereās an article with a picture that shows the conundrum of trying to classify it cleanly - is that a wolf or a coyote?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.