roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.77k stars 180 forks source link

codeproject.ai face_recognition no entity #732

Open dsenecic opened 7 months ago

dsenecic commented 7 months ago

Trying to setup face recognition via codeproject.ai, but there is no face_recognition entity in viseron. So there is also no sensor.face_recognition mqtt topic. Codeproject receives client requests from viseron for face_recognition. With plate_recognition all is OK.

Start by adding some cameras

ffmpeg: camera: camera_1: # This value has to be unique across all cameras name: Garaza host: 10.x.x.x port: 554 path: /user=admin_password=_channel=1_stream=0.sdp?real_stream username: admin password:

mqtt: broker: 10.x.x.x username: password:

You can also use motion detection

mog2: motion_detector: cameras: camera_1: # Attach detector to the configured camera_1 above fps: 1 threshold: 20

Then add an object detector

darknet: object_detector: cameras: camera_1: # Attach detector to the configured camera_1 above fps: 1 scan_on_motion_only: false # Scan for objects even when there is no motion labels:

codeprojectai: host: 10x.x.x port: 32168 object_detector: cameras: camera_1: fps: 1 log_all_objects: true labels:

To tie everything together we need to configure one more component.

nvr: camera_1: # Run NVR for camera_1

camera_2: # Run NVR for camera_2

Now you can restart Viseron and you should be good to go!

roflcoopter commented 7 months ago

You need to train it on some faces for it to work (which i realize now might not be super intuitive)

To do that you can read this chapter in the docs: https://viseron.netlify.app/components-explorer/components/codeprojectai#train