Comments (4)
- Could you share how you modified pSp encoder with Z+?
I could not find the details in the paper and codes.
It seems you didn't use VAE encoder of the AgileGAN and also didn't inference Z mean and Z standard.
The modification of pSp encoder is only passing output (Z+) of pSp encdoer to mapping layer indviually? Am I right?
Yes, the encoder just maps the input image to Z+ output without using VAE.
- How did you train the pSp encoder with Z+? Or you used the pretrained pSp encoder model directly?
(I) I modify the stylegan model (pSp decoder) so that it accepts Z+ input:
DualStyleGAN/model/stylegan/model.py
Lines 511 to 523 in 39a9e9e
(2) I modify pSp encoder so that it passes the options z_plus_latent
and return_z_plus_latent
to the pSp decoder
DualStyleGAN/model/encoder/psp.py
Lines 69 to 70 in 39a9e9e
DualStyleGAN/model/encoder/psp.py
Lines 97 to 101 in 39a9e9e
and return Z+
DualStyleGAN/model/encoder/psp.py
Lines 106 to 108 in 39a9e9e
(3) I modify the function train()
and validate()
of coach.py
in the official pSp code, so that it passes our training option opts.z_plus_latent
to the pSp model.
- changing Line 91 to
y_hat, latent = self.net.forward(x, return_latents=True, z_plus_latent=self.opts.z_plus_latent)
- changing Line 135 to
y_hat, latent = self.net.forward(x, return_latents=True, z_plus_latent=self.opts.z_plus_latent)
(4) Finally, I train pSp from scratch using the following training settings:
python scripts/train.py \
--dataset_type=ffhq_encode \
--exp_dir=./logs/ffhq_encoder_zplus/ \
--workers=4 \
--batch_size=8 \
--test_batch_size=8 \
--test_workers=8 \
--val_interval=2500 \
--save_interval=5000 \
--encoder_type=GradualStyleEncoder \
--start_from_latent_avg \
--lpips_lambda=0.8 \
--l2_lambda=1 \
--id_lambda=0.1 \
--z_plus_latent
Hope this solves your questions.
from dualstylegan.
Thank you for your clear reply!
from dualstylegan.
@williamyang1991 are the changes you suggested to the psp decoder (stylegan) and psp code both to be made in the original psp code repo and then train ? In order to obtain the z plus encoder
from dualstylegan.
@williamyang1991 are the changes you suggested to the psp decoder (stylegan) and psp code both to be made in the original psp code repo and then train ? In order to obtain the z plus encoder
Yes, I modify both the encoder and decoder.
from dualstylegan.
Related Issues (20)
- 我想使用生成的风格图像进行风格迁移,应该如何操作呢? HOT 1
- Why " W+ " encoder giving fully different style transformation ? HOT 23
- How to use this code in mac OS and building in IOS Device ? HOT 1
- 卡通化的人物可以保留人物的真实感吗? HOT 1
- Why dose the destylization process work? HOT 3
- 灌篮高手风格模型 HOT 1
- """Add --wplus in style_transfer.py to use original w+ pSp encoder rather than z+.""" integrate in demo of Hf spaces HOT 3
- Toon images HOT 2
- integrate stable diffusion pretrained models
- How is this picture drawn? HOT 1
- Memory issue while toonifying the image using "VToonify" but not while style transfering the image using "DualStyleGAN" why ?
- AttributeError: module 'model.stylegan' has no attribute 'lpips' HOT 1
- RuntimeError: mat1 dim 1 must match mat2 dim 0 HOT 1
- RuntimeError: input must be contiguous HOT 2
- pre-train ConditionalDiscriminator HOT 1
- 生成图片的脖子有痕迹 HOT 1
- Error occured when pretraining dualstylegan HOT 2
- Train with w-plus pSp encoder. HOT 2
- the gpu memory usage of finetuning dualstylegan on 8 gpus HOT 2
- Apart from Human images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dualstylegan.