exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 2 question 3 discussion

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

HOTSPOT -
You have a Computer Vision resource named contoso1 that is hosted in the West US Azure region.
You need to use contoso1 to make a different size of a product photo by using the smart cropping feature.
How should you complete the API URL? 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://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f21b https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/concept-generating-thumbnails#examples

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
czmiel24
Highly Voted 3 years, 6 months ago
The second one should be generate Thumbnail imho.
upvoted 62 times
ziizai
3 years, 6 months ago
yes, the question is exactly the sample here https://docs.microsoft.com/en-us/rest/api/computervision/3.1/generate-thumbnail/generate-thumbnail#examples
upvoted 15 times
rdemontis
1 year, 4 months ago
agree with you
upvoted 1 times
rdemontis
1 year, 4 months ago
however, I don't understand how I do using the generic endpoint to meet the requirement, "You need to use contoso1 to make a different size of a product photo". I'm not so sure to use the generic endpoint.
upvoted 1 times
rdemontis
1 year, 4 months ago
Clarified. If you go on the API documentation https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f20c/console (here is the version 3.2 but it's the same) you can verify that both type of endpoint are supported. If you choose a custom endpoint named contos1 you'll get the following url request: https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f20c/console. So correct answers are https://contoso1.cognitiveservices.azure.com/ generateThumbnail
upvoted 9 times
rdemontis
1 year, 4 months ago
sorry i pasted twice the same url in the message before: with the custom endpoint the url of the service is: https://contoso1.cognitiveservices.azure.com/vision/v3.2/generateThumbnail?width=300&height=200&smartCropping=true&model-version=latest
upvoted 1 times
...
...
...
...
...
...
VulcanMXNY
Highly Voted 3 years, 4 months ago
Both answers are incorrect. The correct answers are: https://contoso1.cognitiveservices.azure.com/ AND generateThumbnail westus.dev.cognitive.microsoft.com wouldn't be a correct Computer Vision endpoint if the resource name is contoso1. Also, per the documentation, areaOfInterest "returns a bounding box around the most important area of the image", it doesn't return a different size photo (https://docs.microsoft.com/en-us/rest/api/computervision/3.1/get-area-of-interest).
upvoted 48 times
ppo12
2 years, 7 months ago
I agree with generateThumbnail, however first answer provided by ET should be correct https://westus.api.cognitive.microsoft.com as shown in https://docs.microsoft.com/en-us/rest/api/computervision/3.1/generate-thumbnail/generate-thumbnail?tabs=HTTP#examples
upvoted 10 times
...
MDawson
1 year, 11 months ago
contoso1 is a Computer Vision resource, so you would not specify /vision in the URL. Therefore I think the correct answer must be westus.api.cognitive.microsoft.com
upvoted 3 times
...
I agree with both answers here. The example https://westus.api.cognitive.microsoft.com is just an example and it needs to be changed to use the source in real which is contoso1.
upvoted 1 times
dazdzadzadzaazd
1 year, 7 months ago
Today (july 2023), both regional and resource endpoints are supported. So both are correct : https://contoso1.cognitiveservices.azure.com/ AND https://westus.api.cognitive.microsoft.com Doc : https://learn.microsoft.com/en-us/azure/ai-services/cognitive-services-custom-subdomains#what-if-an-sdk-asks-me-for-the-region-for-a-resource "Regional endpoints and custom subdomain names are both supported and can be used interchangeably." I tested it by creating a custom vision resource and used it with both endpoints.
upvoted 11 times
Ody
11 months, 2 weeks ago
Yes, I think the key thing is that the key is specified.
upvoted 1 times
...
...
...
...
syupwsh
Most Recent 3 days, 21 hours ago
"West US Azure region" --> https://westus.api.cognitive.microsoft.com "smart cropping " --> generateThumbnail https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/concept-generating-thumbnails
upvoted 1 times
...
SAMBIT
8 months, 2 weeks ago
POST https://westus.api.cognitive.microsoft.com/vision/v3.2/generateThumbnail?width=500&height=500&smartCropping=True { "url": "{url}" }
upvoted 3 times
...
hatanaoki
9 months, 1 week ago
1. contoso1 2. gererateThumbnail
upvoted 3 times
...
varinder82
11 months, 1 week ago
Final Answer: 1. https://contoso1.cognitiveservices.azure.com/ 2. generateThumbnail
upvoted 4 times
...
Murtuza
11 months, 3 weeks ago
API URL: The base URL for the Analyze Image 4.0 API is typically: https://<region>.api.cognitive.microsoft.com/vision/v4.0/analyze Replace <region> with the appropriate Azure region (in this case, West US).
upvoted 2 times
...
[Removed]
1 year, 6 months ago
"You need to use contoso1 to make a different size of a product photo by using the smart cropping feature." -> You need to use contoso1 to make.... that is hosted in the west us....
upvoted 1 times
...
zellck
1 year, 8 months ago
1. https://contoso1.cognitiveservices.azure.com 2. generateThumbnail https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/concept-generating-thumbnails A thumbnail is a reduced-size representation of an image. Thumbnails are used to represent images and other data in a more economical, layout-friendly way. The Computer Vision API uses smart cropping to create intuitive image thumbnails that include the most important regions of an image with priority given to any detected faces. The Computer Vision thumbnail generation algorithm works as follows: - Remove distracting elements from the image and identify the area of interest—the area of the image in which the main object(s) appears. - Crop the image based on the identified area of interest. - Change the aspect ratio to fit the target thumbnail dimensions.
upvoted 13 times
...
Pixelmate
1 year, 8 months ago
was on exam 28/06/2023
upvoted 4 times
...
ziggy1117
1 year, 9 months ago
I simulated this in Azure Portal: 1. endpoint is https://contoso1.cognitiveservices.azure.com/ 2. thumbnail
upvoted 3 times
...
Sachz88
1 year, 10 months ago
https://contoso1.cognitiveservices.azure.com/ is correct. Context from ChatGPT: westus.api.cognitive.microsoft.com is also a valid endpoint for the Cognitive Services APIs, including the Computer Vision API. However, it is important to note that this endpoint is deprecated and will be retired on October 31, 2024. Therefore, it is recommended to use the newer endpoint format https://<resource-name>.cognitiveservices.azure.com/ for any new development work. This endpoint format follows a more standard Azure resource URL pattern and is also more flexible in terms of geographic distribution and availability. Hope it helps.
upvoted 5 times
...
NNU
2 years ago
The first is https://contoso1.cognitiveservices.azure.com the second is generateThumbnail POST https://*.cognitiveservices.azure.com/vision/v3.2/generateThumbnail?width=100&height=100&smartCropping=true&model-version=latest HTTP/1.1 Host: *.cognitiveservices.azure.com Content-Type: application/json {"url":"http://example.com/images/test.jpg"}
upvoted 1 times
...
KingChuang
2 years, 1 month ago
on my exam (2023-01-16 Passed) My Answer: https://westus.api.cognitive.microsoft.com But I think this is wrong.Because Question request use contoso1! So correct answer is : https://contoso1.cognitiveservices.azure.com/
upvoted 3 times
ap1234pa
2 years, 1 month ago
Hello.. I have exam tomorrow. Can you suggest if ET questions were on exam?
upvoted 1 times
...
...
Eltooth
2 years, 7 months ago
Westus generateThumbnail https://docs.microsoft.com/en-gb/azure/cognitive-services/computer-vision/how-to/generate-thumbnail#call-the-generate-thumbnail-api curl -H "Ocp-Apim-Subscription-Key: <subscriptionKey>" -o <thumbnailFile> -H "Content-Type: application/json" "https://westus.api.cognitive.microsoft.com/vision/v3.2/generateThumbnail?width=100&height=100&smartCropping=true" -d "{\"url\":\"https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Shorkie_Poo_Puppy.jpg/1280px-Shorkie_Poo_Puppy.jpg\"}"
upvoted 4 times
...
RamonKaus
2 years, 7 months ago
First one is contoso.cognitive services. Just checked my own script and cognitiive services uses ur rg name in the endpoint URI.
upvoted 1 times
RamonKaus
2 years, 7 months ago
Second one is obv. generateThumbnail
upvoted 1 times
...
...
JDarshan
2 years, 7 months ago
For first dropdown, 3rd option works with cognitive service key and computer vision key as well. whereas 2nd option works with only computer vision key. so answer 3rd works in both situation. therefor i'll go with https://westus.api.cognitive.microsoft.com/vision/v3.1/generateThumbnail?width=500&height=500&smartCropping=True
upvoted 1 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