Closed jo-dean closed 3 years ago
We normalize images by [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]. As the generated faces by StyleGAN2 should follow the distribution of normalized input faces, and when all the input of ArcFace, i.e. input faces and generated faces, is i.d.d., the identity loss calculated by ArcFace should be well-calibrated.
Thanks for your quick reply,I still can't understand what you mean very well. 1.did you mean generated faces by StyleGAN2 should normalized to [-1,1],cause the generated faces is Tensor format. I can process the input faces when load dataset, but the generated face, should I covert to RGB,then to tensor and normlize?
2.What is i.d.d.?
3.About the well-calibrated,can you tell me more detail?Does all the input of HRnet is same as ArcFace? thank you!
identical and independent distribution
. x = normalize(x) # by [0.5,0.5,0.5], [0.5,0.5,0.5]
latent = HieRFE(x)
x^ = stylegan2(latent)
identity_loss = 1 - cos (ArcFace(x), ArcFace(x^))
landmark_loss = HRnet(x) - HRnet(x^)
I really appreciate you. I have been confused about the input preprocessing of the pretrained model before.
Hello,when i write the loss function, I found the pretrained model(such as ArcFace and HRnet),the Normalize is diff from HieRFE and stylegan2。 The mean and std in ArcFace is [0.485, 0.456, 0.406], [0.229, 0.224, 0.225], and in the HieRFE is [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]. How did you solve this problem? thank you!