未验证 提交 ff02c045 编写于 作者: G Guanghua Yu 提交者: GitHub

fix release/2.1 import problem (#3618)

上级 386d1ead
...@@ -34,7 +34,7 @@ import cv2 ...@@ -34,7 +34,7 @@ import cv2
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from preprocess import preprocess from preprocess import preprocess, Resize, Normalize, Permute, PadStride
from visualize import visualize_box_mask, lmk2out from visualize import visualize_box_mask, lmk2out
# Global dictionary # Global dictionary
...@@ -507,7 +507,9 @@ def predict_video(detector, camera_id): ...@@ -507,7 +507,9 @@ def predict_video(detector, camera_id):
fps = 30 fps = 30
width = int(capture.get(cv2.CAP_PROP_FRAME_WIDTH)) width = int(capture.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT)) height = int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
# yapf: disable
fourcc = cv2.VideoWriter_fourcc(*'mp4v') fourcc = cv2.VideoWriter_fourcc(*'mp4v')
# yapf: enable
if not os.path.exists(FLAGS.output_dir): if not os.path.exists(FLAGS.output_dir):
os.makedirs(FLAGS.output_dir) os.makedirs(FLAGS.output_dir)
out_path = os.path.join(FLAGS.output_dir, video_name) out_path = os.path.join(FLAGS.output_dir, video_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册