williamyang1991 / DualStyleGAN

[CVPR 2022] Pastiche Master: Exemplar-Based High-Resolution Portrait Style Transfer
Other
1.61k stars 250 forks source link

What is the purpose of destylization? #107

Open Lun-menG opened 1 month ago

Lun-menG commented 1 month ago

Hello, I'm considering whether I would need destylization if I already have a paired dataset. What is the purpose of destylization? Is it to generate paired datasets, or is it to encode the destylized images to obtain the content latent codes?Is destylization significantly important? Do we need the intermediate semantic features from the destylization process, or do we simply use the destylized images for encoding? If I use real paired images to obtain these codes, would it be okay to skip the destylization step?

williamyang1991 commented 1 month ago

You can skip the destylization step if you already have paired dataset.

Lun-menG commented 1 month ago

请问外在风格和内在风格用的是同一个编码器吗

williamyang1991 commented 1 month ago

是一个

Lun-menG commented 1 month ago

是一个

好的,谢谢

Lun-menG commented 1 month ago

是一个

请问你这个encoder是自己训练的吗,还是在psp项目上微调的

williamyang1991 commented 1 month ago

我在psp项目上自己训练的。因为psp release的模型都是W+的,不是Z+的,所以只能重新训练。

Lun-menG commented 1 month ago

我在psp项目上自己训练的。因为psp release的模型都是W+的,不是Z+的,所以只能重新训练。

哦哦,明白了,那您看,您方便给我发一份训练encoder的代码吗,或者可以给我说一下您训练encoder的细节吗,我想在这个encoder上面微调以符合我的任务

williamyang1991 commented 1 month ago

代码就是psp项目的,只不过把W+换成了Z+,其他设置都是和psp项目原本的参数一样的。 我因为换工作单位了,所以之前的服务器访问不了,而这部分我没有整理代码,所以手头没有代码

williamyang1991 commented 1 month ago

大概就是这些地方修改了

https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/model/encoder/psp.py#L95-L101

https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/model/stylegan/model.py#L514-L523

Lun-menG commented 1 month ago

大概就是这些地方修改了

https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/model/encoder/psp.py#L95-L101

https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/model/stylegan/model.py#L514-L523

哦哦好的,十分感谢