jhb86253817 / PIPNet

Efficient facial landmark detector
MIT License
412 stars 82 forks source link

Is the stride or feature map size influence the NME? #44

Open CPFelix opened 1 year ago

CPFelix commented 1 year ago

I trained on my dataset and use the input size 64X80, and found the NME is larger than the regression method before used, and when I modified the input size to 256X256, NME is lower than before. @jhb86253817

CPFelix commented 1 year ago

And I'm also curious about the loss weight.Why cls_loss_weight is bigger than reg_loss_weight, according to my analysis, the cls is easier than reg, and reg loss should be important to the final NME. Thanks for pointing out my mistake!

jhb86253817 commented 1 year ago

Hi @CPFelix ,

  1. For PIPNet, if the input size is changed to 64x80, it may cause some problems. (a) E.g., 80 is not divisible by the power of 2 (the network stride), which may introduce error for localization. (b) Since ResNet has Stride 32, your heatmap has size 2x2, which is a bit meaningless for doing heatmap regression. You may need to reduce the stride of the backbone so that the size for heatmap regression and coordinate regression is balanced.
  2. I used larger weights for cls_loss so that its loss scale is comparable to reg_loss. Although cls is easier than reg, it is also important. Anyway, you may also try adjusting the weights see if improves.