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.

You might also like...
Official pytorch implementation of Rainbow Memory (CVPR 2021)
Official pytorch implementation of Rainbow Memory (CVPR 2021)

Rainbow Memory: Continual Learning with a Memory of Diverse Samples

Official Pytorch Implementation of:
Official Pytorch Implementation of: "ImageNet-21K Pretraining for the Masses"(2021) paper

ImageNet-21K Pretraining for the Masses Paper | Pretrained models Official PyTorch Implementation Tal Ridnik, Emanuel Ben-Baruch, Asaf Noy, Lihi Zelni

Official Pytorch implementation of
Official Pytorch implementation of "Beyond Static Features for Temporally Consistent 3D Human Pose and Shape from a Video", CVPR 2021

TCMR: Beyond Static Features for Temporally Consistent 3D Human Pose and Shape from a Video Qualtitative result Paper teaser video Introduction This r

Official PyTorch implementation of
Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)

Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic

Official PyTorch Implementation of SSMix (Findings of ACL 2021)
Official PyTorch Implementation of SSMix (Findings of ACL 2021)

SSMix: Saliency-based Span Mixup for Text Classification (Findings of ACL 2021) Official PyTorch Implementation of SSMix | Paper Abstract Data augment

Official Pytorch Implementation of:
Official Pytorch Implementation of: "Semantic Diversity Learning for Zero-Shot Multi-label Classification"(2021) paper

Semantic Diversity Learning for Zero-Shot Multi-label Classification Paper Official PyTorch Implementation Avi Ben-Cohen, Nadav Zamir, Emanuel Ben Bar

Official PyTorch Implementation of Embedding Transfer with Label Relaxation for Improved Metric Learning, CVPR 2021
Official PyTorch Implementation of Embedding Transfer with Label Relaxation for Improved Metric Learning, CVPR 2021

Embedding Transfer with Label Relaxation for Improved Metric Learning Official PyTorch implementation of CVPR 2021 paper Embedding Transfer with Label

 Official PyTorch implementation of the preprint paper
Official PyTorch implementation of the preprint paper "Stylized Neural Painting", accepted to CVPR 2021.

Official PyTorch implementation of the preprint paper "Stylized Neural Painting", accepted to CVPR 2021.

Official PyTorch implementation of
Official PyTorch implementation of "Rapid Neural Architecture Search by Learning to Generate Graphs from Datasets" (ICLR 2021)

Rapid Neural Architecture Search by Learning to Generate Graphs from Datasets This is the official PyTorch implementation for the paper Rapid Neural A

Comments
  • Pretrained models

    Pretrained models

    Hello, if I need to use for example the Casia WebFace pretrained model, what model of the five models should I use? image

    I would understand if there is only two models, one for Casia and the other for MS1M, but there is 10 models, what's exactly the differenc ebetween them and why to chose one over the other?

    Thanks in advance.

    opened by Abdulrahman-Elsayed 5
  • Errors while running evaluation

    Errors while running evaluation

    Hi,

    I am facing below errors while running the pre-trained models.

    Exception has occurred: RuntimeError (note: full exception trace is shown but execution is paused at: _run_module_as_main) mat1 dim 1 must match mat2 dim 0

    File "/home/ajmal/anaconda3/envs/leebebeto_face_dev/lib/python3.7/site-packages/torch/nn/functional.py", line 1753, in linear return torch._C._nn.linear(input, weight, bias) File "/home/ajmal/anaconda3/envs/leebebeto_face_dev/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 94, in forward return F.linear(input, self.weight, self.bias) File "/home/ajmal/anaconda3/envs/leebebeto_face_dev/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/ajmal/anaconda3/envs/leebebeto_face_dev/lib/python3.7/site-packages/torch/nn/modules/container.py", line 119, in forward input = module(input) File "/home/ajmal/anaconda3/envs/leebebeto_face_dev/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs)

    Thanks,

    opened by ma-siddiqui 1
  • Duplicate listing for same model

    Duplicate listing for same model

    I've removed multiple listing for the same model. Previously for each model trained on CASIA WebFace and MS1MV2, there were 5 listings named acc. to the test set, which doesn't make sense because the model would remain the same. I've also checked the hashes of the files and they were the same.

    opened by parthagar 1
Owner
Jungsoo Lee
I'm interested in the intersection of Computer Vision and HCI.
Jungsoo Lee
Official and maintained implementation of the paper "OSS-Net: Memory Efficient High Resolution Semantic Segmentation of 3D Medical Data" [BMVC 2021].

OSS-Net: Memory Efficient High Resolution Semantic Segmentation of 3D Medical Data Christoph Reich, Tim Prangemeier, Özdemir Cetin & Heinz Koeppl | Pr

Christoph Reich 23 Sep 21, 2022
This repository provides the official implementation of 'Learning to ignore: rethinking attention in CNNs' accepted in BMVC 2021.

inverse_attention This repository provides the official implementation of 'Learning to ignore: rethinking attention in CNNs' accepted in BMVC 2021. Le

Firas Laakom 5 Jul 8, 2022
Pytorch implementation of the paper Progressive Growing of Points with Tree-structured Generators (BMVC 2021)

PGpoints Pytorch implementation of the paper Progressive Growing of Points with Tree-structured Generators (BMVC 2021) Hyeontae Son, Young Min Kim Pre

Hyeontae Son 9 Jun 6, 2022
Boosting Adversarial Attacks with Enhanced Momentum (BMVC 2021)

EMI-FGSM This repository contains code to reproduce results from the paper: Boosting Adversarial Attacks with Enhanced Momentum (BMVC 2021) Xiaosen Wa

John Hopcroft Lab at HUST 10 Sep 26, 2022
Source code of our BMVC 2021 paper: AniFormer: Data-driven 3D Animation with Transformer

AniFormer This is the PyTorch implementation of our BMVC 2021 paper AniFormer: Data-driven 3D Animation with Transformer. Haoyu Chen, Hao Tang, Nicu S

null 7 Oct 22, 2021
Cascading Feature Extraction for Fast Point Cloud Registration (BMVC 2021)

Cascading Feature Extraction for Fast Point Cloud Registration This repository contains the source code for the paper [Arxive link comming soon]. Meth

null 7 May 26, 2022
Official pytorch implementation of paper "Inception Convolution with Efficient Dilation Search" (CVPR 2021 Oral).

IC-Conv This repository is an official implementation of the paper Inception Convolution with Efficient Dilation Search. Getting Started Download Imag

Jie Liu 111 Dec 31, 2022
Official PyTorch implementation of RobustNet (CVPR 2021 Oral)

RobustNet (CVPR 2021 Oral): Official Project Webpage Codes and pretrained models will be released soon. This repository provides the official PyTorch

Sungha Choi 173 Dec 21, 2022
Official PyTorch Implementation of Hypercorrelation Squeeze for Few-Shot Segmentation, arXiv 2021

Hypercorrelation Squeeze for Few-Shot Segmentation This is the implementation of the paper "Hypercorrelation Squeeze for Few-Shot Segmentation" by Juh

Juhong Min 165 Dec 28, 2022
Official PyTorch implementation of "IntegralAction: Pose-driven Feature Integration for Robust Human Action Recognition in Videos", CVPRW 2021

IntegralAction: Pose-driven Feature Integration for Robust Human Action Recognition in Videos Introduction This repo is official PyTorch implementatio

Gyeongsik Moon 29 Sep 24, 2022