Comments (6)
I just found a project that allows controlling a bunch of StyleGAN features through UI knobs:
https://github.com/SummitKwan/transparent_latent_gan
Being a total newbie at machine learning, I'm wondering, what are the main differences between Puzer's approach and transparent_latent_gan?
Another issue - transparent_latent_gan is using the smaller CelebA dataset, so that might be the reason why sometimes its features get entangled too much and StyleGAN gets stuck when you try to lock and combine too many features (try to adjust the sliders to create an old, bald, non-smiling, bearded man with eyeglasses).
I'm wondering if Puzer's approach could work better? I tried current age direction and noticed that at some point it tries to add glasses and beard. I guess, those two features got entangled with age and I'm not sure what could be done to disentangle them - I hope to get only wrinkles and receding hairline for age direction.
Also, when encoding images, I found out that sometimes align works incorrectly cropping away top of a head. And for some of my images, the optimal encoder combination seems to be learning rate of 4.0 and image size of 512. With default settings (learning rate of 1 and image size 256) it got some tricky images (old black&white photos) or complex scenarios (large mustache over lips) totally corrupted, and for some less complex images it lost enough tiny details to make the photo feel too "uncanny" to consider to be exact match, especially, for younger people who don't have enough deep wrinkles or beards and also when images are shot with lots of light, so those tiny details and shadows matter a lot.
Of course, 4.0 @ 512 can take pretty long time to train, and sometimes 1000 iterations are not enough. With one specific tricky image I went as far as to 4000 iterations to get satisfactory results, while for some other images such high learning rate + iterations led to washed-out images (overfitting?).
from stylegan-encoder.
Hey, @Gary-Deeplearning and thanks!
You can find my more examples here Learn_direction_in_latent_space.ipynb.
I think that this noteook is self-explanatory, by using similar approach you can find your own directions.
from stylegan-encoder.
@Puzer Yep, Thank you, I will check the notebook. And from the Readme, you said, New scripts for finding your own directions will be realised soon. Will this be released?
from stylegan-encoder.
@Puzer And, Why used the front 8 layers when you moved the latent direction?
new_latent_vector[:8] = (latent_vector + coeff*direction)[:8]
Is it based on this result: which latent layer is most useful for predicting gender?
from stylegan-encoder.
@Puzer And, Why used the front 8 layers when you moved the latent direction?
new_latent_vector[:8] = (latent_vector + coeff*direction)[:8]
Is it based on this result: which latent layer is most useful for predicting gender?
I'm confused by this too. It looks like @Puzer is training the linear regression on dlatents that he obtained from the mapping network, but I think the mapping network just broadcasts a single 512-length dlatent vector up to an [18, 512] tensor, i.e. all 18 layers of the dlatent tensor should be identical. So, I think you'd get the same result by training only on a single layer of the dlatent tensor, assuming you generated your training data by feeding qlatent vectors through the mapping network (as opposed to using @Puzer 's script to derive dlatent tensors from real images). I assume the "accuracy vs layer" graph above is just showing noise produced by the linear regression.
from stylegan-encoder.
@Puzer Hi, can you release the full script for finding smiling, age, gender? I am a beginner to ML. I checked Learn_direction_in_latent_space.ipynb and still fill confused. Thanks.
from stylegan-encoder.
Related Issues (20)
- I just found a project that allows controlling a bunch of StyleGAN features through UI knobs: HOT 3
- About 'Google Drive quota exceeded' error. HOT 2
- colab cant run missing packages HOT 1
- Basic Usage Question
- tensorflow.python.framework.errors_impl.InvalidArgumentError
- Download couldn't happen from url, error in functions used in file named network.py and encode
- Download couldn't happen from url, error in functions used in file named network.py and encode_image.py
- How can I speed up the encode_image.py process? HOT 2
- why is an optimizer used in something that is not a neural network?
- samples needed to learn a direction
- KeyError: "The name 'G_synthesis_1/_Run/concat:0' refers to a Tensor which does not exist. The operation, 'G_synthesis_1/_Run/concat', does not exist in the graph." HOT 4
- ModuleNotFoundError: No module named 'encoder'
- Generated images color was deformed HOT 1
- Syntax error in encode_images.py HOT 1
- latent directions
- Can't download LATENT_TRAINING_DATA HOT 7
- lines of code to crop and resave a collection of images to Gdrive
- Reduce encode_images.py time by using one model instance
- The error of load image
- Work with StyleGAN3?
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.