You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have trained FAS model with my custom dataset and now i am trying to test trained model with my custom datasets. I applied the same preprocessing to test images (detect face and crop with MTCNN, Normalize, Resize, ToTensor ) :
normalization = transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
and when I tried to get results with Sigmoid the results of real faces and spoof faces are nearly the same:
(sample_image = test_transform(image)
logits = model(sample_image.unsqueeze(0))
print(f'I am Sigmoid score : {torch.sigmoid(logits).item()}')) -----> 0.4~ average score for real faces and also for spoof faces.
Note : but when i tried to get scores like : logit = logits if config.MODEL.num_classes==1 else F.softmax(logits, dim=1)[:, 1] the output for spoof faces are mainly '-' scores and for real faces the are '+' scores. But I wanna apply sigmoid and get a score in a range of [0~1].
I used default parameters 'ICM2O.yaml' and 'loss_func: "bce'.
Please can you help me, Thank you very much ...
The text was updated successfully, but these errors were encountered:
Good morning ~
First of all thank you such a hard work.
I have trained FAS model with my custom dataset and now i am trying to test trained model with my custom datasets. I applied the same preprocessing to test images (detect face and crop with MTCNN, Normalize, Resize, ToTensor ) :
normalization = transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
and when I tried to get results with Sigmoid the results of real faces and spoof faces are nearly the same:
(sample_image = test_transform(image)
logits = model(sample_image.unsqueeze(0))
print(f'I am Sigmoid score : {torch.sigmoid(logits).item()}')) -----> 0.4~ average score for real faces and also for spoof faces.
Note : but when i tried to get scores like : logit = logits if config.MODEL.num_classes==1 else F.softmax(logits, dim=1)[:, 1] the output for spoof faces are mainly '-' scores and for real faces the are '+' scores. But I wanna apply sigmoid and get a score in a range of [0~1].
I used default parameters 'ICM2O.yaml' and 'loss_func: "bce'.
Please can you help me, Thank you very much ...
The text was updated successfully, but these errors were encountered: