facenet uses an Inception Residual Masking Network pretrained on VGGFace2 to classify facial identities. Facenet also exposes a 512 latent facial embedding space.
Model Details
Model Type
: Convolutional Neural Network (CNN)
Architecture
: Inception Residual masking network. Output layer classifies facial identities. Also provides a 512 dimensional representation layer
If you use this model in your research or application, please cite the following paper:
F. Schroff, D. Kalenichenko, J. Philbin. FaceNet: A Unified Embedding for Face Recognition and Clustering, arXiv:1503.03832, 2015.
@inproceedings{schroff2015facenet,
title={Facenet: A unified embedding for face recognition and clustering},
author={Schroff, Florian and Kalenichenko, Dmitry and Philbin, James},
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
pages={815--823},
year={2015}
}
Acknowledgements
We thank Tim Esler and David Sandberg for sharing their code and training weights with a permissive license.
Example Useage
import numpy as np
import torch
import torch.nn as nn
from feat.identity_detectors.facenet.facenet_model import InceptionResnetV1
from huggingface_hub import hf_hub_download
device = 'cpu'
identity_detector = InceptionResnetV1(
pretrained=None,
classify=False,
num_classes=None,
dropout_prob=0.6,
device=device,
)
identity_detector.logits = nn.Linear(512, 8631)
identity_model_file = hf_hub_download(repo_id='py-feat/facenet', filename="facenet_20180402_114759_vggface2.pth")
identity_detector.load_state_dict(torch.load(identity_model_file, map_location=device))
identity_detector.eval()
identity_detector.to(device)
# Test model
face_image = "path/to/your/test_image.jpg"# Replace with your extracted face image that is [224, 224]# 512 dimensional Facial Embeddings
identity_embeddings = identity_detector.forward(extracted_faces)
Runs of py-feat facenet on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
2
30-day runs
More Information About facenet huggingface.co Model
facenet huggingface.co is an AI model on huggingface.co that provides facenet's model effect (), which can be used instantly with this py-feat facenet model. huggingface.co supports a free trial of the facenet model, and also provides paid use of the facenet. Support call facenet model through api, including Node.js, Python, http.
facenet huggingface.co is an online trial and call api platform, which integrates facenet's modeling effects, including api services, and provides a free online trial of facenet, you can try facenet online for free by clicking the link below.
py-feat facenet online free url in huggingface.co:
facenet is an open source model from GitHub that offers a free installation service, and any user can find facenet on GitHub to install. At the same time, huggingface.co provides the effect of facenet install, users can directly use facenet installed effect in huggingface.co for debugging and trial. It also supports api for free installation.