Giter VIP home page Giter VIP logo

Comments (4)

yyy7124 avatar yyy7124 commented on June 15, 2024

And how to generate GAN inversion images

from sam.

yuval-alaluf avatar yuval-alaluf commented on June 15, 2024

It seems like you changed the set_encoder function in psp.py, resulting in the error. Is there a reason that you added that if statement? You are trying to load a pretrained SAM model with opts that do not contain the encoder_type field. That is why your code fails.

Regarding your question on how to generate GAN inversion images, you can simply use the pSp repo if you would like. SAM is designed to edit age, not perform GAN inversion.

from sam.

yyy7124 avatar yyy7124 commented on June 15, 2024

Thanks for your prompt reply .
I added the if statement for the convenience of choosing Gradualstyleencoder or Backboneencoder like in psp.Would it work if I used the weights I trained myself?
I see that the image shown in your paper is a GAN inversion, which is a little different from the image in the FFHQ dataset. Why doesn't this difference need to be used as a measure?

from sam.

yuval-alaluf avatar yuval-alaluf commented on June 15, 2024

I see that the image shown in your paper is a GAN inversion, which is a little different from the image in the FFHQ dataset.

We showed the inverted image instead of the original FFHQ/CelebA-HQ image due to licensing reasons.

Would it work if I used the weights I trained myself?

The code provided in the repo is used to reproduce the paper as is. If you would like to make alterations to the inner workings of SAM, you will need to alter the code. So yes, if you trained our own model, you can load them, but this will require you to know how to alter the code to get what you want.

from sam.

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.