Media-Smart / vedadet

A single stage object detection toolbox based on PyTorch
Apache License 2.0
498 stars 128 forks source link

About img_norm_cfg in tinaface.py #37

Closed WolffyChen closed 3 years ago

WolffyChen commented 3 years ago

Thanks for this great work. Tinaface use resnet50 as backbone and download pretrained model from pytorch official website. The official pytorch resnet50 use norm std as [58.395, 57.12, 57.375], whereas the std of img_norm_cfg in tinaface.py is [1, 1, 1]. Is there something I understand wrong?

mike112223 commented 3 years ago

In order to better demonstrate the efficiency of our method, we keep the data part same as Retinaface where the std of img_norm_cfg is [1, 1, 1]. And DSFD also uses [1, 1, 1]. Actually, we did not dig into this point.

WolffyChen commented 3 years ago

Thank you for your reply. It may be that the std has little effect on pretrained model initialization. And I will try to change the std to [58.395, 57.12, 57.375] to test the performance.

mike112223 commented 3 years ago

If you do not train with [58.395, 57.12, 57.375] and directly use this configuration to test, the performance will definitely degrade.

WolffyChen commented 3 years ago

Yeah, I mean I will train with [58.395, 57.12, 57.375] first and then test it.