Skip to main content

CompreFace

CompreFace

Exadel CompreFace is a free and open-source face recognition service.

It provides capabilities for:

  • Face recognition
  • Face verification
  • Face detection
  • Landmark detection
  • Mask detection
  • Head pose detection
  • Age
  • Gender recognition

See the getting started guide to learn how to use CompreFace.

Configuration

Configuration example
compreface:
face_recognition:
host: compreface
port: 8000
recognition_api_key: !secret compreface_api_key
train: true
face_plugins: age,gender
cameras:
camera_one:
labels:
- person
comprefacemap required
CompreFace configuration.

Face recognition

Face recognition runs as a post processor when a specific object is detected.

Labels

Labels are used to tell Viseron when to run a post processor.

Any label configured under the object_detector for your camera can be added to the post processors labels section.

note

Only objects that are tracked by an object_detector can be sent to a post_processor. The object also has to pass all of its filters (confidence, height, width etc).

Train

On startup images are read from face_recognition_path and a model is trained to recognize these faces.
The folder structure of the faces folder is very strict. Here is an example of the default one:

/config
|── face_recognition
| └── faces
| ├── person1
| | ├── image_of_person1_1.jpg
| | ├── image_of_person1_2.png
| | └── image_of_person1_3.jpg
| └── person2
| | ├── image_of_person2_1.jpeg
| | └── image_of_person2_2.jpg
danger

You need to follow this folder structure, otherwise training will not be possible.

Troubleshooting

To enable debug logging for compreface, add the following to your config.yaml
/config/config.yaml
logger:
logs:
viseron.components.compreface: debug