人脸识别精度要求提升。

This commit is contained in:
liuwei
2025-04-14 12:40:07 +08:00
parent 0cd6836a85
commit f4c66f9806
2 changed files with 7 additions and 4 deletions

View File

@@ -56,13 +56,12 @@ class FaceAnalyzer:
self.logger.error(f"读取图片失败: {image_path}, 错误: {e}")
return []
# 使用更精确的人脸检测参数
# 使用更精确的人脸检测参数移除不支持的threshold参数
faces = DeepFace.extract_faces(
img_path=image_path,
enforce_detection=False,
detector_backend='retinaface', # 使用更精确的RetinaFace检测器
align=True,
threshold=0.7 # 提高置信度阈值,减少误检
align=True
)
# 过滤掉可能的误检