You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
from d_people import analysis_video
# 原视频文件路径
video_path = r " xznsh \ scrfd-opencv \ xznsh_paddle_scrfd \ data \ xj_video.mp4 "
# result存放路径
result_video_path = r " xznsh \ scrfd-opencv \ xznsh_paddle_scrfd \ result \ video.mp4 "
# 使用目标检测巡检人员模型 : best20230606.pt
people_modle_path = r " xznsh \ scrfd-opencv \ xznsh_paddle_scrfd \ weights \ people_modle.pt "
# 人脸检测模型 使用paddle_scrfd模型中的: scrfd_10g_kps.onnx
face_modle_path = r ' xznsh \ scrfd-opencv \ xznsh_paddle_scrfd \ weights \ face_model.onnx '
# 使用拉门模型
action_modle_path = r ' xznsh \ scrfd-opencv \ xznsh_paddle_scrfd \ weights \ action_recognition.pt '
diff_xj , face_flag_xj , face_time , action_frame_xj , action_s_xj = analysis_video ( video_path , result_video_path , people_modle_path , face_modle_path , action_modle_path )
print ( " 这个视频中巡检人员实际停留的时间为: {} 秒 " . format ( diff_xj ) )
print ( " 视频中出现过 {} 次巡检员环视的动作,分别位于视频第 {} 秒 " . format ( face_flag_xj [ " face " ] , face_time ) )
print ( " 视频中出现过 {} 次巡检员巡检ATM机的动作,分别位于视频第 {} 秒 " . format ( action_frame_xj [ " action " ] , action_s_xj ) )