备份一些py文件

This commit is contained in:
zqc
2025-12-20 18:07:49 +08:00
parent de5ac3ef22
commit 713ad3f3e4
17 changed files with 21 additions and 20 deletions

View File

@@ -47,25 +47,25 @@ class VideoFaceRecognition:
# 质量阈值设置 # 质量阈值设置
self.det_size = 640 # 320快速 640中等 1280慢 self.det_size = 640 # 320快速 640中等 1280慢
# white # # white
self.list_mode = "whitelist" # "blacklist" 或 "whitelist" # self.list_mode = "whitelist" # "blacklist" 或 "whitelist"
self.det_threshold = 0.7 # 人脸置信度 # self.det_threshold = 0.7 # 人脸置信度
self.clarity_threshold = 1000.0 # 清晰度阈值,低于此值认为人脸模糊 # self.clarity_threshold = 1000.0 # 清晰度阈值,低于此值认为人脸模糊
self.min_face_size = 30 # 最小人脸像素尺寸 # self.min_face_size = 30 # 最小人脸像素尺寸
self.pitch_threshold = 40 # # self.pitch_threshold = 40 #
self.yaw_threshold = 40 # # self.yaw_threshold = 40 #
self.quality_threshold = 0.6 # 质量得分阈值
self.similarity_threshold = 0.13
# #black
# self.list_mode = "blacklist" # "blacklist" 或 "whitelist"
# self.det_threshold = 0.5 # 人脸置信度
# self.clarity_threshold = 100.0 # 清晰度阈值,低于此值认为人脸模糊
# self.min_face_size = 20 # 最小人脸像素尺寸
# self.pitch_threshold = 90 #
# self.yaw_threshold = 90 #
# self.quality_threshold = 0.6 # 质量得分阈值 # self.quality_threshold = 0.6 # 质量得分阈值
# self.similarity_threshold = 0.3 # self.similarity_threshold = 0.13
#black
self.list_mode = "blacklist" # "blacklist" 或 "whitelist"
self.det_threshold = 0.5 # 人脸置信度
self.clarity_threshold = 100.0 # 清晰度阈值,低于此值认为人脸模糊
self.min_face_size = 20 # 最小人脸像素尺寸
self.pitch_threshold = 90 # 角度
self.yaw_threshold = 90 # 角度
self.quality_threshold = 0.6 # 质量得分阈值
self.similarity_threshold = 0.3
# 根据设备类型选择配置 # 根据设备类型选择配置
if use_npu: if use_npu:
@@ -655,8 +655,9 @@ def main():
# 使用NPU # 使用NPU
# video_system = VideoFaceRecognition(use_gpu=False, use_npu=True, npu_device_id=0) # video_system = VideoFaceRecognition(use_gpu=False, use_npu=True, npu_device_id=0)
# 使用GPU # 使用GPU
video_system = VideoFaceRecognition(use_gpu=True, use_npu=False) # video_system = VideoFaceRecognition(use_gpu=True, use_npu=False)
# 使用CPUvideo_system = VideoFaceRecognition(use_gpu=False, use_npu=False) # 使用CPU
video_system = VideoFaceRecognition(use_gpu=False, use_npu=False)
# video_system = VideoFaceRecognition(use_gpu=True, use_npu=False) # 默认使用GPU # video_system = VideoFaceRecognition(use_gpu=True, use_npu=False) # 默认使用GPU
# 设置名单模式 # 设置名单模式