Comments (9)
Terrific -- thank you so much!
from stylegan-encoder.
Hi @pender - my goal with this encoder is to be able to encode faces well into the latent space of the model; by constraining the total output to [1, 512] it's tougher to get a very realistic face without artifacts. Because the dlatents run from coarse to fine, it's possible to mix them for more variation and finer control over details, which NVIDIA does in the original paper. In my experience, an encoder trained like this does a good job of generating smooth and realistic faces, with less artifacts than the original generator.
I am open to having [1, 512] as an option for building a model, but not as the only option, because I don't believe it will ultimately perform as well for encoding as using the entire latent space -- but it will surely train faster!
from stylegan-encoder.
aha! Thank you for clarifying. I had a suspicion I might have this wrong when the composite face looked closer to the original than the faces generated by the individual layers.
from stylegan-encoder.
Hi @pbaylies, would it be a lot of work to add a flag (or to just indicate to me how) to build an effnet to output a [1, 512] dlatent? I've been staring at the effnet code for a while and I'm not sure how to do it. I can handle changing the assembly of training data but would much appreciate a pointer in correctly tweaking the effnet's architecture itself if you have a minute or two.
from stylegan-encoder.
@pbaylies - Right, I totally get that point with respect to the encoder, which optimizes all 18 layers of the dlatent tensor based on the perceptual loss between the generated image and the original image. My question is specifically regarding the inverse network that you can train via train_effnet.py
or train_resnet.py
. When you train that network, its training target are exclusively outputs of the StyleGAN mapping network, so it is training to match dlatent tensors where all 18 rows are the same for each data point. In other words, it never receives a training signal that would allow the difference between the 18 layers to be meaningful, so any failure to be the same would just be noise from the training. Am I misunderstanding how the training works?
from stylegan-encoder.
@pender -- so take a close look at where I generate the dataset in generate_dataset_main(), I purposely get more values from the mapping network and mix them in to generate more diverse faces. That's what all the mod_l / mod_r stuff relates to -- generating more diverse dlatents for training.
from stylegan-encoder.
@pender Cheers; I should probably document that section better / at all... :)
from stylegan-encoder.
Hi @pender -- I had tested out a simplified version of this code for that purpose, I'll post something for you tomorrow!
from stylegan-encoder.
Here you go @pender -- see if this works for you!
from stylegan-encoder.
Related Issues (20)
- Trianing error about launch failed
- Error running encode_images.py on Colab HOT 2
- Error while running encode_images.py #41
- google drive exceeded encode_images.py
- Two bugs found HOT 2
- AttributeError: module 'tensorflow' has no attribute 'Dimension' HOT 2
- Face Alignment results in exception error
- Compatibility with pretrained stylegan2 model? HOT 7
- train encoder directly HOT 1
- requirements.txt empty and compatibility issues HOT 1
- assert img.shape == self.shape Assertion Error HOT 6
- How to interpolate a one region of two faces? HOT 1
- Why can't we find the vector Z and have to use W ? HOT 2
- runing StyleGAN_Encoder sehape error HOT 2
- Weird error, how do I fix it???'
- Why requirments.txt is empty HOT 1
- Getting error while run the 'encode_images.py' file
- 'latent_training_data' is no longer available HOT 1
- PreTrained Model HOT 1
- tf compatibility issue
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 stylegan-encoder.