[Other]Update im.copy() to im in examples (#854)

* Update keypointdetection result docs

* Update im.copy() to im in examples
This commit is contained in:
huangjianhui
2022-12-12 09:47:54 +08:00
committed by GitHub
parent 99165f2149
commit 19008a2397
30 changed files with 31 additions and 31 deletions

View File

@@ -73,7 +73,7 @@ if args.video is not None:
# for video
cap = cv2.VideoCapture(args.video)
# Define the codec and create VideoWriter object
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
composition = cv2.VideoWriter(output_composition, fourcc, 20.0,
(1080, 1920))
alpha = cv2.VideoWriter(output_alpha, fourcc, 20.0, (1080, 1920))
@@ -100,7 +100,7 @@ if args.video is not None:
if args.image is not None:
# for image
im = cv2.imread(args.image)
result = model.predict(im.copy())
result = model.predict(im)
print(result)
# 可视化结果
vis_im = fd.vision.vis_matting(im, result)