Official PyTorch implementation of "Improving Face Recognition with Large AgeGaps by Learning to Distinguish Children" (BMVC 2021)

Overview

Inter-Prototype (BMVC 2021): Official Project Webpage

This repository provides the official PyTorch implementation of the following paper:

Improving Face Recognition with Large Age Gaps by Learning to Distinguish Children
Jungsoo Lee* (KAIST AI), Jooyeol Yun* (KAIST AI), Sunghyun Park (KAIST AI),
Yonggyu Kim (Korea Univ.), and Jaegul Choo (KAIST AI) (*: equal contribution)
BMVC 2021

Paper: Arxiv

Abstract: Despite the unprecedented improvement of face recognition, existing face recognition models still show considerably low performances in determining whether a pair of child and adult images belong to the same identity. Previous approaches mainly focused on increasing the similarity between child and adult images of a given identity to overcome the discrepancy of facial appearances due to aging. However, we observe that reducing the similarity between child images of different identities is crucial for learning distinct features among children and thus improving face recognition performance in child-adult pairs. Based on this intuition, we propose a novel loss function called the Inter-Prototype loss which minimizes the similarity between child images. Unlike the previous studies, the Inter-Prototype loss does not require additional child images or training additional learnable parameters. Our extensive experiments and in-depth analyses show that our approach outperforms existing baselines in face recognition with child-adult pairs.

Code Contributors

Jungsoo Lee [Website] [LinkedIn] [Google Scholar] (KAIST AI)
Jooyeol Yun [LinkedIn] [Google Scholar] (KAIST AI)

Pytorch Implementation

Installation

Clone this repository.

git clone https://github.com/leebebeto/Inter-Prototype.git
cd Inter-Prototype
pip install -r requirements.txt
CUDA_VISIBLE_DEVICES=0 python3 train.py --data_mode=casia --exp=interproto_casia --wandb --tensorboard

How to Run

We used two different training datasets: 1) CASIA WebFace and 2) MS1M.

We constructed test sets with child-adult pairs with at least 20 years and 30 years age gaps using AgeDB and FG-NET, termed as AgeDB-C20, AgeDB-C30, FGNET-C20, and FGNET-C30. We also used LAG (Large Age Gap) dataset for the test set. For the age labels, we used the age annotations from MTLFace. The age annotations are available at this link. We provide a script file for downloading the test dataset.

sh scripts/download_test_data.sh

The final structure before training or testing the model should look like this.

train
 └ casia
   └ id1
     └ image1.jpg
     └ image2.jpg
     └ ...
   └ id2
     └ image1.jpg
     └ image2.jpg
     └ ...     
   ...
 └ ms1m
   └ id1
     └ image1.jpg
     └ image2.jpg
     └ ...
   └ id2
     └ image1.jpg
     └ image2.jpg
     └ ...     
   ...
 └ age-label
   └ casia-webface.txt
   └ ms1m.txt    
test
 └ AgeDB-aligned
   └ id1
     └ image1.jpg
     └ image2.jpg
   └ id2
     └ image1.jpg
     └ image2.jpg
   └ ...
 └ FGNET-aligned
   └ image1.jpg
   └ image2.jpg
   └ ...
 └ LAG-aligned
   └ id1
     └ image1.jpg
     └ image2.jpg
   └ id2
     └ image1.jpg
     └ image2.jpg
   └ ...

Pretrained Models

All models trained for our paper

Following are the checkpoints of each test set used in our paper.

Trained with Casia WebFace

AgeDB-C20
AgeDB-C30
FGNET-C20
FGNET-C30
LAG

Trained with MS1M

AgeDB-C20
AgeDB-C30
FGNET-C20
FGNET-C30
LAG

CUDA_VISIBLE_DEVICES=0 python3 evaluate.py --model_dir=<test_dir>

Quantitative / Qualitative Evaluation

Trained with CASIA WebFace dataset

Trained with MS1M dataset

t-SNE embedding of prototype vectors

Acknowledgments

Our pytorch implementation is heavily derived from InsightFace_Pytorch. Thanks for the implementation. We also deeply appreciate the age annotations provided by Huang et al. in MTLFace.

Owner
Jungsoo Lee
I'm interested in the intersection of Computer Vision and HCI.
Jungsoo Lee
EvDistill: Asynchronous Events to End-task Learning via Bidirectional Reconstruction-guided Cross-modal Knowledge Distillation (CVPR'21)

EvDistill: Asynchronous Events to End-task Learning via Bidirectional Reconstruction-guided Cross-modal Knowledge Distillation (CVPR'21) Citation If y

addisonwang 18 Nov 11, 2022
DLWP: Deep Learning Weather Prediction

DLWP: Deep Learning Weather Prediction DLWP is a Python project containing data-

Kushal Shingote 3 Aug 14, 2022
This is a library for training and applying sparse fine-tunings with torch and transformers.

This is a library for training and applying sparse fine-tunings with torch and transformers. Please refer to our paper Composable Sparse Fine-Tuning f

Cambridge Language Technology Lab 37 Dec 30, 2022
JAXDL: JAX (Flax) Deep Learning Library

JAXDL: JAX (Flax) Deep Learning Library Simple and clean JAX/Flax deep learning algorithm implementations: Soft-Actor-Critic (arXiv:1812.05905) Transf

Patrick Hart 4 Nov 27, 2022
Rainbow: Combining Improvements in Deep Reinforcement Learning

Rainbow Rainbow: Combining Improvements in Deep Reinforcement Learning [1]. Results and pretrained models can be found in the releases. DQN [2] Double

Kai Arulkumaran 1.4k Dec 29, 2022
unofficial pytorch implementation of RefineGAN

RefineGAN unofficial pytorch implementation of RefineGAN (https://arxiv.org/abs/1709.00753) for CSMRI reconstruction, the official code using tensorpa

xinby17 5 Jul 21, 2022
An implementation of the methods presented in Causal-BALD: Deep Bayesian Active Learning of Outcomes to Infer Treatment-Effects from Observational Data.

An implementation of the methods presented in Causal-BALD: Deep Bayesian Active Learning of Outcomes to Infer Treatment-Effects from Observational Data.

Andrew Jesson 9 Apr 04, 2022
This repository contains the code for our fast polygonal building extraction from overhead images pipeline.

Polygonal Building Segmentation by Frame Field Learning We add a frame field output to an image segmentation neural network to improve segmentation qu

Nicolas Girard 186 Jan 04, 2023
Minimal diffusion models - Minimal code and simple experiments to play with Denoising Diffusion Probabilistic Models (DDPMs)

Minimal code and simple experiments to play with Denoising Diffusion Probabilist

Rithesh Kumar 16 Oct 06, 2022
An implementation of the WHATWG URL Standard in JavaScript

whatwg-url whatwg-url is a full implementation of the WHATWG URL Standard. It can be used standalone, but it also exposes a lot of the internal algori

314 Dec 28, 2022
LIAO Shuiying 6 Dec 01, 2022
Functional TensorFlow Implementation of Singular Value Decomposition for paper Fast Graph Learning

tf-fsvd TensorFlow Implementation of Functional Singular Value Decomposition for paper Fast Graph Learning with Unique Optimal Solutions Cite If you f

Sami Abu-El-Haija 14 Nov 25, 2021
Source code of D-HAN: Dynamic News Recommendation with Hierarchical Attention Network

D-HAN The source code of D-HAN This is the source code of D-HAN: Dynamic News Recommendation with Hierarchical Attention Network. However, only the co

30 Sep 22, 2022
CVPR 2021 - Official code repository for the paper: On Self-Contact and Human Pose.

TUCH This repo is part of our project: On Self-Contact and Human Pose. [Project Page] [Paper] [MPI Project Page] License Software Copyright License fo

Lea Müller 45 Jan 07, 2023
Code and datasets for the paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction"

KnowPrompt Code and datasets for our paper "KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction" Requireme

ZJUNLP 137 Dec 31, 2022
Source code for "Taming Visually Guided Sound Generation" (Oral at the BMVC 2021)

Taming Visually Guided Sound Generation • [Project Page] • [ArXiv] • [Poster] • • Listen for the samples on our project page. Overview We propose to t

Vladimir Iashin 226 Jan 03, 2023
Perform Linear Classification with Multi-way Data

MultiwayClassification This is an R package to perform linear classification for data with multi-way structure. The distance-weighted discrimination (

Eric F. Lock 2 Dec 15, 2020
Global-Local Context Network for Person Search

Global-Local Context Network for Person Search Abstract: Person search aims to jointly localize and identify a query person from natural, uncropped im

Peng Zheng 15 Oct 17, 2022
Turning pixels into virtual points for multimodal 3D object detection.

Multimodal Virtual Point 3D Detection Turning pixels into virtual points for multimodal 3D object detection. Multimodal Virtual Point 3D Detection, Ti

Tianwei Yin 204 Jan 08, 2023
Official implementation of Densely connected normalizing flows

Densely connected normalizing flows This repository is the official implementation of NeurIPS 2021 paper Densely connected normalizing flows. Poster a

Matej Grcić 31 Dec 12, 2022