How do add a new person record with face even if its similar to another
SAFR API to add a person with face image is POST /people. By design, this API will match an existing person before adding a new person. To force SAFR to add a new person record, use the X-RPC-GROUPING-THRESHOLD API header with value of 0 as described below.
Use the following with the post /people API
- API Parameters
- insert=true
- update=false
- Headers
- X-RPC-FACES-GROUPING-THRESHOLD=0
Value of 0 forces SAFR to assume face does not match any other record.
Example:
curl -k -X POST curl ""https://127.0.0.1:8081/people?insert=true&update=false"" -H ""accept: application/json;charset=UTF-8"" -H ""X-RPC-DIRECTORY: main"" -H ""X-RPC-FACES-GROUPING-THRESHOLD: 0"" -H ""X-RPC-AUTHORIZATION: $USER:$PASS"" -H ""Content-Type: image/jpeg"" --data-binary @new_face.jpg
You may also need to set min-cpq, min-fcq, min-fsq and occlusion parameters to prevent image from being rejected due to quality, though it is recommended to maintain minimum quality of face images added to SAFR to avoid increasing false match rate.
Tip:
SAFR supports a property ""externalId"" on a person record. You may set this at the time you create a record. Generally this would be set to the unique id that your system uses to identify a person. The GET /people/external/
For more information, please refer to the SAFR REST APIs at https://covi.real.com/docs/index.html