Recognize a face from an uploaded image
POSThttps://demo.frigate.video/api/faces/recognize
Recognizes a face from an uploaded image file by comparing it against registered faces in the system. Returns the recognized face name and confidence score, or an error if face recognition is not enabled or the image cannot be processed.
Request​
- multipart/form-data
Bodyrequired
filestring<binary>required
Responses​
- 200
- 422
Successful Response
- application/json
- Schema
- Example (auto)
Schema
successSuccess (boolean)required
Whether the face recognition was successful
score object
face_name object
{
"success": true,
"score": 0,
"face_name": "string"
}
Validation Error
- application/json
- Schema
- Example (auto)
Schema
detail object[]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
- python
- nodejs
- javascript
- curl
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
conn = http.client.HTTPSConnection("demo.frigate.video")
payload = ''
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
conn.request("POST", "/api/faces/recognize", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear