Skip to main content

Classify and save a face training image

POST 

https://demo.frigate.video/api/faces/train/:name/classify

Adds a training image to a specific face name for face recognition. Accepts either a training file from the train directory or an event_id to extract the face from. The image is saved to the face's directory and the face classifier is cleared to incorporate the new training data. Returns a success message with the new filename or an error if face recognition is not enabled, the file/event is invalid, or the face cannot be extracted.

Request​

Path Parameters

    name Namerequired

Body

    objectobject

Responses​

Successful Response

Schema
    successSuccess (boolean)required
    messageMessage (string)required
import http.client
import json

conn = http.client.HTTPSConnection("demo.frigate.video")
payload = json.dumps({})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
conn.request("POST", "/api/faces/train/:name/classify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://demo.frigate.video/api
Parameters
— pathrequired
Body
{}
ResponseClear

Click the Send API Request button above and see the response here!