minyoungg / pix2latent Goto Github PK
View Code? Open in Web Editor NEWCode for: Transforming and Projecting Images into Class-conditional Generative Networks
Home Page: https://minyoungg.github.io/pix2latent
License: Apache License 2.0
Code for: Transforming and Projecting Images into Class-conditional Generative Networks
Home Page: https://minyoungg.github.io/pix2latent
License: Apache License 2.0
Hello, sorry for asking too often.
I am curious about doing optimization in batch input in the code.
I think in actual use, batch size should be one and this code just show the result of diverse initialization results, is it right?
Or, is it better to do it in batch for the results in the case of basincma or adam?
Hello,
I want to try pix2latent
on the FFHQ dataset on Google Colab. Due to RAM constraints, Colab won't run the optimization process with CMA or BasinCMA (unless I use the cars dataset), so I have to go with the faster (yet worse) option relying on Nevergrad.
I see that:
Between the two options (Nevergrad vs. HybridNevergrad), which one would you recommend?
Edit: Below are results obtained with Nevergrad .
Edit: Below are results obtained with HybridNevergrad.
I guess I would have to try another portrait, tweak parameters, or forget Colab and stick to CMA/BasinCMA on a local machine.
why do you apply remove_spectral_norm for biggan?
Thank you for sharing your code!! It's a cool work.
Is there a code using encoder network? I can't fine them..
https://github.com/richzhang/PerceptualSimilarity was recently updated,
this broke the import models
that is called from the examples.
Traceback (most recent call last):
File "invert_biggan_adam.py", line 44, in <module>
loss_fn = LF.ProjectionLoss()
File "/home/r/.local/share/virtualenvs/single_view_mpi-aYhVwZ1J/lib/python3.6/site-packages/pix2latent/loss_functions.py", line 90, in __init__
self.ploss_fn = PerceptualLoss(net=lpips_net)
File "/home/r/.local/share/virtualenvs/single_view_mpi-aYhVwZ1J/lib/python3.6/site-packages/pix2latent/loss_functions.py", line 134, in __init__
import models
ModuleNotFoundError: No module named 'models'
I believe now you should call something like lpips.LPIPS(params) to instantiate a loss object.
(model='net-lin' is also not available anymore)
I'm going to try and clone an older version of the repo.
Update: git checkout 6abcdd1077b090cb9f0892103b45d56531d50689
seems to do the trick.
Can you please share your code and images for STYLEGAN2 FFHQ face example?
thanks
Hello,
I have a question,what is the mask
in line 107 and line 108 in the file invert_biggan_with_transform.py
,
target_transform_fn = SpatialTransform(pre_align=mask)
weight_transform_fn = SpatialTransform(pre_align=mask)
when I run this program, the following error occurs:
Traceback (most recent call last):
File "invert_biggan_with_transform.py", line 107, in <module>
target_transform_fn = SpatialTransform(pre_align=mask)
NameError: name 'mask' is not defined
How can I solve it?Thank you.
Hi there, excellent job! Thanks for providing the code!
I have a question about fine-tuning. In Section 3.5 of the paper, I think there is a regularization term that can also optimize the weights of the original GAN. Where can I find this part in your code? Currently, I just saw the optimization of z,c, and ф. Did I miss something? Please correct me if I was wrong.
Thank you again!
I want to invert images sized 256x256 into .pt through stylegan2, however it reports 【RuntimeError: mat1 dim 1 must match mat2 dim 0】. I know it is because original model is for images sized 512x512, but how should I change it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.