robot_face_rec/config.yaml

67 lines
1.9 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://10.0.0.202"
port: "8000"
# api_key: "your_api_key_here"
recognition_api_key: "a5924457-62c9-47dc-a6e7-15462c502d2c"
detection_api_key: "070283a2-faa3-423b-9772-2cd48ecc5362"
# WebSocket配置
websocket:
url: "ws://10.0.0.61:3344"
status_interval: 0.2 # 状态查询间隔(秒)
reconnect_delay: 5 # 重连延迟(秒)
# 摄像头配置
camera:
device_id: "/dev/v4l/by-id/usb-SYX-230524-J_HD_Camera-video-index0" # 摄像头设备ID, id是动态变化的 ls /dev/v4l/by-id/ 查看系统创建的链接
width: 1280
height: 720
fps: 30
retry_interval: 2 # 打开摄像头失败后的重试间隔(秒)
# 人脸检测配置
face_detection:
frame_interval: 10 # 检测帧间隔(每N帧检测一次)
quality_threshold: 100 # 图像质量阈值(Laplacian方差)
min_face_size: 80 # 最小人脸尺寸(像素)
face_present_duration: 2.0 # 持续出现时长(秒)才触发识别
# 人脸识别配置
face_recognition:
similarity_threshold: 0.85 # 相似度阈值(低于此值视为陌生人)
recognition_cooldown: 10.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 # 开关推流功能
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 # 不包含音频