阶段性人脸识别成果,可以对视频做白名单、黑名单识别
This commit is contained in:
@@ -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帧,提高速度
|
||||
|
||||
Reference in New Issue
Block a user