How to get 3 text from Computer vision REST API ?

keroido 21 Reputation points
2020-09-02T02:43:19.057+00:00
Computer Vision
Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
0 comments No comments
{count} votes

Answer accepted by question author
  1. romungi-MSFT 49,086 Reputation points Microsoft Employee Moderator
    2020-09-02T08:59:38.95+00:00

    @keroido To get more than one description text of the image you can use describeImage API and use the maxCandidates query parameter to the required number. This is how your request URI would look like:

    https://eastus.api.cognitive.microsoft.com/vision/v3.0/describe?maxCandidates=3&language=en  
    

    The result in this case would be the following:

    {  
      "description": {  
        "tags": ["outdoor", "building", "photo", "city", "large", "sitting", "old", "water", "skyscraper", "many", "boat", "river", "group", "people", "street", "tall", "field", "bird", "standing"],  
        "captions": [{  
          "text": "a large city",  
          "confidence": 0.95549135022361287  
        }, {  
          "text": "an old photo of a large city",  
          "confidence": 0.93256271335599006  
        }, {  
          "text": "an old photo of a city",  
          "confidence": 0.93156271335599006  
        }]  
      },  
      "requestId": "<request_id>",  
      "metadata": {  
        "height": 300,  
        "width": 239,  
        "format": "Png"  
      }  
    }  
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.