robot_face_rec/config.yaml

84 lines
2.6 KiB
YAML
Raw 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.jpg" # 二维码图片路径
display_duration: 10 # 显示持续时间(秒)
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 # 打开摄像头失败后的重试间隔(秒)
# 人脸检测配置
face_detection:
frame_interval: 10 # 检测帧间隔(每N帧检测一次)
quality_threshold: 10 # 图像质量阈值(Laplacian方差)
min_face_size: 80 # 最小人脸尺寸(像素)
face_present_duration: 2.0 # 持续出现时长(秒)才触发识别
max_yaw: 30.0 # 最大允许的偏航角(度),超过此角度视为侧脸
max_pitch: 30.0 # 最大允许的俯仰角(度),超过此角度视为抬头或低头
# 人脸识别配置
face_recognition:
# similarity_threshold: 0.85 # 相似度阈值(低于此值视为陌生人)
recognition_cooldown: 20.0 # 同一人识别冷却时间(秒)
# 角色映射配置
role_mapping:
stranger_threshold: 0.98 # 人脸识别阈值
# visitor_threshold: 0.70 # 访客识别阈值
# 低于visitor_threshold视为陌生人
# 日志配置
logging:
level: "INFO" # DEBUG, INFO, WARNING, ERROR
file: "face_recognition.log"
max_bytes: 10485760 # 10MB
backup_count: 5
# 中文字体设置
display:
font_path: "/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf"
stream:
# enabled: true # 开关推流功能
enabled: false # 开关推流功能
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 # 不包含音频