Git Product home page Git Product logo

Comments (5)

ShenYujun avatar ShenYujun commented on July 20, 2024 1

Please refer to this repo.

from interfacegan.

ltnghia avatar ltnghia commented on July 20, 2024

Hello, I use LIA to extract latent codes from input images and then use them as inputs for interfacegan. However, I cannot generate results of the same input images of LIA. I used pre-trained models from LIA and interfacegan. Do I need to process extracted latent codes? Or can you provide codes and models for Fig.11? Thank you.

E, _, _, Gs, _ = load_pkl(args.restore_path)
real = tf.placeholder('float32', [None, 3, args.image_size, args.image_size], name='real_image')
encoder_w = E.get_output_for(real, phase=False)
sess = tf.get_default_session()
latent_code = sess.run(encoder_w, feed_dict={real: input_image})
np.save('%s/%s.npy' % (save_dir, im_name), latent_code)
python edit.py \
    -m pggan_celebahq \
    -b boundaries/pggan_celebahq_smile_boundary.npy \
    -i $INPUT_LATENT_CODES_PATH \
    -o results/from_latent_code/pggan/celebahq/smile_editing
python edit.py \
    -m stylegan_ffhq \
    -b boundaries/stylegan_ffhq_smile_boundary.npy \
    -i $INPUT_LATENT_CODES_PATH \
    -o results/from_latent_code/stylegan/ffhq/smile_editing

from interfacegan.

ShenYujun avatar ShenYujun commented on July 20, 2024

You are using the official PGGAN (pggan_celebahq) and StyleGAN (stylegan_ffhq) models for editing, but LIA uses its own model for inversion. Please find the boundaries for LIA model and use them for manipulation. This repo only contains the boundaries and editing script w.r.t. PGGAN and StyleGAN.

from interfacegan.

ltnghia avatar ltnghia commented on July 20, 2024

Can you give a guidance to reproduce results in Fig.11? Thank you.

from interfacegan.

ShenYujun avatar ShenYujun commented on July 20, 2024
  1. Find your own boundaries with LIA model (this process is exactly the same as that of PGGAN and StyleGAN).
  2. Invert real images with LIA encoder and get the inverted codes.
  3. Move the inverted codes towards the boundaries (use utils/manipulator.py)
  4. Use the LIA generator to produce images with the manipulated codes.

from interfacegan.

Related Issues (20)

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.