Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
CodeFormer_pytorch
Commits
235956da
"src/vscode:/vscode.git/clone" did not exist on "8ac27dad1a20b4228419e64746ae9110416e34ee"
Commit
235956da
authored
Jan 26, 2024
by
mashun1
Browse files
Update README.md
parent
9097fc58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
README.md
README.md
+21
-22
No files found.
README.md
View file @
235956da
...
@@ -84,6 +84,27 @@
...
@@ -84,6 +84,27 @@
注意:原始数据为
`1024x1024`
需要处理为
`512x512`
,可运行
`data_process.py`
对数据进行处理。
注意:原始数据为
`1024x1024`
需要处理为
`512x512`
,可运行
`data_process.py`
对数据进行处理。
## 训练
### 阶段一 - 训练VQGAN
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4321 basicsr/train.py -opt options/VQGAN_512_ds32_nearest_stage1.yml --launcher pytorch
获取训练数据的码本序列,可以加速后续训练
python scripts/generate_latent_gt.py
### 阶段二 - 训练Transformer (w = 0)
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4322 basicsr/train.py -opt options/CodeFormer_stage2.yml --launcher pytorch
### 阶段三 - 训练可控特征Transformer (w = 1)
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4323 basicsr/train.py -opt options/CodeFormer_stage3.yml --launcher pytorch
注意:
`vqgan`
为
`net_g_xxx.pth`
,
`net_d`
为第一阶段生成。
## 推理
## 推理
### 模型下载
### 模型下载
...
@@ -150,28 +171,6 @@ Github:https://github.com/sczhou/CodeFormer/releases/tag/v0.1.0
...
@@ -150,28 +171,6 @@ Github:https://github.com/sczhou/CodeFormer/releases/tag/v0.1.0
# (check out the examples in inputs/masked_faces)
# (check out the examples in inputs/masked_faces)
python inference_inpainting.py --input_path [image folder]|[image path]
python inference_inpainting.py --input_path [image folder]|[image path]
## 训练
### 阶段一 - 训练VQGAN
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4321 basicsr/train.py -opt options/VQGAN_512_ds32_nearest_stage1.yml --launcher pytorch
获取训练数据的码本序列,可以加速后续训练
python scripts/generate_latent_gt.py
### 阶段二 - 训练Transformer (w = 0)
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4322 basicsr/train.py -opt options/CodeFormer_stage2.yml --launcher pytorch
### 阶段三 - 训练可控特征Transformer (w = 1)
python -m torch.distributed.launch --nproc_per_node=8 --master_port=4323 basicsr/train.py -opt options/CodeFormer_stage3.yml --launcher pytorch
注意:
`vqgan`
为
`net_g_xxx.pth`
,
`net_d`
为第一阶段生成。
## result
## result


...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment