Giter VIP home page Giter VIP logo

one-model-to-reconstruct-them-all's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

one-model-to-reconstruct-them-all's Issues

colab

Hi, can you please add a google colab notebook thanks

No module named 'prompt_toolkit.formatted_text'

Trying to get this to run, keep running into this error regardless of the server I run it on.

Console Input:
λ python C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\reconstruct_image.py C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\models\ffhq_stylegan_2_w_plus\2020-09-05T16_09_10.557656\checkpoints\100000.pt C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\data\image.png

Traceback:

Traceback (most recent call last):
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\reconstruct_image.py", line 8, in <module>
    from networks import get_autoencoder, load_weights
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\networks\__init__.py", line 11, in <module>
    from networks.encoder.autoencoder import StyleganAutoencoder, CodeStyleganAutoencoder, \
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\networks\encoder\autoencoder.py", line 10, in <module>
    from latent_projecting import Latents, CodeLatents
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\latent_projecting\__init__.py", line 11, in <module>
    from latent_projecting.losses import w_plus_style_loss, noise_loss, w_plus_loss, naive_noise_loss
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\latent_projecting\losses.py", line 7, in <module>
    from losses.lpips import PerceptualLoss
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\losses\lpips\__init__.py", line 11, in <module>
    from . import dist_model
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\losses\lpips\dist_model.py", line 12, in <module>
    from .base_model import BaseModel
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all-Copy\losses\lpips\base_model.py", line 5, in <module>
    from IPython import embed
  File "C:\Users\sep27\AppData\Local\Programs\Python\Python38\lib\site-packages\IPython\__init__.py", line 56, in <module>
    from .terminal.embed import embed
  File "C:\Users\sep27\AppData\Local\Programs\Python\Python38\lib\site-packages\IPython\terminal\embed.py", line 16, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "C:\Users\sep27\AppData\Local\Programs\Python\Python38\lib\site-packages\IPython\terminal\interactiveshell.py", line 21, in <module>
    from prompt_toolkit.formatted_text import PygmentsTokens
ModuleNotFoundError: No module named 'prompt_toolkit.formatted_text'

I've also tried commenting out all problematic IPython imports in the losses\lpips files, but after a series of debuggings, that leads to this traceback:

Traceback (most recent call last):
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\networks\__init__.py", line 325, in get_stylegan_2_based_autoencoder
    from networks import get_stylegan2_autoencoder
ImportError: cannot import name 'get_stylegan2_autoencoder' from 'networks' (C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\networks\__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\reconstruct_image.py", line 45, in <module>
    main(parser.parse_args())
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\reconstruct_image.py", line 20, in main
    autoencoder = get_autoencoder(config).to(args.device)
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\networks\__init__.py", line 366, in get_autoencoder
    autoencoder_func = get_stylegan_2_based_autoencoder(argparse.Namespace(**config))
  File "C:\Users\sep27\Documents\Projects\Bloom\one-model-to-reconstruct-them-all\networks\__init__.py", line 327, in get_stylegan_2_based_autoencoder
    raise RuntimeError("stylegan 2 not supported on fsoc lab")
RuntimeError: stylegan 2 not supported on fsoc lab

pretrained model

Hi, thanks for sharing the code, but it seems that the pretrained model is missing, could you please share it?

package version

Hi!
I want to train an autoencoder, and run the train_code_finder.py code. In your README.md, the python version should be >=3.8, while in your requirements.txt you need kornia==0.3.1. This is kind of confusing when I tried to install kornia==0.3.1 and found kornia==0.3.1 did not support python>=3.8.0. So what am I missing, or what can I do to make it work?
Thank you very much!

Train an encoder just using latents

Hi, thanks for your excellent work. I have read and run your code, and it inspired me a lot.

I have a question, if it is possible to train an encoder that outputs latents only, i.e, without noise?
Maybe the quality of the reconstructed image is not perfect, but it is more convenient to do some image morphing
like Image2Stylegan. Does it work just setting the argument --disable-update-for noise?

Thank you very much.

Steven

How to do style mixing quickly?

I am trying to do style mixing between two images using file_based_simple_style_transfer.py with the following command, but it takes a couple of minutes to optimize and the artifacts are noticeable in the results. Reducing the latent-step or the noise-step makes the results worse.

python file_based_simple_style_transfer.py --content img1.png --style img2.png --mixing-index -1 --destination . --config trained_model/ffhq_stylegan_2_w_plus/2020-09-05T16:09:10.557656/config/config.json --latent-step 5000 --noise-step 3000

The official StyleGAN implementation can do style mixing by swapping some layers of the w variables and I tried to do the same by swapping some layers of the noise variables of two images. All I got are two images overlaying on top of each other.

How should I do style mixing with a good balance between performance and fidelity?

question about stylegan pretrained model

Hi, thank you for your sharing.

I have a question about your pretrained model of stylegan.
Suppose you're using stylegan2 , as your readme file and config.json, You used stylegan2 pretrained model is "stylegan2-ffhq-config-f.pt". This pretrained model can generate 1024x1024 resolution images, but your provided the pretrained model only generated 256x256 resolution images。

My question is :
how did you train your model with "stylegan2-ffhq-config-f.pt" that only output 1024x1024 resolution image as pretrained, but your model is build on image size 256x256 ??

I see your config.json file . the train image and val image are both 1024x1024 ?

super-resolution

Hey, thanks for the great code!

You include the option for training a super-resolution encoder. However, there is nothing written about this in the paper or the documentation of the code and I am wondering why this is the case. Did you imply it later, did not test it, did it not work that well or any other reason?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.