From ff02c0454ae6eeb7dd96836325526f25b91d48c1 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Wed, 7 Jul 2021 14:24:58 +0800 Subject: [PATCH] fix release/2.1 import problem (#3618) --- static/deploy/python/infer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/deploy/python/infer.py b/static/deploy/python/infer.py index 6b126fdd5..bb545266e 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) -- GitLab