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.51k
stars
155
forks
source link
How to make two AI detection models work under one camera. #703
ffmpeg:
camera:
thoughtallroomtest1: # This value has to be unique across all cameras
name: thoughtallroomtest1
host: xxxxxxxx #
port: xxxxxxx #
path: xxxxxxx #.live.flv #
username: #
password: #
stream_format: rtsp
protocol: rtsp
To tie everything together we need to configure one more component.
nvr:
thoughtallroomtest1:
fireserver:
host: xxx
port: xxx
model_name: ppdet
model_version: "1"
label_path: "viseron/components/fireserver/labels"
object_detector:
cameras:
thoughtallroomtest1: # Attach detector to the configured camera_1 above
fps: 1
scan_on_motion_only: true # Scan for objects even when there is no motion
labels:
label: fire
confidence: 0.50
trigger_recorder: false
fastdeployserver:
host: xxx
port: xxx
model_name: ppdet
model_version: "1"
label_path: "viseron/components/fastdeployserver/labels"
object_detector:
cameras:
thoughtallroomtest1: # Attach detector to the configured camera_1 above
fps: 1
scan_on_motion_only: true # Scan for objects even when there is no motion
labels:
label: person
confidence: 0.50
trigger_recorder: false
################################
I set up two AI detection models under one camera, but only one of them was effective.
However if I copy the camera in FFmpeg, just change its name, and then use two AI detection models for two cameras with only different names. They will take effect.
The effect is as follows.
![Uploading 微信图片_20240115105706.png…]()
What if I want multiple AI models to work under one camera?
Here is my configuration file.
mqtt: broker: xxxx port: xxxx username: xxx password: xxx client_id: xxx
ffmpeg: camera: thoughtallroomtest1: # This value has to be unique across all cameras name: thoughtallroomtest1 host: xxxxxxxx #
port: xxxxxxx #
path: xxxxxxx #.live.flv #
username: #
password: #
stream_format: rtsp
protocol: rtsp
codec: h264_cuvid
You can also use motion detection
mog2: motion_detector: cameras: thoughtallroomtest1: fps: 1
To tie everything together we need to configure one more component.
nvr: thoughtallroomtest1:
fireserver: host: xxx port: xxx model_name: ppdet model_version: "1" label_path: "viseron/components/fireserver/labels" object_detector: cameras: thoughtallroomtest1: # Attach detector to the configured camera_1 above fps: 1 scan_on_motion_only: true # Scan for objects even when there is no motion labels:
fastdeployserver: host: xxx port: xxx model_name: ppdet model_version: "1" label_path: "viseron/components/fastdeployserver/labels" object_detector: cameras: thoughtallroomtest1: # Attach detector to the configured camera_1 above fps: 1 scan_on_motion_only: true # Scan for objects even when there is no motion labels: