williamyang1991 / VToonify

[SIGGRAPH Asia 2022] VToonify: Controllable High-Resolution Portrait Video Style Transfer
Other
3.53k stars 442 forks source link

Generate random w in paired data generation #74

Closed ayush202 closed 4 months ago

ayush202 commented 5 months ago

Hi I didn't understand how to generate random style codes w ∈ W+ to synthesize face images with G_0 in section 4.1.2 Data Generation and Training Objectives.

Could you please clarify this :)

williamyang1991 commented 5 months ago

This code generates random style codes w

https://github.com/williamyang1991/VToonify/blob/35922e049acad7c87c058929b15cef44c9968b30/train_vtoonify_t.py#L194-L195

ayush202 commented 5 months ago

Hi Thanks for the quick reply. According to my understanding from the StyleGAN inversion literature the W+ space latent vector dimensionality is (18, 512) where all these 18 vectors are different. Whereas, in your code mentioned in the above comment 1 single vector of 512 dimensionality is repeated 18 times which is also done in StyleGAN1 paper which is called as W space.

So, is it true that you meant to use W space instead of W+ space mentioned in the paper? Please correct me if I have misunderstood something :)

williamyang1991 commented 5 months ago

https://github.com/williamyang1991/VToonify/blob/35922e049acad7c87c058929b15cef44c9968b30/train_vtoonify_t.py#L194-L196

In Line 196, the 18 vectors become different.