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
Deployment of PyTorch chatbot with Flask

Chatbot Deployment with Flask and JavaScript In this tutorial we deploy the chatbot I created in this tutorial with Flask and JavaScript. This gives 2

Patrick Loeber (Python Engineer) 107 Dec 29, 2022
Object tracking and object detection is applied to track golf puts in real time and display stats/games.

Putting_Game Object tracking and object detection is applied to track golf puts in real time and display stats/games. Works best with the Perfect Prac

Max 1 Dec 29, 2021
Implementation of the GVP-Transformer, which was used in the paper "Learning inverse folding from millions of predicted structures" for de novo protein design alongside Alphafold2

GVP Transformer (wip) Implementation of the GVP-Transformer, which was used in the paper Learning inverse folding from millions of predicted structure

Phil Wang 19 May 06, 2022
Pytorch implementation for DFN: Distributed Feedback Network for Single-Image Deraining.

DFN:Distributed Feedback Network for Single-Image Deraining Abstract Recently, deep convolutional neural networks have achieved great success for sing

6 Nov 05, 2022
Orbivator AI - To Determine which features of data (measurements) are most important for diagnosing breast cancer and find out if breast cancer occurs or not.

Orbivator_AI Breast Cancer Wisconsin (Diagnostic) GOAL To Determine which features of data (measurements) are most important for diagnosing breast can

anurag kumar singh 1 Jan 02, 2022
MLJetReconstruction - using machine learning to reconstruct jets for CMS

MLJetReconstruction - using machine learning to reconstruct jets for CMS The C++ data extraction code used here was based heavily on that foundv here.

ALPhA Davidson 0 Nov 17, 2021
Vikrant Deshpande 1 Nov 17, 2022
PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation

PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation Created by Charles R. Qi, Hao Su, Kaichun Mo, Leonidas J. Guibas from Sta

Charles R. Qi 4k Dec 30, 2022
Code and data for ACL2021 paper Cross-Lingual Abstractive Summarization with Limited Parallel Resources.

Multi-Task Framework for Cross-Lingual Abstractive Summarization (MCLAS) The code for ACL2021 paper Cross-Lingual Abstractive Summarization with Limit

Yu Bai 43 Nov 07, 2022
Simple, but essential Bayesian optimization package

BayesO: A Bayesian optimization framework in Python Simple, but essential Bayesian optimization package. http://bayeso.org Online documentation Instal

Jungtaek Kim 74 Dec 05, 2022
Multi-Glimpse Network With Python

Multi-Glimpse Network Our code requires Python ≥ 3.8 Installation For example, venv + pip: $ python3 -m venv env $ source env/bin/activate (env) $ pyt

9 May 10, 2022
Metric learning algorithms in Python

metric-learn: Metric Learning in Python metric-learn contains efficient Python implementations of several popular supervised and weakly-supervised met

1.3k Dec 28, 2022
Official implementation of our paper "LLA: Loss-aware Label Assignment for Dense Pedestrian Detection" in Pytorch.

LLA: Loss-aware Label Assignment for Dense Pedestrian Detection This project provides an implementation for "LLA: Loss-aware Label Assignment for Dens

35 Dec 06, 2022
Code to produce syntactic representations that can be used to study syntax processing in the human brain

Can fMRI reveal the representation of syntactic structure in the brain? The code base for our paper on understanding syntactic representations in the

Aniketh Janardhan Reddy 4 Dec 18, 2022
ICCV2021 Oral SA-ConvONet: Sign-Agnostic Optimization of Convolutional Occupancy Networks

Sign-Agnostic Convolutional Occupancy Networks Paper | Supplementary | Video | Teaser Video | Project Page This repository contains the implementation

63 Nov 18, 2022
Add gui for YoloV5 using PyQt5

HEAD 更新2021.08.16 **添加图片和视频保存功能: 1.图片和视频按照当前系统时间进行命名 2.各自检测结果存放入output文件夹 3.摄像头检测的默认设备序号更改为0,减少调试报错 温馨提示: 1.项目放置在全英文路径下,防止项目报错 2.默认使用cpu进行检测,自

Ruihao Wang 65 Dec 27, 2022
Course content and resources for the AIAIART course.

AIAIART course This repo will house the notebooks used for the AIAIART course. Part 1 (first four lessons) ran via Discord in September/October 2021.

Jonathan Whitaker 492 Jan 06, 2023
Optimising chemical reactions using machine learning

Summit Summit is a set of tools for optimising chemical processes. We’ve started by targeting reactions. What is Summit? Currently, reaction optimisat

Sustainable Reaction Engineering Group 75 Dec 14, 2022
N-RPG - Novel role playing game da turfu

N-RPG Ce README sera la page de garde du projet. Contenu Il contiendra la présen

4 Mar 15, 2022