Java source codes in GitHub: testAzureFaceRecognitionAPI
If you ark looking for a demo, please click here.
Personally, compared with Speaker Recognition API, Face Recognition API is easier to use.
Steps
- Create person group
- Create person
- Add face
- Train person group
- Detect face(s)
- Identify face(s)
Create Person Group
A container of persons. "personGroupId" should be specified by ourselves.
Create person
A person must belong to a person group. Use the above "personGroupId" to create a person and "personId" should be returned.
Add face
Add a face to a person. Both "personGroupId" and "personId" are required.
Train person group
Only a trained person group can be used to identify.
Detect face(s)
We can specify image url so that Microsoft can get data or embed image data directly in the request body. Generally, "faceId" should be returned.
Identify face(s)
1-to-many identification to find the closest matches of the specific query person face from a specified person group. Both "personGroupId" and "faceId" are required.