/edgeface

EdgeFace: Efficient Face Recognition Model for Edge Devices [TBIOM 2024] the winner of compact track of IJCB 2023 Efficient Face Recognition Competition

Primary LanguageJupyter NotebookOtherNOASSERTION

EdgeFace: Efficient Face Recognition Model for Edge Devices

PWC PWC PWC PWC PWC PWC PWC

arXiv

This repository contain inference code and pretrained models to use EdgeFace: Efficient Face Recognition Model for Edge Devices, which is the winning entry in the compact track of "EFaR 2023: Efficient Face Recognition Competition" organised for the IEEE/IAPR International Journal of Central Banking (IJCB) 2023. For the complete source code of training and evaluation, please check the official repository.

EdgeFace

Installation

$ pip install -r requirements.txt

Inference

The following code shows how to use the model for inference:

import torch
from torchvision import transforms
from face_alignment import align
from backbones import get_model

# load model
model_name="edgeface_s_gamma_05" # or edgeface_xs_gamma_06
model=get_model(model_name)
checkpoint_path='path_to_checkpint'
model.load_state_dict(torch.load(checkpoint_path)['state_dict']).eval()

transform = transforms.Compose([
            transforms.ToTensor(),
            transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]),
            ])

path = 'path_to_face_image'
aligned = align.get_aligned_face(path) # align face
transformed_input = transform(aligned) # preprocessing

# extract embedding
embedding = model(transformed_input)

Pre-trained models

Performance

The performance of each model is reported in Table 2 of the paper:

performance

Reference

If you use this repository, please cite the following paper, which is published in the IEEE Transactions on Biometrics, Behavior, and Identity Science (IEEE T-BIOM). The PDF version of the paper is available as pre-print on arxiv. The complete source code for reproducing all experiments in the paper (including training and evaluation) is also publicly available in the official repository.

@article{edgeface,
  title={Edgeface: Efficient face recognition model for edge devices},
  author={George, Anjith and Ecabert, Christophe and Shahreza, Hatef Otroshi and Kotwal, Ketan and Marcel, Sebastien},
  journal={IEEE Transactions on Biometrics, Behavior, and Identity Science},
  year={2024}
}