Comments (5)
@zuimeiyujianni so, we improve user experience a little bit. Just do like:
$ git clone https://github.com/bes-dev/MobileStyleGAN.pytorch.git && cd MobileStyleGAN.pytorch
$ gdown https://drive.google.com/uc?id=1PQutd-JboOCOZqmd95XWxWrO8gGEvRcO
$ python convert_rosinality_ckpt.py --ckpt 550000.pt --ckpt-mnet mnet.ckpt --ckpt-snet snet.ckpt --cfg-path config.json
$ python demo.py --cfg config.json --ckpt "" --generator teacher
It works well for me.
from mobilestylegan.pytorch.
It works correct on my side. For exmaple 550000.pt:
from mobilestylegan.pytorch.
Thank you for your reply! I use the latest code in your MobileStyleGAN repository. However, I can't generate sharp images. Can you share your local "convert_rosinality_ckpt.py" file with me? or the converted ckpt file? I want to find the reason.
from mobilestylegan.pytorch.
@zuimeiyujianni I just do something like this:
- clone latest version of MobileStyleGAN.pytorch
git clone https://github.com/bes-dev/MobileStyleGAN.pytorch.git && cd MobileStyleGAN.pytorch
- downnload 550000.pt
gdown https://drive.google.com/uc?id=1PQutd-JboOCOZqmd95XWxWrO8gGEvRcO
- convert 550000.pt to internal format:
python convert_rosinality_ckpt.py --ckpt 550000.pt --ckpt-mnet mnet.ckpt --ckpt-snet snet.ckpt
- create config.json:
{
"logger": {
"type": "NeptuneLogger",
"params": {
"offline_mode": true,
"project_name": "bes-dev/stylegan2_compression",
"experiment_name": "baseline"
}
},
"trainset": {
"emb_size": 512,
"n_batches": 10000
},
"valset": {
"emb_size": 512,
"n_batches": 200
},
"teacher": {
"mapping_network": {
"name": "mnet.ckpt"
},
"synthesis_network": {
"name": "snet.ckpt"
}
},
"distillation_loss": {
"perceptual_size": 256,
"loss_weights": {
"l1": 1.0,
"l2": 1.0,
"loss_p": 1.0,
"loss_g": 0.5
}
},
"trainer": {
"monitor": "kid_val",
"monitor_mode": "min",
"style_mean": 4096,
"style_mean_weight": 0.5,
"num_workers": 0,
"lr_student": 5e-4,
"lr_gan": 5e-4,
"batch_size": 2,
"max_epochs": 100,
"mode": "g,d",
"reg_d_interval": 16,
"truncated": false
}
}
- run compare.py demo:
python compare.py --cfg config.json --ckpt ""
So, you should see the correct images generated by StyleGAN2 on the left (and noise on the right, because your MobileStyleGAN model is not trained yet)
from mobilestylegan.pytorch.
Thank you for your reply!!!. I have overcome this problem.
from mobilestylegan.pytorch.
Related Issues (20)
- model_zoo.json need an update HOT 1
- How to return latents from MobileStyleGAN like those in StyleGAN2? HOT 4
- conversion to coreml doesn't work HOT 3
- A few questions HOT 1
- Can MobileStyleGAN be deployed as openvino with fp16 accuracy? HOT 2
- MobileStyleGAN Checkpoint converted to ONNX generates grey images
- Is there a Pytorch Lite version? HOT 2
- Project dependencies may have API risk issues
- Can this be used inside GFP - GAN? HOT 4
- support stylespace HOT 1
- Smaller images look interesting! HOT 1
- Doubts about ckpt HOT 1
- Image to image translation like CycleGAN
- Curious about the gan inversion of mobile-stylegan
- Finetuning of student network?
- question about replace stygan2 decoder in other gan network
- How can we do projection, interpolation and style mix with this model?
- iStyleGAN video thank you HOT 1
- Hello, could you please tell me where I should place the pre-trained model "stylegan2_ffhq_config_f_mapping_network.ckpt"?
- About batch_size during training
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 mobilestylegan.pytorch.