facenet-pytorch
facenet-pytorch copied to clipboard
labels for vggface2 model
Hi when I do classification with the pretrained vggface2 model, how do I match a probability to a name? do you have a list of labels for the trained model?
Thanks
The list doesn't seem right. At least it looks different from the list provided in the Identity Meta_v1. file on VGGFACE2 website : https://www.robots.ox.ac.uk/~vgg/data/vgg_face2/meta_infor.html.
Hi, can you provide the folder structure for VGGFACE2 datasets when training? I'm using the vggface2 pretrained model to make evaluation on the data but the label of the prediction seems inaccurate. Thanks.
I have a problem because in the paper https://www.robots.ox.ac.uk/~vgg/publications/2018/Cao18/cao18.pdf the number of labels is 9131, but the output shape with probabilities is with dimension 8631. Why is this the case?
After doing the fine tuning as explained in https://github.com/timesler/facenet-pytorch/blob/master/examples/finetune.ipynb , I am doing the following code to create a dictionary of probability for each person:
from PIL import Image
path = "<path to my picture>"
mtcnn = MTCNN(
image_size=160, margin=0, min_face_size=64,
thresholds=[0.6, 0.7, 0.7], factor=0.709, post_process=True,
device=device
)
img = mtcnn(Image.open(path), save_path=None)
probs = resnet(img.unsqueeze(0).to(device))
{name:prob for name, prob in zip(dataset.classes, list(probs[0].tolist()))}
I have a problem because in the paper https://www.robots.ox.ac.uk/~vgg/publications/2018/Cao18/cao18.pdf the number of labels is 9131, but the output shape with probabilities is with dimension 8631. Why is this the case?
As stated in the repo description, the model output an embedding vector of 8631 logits which represents the number of identities in the training set of VGGFace2,
The VGGFace2 dataset is made of around 3.31 million images divided into 9131 classes, each representing a different person identity. The dataset is divided into two splits, one for the training and one for test. The latter contains around 170000 images divided into 500 identities while all the other images belong to the remaining 8631 classes available for training.