taylover-pei / SSDG-CVPR2020

Single-Side Domain Generalization for Face Anti-Spoofing, CVPR2020
224 stars 35 forks source link

Loading pretrained model in pytorch #8

Closed neerajkerkar closed 4 years ago

neerajkerkar commented 4 years ago

How should the pretrained model be loaded? I loaded the resnet18-5c106cde.pth model provided in the pretrained_model directory into the torchvision resnet18 model. This model has an fc layer with 1000 outputs. I used the first output as the 'spoof' class score and the second output as the 'real' class score. I evaluated the model on OULU but the accuracy is very bad. Am I loading the pretrained model correctly?

XingyuJinTI commented 4 years ago

Please refer to https://github.com/taylover-pei/SSDG-CVPR2020/issues/9#issuecomment-680819339

taylover-pei commented 4 years ago

The pretrained model refers to the model pretrained on ImageNet, not the final one pretrained by the algorithm in this paper. Thank you.