ElasticFace: Elastic Margin Loss for Deep Face Recognition

Overview

This is the official repository of the paper:

ElasticFace: Elastic Margin Loss for Deep Face Recognition

Paper on arxiv: arxiv

evaluation

Model Log file Pretrained model
ElasticFace-Arc log file pretrained-mode
ElasticFace-Cos log file pretrained-mode
ElasticFace-Arc+ log file pretrained-mode
ElasticFace-Cos+ log file pretrained-mode

Evaluation result: See: Paper with code

Face recognition model training

Model training: In the paper, we employ MS1MV2 as the training dataset which can be downloaded from InsightFace (MS1M-ArcFace in DataZoo) Download MS1MV2 dataset from insightface on strictly follow the licence distribution

Unzip the dataset and place it in the data folder Set the config.output and config.loss in the config/config.py

All code has been trained and tested using Pytorch 1.7.1

Face recognition evaluation

evaluation on LFW, AgeDb-30, CPLFW, CALFW and CFP-FP:
  1. download the data from their offical webpages.
  2. alternative: The evaluation datasets are available in the training dataset package as bin file
  3. set the config.rec to dataset folder e.g. data/faces_emore
  4. set the config.val_targets for list of the evaluation dataset
  5. download the pretrained model from link the previous table
  6. set the config.output to path to pretrained model weights
  7. run eval/evaluation.py
  8. the output is test.log contains the evaluation results over all epochs

To-do

  • Add evaluation script

If you use any of the code provided in this repository, please cite the following paper:

Citation

@misc{boutros2021elasticface,
      title={ElasticFace: Elastic Margin Loss for Deep Face Recognition}, 
      author={Fadi Boutros and Naser Damer and Florian Kirchbuchner and Arjan Kuijper},
      year={2021},
      eprint={2109.09416},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}


License

This project is licensed under the terms of the Attribution-NonCommercial-ShareAlike 4.0 
International (CC BY-NC-SA 4.0) license. 
Copyright (c) 2021 Fraunhofer Institute for Computer Graphics Research IGD Darmstadt
Comments
  • dataset as .bin

    dataset as .bin

    • I'm not good at English -
    1. I downloaded megaface train dataset at https://github.com/deepinsight/insightface/tree/master/recognition/datasets

    but it is not .jpg, it is .bin

    I want to know the dataset flow, but I can't read .bin .

    How can I read the dataset flow ?? please help me

    opened by dlwnsgud8406 1
  • issame list variable and bin file

    issame list variable and bin file

    Hi, Can you please tell :

    1. What is "issame_list" while loading pickle file code Line in load_bin function in verification.py:   bins, issame_list = pickle.load(f, encoding='bytes')  # py3

    2. And where can I find : alternative: The evaluation datasets are available in the training dataset package as bin file ?

    Thank you

    opened by aryachiranjeev 1
  • chage in number of Data Sets

    chage in number of Data Sets

    hi i want to reduce the number of datasets but changing config.val_targets doesn't help it leads to an error. Also i am running the code with local_rank =0 is that ok?

    opened by javaria227 0
  • Cuda error( core dump )

    Cuda error( core dump )

    when I train with my custom data set if I keep default config.num_classes and config.num_image it work and if I set config.num_classes and config.num_image by my classes and number image of my dataset it error with frame and core dump

    opened by xuanson97hg 3
  • Waht's the architecture of the provided pretrained weight?

    Waht's the architecture of the provided pretrained weight?

    Hi, @NetoPedro, thank you for your work.

    I have a question, what is the network structure of the provided pretrained weight file? Is it iresnet100 or iresnet50?

    If it is iresnet100, would you provide the pretrained model of iresnet50?

    Thanks

    opened by taosean 2
Owner
Fadi Boutros
Fadi Boutros
Implement of "Training deep neural networks via direct loss minimization" in PyTorch for 0-1 loss

This is the implementation of "Training deep neural networks via direct loss minimization" published at ICML 2016 in PyTorch. The implementation targe

Cuong Nguyen 1 Jan 18, 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
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

null 32 Sep 21, 2022
An implementation for the loss function proposed in Decoupled Contrastive Loss paper.

Decoupled-Contrastive-Learning This repository is an implementation for the loss function proposed in Decoupled Contrastive Loss paper. Requirements P

Ramin Nakhli 71 Dec 4, 2022
The official implementation of You Only Compress Once: Towards Effective and Elastic BERT Compression via Exploit-Explore Stochastic Nature Gradient.

You Only Compress Once: Towards Effective and Elastic BERT Compression via Exploit-Explore Stochastic Nature Gradient (paper) @misc{zhang2021compress,

null 46 Dec 7, 2022
Official implementation of the ICML2021 paper "Elastic Graph Neural Networks"

ElasticGNN This repository includes the official implementation of ElasticGNN in the paper "Elastic Graph Neural Networks" [ICML 2021]. Xiaorui Liu, W

liuxiaorui 34 Dec 4, 2022
Realtime Face Anti Spoofing with Face Detector based on Deep Learning using Tensorflow/Keras and OpenCV

Realtime Face Anti-Spoofing Detection ?? Realtime Face Anti Spoofing Detection with Face Detector to detect real and fake faces Please star this repo

Prem Kumar 86 Aug 3, 2022
Deep Face Recognition in PyTorch

Face Recognition in PyTorch By Alexey Gruzdev and Vladislav Sovrasov Introduction A repository for different experimental Face Recognition models such

Alexey Gruzdev 141 Sep 11, 2022
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
Location-Sensitive Visual Recognition with Cross-IOU Loss

The trained models are temporarily unavailable, but you can train the code using reasonable computational resource. Location-Sensitive Visual Recognit

Kaiwen Duan 146 Dec 25, 2022
img2pose: Face Alignment and Detection via 6DoF, Face Pose Estimation

img2pose: Face Alignment and Detection via 6DoF, Face Pose Estimation Figure 1: We estimate the 6DoF rigid transformation of a 3D face (rendered in si

Vítor Albiero 519 Dec 29, 2022
Code for HLA-Face: Joint High-Low Adaptation for Low Light Face Detection (CVPR21)

HLA-Face: Joint High-Low Adaptation for Low Light Face Detection The official PyTorch implementation for HLA-Face: Joint High-Low Adaptation for Low L

Wenjing Wang 77 Dec 8, 2022
[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
Swapping face using Face Mesh with TensorFlow Lite

Swapping face using Face Mesh with TensorFlow Lite

iwatake 17 Apr 26, 2022
Face Synthetics dataset is a collection of diverse synthetic face images with ground truth labels.

The Face Synthetics dataset Face Synthetics dataset is a collection of diverse synthetic face images with ground truth labels. It was introduced in ou

Microsoft 608 Jan 2, 2023
VGGFace2-HQ - A high resolution face dataset for face editing purpose

The first open source high resolution dataset for face swapping!!! A high resolution version of VGGFace2 for academic face editing purpose

Naiyuan Liu 232 Dec 29, 2022