Code Monkey home page Code Monkey logo

Comments (3)

williamyang1991 avatar williamyang1991 commented on August 15, 2024

Yes, the limited steps make the two models well aligned, thus the latent code for one domain works for anther domain.
See StyleAlign: Analysis and Applications of Aligned StyleGAN Models for details.

from dualstylegan.

laolongboy avatar laolongboy commented on August 15, 2024

Thanks! If I want to transfer all the real face to a specific style, and I don't want to refer to any example, can I just set
the exstyle code as same as the instyle code? Or is there another way?

from dualstylegan.

williamyang1991 avatar williamyang1991 commented on August 15, 2024

I don't know whether it works.
I think you can just sample random exstyle code.

DualStyleGAN/generate.py

Lines 61 to 64 in b3f0cf8

# sample structure codes
res_in = icpts.icp.netT(torch.randn(args.batch,128).to(device)).reshape(-1,7,512)
# sample color codes
ada_in = icptc.icp.netT(torch.randn(args.batch,128).to(device)).reshape(-1,11,512)

DualStyleGAN/generate.py

Lines 72 to 75 in b3f0cf8

# concatenate two codes to form the complete extrinsic style code
latent = torch.cat((res_in, ada_in), dim=1)
# map into W+ space
exstyle = generator.generator.style(latent.reshape(latent.shape[0]*latent.shape[1], latent.shape[2])).reshape(latent.shape)

from dualstylegan.

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.