Facial Recognition provides the ability to recognise faces from your video feeds. You upload and tag photos of the faces you want to recognise and Agent will use an AI server to recognise people, take photos and perform actions.

To get started, install DeepStack AI or senseAI for your platform. If using DeepStack, Make sure it's running in Facial Recognition mode. To do that via the command line pass in "-e VISION-FACE=True".

When you have an AI Server up and running, switch back to Agent DVR and go to Server Settings - AI Settings:

Click to configure an AI server (Agent supports multiple AI servers) and add the URL of your DeepStack/ SenseAI server. Then edit a camera and go to the Facial Recognition tab:

Configure Facial Recognition

  • Enabled: Switch Facial Recognition on or off. You can also do this via the Schedule
  • Mode: Choose between Motion, Alert, Interval or None. Motion and alert only process when something is happening. Interval will constantly send frames to the AI server. Use None if you only want to process using the API.
  • Minimum Interval: How often to process frames when triggered.
  • Confidence: Minimum confidence of result. Anything below this value will be discarded (0-100)
  • Photos: Check this to take a photo. These photos will be saved to Photos in Agent DVR.
  • Label: Check this to label the photo with results.
  • Edit Faces: Click this to register new faces and delete registered faces (see below)

Editing Faces

Editing Faces

Click Add to register a new face. The face must be clearly visible in the Camera (Camera must be enabled). You can add multiple photos of the same face to improve results - just use the same name for each capture.

The AI server stores the faces in a database so you can add photos in one camera and other cameras will also have access to them.

Example Result
Example Face Recognition Result
Adding Face Recognition Actions

When Facial Recognition runs Agent will generate events for "Face Recognized" under Actions.

You can use these events to trigger actions such as calling a URL with the recognized face or running an executable or publishing a message to an MQTT server. You can use the tags {AI} for the face name (if more than one they will be in a CSV list) or {AIJSON} for the full response JSON object.


Facial Recognition Troubleshooting

  • If you are getting errors (code 500 server errors) from DeepStack on Windows you may need to install https://aka.ms/vs/16/release/vc_redist.x64.exe
  • Check that DeepStack is running in FACE RECOGNITION mode ( VISION-FACE=True on the command line).
  • Try adjusting the Confidence level down in Agent as results may be being filtered
  • Check the logs at /logs.html for error messages from the AI server. Possibly the service is running on a different port or a firewall or antivirus is blocking access to it. If Agent can't contact it will record the event.
  • Check that the AI server isn't overloading your computer. If the AI server can't process the images quickly then it will time-out and Agent DVR will give up waiting for a result. If the AI server is timing out you will see errors in the logs. You may need to move the service to another computer with more resources or a compatible GPU.