Comments (6)
@icoric4
The training setting is similar, but
- we remove the component loss
- we use more data and data with higher quality
- the training network structure is not the same as the inference network structure
from gfpgan.
@icoric4 Finetuning the https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth has not been supported yet. As this model is converted from another model (which is not released.)
I will add the model, but it may take much time ~
from gfpgan.
Thanks!
from gfpgan.
Hello, I have another question.
When training from scratch a model like this one https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth,
could you share the training settings you have used to train it, similar to this?
# training settings
train:
optim_g:
type: Adam
lr: !!float 2e-3
optim_d:
type: Adam
lr: !!float 2e-3
optim_component:
type: Adam
lr: !!float 2e-3
scheduler:
type: MultiStepLR
milestones: [600000, 700000]
gamma: 0.5
total_iter: 800000
warmup_iter: -1 # no warm up
# losses
# pixel loss
pixel_opt:
type: L1Loss
loss_weight: !!float 1e-1
reduction: mean
# L1 loss used in pyramid loss, component style loss and identity loss
L1_opt:
type: L1Loss
loss_weight: 1
reduction: mean
# image pyramid loss
pyramid_loss_weight: 1
remove_pyramid_loss: 50000
# perceptual loss (content and style losses)
perceptual_opt:
type: PerceptualLoss
layer_weights:
# before relu
'conv1_2': 0.1
'conv2_2': 0.1
'conv3_4': 1
'conv4_4': 1
'conv5_4': 1
vgg_type: vgg19
use_input_norm: true
perceptual_weight: !!float 1
style_weight: 50
range_norm: true
criterion: l1
# gan loss
gan_opt:
type: GANLoss
gan_type: wgan_softplus
loss_weight: !!float 1e-1
# r1 regularization for discriminator
r1_reg_weight: 10
# facial component loss
gan_component_opt:
type: GANLoss
gan_type: vanilla
real_label_val: 1.0
fake_label_val: 0.0
loss_weight: !!float 1
comp_style_weight: 200
# identity loss
identity_weight: 10
net_d_iters: 1
net_d_init_iters: 0
net_d_reg_every: 16
from gfpgan.
你好,如果我想训练 type: GFPGANv1Clean,该怎样获取正确的pre-trained stylegan2 model呢?
如此设置时 decoder_load_path: experiments/pretrained_models/StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth
会报如下错误:
RuntimeError: Error(s) in loading state_dict for StyleGAN2GeneratorCSFT:
Missing key(s) in state_dict: "style_mlp.9.weight", "style_mlp.9.bias", "style_mlp.11.weight", "style_mlp.11.bias", "style_mlp.13.weight", "style_mlp.13.bias", "style_mlp.15.weight", "style_mlp.15.bias", "style_conv1.bias", "style_convs.0.bias", "style_convs.1.bias", "style_convs.2.bias", "style_convs.3.bias", "style_convs.4.bias", "style_convs.5.bias", "style_convs.6.bias", "style_convs.7.bias", "style_convs.8.bias", "style_convs.9.bias", "style_convs.10.bias", "style_convs.11.bias", "style_convs.12.bias", "style_convs.13.bias".
Unexpected key(s) in state_dict: "style_mlp.2.weight", "style_mlp.2.bias", "style_mlp.4.weight", "style_mlp.4.bias", "style_mlp.6.weight", "style_mlp.6.bias", "style_mlp.8.weight", "style_mlp.8.bias", "style_conv1.activate.bias", "style_convs.0.activate.bias", "style_convs.1.activate.bias", "style_convs.2.activate.bias", "style_convs.3.activate.bias", "style_convs.4.activate.bias", "style_convs.5.activate.bias", "style_convs.6.activate.bias", "style_convs.7.activate.bias", "style_convs.8.activate.bias", "style_convs.9.activate.bias", "style_convs.10.activate.bias", "style_convs.11.activate.bias", "style_convs.12.activate.bias", "style_convs.13.activate.bias".
from gfpgan.
你好,如果我想训练 type: GFPGANv1Clean,该怎样获取正确的pre-trained stylegan2 model呢?
如此设置时 decoder_load_path: experiments/pretrained_models/StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth 会报如下错误:
RuntimeError: Error(s) in loading state_dict for StyleGAN2GeneratorCSFT: Missing key(s) in state_dict: "style_mlp.9.weight", "style_mlp.9.bias", "style_mlp.11.weight", "style_mlp.11.bias", "style_mlp.13.weight", "style_mlp.13.bias", "style_mlp.15.weight", "style_mlp.15.bias", "style_conv1.bias", "style_convs.0.bias", "style_convs.1.bias", "style_convs.2.bias", "style_convs.3.bias", "style_convs.4.bias", "style_convs.5.bias", "style_convs.6.bias", "style_convs.7.bias", "style_convs.8.bias", "style_convs.9.bias", "style_convs.10.bias", "style_convs.11.bias", "style_convs.12.bias", "style_convs.13.bias". Unexpected key(s) in state_dict: "style_mlp.2.weight", "style_mlp.2.bias", "style_mlp.4.weight", "style_mlp.4.bias", "style_mlp.6.weight", "style_mlp.6.bias", "style_mlp.8.weight", "style_mlp.8.bias", "style_conv1.activate.bias", "style_convs.0.activate.bias", "style_convs.1.activate.bias", "style_convs.2.activate.bias", "style_convs.3.activate.bias", "style_convs.4.activate.bias", "style_convs.5.activate.bias", "style_convs.6.activate.bias", "style_convs.7.activate.bias", "style_convs.8.activate.bias", "style_convs.9.activate.bias", "style_convs.10.activate.bias", "style_convs.11.activate.bias", "style_convs.12.activate.bias", "style_convs.13.activate.bias".
@timfu248 有解决吗兄弟,目前是不是只能微调GFPGANv1.pth呀
from gfpgan.
Related Issues (20)
- billing problem
- roop face enhancer is not working now HOT 1
- Nice
- C:\Users\MARY\Downloads
- C:\Users\MARY\Downloads HOT 1
- For Free HOT 1
- Gfpgan Not working on colab
- npm install replicate
- Can we only repair the lip(mouth) area?
- Temporal instability with faces on continuous frames
- How to train on 1024 x 1024 face images? HOT 3
- .github
- 10 HOT 1
- 28 HOT 3
- Jvkvfxj HOT 2
- 'torchvision.transforms.functional_tensor' has been depreciated to 'torchvision.transforms.functional' HOT 1
- Anaconda Prompt Displays Error Code When Running Pip Command
- Huggingface scaling issue
- Training Data and configurations for GFPGAN v1.4
- ls: cannot access 'results/cmp': No such file or directory HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gfpgan.