阶段性人脸识别成果,可以对视频做白名单、黑名单识别

This commit is contained in:
zqc
2025-11-26 16:09:09 +08:00
parent 3dfe075080
commit 80491f277b
7 changed files with 2713 additions and 11 deletions

View File

@@ -294,8 +294,8 @@ def main():
video_system = VideoFaceRecognition(use_gpu=True)
# 设置目标人脸(可选)
target_image = "test_data/register/person1.png"
# target_image = "test_data/register/cjh.jpg"
# target_image = "test_data/register/person1.png"
target_image = "test_data/register/sy.jpg"
if os.path.exists(target_image):
video_system.set_target_face(target_image, "目标人物")
@@ -310,8 +310,8 @@ def main():
if choice == "1":
# 处理视频文件
video_path = "test_data/video/test_video.mp4"
output_path = "test_data/output_video/zqc.mp4"
video_path = "test_data/video/video_1.mp4"
output_path = "test_data/output_video/video_1.mp4"
# 性能优化:跳帧处理
skip_frames = 1 # 每2帧处理1帧提高速度