.
This commit is contained in:
112
config.yaml
112
config.yaml
@@ -4,40 +4,104 @@ model:
|
||||
conf_threshold: 0.5
|
||||
device: "cuda" # cuda, cpu
|
||||
|
||||
# 大模型配置
|
||||
llm:
|
||||
api_key: "sk-21e61bef09074682b589da3bdbfe07a2" # 请替换为实际的API密钥(阿里云DashScope API Key)
|
||||
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1/"
|
||||
model_name: "qwen3-vl-flash" # 模型名称,可选:qwen-vl-max, qwen-vl-plus, qwen3-vl-flash等
|
||||
|
||||
common:
|
||||
working_hours: [9, 17] # 工作时间:9:00 ~ 17:00(24小时制)
|
||||
process_every_n_frames: 3 # 每3帧处理1帧
|
||||
# 工作时间段:支持多个时间段,格式为 [开始小时, 开始分钟, 结束小时, 结束分钟]
|
||||
# 8:30-11:00, 12:00-17:30
|
||||
working_hours:
|
||||
- [8, 30, 11, 0] # 8:30-11:00
|
||||
- [12, 0, 17, 30] # 12:00-17:30
|
||||
process_every_n_frames: 3 # 每3帧处理1帧(用于人员离岗)
|
||||
alert_cooldown_sec: 300 # 离岗告警冷却(秒)
|
||||
crowd_cooldown_sec: 180 # 聚集告警冷却(秒)
|
||||
entry_grace_period_sec: 1.0 # 入岗保护期(防漏检)
|
||||
off_duty_alert_threshold_sec: 360 # 离岗超过6分钟(360秒)触发告警
|
||||
|
||||
cameras:
|
||||
- id: "cam_01"
|
||||
rtsp_url: "rtsp://admin:admin@172.16.8.19:554/cam/realmonitor?channel=16&subtype=1"
|
||||
roi_points: [[380, 50], [530, 100], [550, 550], [140, 420]] # 离岗检测区域
|
||||
crowd_roi_points: [[220, 50], [380, 60], [180, 525], [0, 500]] # 聚集检测区域
|
||||
off_duty_threshold_sec: 300 # 离岗超时告警(秒)
|
||||
on_duty_confirm_sec: 5 # 上岗确认时间(秒)
|
||||
process_every_n_frames: 5
|
||||
off_duty_confirm_sec: 30 # 离岗确认时间(秒)
|
||||
crowd_threshold: 5 # 聚集人数阈值(最低触发)
|
||||
|
||||
rois:
|
||||
- name: "离岗检测区域"
|
||||
points: [[380, 50], [530, 100], [550, 550], [140, 420]]
|
||||
algorithms:
|
||||
- name: "人员离岗"
|
||||
enabled: true
|
||||
off_duty_threshold_sec: 300 # 离岗超时告警(秒)
|
||||
on_duty_confirm_sec: 5 # 上岗确认时间(秒)
|
||||
off_duty_confirm_sec: 30 # 离岗确认时间(秒)
|
||||
- name: "周界入侵"
|
||||
enabled: false
|
||||
# - name: "周界入侵区域1"
|
||||
# points: [[100, 100], [200, 100], [200, 300], [100, 300]]
|
||||
# algorithms:
|
||||
# - name: "人员离岗"
|
||||
# enabled: false
|
||||
# - name: "周界入侵"
|
||||
# enabled: false
|
||||
|
||||
- id: "cam_02"
|
||||
rtsp_url: "rtsp://admin:admin@172.16.8.13:554/cam/realmonitor?channel=7&subtype=1"
|
||||
roi_points: [ [ 380, 50 ], [ 530, 100 ], [ 550, 550 ], [ 140, 420 ] ] # 离岗检测区域
|
||||
crowd_roi_points: [ [ 220, 50 ], [ 380, 60 ], [ 180, 525 ], [ 0, 500 ] ] # 聚集检测区域
|
||||
off_duty_threshold_sec: 600
|
||||
on_duty_confirm_sec: 10
|
||||
off_duty_confirm_sec: 20
|
||||
crowd_threshold: 3
|
||||
|
||||
rois:
|
||||
- name: "离岗检测区域"
|
||||
points: [[380, 50], [530, 100], [550, 550], [140, 420]]
|
||||
algorithms:
|
||||
- name: "人员离岗"
|
||||
enabled: true
|
||||
off_duty_threshold_sec: 600
|
||||
on_duty_confirm_sec: 10
|
||||
off_duty_confirm_sec: 20
|
||||
- name: "周界入侵"
|
||||
enabled: false
|
||||
|
||||
- id: "cam_03"
|
||||
rtsp_url: "rtsp://admin:admin@172.16.8.26:554/cam/realmonitor?channel=3&subtype=1"
|
||||
roi_points: [ [ 380, 50 ], [ 530, 100 ], [ 550, 550 ], [ 140, 420 ] ] # 离岗检测区域
|
||||
crowd_roi_points: [ [ 220, 50 ], [ 380, 60 ], [ 180, 525 ], [ 0, 500 ] ] # 聚集检测区域
|
||||
off_duty_threshold_sec: 600
|
||||
on_duty_confirm_sec: 10
|
||||
off_duty_confirm_sec: 20
|
||||
crowd_threshold: 3
|
||||
rois:
|
||||
- name: "离岗检测区域"
|
||||
points: [[380, 50], [530, 100], [550, 550], [140, 420]]
|
||||
algorithms:
|
||||
- name: "人员离岗"
|
||||
enabled: true
|
||||
off_duty_threshold_sec: 600
|
||||
on_duty_confirm_sec: 10
|
||||
off_duty_confirm_sec: 20
|
||||
- name: "周界入侵"
|
||||
enabled: false
|
||||
|
||||
- id: "cam_04"
|
||||
rtsp_url: "rtsp://admin:admin@172.16.8.20:554/cam/realmonitor?channel=14&subtype=1"
|
||||
process_every_n_frames: 5
|
||||
rois:
|
||||
- name: "离岗检测区域"
|
||||
# points: [ [ 380, 50 ], [ 530, 100 ], [ 550, 550 ], [ 140, 420 ] ]
|
||||
algorithms:
|
||||
- name: "人员离岗"
|
||||
enabled: false
|
||||
- name: "周界入侵"
|
||||
enabled: true
|
||||
- id: "cam_05"
|
||||
rtsp_url: "rtsp://admin:admin@172.16.8.31:554/cam/realmonitor?channel=15&subtype=1"
|
||||
process_every_n_frames: 5
|
||||
rois:
|
||||
- name: "离岗检测区域"
|
||||
# points: [ [ 380, 50 ], [ 530, 100 ], [ 550, 550 ], [ 140, 420 ] ]
|
||||
algorithms:
|
||||
- name: "人员离岗"
|
||||
enabled: false # 离岗确认时间(秒)
|
||||
- name: "周界入侵"
|
||||
enabled: true
|
||||
|
||||
- id: "cam_06"
|
||||
rtsp_url: "rtsp://admin:admin@172.16.8.35:554/cam/realmonitor?channel=13&subtype=1"
|
||||
process_every_n_frames: 5
|
||||
rois:
|
||||
- name: "离岗检测区域"
|
||||
points: [ [ 150, 100 ], [ 600, 100 ], [ 600, 500 ], [ 150, 500 ] ]
|
||||
algorithms:
|
||||
- name: "人员离岗"
|
||||
enabled: false
|
||||
- name: "周界入侵"
|
||||
enabled: true
|
||||
969
monitor.py
969
monitor.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user