Implement predict video
This commit is contained in:
parent
23753b523e
commit
54c5987ef0
11
run.py
11
run.py
@ -89,12 +89,11 @@ def pre_check():
|
|||||||
def start_processing():
|
def start_processing():
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
try:
|
try:
|
||||||
seconds, probabilities = predict_video_frames(video_path=args['target_path'], frame_interval=30)
|
seconds, probabilities = predict_video_frames(video_path=args['target_path'], frame_interval=50)
|
||||||
print(seconds, probabilities)
|
if any(probability > 0.7 for probability in probabilities):
|
||||||
if probabilities > 0.7:
|
quit()
|
||||||
quit('0')
|
except Exception as exception:
|
||||||
except:
|
quit(exception)
|
||||||
quit('1')
|
|
||||||
if args['gpu']:
|
if args['gpu']:
|
||||||
process_video(args['source_img'], args["frame_paths"])
|
process_video(args['source_img'], args["frame_paths"])
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
|
Loading…
Reference in New Issue
Block a user