完成犯人带出检测

This commit is contained in:
zqc
2026-01-08 22:19:50 +08:00
parent 931f2ff861
commit 1b8b24ab3e
2 changed files with 164 additions and 2 deletions

View File

@@ -876,7 +876,10 @@ def sync_videofaceprisonbiz_params():
"face.min_face_size": "min_face_size",
"face.pitch_threshold": "pitch_threshold",
"face.yaw_threshold": "yaw_threshold",
"face.similarity_threshold": "similarity_threshold"
"face.similarity_threshold": "similarity_threshold",
"face.detection_window_seconds": "detection_window_seconds",
"face.min_match_count": "min_match_count",
"face.cooldown_seconds": "cooldown_seconds"
}
updated_count = 0
@@ -925,6 +928,27 @@ def sync_videofaceprisonbiz_params():
updated_count += 1
except ValueError:
logger.error(f"无效的相似度阈值: {config_value}")
elif param_name == "detection_window_seconds":
try:
window_seconds = float(config_value)
video_face_prison_biz.set_detection_window_seconds(window_seconds)
updated_count += 1
except ValueError:
logger.error(f"无效的检测窗口时间: {config_value}")
elif param_name == "min_match_count":
try:
min_matches = int(config_value)
video_face_prison_biz.set_min_match_count(min_matches)
updated_count += 1
except ValueError:
logger.error(f"无效的最小匹配次数: {config_value}")
elif param_name == "cooldown_seconds":
try:
cooldown_seconds = int(config_value)
video_face_prison_biz.set_cooldown_seconds(cooldown_seconds)
updated_count += 1
except ValueError:
logger.error(f"无效的冷却时间: {config_value}")
logger.info(f"✅ 同步VideoFacePrisonBiz参数完成更新了 {updated_count} 个参数配置组ID: {prison_config.config_group_id}")
return updated_count