diff --git a/applications/tools/first-order-demo.py b/applications/tools/first-order-demo.py index 149f721be6ab2211900990c64f535d2bb7988d5f..e08ac73c63e3741fdbe885dac500af17116d59d8 100644 --- a/applications/tools/first-order-demo.py +++ b/applications/tools/first-order-demo.py @@ -25,7 +25,9 @@ parser.add_argument("--weight_path", parser.add_argument("--source_image", type=str, help="path to source image") parser.add_argument("--driving_video", type=str, help="path to driving video") parser.add_argument("--output", default='output', help="path to output") -parser.add_argument("--filename", default='result.mp4', help="filename to output") +parser.add_argument("--filename", + default='result.mp4', + help="filename to output") parser.add_argument("--relative", dest="relative", action="store_true", @@ -53,7 +55,7 @@ parser.add_argument("--cpu", dest="cpu", action="store_true", help="cpu mode.") parser.add_argument("--ratio", dest="ratio", type=float, - default=1.0, + default=0.4, help="margin ratio") parser.set_defaults(relative=False) diff --git a/docs/en_US/tutorials/motion_driving.md b/docs/en_US/tutorials/motion_driving.md index 834a94cd8dac5ee58c22341f71d6de401eb58f37..402c4a63c5403fbd61a15139ba67910da8edc717 100644 --- a/docs/en_US/tutorials/motion_driving.md +++ b/docs/en_US/tutorials/motion_driving.md @@ -17,7 +17,7 @@ cd applications/ python -u tools/first-order-demo.py \ --driving_video ../docs/imgs/fom_dv.mp4 \ --source_image ../docs/imgs/fom_source_image.png \ - --ratio 0.5 \ + --ratio 0.4 \ --relative --adapt_scalae ``` @@ -26,7 +26,7 @@ python -u tools/first-order-demo.py \ - source_image: source_image, support single people and multipeople in the image, the image will be animated according to the motion of the driving video. - relative: indicate whether the relative or absolute coordinates of the key points in the video are used in the program. It is recommended to use relative coordinates. If absolute coordinates are used, the characters will be distorted after animation. - adapt_scale: adapt movement scale based on convex hull of keypoints. -- ratio: The pasted face percentage of generated image, this parameter should be adjusted in the case of multipeople image in which the adjacent faces are close +- ratio: The pasted face percentage of generated image, this parameter should be adjusted in the case of multi-person image in which the adjacent faces are close, the reange is [0.4, 0.5] ## Animation results diff --git a/docs/zh_CN/tutorials/motion_driving.md b/docs/zh_CN/tutorials/motion_driving.md index ed0e156b36376347b83e90a2e18658c528cbb7d0..d43e6985da1243b160910765c9a007a16f4e4f47 100644 --- a/docs/zh_CN/tutorials/motion_driving.md +++ b/docs/zh_CN/tutorials/motion_driving.md @@ -29,7 +29,7 @@ python -u tools/first-order-demo.py \ - source_image: 原始图片,支持单人图片和多人图片,视频中人物的表情动作将迁移到该原始图片中的人物上 - relative: 指示程序中使用视频和图片中人物关键点的相对坐标还是绝对坐标,建议使用相对坐标,若使用绝对坐标,会导致迁移后人物扭曲变形 - adapt_scale: 根据关键点凸包自适应运动尺度 -- ratio: 贴回驱动生成的人脸区域占原图的比例, 用户需要根据生成的效果调整该参数,尤其对于多人脸距离比较近的情况下需要调整改参数 +- ratio: 贴回驱动生成的人脸区域占原图的比例, 用户需要根据生成的效果调整该参数,尤其对于多人脸距离比较近的情况下需要调整改参数, 调整范围是[0.4, 0.5] ## 生成结果展示