Code Monkey home page Code Monkey logo

Comments (4)

williamyang1991 avatar williamyang1991 commented on May 30, 2024
  1. Could I use the pretrained model you provided (showing below) on several different dataset that I collected them myself.

Yes. You don't need to pretrain another model.
This model is pretrained on FFHQ, independent of the extrinsic styles, thus it can be applied to any extrinsic styles.

  1. I only find out stage 2 codes in pretrain_dualstylegan.py. Could you showd me codes of Stage 1 in pretrain_dualstylegan.py?

Stage 1 initializes the extrinsic style path, which I directly put in the model initialization function __init__():

# model initialization
# the convolution filters are set to values close to 0 to produce negligible residual features
self.conv[0].weight.data *= 0.01
self.conv2[0].weight.data *= 0.01

# structure transform block T_s
self.res.append(EqualLinear(512, 512))
# FC layer is initialized with identity matrices, meaning no changes to the input latent code
self.res[-1].weight.data = torch.eye(512) * 512.0**0.5 + torch.randn(512, 512) * 0.01

  1. I am not understand stage1 very well from paper. In stage 1, you trained color transform blocks with style mixing FFHQ images?
    The purple hair in following figure you showed it on purpose. In most cases, it is regular hair color (black, yellow, ...) when we train model in stage1, right?

Stage I only initializes the extrinsic style path to make the initialized model can naturally follow the original StyleGAN to perform color transfer.
Yes. the purple hair is just for easy visualization of color transfer. In most cases, the sampled faces have regular hair color.

  1. In stage 2, you mentioned you sampled z2~ from {z2,E(g(z2))}. Could I know why you do it this way instead of only z2 or E(g(z2)).

Because we want the extrinsic style path to work for both the randomly sampled latent code or latent code embeded from style image. These two kinds of latent codes have different distributions.

from dualstylegan.

kasim0226 avatar kasim0226 commented on May 30, 2024

Thank you for quick and clear reply.
Based on your reply, Stage 1 doesn't involve any training, am I right?

from dualstylegan.

williamyang1991 avatar williamyang1991 commented on May 30, 2024

Yes. No training is required.

from dualstylegan.

kasim0226 avatar kasim0226 commented on May 30, 2024

Thank you for answering

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.