viseron
viseron copied to clipboard
codeproject.ai face_recognition no entity
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: - label: person confidence: 0.7 trigger_recorder: false - label: car confidence: 0.6 trigger_recorder: false zones: - name: garaza coordinates: - x: 500 y: 1992 - x: 365 y: 596 - x: 1002 y: 599 - x: 1201 y: 1931 labels: - label: person confidence: 0.7 trigger_recorder: true - name: prolaz1 coordinates: - x: 1027 y: 716 - x: 1194 y: 1831 - x: 2589 y: 1767 - x: 1540 y: 711 labels: - label: car confidence: 0.6 trigger_recorder: true require_motion: true
codeprojectai: host: 10x.x.x port: 32168 object_detector: cameras: camera_1: fps: 1 log_all_objects: true labels: - label: car confidence: 0.6 trigger_recorder: true - label: motorbike confidence: 0.6 trigger_recorder: true - label: person confidence: 0.7 trigger_recorder: true
zones:
- name: garaza
coordinates:
- x: 500
y: 1992
- x: 365
y: 596
- x: 1002
y: 599
- x: 1201
y: 1931
labels:
- label: person
confidence: 0.6
trigger_recorder: true
- name: prolaz
coordinates:
- x: 1027
y: 716
- x: 1194
y: 1831
- x: 2589
y: 1767
- x: 1540
y: 711
labels:
- label: car
confidence: 0.6
trigger_recorder: true
require_motion: true
- label: motorbike
confidence: 0.6
trigger_recorder: true
require_motion: true
face_recognition: save_unknown_faces: true cameras: camera_1: labels: - person
license_plate_recognition: cameras: camera_1: labels: - car - motorbike
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!
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