Master Azure AI-102 with Practice Questions

Master Azure AI-102 with Practice Questions

Table of Contents

  1. Introduction
  2. Exam Topics
    • Azure AI102 Exam
  3. Question 1: Verifying Results in Computer Vision API
    • Introduction to the question
    • Explanation of the code segment
    • Analysis of each statement
  4. Question 2: Adding Images to Person Group in Face API
    • Introduction to the question
    • Explanation of the code segment
    • Selecting the correct option
  5. Question 3: Functionality of Computer Vision Client Library
    • Introduction to the question
    • Explanation of the code segment
    • Analysis of each statement
  6. Question 4: Optical Character Recovery using Computer Vision Client Library
    • Introduction to the question
    • Explanation of the code segment
    • Identifying the issue and finding the solution
  7. Question 5: Utilizing Smart Cropping Feature in Computer Vision API
    • Introduction to the question
    • Explanation of the desired outcome
    • Selecting the correct API endpoint and function

Verifying Results in Computer Vision API

In this question, We Are tasked with developing a test method to verify the result retrieved from a call to the Computer Vision API. The purpose of the API is to analyze images and determine the existence of company logos. The code given includes a loop that iterates over the detected brands and checks the confidence level. We need to evaluate three statements and determine whether they are true or false Based on the provided code.

  1. The code will return the name of each detected brand with a confidence equal to or greater than 75 percent. The code segment clearly states that if the confidence is greater than or equal to 75, it will write the brand name. Therefore, this statement is true.

  2. The code will return coordinates for the top-left corner of the rectangle that contains the brand logo. Looking at the code, we can see that it extracts the x and y coordinates from brand.rectangle, which represents the top-left corner of the rectangle. Hence, this statement is also true.

  3. The code will return coordinates for the bottom-right corner. However, there is no code or reference to the bottom-right corner in the given segment. The code only deals with the top-left corner and the brand name. Therefore, this statement is false.

Based on the analysis, the correct answers are yes, yes, and no. The community agrees with this assessment.

Adding Images to Person Group in Face API

In this question, we are developing an application that uses the Face API. Our goal is to add multiple images to a person group. We are provided with a code segment and need to determine how to complete it correctly.

The code segment contains a directory path where the images are located. We need to choose the appropriate option to complete the code.

We should use the stream function because we want to add multiple images from a directory path. The stream function can Read each image from the specified path. Therefore, the correct option is to use the stream method.

The function we should use in conjunction with the stream method is add face from stream async. This function allows us to add faces or images from the stream asynchronously.

According to the provided solution and discussion in the community, the correct answer is to use the stream function and add face from stream async method.

Functionality of Computer Vision Client Library

This question focuses on the functionality of the Computer Vision Client Library in an application. We are given a code segment and need to evaluate three statements based on it.

  1. The code will recognize face recognition. However, looking at the code, we can see that it is only analyzing the image and retrieving Captions. It does not perform any face recognition. Therefore, this statement is false.

  2. The code will list tags and their associated confidence. This statement is true because the code segment includes console.log(caption.text) and caption.confidence, which output the tags and their associated confidence levels.

  3. The code will read a file from the local file system. The code segment contains const stream = fs.createReadStream(localImagePath), which reads the file locally. Therefore, this statement is true.

Based on the analysis, the correct answers are no, yes, and yes. While the community opinion varies, most individuals agree with these answers.

Optical Character Recovery using Computer Vision Client Library

In this question, we are developing a method that uses the Computer Vision Client Library to perform optical character recovery (OCR). The code provided has a flaw where the call to the getReadResultAsync method occurs before the read operation is complete. We need to determine how to fix this issue.

Ideally, we need to ensure that the read operation completes before calling the getReadResultAsync method. To prevent the premature calling of getReadResultAsync, there are a few potential solutions:

  1. Remove the ocrclient.startReadOp operation ID parameter: This option does not address the issue. It is unrelated to the problem and does not fix the premature calling of getReadResultAsync.

  2. Add code to verify the result.status.value: This option suggests adding code to verify the status value of the result. This can help ensure that the read operation is complete before moving forward. Therefore, this is a potential solution.

  3. Write code to wrap the call to getReadResultAsync within a loop that contains a delay: This option involves adding the getReadResultAsync method within a loop to delay its execution until the read operation is complete. This ensures that the read operation finishes before proceeding with the getReadResultAsync method. This solution is also valid.

Based on the analysis, the correct answers are to add code to verify the result.status.value and to wrap the call to getReadResultAsync within a loop that contains a delay.

Most of the community agrees with these solutions, and the reference link provided supports this answer as well.

Utilizing Smart Cropping Feature in Computer Vision API

The last question involves using the Computer Vision API to crop different-sized product photos using the smart cropping feature. We are also provided with a code segment that needs to be completed with the correct API URL and function.

Since the given computer vision resource named "contoso one" is hosted on the West US Azure region, we need to use an API URL that corresponds to this region. The correct API URL, in this case, is "westus.api.cognitive.microsoft.com".

To utilize the smart cropping feature, we need to use the "generate thumbnail" function. This function will ensure that the cropped image retains the main part of the original image.

Based on the provided solution and Consensus in the community, the correct API URL is "westus.api.cognitive.microsoft.com" and the function to use is "generate thumbnail".

Most people like

Find AI tools in Toolify

Join TOOLIFY to find the ai tools

Get started

Sign Up
App rating
4.9
AI Tools
20k+
Trusted Users
5000+
No complicated
No difficulty
Free forever
Browse More Content