Comments (6)
@RahulBhalley our code doesn't load pre-trained student automatically, you should load it on your side. Please, look at this sample of code:
MobileStyleGAN.pytorch/demo.py
Line 14 in a9776ff
from mobilestylegan.pytorch.
@RahulBhalley did you load pre-trained checkpoint?
from mobilestylegan.pytorch.
@bes-dev after running the following lines of code
cfg = load_cfg("configs/mobile_stylegan_ffhq.json")
distiller = Distiller(cfg)
I get the following output.
load mapping network...
load pretrained model: stylegan2_ffhq_config_f_mapping_network.ckpt...
Computing MD5: /tmp/stylegan2_ffhq_config_f_mapping_network.ckpt
MD5 matches: /tmp/stylegan2_ffhq_config_f_mapping_network.ckpt
load synthesis network...
load pretrained model: stylegan2_ffhq_config_f_synthesis_network.ckpt...
Computing MD5: /tmp/stylegan2_ffhq_config_f_synthesis_network.ckpt
MD5 matches: /tmp/stylegan2_ffhq_config_f_synthesis_network.ckpt
/Users/codeboy/Freelancing/SocialKit/face-app/restyle-encoder-light/venv/lib/python3.9/site-packages/torchvision/models/inception.py:80: FutureWarning: The default weight initialization of inception_v3 will be changed in future releases of torchvision. If you wish to keep the old behavior (which leads to long initialization times due to scipy/scipy#11299), please set init_weights=True.
warnings.warn('The default weight initialization of inception_v3 will be changed in future releases of '
It looks like the checkpoints are loaded (for mapping_net
also).
from mobilestylegan.pytorch.
I tried using distiller.style_mean
but still I get gray image.
out = distiller.student(distiller.style_mean)['img']
from mobilestylegan.pytorch.
Even truncation trick doesn't produce face image (but just gray).
var = torch.randn(1, 512)
style = distiller.mapping_net(var)
style = distiller.style_mean + 0.5 * (style - distiller.style_mean)
out = distiller.student(style)['img']
from mobilestylegan.pytorch.
Brilliant! Dumb me. 😅 I forgot looking at demo code. Thank you! 🙏
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.