未验证 提交 abcbb6c7 编写于 作者: L lzzyzlbb 提交者: GitHub

fix documents (#360)

* fix documents

* fix documents
上级 3c2ab038
...@@ -32,7 +32,8 @@ python -u tools/first-order-demo.py \ ...@@ -32,7 +32,8 @@ python -u tools/first-order-demo.py \
--driving_video ../docs/imgs/fom_dv.mp4 \ --driving_video ../docs/imgs/fom_dv.mp4 \
--source_image ../docs/imgs/fom_source_image.png \ --source_image ../docs/imgs/fom_source_image.png \
--ratio 0.4 \ --ratio 0.4 \
--relative --adapt_scale --relative --adapt_scale \
--image_size 512
``` ```
- multi face: - multi face:
...@@ -43,6 +44,7 @@ python -u tools/first-order-demo.py \ ...@@ -43,6 +44,7 @@ python -u tools/first-order-demo.py \
--source_image ../docs/imgs/fom_source_image_multi_person.png \ --source_image ../docs/imgs/fom_source_image_multi_person.png \
--ratio 0.4 \ --ratio 0.4 \
--relative --adapt_scale \ --relative --adapt_scale \
--image_size 512 \
--multi_person --multi_person
...@@ -52,12 +54,15 @@ python -u tools/first-order-demo.py \ ...@@ -52,12 +54,15 @@ python -u tools/first-order-demo.py \
- 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. - 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. - 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 multi-person image in which the adjacent faces are close. The defualt value is 0.4 and the range is [0.4, 0.5]. - 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 defualt value is 0.4 and the range is [0.4, 0.5].
- image_size: The image size of the face. Default is 256
- multi_person: There are multi faces in the images. Default means only one face in the image - multi_person: There are multi faces in the images. Default means only one face in the image
```
### 2 Training ### 2 Training
**Datasets:** **Datasets:**
- fashion See[here](https://vision.cs.ubc.ca/datasets/fashion/) - fashion See[here](https://vision.cs.ubc.ca/datasets/fashion/)
- VoxCeleb See[here](https://github.com/AliaksandrSiarohin/video-preprocessing) - VoxCeleb See[here](https://github.com/AliaksandrSiarohin/video-preprocessing). Here you can process the data sizes according to your requirements. We deal with two sizes: 256 and 512, the results can be seen below
![](../../imgs/fom_512_vs_256.png)
**params:** **params:**
- dataset_name.yaml: Create a config of your own dataset - dataset_name.yaml: Create a config of your own dataset
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
``` ```
You can download from wget, download facades from wget for example: You can download from wget, download facades from wget for example:
``` ```
wget https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/facades.zip --no-check-certificate wget http://efrosgans.eecs.berkeley.edu/pix2pix/datasets/facades.tar.gz --no-check-certificate
``` ```
### 1.2.2 Train/Test ### 1.2.2 Train/Test
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
``` ```
You can download from wget, download facades from wget for example: You can download from wget, download facades from wget for example:
``` ```
wget http://efrosgans.eecs.berkeley.edu/pix2pix/datasets/facades.tar.gz --no-check-certificate wget https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/facades.zip --no-check-certificate
``` ```
### 2.2.2 Train/Test ### 2.2.2 Train/Test
......
...@@ -39,7 +39,8 @@ python -u tools/first-order-demo.py \ ...@@ -39,7 +39,8 @@ python -u tools/first-order-demo.py \
--driving_video ../docs/imgs/fom_dv.mp4 \ --driving_video ../docs/imgs/fom_dv.mp4 \
--source_image ../docs/imgs/fom_source_image.png \ --source_image ../docs/imgs/fom_source_image.png \
--ratio 0.4 \ --ratio 0.4 \
--relative --adapt_scale --relative --adapt_scale \
--image_size 512
``` ```
- 多人脸: - 多人脸:
``` ```
...@@ -49,6 +50,7 @@ python -u tools/first-order-demo.py \ ...@@ -49,6 +50,7 @@ python -u tools/first-order-demo.py \
--source_image ../docs/imgs/fom_source_image_multi_person.jpg \ --source_image ../docs/imgs/fom_source_image_multi_person.jpg \
--ratio 0.4 \ --ratio 0.4 \
--relative --adapt_scale \ --relative --adapt_scale \
--image_size 512 \
--multi_person --multi_person
- driving_video: 驱动视频,视频中人物的表情动作作为待迁移的对象 - driving_video: 驱动视频,视频中人物的表情动作作为待迁移的对象
...@@ -56,12 +58,15 @@ python -u tools/first-order-demo.py \ ...@@ -56,12 +58,15 @@ python -u tools/first-order-demo.py \
- relative: 指示程序中使用视频和图片中人物关键点的相对坐标还是绝对坐标,建议使用相对坐标,若使用绝对坐标,会导致迁移后人物扭曲变形 - relative: 指示程序中使用视频和图片中人物关键点的相对坐标还是绝对坐标,建议使用相对坐标,若使用绝对坐标,会导致迁移后人物扭曲变形
- adapt_scale: 根据关键点凸包自适应运动尺度 - adapt_scale: 根据关键点凸包自适应运动尺度
- ratio: 贴回驱动生成的人脸区域占原图的比例, 用户需要根据生成的效果调整该参数,尤其对于多人脸距离比较近的情况下需要调整改参数, 默认为0.4,调整范围是[0.4, 0.5] - ratio: 贴回驱动生成的人脸区域占原图的比例, 用户需要根据生成的效果调整该参数,尤其对于多人脸距离比较近的情况下需要调整改参数, 默认为0.4,调整范围是[0.4, 0.5]
- image_size: 图片人脸大小,默认为256
- multi_person: 表示图片中有多张人脸,不加则默认为单人脸 - multi_person: 表示图片中有多张人脸,不加则默认为单人脸
```
### 2 训练 ### 2 训练
**数据集:** **数据集:**
- fashion 可以参考[这里](https://vision.cs.ubc.ca/datasets/fashion/) - fashion 可以参考[这里](https://vision.cs.ubc.ca/datasets/fashion/)
- VoxCeleb 可以参考[这里](https://github.com/AliaksandrSiarohin/video-preprocessing) - VoxCeleb 可以参考[这里](https://github.com/AliaksandrSiarohin/video-preprocessing). 将数据按照需求处理为想要的大小,即可开始训练,这里我们处理了256和512两种分辨率大小,结果对比如下:
![](../../imgs/fom_512_vs_256.png)
**参数说明:** **参数说明:**
- dataset_name.yaml: 需要配置自己的yaml文件及参数 - dataset_name.yaml: 需要配置自己的yaml文件及参数
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册