exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 2 question 15 discussion

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

HOTSPOT -
You develop an application that uses the Face API.
You need to add multiple images to a person group.
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:

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
leo822
Highly Voted 3 years, 4 months ago
AddFaceFromStreamAsync. Step 5 on https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/how-to-add-faces
upvoted 70 times
rdemontis
12 months ago
thanks for the provided document. Clearly wrong the second answer. It should be AddFaceFromStreamAsync
upvoted 3 times
...
...
azurelearner666
Highly Voted 3 years, 4 months ago
Wrong! A - Stream (this is correct) B - AddFaceFromStreamAsync (literally the same code from Step 5 at https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/how-to-add-faces)
upvoted 53 times
...
NagaoShingo
Most Recent 4 months, 3 weeks ago
1. Stream 2. AddFaceFromStreamAsync
upvoted 5 times
...
hatanaoki
5 months ago
1. Stream 2. AddFaceFromStreamAsync
upvoted 1 times
...
nanaw770
5 months, 1 week ago
1. Stream 2. AddFaceFromStreamAsync
upvoted 1 times
...
nanaw770
5 months, 1 week ago
Stream and CreateAsync
upvoted 1 times
...
varinder82
7 months, 1 week ago
Final Answer: A - Stream (this is correct) B - AddFaceFromStreamAsync
upvoted 2 times
...
chenglim
1 year ago
1. Stream 2. AddFaceFromStreamAsync https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/add-faces#step-5-add-faces-to-the-persons
upvoted 2 times
...
zellck
1 year, 4 months ago
1. Stream 2. AddFaceFromStreamAsync https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/add-faces#step-5-add-faces-to-the-persons
upvoted 5 times
...
examworld
1 year, 5 months ago
Stream AddFaceFromStreamAsync
upvoted 1 times
...
Mike19D
1 year, 6 months ago
Stream AddFaceFromStreamAsync
upvoted 1 times
...
ninjia
2 years, 2 months ago
Box 1: Stream Box 2: AddFaceFromStreamAsync File.OpenRead() returns a Stream object. using (Stream stream = File.OpenRead(imagePath)) { await faceClient.PersonGroupPerson.AddFaceFromStreamAsync(personGroupId, personId, stream); } ref: https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/add-faces#step-5-add-faces-to-the-persons
upvoted 3 times
...
Eltooth
2 years, 3 months ago
Stream and AddFaceFromStreamAsync are correct answers. https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/add-faces#step-5-add-faces-to-the-persons
upvoted 3 times
...
Deepusuraj
2 years, 8 months ago
Parallel.For(0, PersonCount, async i => { Guid personId = persons[i].PersonId; string personImageDir = @"/path/to/person/i/images"; foreach (string imagePath in Directory.GetFiles(personImageDir, "*.jpg")) { await WaitCallLimitPerSecondAsync(); using (Stream stream = File.OpenRead(imagePath)) { await faceClient.PersonGroupPerson.AddFaceFromStreamAsync(personGroupId, personId, stream); } } });
upvoted 2 times
...
sumanshu
2 years, 10 months ago
Stream and AddFaceFromStreamAsync
upvoted 3 times
...
Happiness20
3 years, 1 month ago
Parallel.For(0, PersonCount, async i => { Guid personId = persons[i].PersonId; string personImageDir = @"/path/to/person/i/images"; foreach (string imagePath in Directory.GetFiles(personImageDir, "*.jpg")) { await WaitCallLimitPerSecondAsync(); using (Stream stream = File.OpenRead(imagePath)) { await faceClient.PersonGroupPerson.AddFaceFromStreamAsync(personGroupId, personId, stream); } } }); https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/how-to-add-faces
upvoted 3 times
...
Happiness20
3 years, 1 month ago
Parallel.For(0, PersonCount, async i => { Guid personId = persons[i].PersonId; string personImageDir = @"/path/to/person/i/images"; foreach (string imagePath in Directory.GetFiles(personImageDir, "*.jpg")) { await WaitCallLimitPerSecondAsync(); using (Stream stream = File.OpenRead(imagePath)) { await faceClient.PersonGroupPerson.AddFaceFromStreamAsync(personGroupId, personId, stream); } } }); https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/how-to-add-faces
upvoted 2 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