[Other] Update old Api to new ones (#861)

* Update keypointdetection result docs

* Update im.copy() to im in examples

* Update new Api, fastdeploy::vision::Visualize to fastdeploy::vision

* Update SwapBackgroundSegmentation && SwapBackgroundMatting to SwapBackground

* Update README_CN.md

* Update README_CN.md
This commit is contained in:
huangjianhui
2022-12-14 17:25:58 +08:00
committed by GitHub
parent e7c244054b
commit 376fdbfe2c
24 changed files with 64 additions and 115 deletions

View File

@@ -86,7 +86,7 @@ if args.video is not None:
break
result = model.predict(frame)
vis_im = fd.vision.vis_matting(frame, result)
vis_im_with_bg = fd.vision.swap_background_matting(frame, bg, result)
vis_im_with_bg = fd.vision.swap_background(frame, bg, result)
alpha.write(vis_im)
composition.write(vis_im_with_bg)
cv2.waitKey(30)
@@ -104,7 +104,7 @@ if args.image is not None:
print(result)
# 可视化结果
vis_im = fd.vision.vis_matting(im, result)
vis_im_with_bg = fd.vision.swap_background_matting(im, bg, result)
vis_im_with_bg = fd.vision.swap_background(im, bg, result)
cv2.imwrite("visualized_result_fg.jpg", vis_im)
cv2.imwrite("visualized_result_replaced_bg.jpg", vis_im_with_bg)
print(