Official repository for MixFaceNets: Extremely Efficient Face Recognition Networks

Overview

MixFaceNets

This is the official repository of the paper: MixFaceNets: Extremely Efficient Face Recognition Networks.

(Accepted in IJCB2021) https://ieeexplore.ieee.org/abstract/document/9484374

Paper Arxiv

Model MFLOPs Params (M) LFW% AgeDB-30% IJB-B( TAR at FAR1e–6) IJB-C( TAR at FAR1e–6) Pretrained model
MixFaceNet-M 626.1 3.95 99.68 97.05 91.55 93.42 pretrained-mode
ShuffleMixFaceNet-M 626.1 3.95 99.60 96.98 91.47 93.5 pretrained-mode
MixFaceNet-S 451.7 3.07 99.60 96.63 90.17 92.30 pretrained-mode
ShuffleMixFaceNet-S 451.7 3.07 99.58 97.05 90.94 93.08 pretrained-mode
MixFaceNet-XS 161.9 1.04 99.60 95.85 88.48 90.73 pretrained-mode
ShuffleMixFaceNet-XS 161.9 1.04 99.53 95.62 87.86 90.43 pretrained-mode

FLOPs vs. performance on LFW (accuracy), AgeDB-30 (accuracy), MegaFace (TAR at FAR1e-6), IJB-B (TAR at FAR1e-4), IJB-C (TAR at FAR1e-4) and refined version of MegaFace, noted as MegaFace (R), (TAR at FAR1e-6). Our MixFaceNet models are highlighted with triangle marker and red edge color.

LFW LFW

AgeDb-30 LFW

MegaFace LFW

MegaFace(R) LFW

IJB-B LFW

IJB-C LFW

If you find MixFaceNets useful in your research, please cite the following paper:

Citation

@INPROCEEDINGS{9484374,
  author={Boutros, Fadi and Damer, Naser and Fang, Meiling and Kirchbuchner, Florian and Kuijper, Arjan},
  booktitle={2021 IEEE International Joint Conference on Biometrics (IJCB)}, 
  title={MixFaceNets: Extremely Efficient Face Recognition Networks}, 
  year={2021},
  volume={},
  number={},
  pages={1-8},
  doi={10.1109/IJCB52358.2021.9484374}}


The model is trained with ArcFace loss using Partial-FC algorithms. If you train the MixfaceNets with ArcFace and Partial-FC, please follow their distribution licenses.

Citation

@inproceedings{deng2019arcface,
  title={Arcface: Additive angular margin loss for deep face recognition},
  author={Deng, Jiankang and Guo, Jia and Xue, Niannan and Zafeiriou, Stefanos},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={4690--4699},
  year={2019}
}
@inproceedings{an2020partical_fc,
  title={Partial FC: Training 10 Million Identities on a Single Machine},
  author={An, Xiang and Zhu, Xuhan and Xiao, Yang and Wu, Lan and Zhang, Ming and Gao, Yuan and Qin, Bin and
  Zhang, Debing and Fu Ying},
  booktitle={Arxiv 2010.05222},
  year={2020}
}
You might also like...
TDN: Temporal Difference Networks for Efficient Action Recognition
TDN: Temporal Difference Networks for Efficient Action Recognition

TDN: Temporal Difference Networks for Efficient Action Recognition Overview We release the PyTorch code of the TDN(Temporal Difference Networks).

QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.
QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

 WarpDrive: Extremely Fast End-to-End Deep Multi-Agent Reinforcement Learning on a GPU
WarpDrive: Extremely Fast End-to-End Deep Multi-Agent Reinforcement Learning on a GPU

WarpDrive is a flexible, lightweight, and easy-to-use open-source reinforcement learning (RL) framework that implements end-to-end multi-agent RL on a single GPU (Graphics Processing Unit).

An extremely simple, intuitive, hardware-friendly, and well-performing network structure for LiDAR semantic segmentation on 2D range image. IROS21
An extremely simple, intuitive, hardware-friendly, and well-performing network structure for LiDAR semantic segmentation on 2D range image. IROS21

FIDNet_SemanticKITTI Motivation Implementing complicated network modules with only one or two points improvement on hardware is tedious. So here we pr

Pre-trained Deep Learning models and demos (high quality and extremely fast)

OpenVINO™ Toolkit - Open Model Zoo repository This repository includes optimized deep learning models and a set of demos to expedite development of hi

Extremely easy multi instancing software for minecraft speedrunning.
Extremely easy multi instancing software for minecraft speedrunning.

Easy Multi Extremely easy multi/single instancing software for minecraft speedrunning. A couple of goals of this project: Setup multi in minutes No fi

This is an official implementation for "ResT: An Efficient Transformer for Visual Recognition".

ResT By Qing-Long Zhang and Yu-Bin Yang [State Key Laboratory for Novel Software Technology at Nanjing University] This repo is the official implement

This is the official repository for evaluation on the NoW Benchmark Dataset. The goal of the NoW benchmark is to introduce a standard evaluation metric to measure the accuracy and robustness of 3D face reconstruction methods from a single image under variations in viewing angle, lighting, and common occlusions. Official repository of the paper Learning to Regress 3D Face Shape and Expression from an Image without 3D Supervision
Official repository of the paper Learning to Regress 3D Face Shape and Expression from an Image without 3D Supervision

Official repository of the paper Learning to Regress 3D Face Shape and Expression from an Image without 3D Supervision

Comments
  • Underwelming results of eval.py

    Underwelming results of eval.py

    Hello,

    I tried to run the eval.py using the evaluation dataset (MS1M-ArcFace), but the results for the MixFaceNet-S are suboptimal...

    Log file: Training: 2021-09-16 10:52:06,829-[lfw][295672]XNorm: 289.635608 Training: 2021-09-16 10:52:06,837-[lfw][295672]Accuracy-Flip: 0.58800+-0.01770 Training: 2021-09-16 10:52:06,837-[lfw][295672]Accuracy-Highest: 0.58800 Training: 2021-09-16 10:55:39,481-[cfp_fp][295672]XNorm: 2203.600646 Training: 2021-09-16 10:55:39,481-[cfp_fp][295672]Accuracy-Flip: 0.50171+-0.01464 Training: 2021-09-16 10:55:39,481-[cfp_fp][295672]Accuracy-Highest: 0.50171 Training: 2021-09-16 10:58:48,704-[agedb_30][295672]XNorm: 434.067380 Training: 2021-09-16 10:58:48,705-[agedb_30][295672]Accuracy-Flip: 0.49850+-0.00444 Training: 2021-09-16 10:58:48,705-[agedb_30][295672]Accuracy-Highest: 0.49850

    I used the '295672backbone.pth' in the output folder.

    Thanks for the help in advance!

    opened by stbunda 1
  • Underwhelimg results when testing with personal images (+ bug fix)

    Underwhelimg results when testing with personal images (+ bug fix)

    Hello,

    First of all, thank you for sharing your code. I ran into a few problems when trying to run your eval.py code, it would seem like the value of config.gdw_size under the condition if (config.net_size == "s"): should be 1024 instead of 512, without which the model will crash when loaded.

    That being fixed, I tried running the model on some of my images and I'm running into some pretty underwhelming results. I haven't tried reproducing your results with existing datasets, but I have no doubt your reported metrics are accurate, so I must be missing a step on my end. This is what I have tried so far

    import logging
    import os
    import sys
    
    import torch
    
    import backbones.mixnetm as mx
    from utils.utils_callbacks import CallBackVerification
    from utils.utils_logging import init_logging
    import numpy as np
    from scipy.spatial.distance import cdist
    
    sys.path.append('/root/xy/work_dir/xyface/')
    from config import config as cfg
    from cv2 import imread, resize
    
    
    if __name__ == "__main__":
        img1 = imread("o1.jpg")
        img2 = imread("o2.jpg")
        img1 = resize(img1, (112, 112)) / 255
        img2 = resize(img2, (112, 112)) / 255
        img1 = (img1 - 0.5) / 0.5
        img2 = (img2 - 0.5) / 0.5
        backbone = mx.mixnet_s(embedding_size=cfg.embedding_size, width_scale=cfg.scale, gdw_size=cfg.gdw_size).to("cpu")
        backbone.load_state_dict(torch.load(os.path.join('147836backbone.pth'), map_location=torch.device('cpu')))
        model = torch.nn.DataParallel(backbone)
        model.eval()
        img1_embeddings = model(
            torch.tensor(np.expand_dims(np.moveaxis(img1, -1, 0), axis=0)).type(torch.float)).detach().cpu().numpy()
        img2_embeddings = model(
            torch.tensor(np.expand_dims(np.moveaxis(img2, -1, 0), axis=0)).type(torch.float)).detach().cpu().numpy()
        cos_sim = 1 - cdist(img1_embeddings, img2_embeddings, 'cosine')
    

    o1.jpg and o2.jpg are faces detected and aligned by MTCNN, as you did in your paper. As you can see, I reduce the RGB values to the [0,1] range and normalize them with mean and std 0.5, as I saw you did elsewhere in your code. I am not sure what is missing, could you provide me with some assistance, please?

    You can find an example of two faces below, I get the cos_sim 0.92102719 when comparing them, which seems too high. https://drive.google.com/drive/folders/1YUY3ZkxPQFemWzQ8byHdNFUidxw5OOKp?usp=sharing

    opened by lrizzello 6
Owner
Fadi Boutros
Fadi Boutros
Official PyTorch implementation of "Contrastive Learning from Extremely Augmented Skeleton Sequences for Self-supervised Action Recognition" in AAAI2022.

AimCLR This is an official PyTorch implementation of "Contrastive Learning from Extremely Augmented Skeleton Sequences for Self-supervised Action Reco

Gty 44 Dec 17, 2022
This is the repository for the NeurIPS-21 paper [Contrastive Graph Poisson Networks: Semi-Supervised Learning with Extremely Limited Labels].

CGPN This is the repository for the NeurIPS-21 paper [Contrastive Graph Poisson Networks: Semi-Supervised Learning with Extremely Limited Labels]. Req

null 10 Sep 12, 2022
DVG-Face: Dual Variational Generation for Heterogeneous Face Recognition, TPAMI 2021

DVG-Face: Dual Variational Generation for HFR This repo is a PyTorch implementation of DVG-Face: Dual Variational Generation for Heterogeneous Face Re

null 52 Dec 30, 2022
Face Library is an open source package for accurate and real-time face detection and recognition

Face Library Face Library is an open source package for accurate and real-time face detection and recognition. The package is built over OpenCV and us

null 52 Nov 9, 2022
A large-scale face dataset for face parsing, recognition, generation and editing.

CelebAMask-HQ [Paper] [Demo] CelebAMask-HQ is a large-scale face image dataset that has 30,000 high-resolution face images selected from the CelebA da

switchnorm 1.7k Dec 26, 2022
An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicity.

Fast Face Classification (F²C) This is the code of our paper An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicit

null 33 Jun 27, 2021
A deep learning library that makes face recognition efficient and effective

Distributed Arcface Training in Pytorch This is a deep learning library that makes face recognition efficient, and effective, which can train tens of

Sajjad Aemmi 10 Nov 23, 2021
[TIP 2021] SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction

SADRNet Paper link: SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction Requirements python

Multimedia Computing Group, Nanjing University 99 Dec 30, 2022
A repository that finds a person who looks like you by using face recognition technology.

Find Your Twin Hello everyone, I've always wondered how casting agencies do the casting for a scene where a certain actor is young or old for a movie

Cengizhan Yurdakul 3 Jan 29, 2022
Official PyTorch implementation of "Improving Face Recognition with Large AgeGaps by Learning to Distinguish Children" (BMVC 2021)

Inter-Prototype (BMVC 2021): Official Project Webpage This repository provides the official PyTorch implementation of the following paper: Improving F

Jungsoo Lee 16 Jun 30, 2022