FirebaseExtended / mlkit-material-android

ML Kit Showcase App with Material Design
Apache License 2.0
491 stars 143 forks source link

Issues with Object Detection API #3

Closed harshithdwivedi closed 5 years ago

harshithdwivedi commented 5 years ago

I've been trying out the object detection API and most of the times the Knowledge Graph ID returned by the API returns no info on looking it up on the Knowledge Graph API Explorer.

For instance; all the example kg IDs mentioned in the official firebase docs return nothing when looked up on the Knowledge Graph API (I tried both the explorer and the API).

The IDs I tried were : /g/11fhycwtxg, /m/0bl9f, /g/11g0srrsqr, etc. (All these were returned from the Object detection API)

One ID that worked however was /m/02wbm but it was a cosmetic item that was incorrectly identified as an edible item.

Any ideas on how one can use the returned IDs to do something meaningful?

Because in the current state, it doesn't look like that you can do much apart from simply tracking objects in which scenario; returning the kg ID doesn't make much sense.

cc : @samtstern

samtstern commented 5 years ago

Thanks for filing this @harshithdwivedi. I am not at all familiar with the details of this API so I am hoping @zhouyiself or @ulukaya can help you route this one.

zhouyiself commented 5 years ago

@harshithdwivedi thanks for the report. It's a known issue that the public knowledge graph API covers only small portion of entity ids, and the improvement has been tracked internally already.

Since current implementation is just using an on-device coarse classification and supports very few categories, the entity id API is more like a nice-to-have feature for now (not the promoting ones) and to be consistent with our other vision feature APIs.

swiyu commented 5 years ago

Please do not use the entity ID if the ID can not be found. Instead, please use the object category: https://firebase.google.com/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject

zhouyiself commented 5 years ago

getEntityId is removed from the latest version to reduce confusion, thanks for the report!