exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 9 question 2 discussion

Actual exam question from Microsoft's AI-102
Question #: 2
Topic #: 11
[All AI-102 Questions]

HOTSPOT -
You need to develop code to upload images for the product creation project. The solution must meet the accessibility requirements.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Reference:
https://github.com/Azure-Samples/cognitive-services-dotnet-sdk-samples/blob/master/documentation-samples/quickstarts/ComputerVision/Program.cs

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zellck
Highly Voted 1 year, 9 months ago
1. string 2. VisualFeatureTypes.Description 3. results.Description.Captions[0] https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/concept-describing-images#use-the-api The image description feature is part of the Analyze Image API. You can call this API through a native SDK or through REST calls. Include Description in the visualFeatures query parameter. Then, when you get the full JSON response, parse the string for the contents of the "description" section.
upvoted 26 times
evangelist
1 year, 2 months ago
the correct choice between Stream and string depends on the source of the image: If you have the image file and want to upload it directly from the client or server where the request is being made, you should use a Stream. This approach is direct and efficient for handling binary data without the need for encoding or hosting the image externally. If the image is already hosted online and accessible via a URL, you use a string containing the URL to let the API fetch the image for analysis.
upvoted 7 times
HVardhini
10 months, 1 week ago
Yes given the previous questions answers, the files are uploaded in blob storage. So string is the correct answer
upvoted 3 times
...
...
M25
1 year, 7 months ago
https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/use-case-alt-text#what-languages-are-image-captions-available-in Image captions are available in English, Chinese, Portuguese, Japanese, and Spanish in Image Analysis 3.2 API. In the Image Analysis 4.0 API (preview), image captions are only available in English.
upvoted 3 times
...
rdemontis
1 year, 5 months ago
thanks for explanation
upvoted 1 times
...
...
syupwsh
Most Recent 1 month, 4 weeks ago
credit to zellck 1. string 2. VisualFeatureTypes.Description 3. results.Description.Captions[0] https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/concept-describing-images#use-the-api
upvoted 1 times
...
famco
7 months, 1 week ago
Microsoft employees has bad naming convention. So they try to trick you with that. String image? Nope, I will not write it but it should have been String imageUrl. Who wants to remember these api calls in this age of copilots (ignore google and documentations).
upvoted 1 times
...
HVardhini
10 months, 1 week ago
The given answer is correct because this is the requirement - All images must have relevant alt text.
upvoted 1 times
...
evangelist
1 year, 2 months ago
given answer is correct
upvoted 1 times
...
JTWang
2 years, 11 months ago
AnalyzeImageSample https://github.com/Azure-Samples/cognitive-services-dotnet-sdk-samples/blob/master/samples/ComputerVision/AnalyzeImage/Program.cs
upvoted 2 times
...
Ravnit
3 years, 5 months ago
Was on exam 27/11/2021
upvoted 4 times
...
Diem
3 years, 7 months ago
Correct!
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago