• Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    Jupyter Notebook
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework (CVPR 2021 oral & TPAMI 2022)

MTLFace

This repository contains the PyTorch implementation and the dataset of the paper: When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework (CVPR 2021 oral)

Our journal extension has been accepted by TPAMI 2022; see details at https://hzzone.github.io/MTLFace/.

When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework
https://arxiv.org/abs/2103.01520
Abstract: To minimize the effects of age variation in face recognition, previous work either extracts identity-related discriminative features by minimizing the correlation between identity- and age-related features, called age-invariant face recognition (AIFR), or removes age variation by transforming the faces of different age groups into the same age group, called face age synthesis (FAS); however, the former lacks visual results for model interpretation while the latter suffers from artifacts compromising downstream recognition. Therefore, this paper proposes a unified, multi-task framework to jointly handle these two tasks, termed MTLFace, which can learn age-invariant identity-related representation while achieving pleasing face synthesis. Specifically, we first decompose the mixed face features into two uncorrelated components---identity- and age-related features---through an attention mechanism, and then decorrelate these two components using multi-task training and continuous domain adaption. In contrast to the conventional one-hot encoding that achieves group-level FAS, we propose a novel identity conditional module to achieve identity-level FAS, with a weight-sharing strategy to improve the age smoothness of synthesized faces. In addition, we collect and release a large cross-age face dataset with age and gender annotations to advance AIFR and FAS. Extensive experiments on five benchmark cross-age datasets demonstrate the superior performance of our proposed MTLFace over state-of-the-art methods for AIFR and FAS. We further validate MTLFace on two popular general face recognition datasets, showing competitive performance for face recognition in the wild.

example.png

framework

DATASET

  1. Downloading MS1M-ArcFace, CASIA-Webface or test set from insightface.
  2. Extract the jpg images from the mxnet .rec or .bin file according to the comments in the source code like:
python convert_insightface.py --source /home/zzhuang/faces_webface_112x112 --dest /home/zzhuang/casia-webface-112x112-arcface
python convert_insightface.py --bin --source /home/zzhuang/faces_webface_112x112/agedb_30.bin --dest /home/zzhuang/arcface-test-set
  1. Downloading the annotations from Google Drive: https://drive.google.com/drive/folders/1YmaBkHoRt85cysQX2TJZmasRwfrchiWO or BaiduDisk: https://pan.baidu.com/s/1_9rrxOyicTxzLeoCMmnE5g with password iljn, which is organized by id filename age gender; 1 for male and 0 for female.

  2. Putting the dataset and annotations into the dataset folder.

REQUIREMENTS

see requirements.txt and run pip install -r requirements.txt.

TRAINING

train AIFR:

python -m torch.distributed.launch --nproc_per_node=8 --master_port=17647 main.py \
    --train_fr --backbone_name ir50 --head_s 64 --head_m 0.35 \
    --weight_decay 5e-4 --momentum 0.9 --fr_age_loss_weight 0.001 --fr_da_loss_weight 0.002 --age_group 7 \
    --gamma 0.1 --milestone 20000 23000 --warmup 1000 --learning_rate 0.1 \
    --dataset_name scaf --image_size 112 --num_iter 36000 --batch_size 64 --amp

train FAS:

python -m torch.distributed.launch --nproc_per_node=8 --master_port=17647 main.py \
    --train_fas --backbone_name ir50 --age_group 7 \
    --dataset_name scaf --image_size 112 --num_iter 36000 --batch_size 64 \
    --d_lr 1e-4 --g_lr 1e-4 --fas_gan_loss_weight 75 --fas_age_loss_weight 10 --fas_id_loss_weight 0.002

If you want to train both tasks, please use apex.

Citation

If you found this code or our work useful please cite us:

@inproceedings{huang2020mtlface,
  title={When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework},
  author={Huang, Zhizhong and Zhang, Junping and Shan, Hongming},
  booktitle={CVPR},
  year={2021},
}

More Repositories

1

pytorch-openpose

pytorch implementation of openpose including Hand and Body Pose Estimation.
Jupyter Notebook
2,040
star
2

Precipitation-Nowcasting

pytorch implemention of trajGRU.
Python
547
star
3

ProPos

Self-Supervised Learning for Deep Clustering (TPAMI 2022)
Python
98
star
4

PseCo

(CVPR 2024) Point, Segment and Count: A Generalized Framework for Object Counting
Jupyter Notebook
69
star
5

TCL

Twin Contrastive Learning with Noisy Labels (CVPR 2023)
Python
66
star
6

DU-GAN

DU-GAN: Generative Adversarial Networks with Dual-Domain U-Net Based Discriminators for Low-Dose CT Denoising
Jupyter Notebook
57
star
7

PFA-GAN

PFA-GAN: Progressive Face Aging with Generative Adversarial Network (TIFS 2021)
Python
45
star
8

torch_clustering

A pure PyTorch implementation of kmeans and GMM with distributed clustering.
Python
36
star
9

AdaTrans

Adaptive Nonlinear Latent Transformation for Conditional Face Editing (ICCV 2023)
Jupyter Notebook
34
star
10

Hand-Keypoint-Detection

Hand and Keypoint detection by caffe.
Python
30
star
11

grad-CAM-pycaffe

grad-CAM visulization technique of pycaffe, regression task of Medical Image.
Python
26
star
12

E-Book

δΈ€ζ¬Ύη½‘η»œε°θ―΄ι˜…θ―»ε™¨οΌˆδ»ΏθΏ½δΉ¦η₯žε™¨οΌ‰
HTML
22
star
13

AgeFlow

AgeFlow: Conditional Age Progression and Regression with Normalizing Flows (IJCAI 2021)
Python
20
star
14

Bone-Age-Assessment

Deep Learning and Training dicom file with Caffe and Regression Prediction by age label.
JavaScript
15
star
15

CNTK_Realtime_Multi-Person_Pose_Estimation

Microsoft CNTK implementation of Realtime Multi-Person Pose Estimation.
Python
8
star
16

determination-of-identity

Caffe Siamese Network and Similarity by feature vector.
Jupyter Notebook
7
star
17

hzzone.github.io

HTML
7
star