未验证 提交 f66de7fb 编写于 作者: W wangna11BD 提交者: GitHub

modify lapstyle doc (#363)

上级 fc9becf0
......@@ -29,7 +29,7 @@ python applications/tools/lapstyle.py --content_img ${PATH_OF_CONTENT_IMG}
### 3.1 Prepare Datasets
To train LapStyle, we use the COCO dataset as content set. And you can choose any style image you like. Before training or testing, remember modify the data path of style image in the config file.
To train LapStyle, we use the COCO dataset as content image set. You can choose one style image from [starrynew](https://user-images.githubusercontent.com/79366697/118655415-1ec8c000-b81c-11eb-8002-90bf8d477860.png), [ocean](https://user-images.githubusercontent.com/79366697/118655407-1c666600-b81c-11eb-83a6-300ee1952415.png), [stars](https://user-images.githubusercontent.com/79366697/118655423-20928380-b81c-11eb-92bd-0deeb320ff14.png) or [circuit](https://user-images.githubusercontent.com/79366697/118655399-196b7580-b81c-11eb-8bc5-d5ece80c18ba.jpg). Or you can choose any style image you like. Before training or testing, remember modify the data path of style image in the config file.
### 3.2 Train
......@@ -54,6 +54,7 @@ python -u tools/main.py --config-file configs/lapstyle_rev_second.yaml --load ${
### 3.4 Test
When testing, you need to change the parameter `validate/save_img` in the configuration file to `true` to save the output image.
To test the trained model, you can directly test the "lapstyle_rev_second", since it also contains the trained weight of previous stages:
```
python tools/main.py --config-file configs/lapstyle_rev_second.yaml --evaluate-only --load ${PATH_OF_WEIGHT}
......
......@@ -28,7 +28,7 @@ python applications/tools/lapstyle.py --content_img ${PATH_OF_CONTENT_IMG}
### 3.1 数据准备
为了训练LapStyle,我们使用COCO数据集作为内容数据集。您可以任意选择您喜欢的风格图片。在开始训练与测试之前,记得修改配置文件的数据路径。
为了训练LapStyle,我们使用COCO数据集作为内容图像数据集。您可以从[starrynew](https://user-images.githubusercontent.com/79366697/118655415-1ec8c000-b81c-11eb-8002-90bf8d477860.png)[ocean](https://user-images.githubusercontent.com/79366697/118655407-1c666600-b81c-11eb-83a6-300ee1952415.png)[stars](https://user-images.githubusercontent.com/79366697/118655423-20928380-b81c-11eb-92bd-0deeb320ff14.png)[circuit](https://user-images.githubusercontent.com/79366697/118655399-196b7580-b81c-11eb-8bc5-d5ece80c18ba.jpg)中选择一张风格图片,也可以任意选择您喜欢的图片作为风格图片。在开始训练与测试之前,记得修改配置文件的数据路径。
### 3.2 训练
......@@ -51,6 +51,7 @@ python -u tools/main.py --config-file configs/lapstyle_rev_second.yaml --load ${
### 3.4 测试
测试时需要将配置文件中的`validate/save_img`参数改成`True`以保存输出图像。
测试训练好的模型,您可以直接测试 "lapstyle_rev_second",因为它包含了之前步骤里的训练权重:
```
python tools/main.py --config-file configs/lapstyle_rev_second.yaml --evaluate-only --load ${PATH_OF_WEIGHT}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册