How to get negative attribute direction
shartoo opened this issue · 0 comments
shartoo commented
I tranined the network with some other version of StyleGAN and produce some good result, it transform postive attribute defined by CelebA-HQ(40 attributes,such Bald
, Male
) very well. But how can i transform image by the negative attributes direction,namely Male to Female?
Your code show some example as below in test.py
w_1 = trainer.T_net(w_0.view(w_0.size(0), -1), alpha.unsqueeze(0).to(device))
w_1 = w_1.view(w_0.size())
w_1 = torch.cat((w_1[:,:11,:], w_0[:,11:,:]), 1)
x_1, _ = trainer.StyleGAN([w_1], input_is_latent=True, randomize_noise=False)
if alpha is negative value ,it transform image by negative attribute direction,but such kind of tranform will result in very bad image.
Source image
To negative Male
(Female)