diff --git a/static/deploy/python/infer.py b/static/deploy/python/infer.py index 6b126fdd5dedeec95c3f0a8edb4e7ca4f2274b64..bb545266e68edc8efa0243562ed3c568fbed1ab8 100644 --- a/static/deploy/python/infer.py +++ b/static/deploy/python/infer.py @@ -34,7 +34,7 @@ import cv2 import numpy as np import paddle import paddle.fluid as fluid -from preprocess import preprocess +from preprocess import preprocess, Resize, Normalize, Permute, PadStride from visualize import visualize_box_mask, lmk2out # Global dictionary @@ -507,7 +507,9 @@ def predict_video(detector, camera_id): fps = 30 width = int(capture.get(cv2.CAP_PROP_FRAME_WIDTH)) height = int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT)) + # yapf: disable fourcc = cv2.VideoWriter_fourcc(*'mp4v') + # yapf: enable if not os.path.exists(FLAGS.output_dir): os.makedirs(FLAGS.output_dir) out_path = os.path.join(FLAGS.output_dir, video_name)