robot_face_rec/config.yaml

91 lines
2.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 人脸识别系统配置文件
# CompreFace API配置
compreface:
# host: "http://192.168.30.195"
host: "http://10.0.0.202"
# port: "9900"
port: "8000"
# api_key: "your_api_key_here"
# recognition_api_key: "9115667c-4968-400f-9006-7b2646fba8df"
recognition_api_key: "a5924457-62c9-47dc-a6e7-15462c502d2c"
# detection_api_key: "08f31eab-de28-4c00-aea5-eb69f2619783"
detection_api_key: "070283a2-faa3-423b-9772-2cd48ecc5362"
# WebSocket配置
websocket:
url: "ws://127.0.0.1:3344"
status_interval: 0.2 # 状态查询间隔(秒)
reconnect_delay: 5 # 重连延迟(秒)
# 二维码设置
qrcode:
image_path: "preview_qrcode_sota.png" # 二维码图片路径
display_duration: 30 # 显示持续时间(秒)
video:
path: "exhibition.mp4" # 视频文件路径
loop: true # 是否循环播放
# 摄像头配置
camera:
# device_id: "/dev/v4l/by-id/usb-SYX-230524-J_HD_Camera-video-index0" # 摄像头设备ID, id是动态变化的 ls /dev/v4l/by-id/ 查看系统创建的链接
device_id: 0 # 摄像头设备ID, id是动态变化的 ls /dev/v4l/by-id/ 查看系统创建的链接
width: 1280
height: 720
fps: 30
retry_interval: 2 # 打开摄像头失败后的重试间隔(秒)
max_failures: 5 # 触发重新初始化的失败次数阈值
# 人脸检测配置
face_detection:
frame_interval: 10 # 检测帧间隔(每N帧检测一次)
quality_threshold: 10 # 图像质量阈值(Laplacian方差)
min_face_size: 80 # 最小人脸尺寸(像素),越小检测距离越远
face_present_duration: 2.0 # 持续出现时长(秒)才触发识别
max_yaw: 20.0 # 最大允许的偏航角(度),超过此角度视为侧脸
max_pitch: 20.0 # 最大允许的俯仰角(度),超过此角度视为抬头或低头
no_face_threshold: 60 # 人脸消失计数器阈值(帧)约2秒没有检测到人脸才清空
# 人脸识别配置
face_recognition:
recognition_cooldown: 20.0 # 同一人识别冷却时间(秒)
# 角色映射配置
role_mapping:
stranger_threshold: 0.98 # 人脸识别阈值
# 性能控制配置
performance:
target_fps: 30 # 目标帧率
cleanup_interval: 60 # 清理过期记录的间隔(秒)
websocket_loop_delay: 0.01 # WebSocket消息循环延迟(秒)
# 日志配置
logging:
level: "INFO" # DEBUG, INFO, WARNING, ERROR
dir: "logs" # 日志目录
max_bytes: 10485760 # 10MB
backup_count: 5
keep_days: 7 # 日志保留天数
# 中文字体设置
display:
font_path: "/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf"
stream:
# enabled: true # 开关推流功能
enabled: false # 开关推流功能
max_retries: 5 # 最大重试次数
rtmp_url: "rtsp://127.0.0.1/live/video6"
ffmpeg:
fps: 10 # 推流帧率
video_bitrate: "1000k" # 码率
preset: "ultrafast" # 编码速度
tune: "zerolatency" # 低延迟优化
pixel_format: "yuv420p"
video_codec: "libx264"
audio: false # 不包含音频