A trusty face recognition research platform developed by Tencent Youtu Lab

Related tags

Deep LearningTFace
Overview

Introduction

TFace: A trusty face recognition research platform developed by Tencent Youtu Lab. It provides a high-performance distributed training framework and releases our efficient methods implementation.

This framework consists of several modules: 1. various data augmentation methods, 2. backbone model zoo, 3. our proposed methods for face recognition and face quality, 4. test protocols of evalution results and model latency.

Recent News

2021.3: SDD-FIQA: Unsupervised Face Image Quality Assessment with Similarity Distribution Distance accepted by CVPR2021. [paper] [code]

2021.3: Consistent Instance False Positive Improves Fairness in Face Recognition accepted by CVPR2021. [paper] [code]

2021.3: Spherical Confidence Learning for Face Recognition accepted by CVPR2021. [paper] [code]

2020.8: Improving Face Recognition from Hard Samples via Distribution Distillation Loss accepted by ECCV2020. [paper] [code]

2020.3: Curricularface: adaptive curriculum learning loss for deep face recognition has been accepted by CVPR2020. [paper] [code]

Requirements

  • python==3.6.0
  • torch==1.6.0
  • torchvision==0.7.0
  • tensorboard==2.4.0
  • Pillow==5.0.0

Getting Started

Train Data

The training dataset is organized in tfrecord format for efficiency. The raw data of all face images are saved in tfrecord files, and each dataset has a corresponding index file(each line includes tfrecord_name, trecord_index offset, label).

The IndexTFRDataset class will parse the index file to gather image data and label for training. This form of dataset is convenient for reorganization in data cleaning(do not reproduce tfrecord, just reproduce the index file).

  1. Convert raw image to tfrecords, generate a new data dir including some tfrecord files and a index_map file
python3 tools/img2tfrecord.py --img_list=${img_list} --pts_list=${pts_list} --tfrecords_name=${tfr_data_name}
  1. Convert old index file(each line includes image path, label) to new index file
python3 tools/convert_new_index.py --old=${old_index} --tfr_index=${tfr_index} --new=${new_index}
  1. Decode the tfrecords to raw image
python3 tools/decode.py --tfrecords_dir=${tfr_dir} --output_dir=${output_dir}

Augmentation

Data Augmentation module implements some 2D-based methods to generated some hard samples, e.g., maks, glass, headscarf. Details see Augmentation

Train

Modified the DATA_ROOTandINDEX_ROOTin ./tasks/distfc/train_confing.yaml, DATA_ROOT is the parent dir for tfrecord dir, INDEX_ROOT is the parent dir for index file.

bash local_train.sh

Test

Detail codes and steps see Test

Benchmark

Evaluation Results

Backbone Head Data LFW CFP-FP CPLFW AGEDB CALFW IJBB ([email protected]=1e-4) IJBC ([email protected]=1e-4)
IR_101 ArcFace MS1Mv2 99.77 98.27 92.08 98.15 95.45 94.2 95.6
IR_101 CurricularFace MS1Mv2 99.80 98.36 93.13 98.37 96.05 94.86 96.15
IR_18 ArcFace MS1Mv2 99.65 94.89 89.80 97.23 95.60 90.06 92.39
IR_34 ArcFace MS1Mv2 99.80 97.27 91.75 98.07 95.97 92.88 94.65
IR_50 ArcFace MS1Mv2 99.80 97.63 92.50 97.92 96.05 93.45 95.16
MobileFaceNet ArcFace MS1Mv2 99.52 91.66 87.93 95.82 95.12 87.07 89.13
GhostNet_x1.3 ArcFace MS1Mv2 99.65 94.20 89.87 96.95 95.58 89.61 91.96
EfficientNetB0 ArcFace MS1Mv2 99.60 95.90 91.07 97.58 95.82 91.79 93.67
EfficientNetB1 ArcFace MS1Mv2 99.60 96.39 91.75 97.65 95.73 92.43 94.43

Backbone model size & latency

The device and platform information see below:

Device Inference Framework
x86 cpu Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz Openvino
arm Kirin 980 TNN

Test results for different backbones and different devices:

Backbone Model Size(fp32) X86 CPU ARM
EfficientNetB0 16MB 26.29ms 32.09ms
EfficientNetB1 26MB 35.73ms 46.5ms
MobileFaceNet 4.7MB 7.63ms 15.61ms
GhostNet_x1.3 16MB 25.70ms 27.58ms
IR_18 92MB 57.34ms 94.58ms
IR_34 131MB 105.58ms NA
IR_50 167MB 165.95ms NA
IR_101 249MB 215.47ms NA

Acknowledgement

This repo is modified and adapted on these great repositories, we thank theses authors a lot for their greate efforts.

Owner
Tencent
Tencent
Build Graph Nets in Tensorflow

Graph Nets library Graph Nets is DeepMind's library for building graph networks in Tensorflow and Sonnet. Contact DeepMind 5.2k Jan 05, 2023

Implementing DeepMind's Fast Reinforcement Learning paper

Fast Reinforcement Learning This is a repo where I implement the algorithms in the paper, Fast reinforcement learning with generalized policy updates.

Marcus Chiam 6 Nov 28, 2022
[ICCV2021] Safety-aware Motion Prediction with Unseen Vehicles for Autonomous Driving

Safety-aware Motion Prediction with Unseen Vehicles for Autonomous Driving Safety-aware Motion Prediction with Unseen Vehicles for Autonomous Driving

Xuanchi Ren 44 Dec 03, 2022
PyTorch IPFS Dataset

PyTorch IPFS Dataset IPFSDataset(Dataset) See the jupyter notepad to see how it works and how it interacts with a standard pytorch DataLoader You need

Jake Kalstad 2 Apr 13, 2022
MediaPipeで姿勢推定を行い、Tokyo2020オリンピック風のピクトグラムを表示するデモ

Tokyo2020-Pictogram-using-MediaPipe MediaPipeで姿勢推定を行い、Tokyo2020オリンピック風のピクトグラムを表示するデモです。 Tokyo2020Pictgram02.mp4 Requirement mediapipe 0.8.6 or later O

KazuhitoTakahashi 295 Dec 26, 2022
DeiT: Data-efficient Image Transformers

DeiT: Data-efficient Image Transformers This repository contains PyTorch evaluation code, training code and pretrained models for DeiT (Data-Efficient

Facebook Research 3.2k Jan 06, 2023
yufan 81 Dec 08, 2022
A Haskell kernel for IPython.

IHaskell You can now try IHaskell directly in your browser at CoCalc or mybinder.org. Alternatively, watch a talk and demo showing off IHaskell featur

Andrew Gibiansky 2.4k Dec 29, 2022
Feature extraction made simple with torchextractor

torchextractor: PyTorch Intermediate Feature Extraction Introduction Too many times some model definitions get remorselessly copy-pasted just because

Antoine Broyelle 89 Oct 31, 2022
Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks

Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks This is a Pytorch-Lightning implementation of the paper "Self-s

Photogrammetry & Robotics Bonn 111 Dec 06, 2022
SPRING is a seq2seq model for Text-to-AMR and AMR-to-Text (AAAI2021).

SPRING This is the repo for SPRING (Symmetric ParsIng aNd Generation), a novel approach to semantic parsing and generation, presented at AAAI 2021. Wi

Sapienza NLP group 98 Dec 21, 2022
Anonymize BLM Protest Images

Anonymize BLM Protest Images This repository automates @BLMPrivacyBot, a Twitter bot that shows the anonymized images to help keep protesters safe. Us

Stanford Machine Learning Group 40 Oct 13, 2022
This project contains an implemented version of Face Detection using OpenCV and Mediapipe. This is a code snippet and can be used in projects.

Live-Face-Detection Project Description: In this project, we will be using the live video feed from the camera to detect Faces. It will also detect so

Hassan Shahzad 3 Oct 02, 2021
The implementation of the paper "HIST: A Graph-based Framework for Stock Trend Forecasting via Mining Concept-Oriented Shared Information".

The HIST framework for stock trend forecasting The implementation of the paper "HIST: A Graph-based Framework for Stock Trend Forecasting via Mining C

Wentao Xu 110 Dec 27, 2022
Estimating and Exploiting the Aleatoric Uncertainty in Surface Normal Estimation

Estimating and Exploiting the Aleatoric Uncertainty in Surface Normal Estimation

Bae, Gwangbin 95 Jan 04, 2023
The Python3 import playground

The Python3 import playground I have been confused about python modules and packages, this text tries to clear the topic up a bit. Sources: https://ch

Michael Moser 5 Feb 22, 2022
This repository contains the code used for Predicting Patient Outcomes with Graph Representation Learning (https://arxiv.org/abs/2101.03940).

Predicting Patient Outcomes with Graph Representation Learning This repository contains the code used for Predicting Patient Outcomes with Graph Repre

Emma Rocheteau 76 Dec 22, 2022
Depth-Aware Video Frame Interpolation (CVPR 2019)

DAIN (Depth-Aware Video Frame Interpolation) Project | Paper Wenbo Bao, Wei-Sheng Lai, Chao Ma, Xiaoyun Zhang, Zhiyong Gao, and Ming-Hsuan Yang IEEE C

Wenbo Bao 7.7k Dec 31, 2022
Optimizing Value-at-Risk and Conditional Value-at-Risk of Black Box Functions with Lacing Values (LV)

BayesOpt-LV Optimizing Value-at-Risk and Conditional Value-at-Risk of Black Box Functions with Lacing Values (LV) About This repository contains the s

1 Nov 11, 2021
The best solution of the Weather Prediction track in the Yandex Shifts challenge

yandex-shifts-weather The repository contains information about my solution for the Weather Prediction track in the Yandex Shifts challenge https://re

Ivan Yu. Bondarenko 15 Dec 18, 2022