Can I get the information or list of ObjectHierarchy in Analyze Image API?

Cho, Ray 21 Reputation points
2020-10-13T01:37:32.11+00:00

Hi

I'm Ray Cho who is working on a class project using Microsoft Analyze Image API.

I have a question for the API that there is any way we can get the entire ObjectHierarchy.
For example, if the object is banana, then the parent would be Fruit, and then the parent of Fruit would be Food. Can we get the entire ObjectHierarchy?

The reason why I ask it is we want to try to handle every edge case for each object from an image.

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
329 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,486 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 43,246 Reputation points Microsoft Employee
    2020-10-13T09:53:53.137+00:00

    @Cho, Ray Yes, you can get this information with the current Analyze API. Please use the query parameter "Objects" in the query to get this information. For example if I use this image, the response displays the following in the response along with confidence and boundary co-ordinates.

        "object": "Strawberry",  
        "confidence": 0.588,  
        "parent": {  
          "object": "Fruit",  
          "confidence": 0.612,  
          "parent": {  
            "object": "Food",  
            "confidence": 0.62  
          }  
        }  
    

    The post query I used in this case is the following, Please note that this feature is only available in English.

    https://eastus.api.cognitive.microsoft.com/vision/v2.0/analyze?visualFeatures=Objects&language=en  
    

    If the above response is helpful, please accept the same as answer.


0 additional answers

Sort by: Most helpful