Exam AI-102 All QuestionsBrowse all questions from this 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:

    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
halfway

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

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

thanks for posting the documentation

takaimomoGcup

Yes Yes No

rafael0

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

taiwan_is_not_china

The correct sequence is Yes Yes No.

nanaw770

This is the same question as Topic2 #29.

takaimomoGcup

Yes Yes No

michaelmorar

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.

varinder82

Final Answer: Yes Yes No

RAN_L

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.

VinnieG

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

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

TJ001

hope it is a typo. explanation is spot on

EngT

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

EngT

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

[Removed]

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!

oliverio

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

Anulf

yes yes yes

Davard

What makes the third one "yes"?

Anulf

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

GigaCaster

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

AzureJobsTillRetire

I think that is a typo