AI-102 Exam QuestionsBrowse all questions from this exam

AI-102 Exam - Question 83


HOTSPOT -

You develop a test method to verify the results retrieved from a call to the Computer Vision API. The call is used to analyze the existence of company logos in images. The call returns a collection of brands named brands.

You have the following code segment.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Hot Area:

Show Answer
Correct Answer:

Box 1: Yes -

Box 2: Yes -

Coordinates of a rectangle in the API refer to the top left corner.

Box 3: No -

Reference:

https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/concept-brand-detection

Discussion

15 comments
Sign in to comment
halfway
Nov 13, 2022

Maybe I take it too literally, but I think the third one is "NO": the response returns Width and Height, which can be used to calculate the coordinates of bottom right corner, but it does not include them directly.

M25
Aug 31, 2023

Y, Y, N https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/shelf-analyze#bounding-box-api-model x Left-coordinate of the top left point of the area, in pixels. y Top-coordinate of the top left point of the area, in pixels. w Width measured from the top-left point of the area, in pixels. h Height measured from the top-left point of the area, in pixels.

rdemontis
Nov 4, 2023

thanks for posting the documentation

rafael0
Dec 13, 2022

its' yes yes no The coordinates are always regarding the top left point of the rectangle

takaimomoGcup
May 20, 2024

Yes Yes No

VinnieG
Jan 9, 2023

it could be a trap : so yes, no (it is rectangle.x and not _x) , no (should be x + w as the service returns the width and top left corner : Console.WriteLine("Brands:"); foreach (var brand in results.Brands) { Console.WriteLine($"Logo of {brand.Name} with confidence {brand.Confidence} at location {brand.Rectangle.X}, " + $"{brand.Rectangle.X + brand.Rectangle.W}, {brand.Rectangle.Y}, {brand.Rectangle.Y + brand.Rectangle.H}"); } Console.WriteLine(); https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/call-analyze-image?tabs=csharp

rober13
Mar 1, 2024

it is true, it is a trick. Yes,No,No

TJ001
May 20, 2024

hope it is a typo. explanation is spot on

RAN_L
Mar 15, 2023

The code will return the name of each detected brand with a confidence equal to or higher than 75 percent. Yes, the code will return the name of each detected brand with a confidence equal to or higher than 75 percent. 2. The code will return coordinates for the top-left corner of the rectangle that contains the brand logo of the displayed brands. Yes, the code will return the coordinates for the top-left corner of the rectangle that contains the brand logo of the displayed brands. 3. The code will return coordinates for the bottom-right corner of the rectangle that contains the brand logo of the displayed brands. No, the code will not return coordinates for the bottom-right corner of the rectangle that contains the brand logo of the displayed brands. The code is printing the width and height of the rectangle instead.

varinder82
Mar 25, 2024

Final Answer: Yes Yes No

michaelmorar
Apr 30, 2024

The brand_confidence variable is not declared in the snippet. Perhaps they meant brand.confidence? Same with rectangle_x . As it stands, the answers should be N,N,N.

takaimomoGcup
May 20, 2024

Yes Yes No

nanaw770
May 25, 2024

This is the same question as Topic2 #29.

taiwan_is_not_china
May 28, 2024

The correct sequence is Yes Yes No.

Anulf
Oct 4, 2022

yes yes yes

Davard
Oct 5, 2022

What makes the third one "yes"?

Anulf
Oct 8, 2022

According to the microsoft Documetn, Ithought so. What makes yu think it is No ?

GigaCaster
Oct 27, 2022

if you look at the code it is _x and not .x

AzureJobsTillRetire
Feb 12, 2023

I think that is a typo

oliverio
Oct 13, 2022

Y Y Y the code will return the coordinates for any position

[Removed]
Apr 13, 2024

The Python syntax for working with Python dictionaries is wrong. Remember we are calling the API which returns a JSON object. brand.rectangle_x - WRONG - it should be brand.rectangle.x brand_confidence - WRONG - should be brand.confidence So the answer should be N for all!

EngT
Jul 21, 2024

I cant see anythig related to corner position in the api. Then its Y, Y, Y

EngT
Jul 21, 2024

Nop , based on documentation its top left - so its Y Y N