人脸识别精度要求提升。
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
# 过滤掉可能的误检
|
||||
|
||||
Reference in New Issue
Block a user