Open utkarsh-chaurasia opened 1 month ago
Are the images aligned and cropped? you can use this code to align and crop the testing data: https://github.com/fdbtrs/ExFaceGAN/blob/main/MTCNN_alignment.py
Yes, I have already cropped the data into the required format. The images are aligned and preprocessed as per the model's requirements.
what are the similar, none-similar faces? Is it the same/different identity? ... P.S. you don't need these lines: transforms.Resize((112, 112)), transforms.RandomHorizontalFlip(),
Thank you for your suggestions.
To clarify, by "similar faces," I mean images of the same identity, while "non-similar faces" are images of different identities.
I tried removing the lines:
transforms.Resize((112, 112)),
transforms.RandomHorizontalFlip(),
as you suggested, but it didn’t significantly impact the results. The similarity scores for both similar and non-similar faces remain close, making it difficult to distinguish between them effectively.
What I’m attempting to do is perform N matching between a set of images using cosine similarity based on their feature embeddings. The goal is to see how well the model differentiates between images of the same person and images of different people. However, the similarity scores for non-similar faces (different identities) are still too close to those for similar faces (same identity), which affects the matching accuracy.
Any further suggestions on improving the performance or distinguishing capabilities would be greatly appreciated.
Description: I have tested a set of images using your model weights and performed N matching based on cosine similarity. I followed the code structure below:
Sample code for N:N matching using cosine similarity
(Insert relevant parts of the code here)
I tested with the following weights:
CASIA-webface
SFace-CL
SFace-CLS
SFace-KT
Here are the results I observed:
Starting score for non-similar face (mean cosine similarity):
CASIA-webface: 0.736122
SFace-CL: 0.75276744
SFace-CLS: 0.80045915
SFace-KT: 0.7076743
Final score for similar face (mean cosine similarity):
CASIA-webface: 0.7416373
SFace-CL: 0.775683
SFace-CLS: 0.8008376
SFace-KT: 0.7437376
Problem: The similarity scores for non-similar faces and similar faces are very close, which limits the accuracy in distinguishing between them. For instance, in the case of SFace-KT, the difference between non-similar (0.7076743) and similar faces (0.7437376) is minimal. This behavior can be seen across all the weights.
Could you provide any suggestions on improving the model's ability to better distinguish between similar and non-similar faces? I suspect there might be an issue in either the weight structure or feature extraction process.
Let me know if you need more information or if there are any suggested tweaks I can make to further improve the results.