TreB1eN / InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace
MIT License
1.73k stars 423 forks source link

why trans.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]) #21

Open tengshaofeng opened 5 years ago

tengshaofeng commented 5 years ago

hi, you really did a great job. Here I have a question. why trans.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]) not mean = [0.485, 0.456, 0.406] stdv = [0.229, 0.224, 0.225] ? can you help me?

TreB1eN commented 5 years ago

mean = [0.485, 0.456, 0.406] stdv = [0.229, 0.224, 0.225] where is this statistics coming from ? Imagenet pretraining ? Well, I think this work is training with faces from scratch, it doesn't related to other pretrained paras

tengshaofeng commented 5 years ago

so mean = [0.485, 0.456, 0.406] stdv = [0.229, 0.224, 0.225] is also ok?

TreB1eN commented 5 years ago

it also gonna work I guess. But the Best way is to calculate the mean and std of your Training Data