How to get 3 text from Computer vision REST API ?

keroido 21 Reputation points
2020-09-02T02:43:19.057+00:00
Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
380 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,921 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 46,986 Reputation points Microsoft Employee
    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 Answers by the question author, which helps users to know the answer solved the author's problem.