GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - XiaohangZhan/face_recognition_framework: Multi-task face recognition framework based on PyTorch

BranchesTags
Open more actions menu

Latest commit

 

History

53 Commits
53 Commits

Folders and files

NameName
Last commit message
Last commit date
evaluation
evaluation
 
 
experiments
experiments
 
 
models
models
 
 
scripts
scripts
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
datasets.py
datasets.py
 
 
main.py
main.py
 
 
utils.py
utils.py
 
 

Repository files navigation

Face recognition framework based on PyTorch.

Introduction

This is a face recognition framework based on PyTorch with convenient training, evaluation and feature extraction functions. It is originally a multi-task face recognition framework for our accpeted ECCV 2018 paper, "Consensus-Driven Propagation in Massive Unlabeled Data for Face Recognition". However, it is also a common framework for face recognition. You can freely customize your experiments with your data and configurations with it.

Paper

Xiaohang Zhan, Ziwei Liu, Junjie Yan, Dahua Lin, Chen Change Loy, "Consensus-Driven Propagation in Massive Unlabeled Data for Face Recognition", ECCV 2018

Project Page: link

Why multi-task?

Different datasets have different identity (category) sets. We do not know the intersection between them. Hence instead of merging identity sets of different datasets, regarding them as different tasks is an effective alternative way.

Features

Framework: Multi-task, Single Task

Loss: Softmax Loss, ArcFace

Backbone CNN: ResNet, DenseNet, Inception, InceptionResNet, NASNet, VGG

Benchmarks: Megaface (FaceScrub), IJB-A, LFW, CFP-FF, CFP-FP, AgeDB-30, calfw, cplfw

Data aug: flip, scale, translation

Online testing and visualization with Tensorboard.

Setup step by step

  1. Clone the project.

    git clone [email protected]:XiaohangZhan/face_recognition_framework.git
    cd face_recognition_framework
    
  2. Dependency.

    python=3.6, tensorboardX, pytorch=0.3.1, mxnet, sklearn

  3. Data Preparation.

    Download datasets from insightface into your data storage folder, e.g., ~/data/face_recognition/. Taking CASIA-Webface for example:

    cd ~/data/face_recognition/
    unzip faces_CASIA_112x112.zip
    cd - # back to the repo root
    mkdir data
    python tools/convert_data.py -r ~/data/face_recognition/faces_webface_112x112 -o ~/data/face_recognition/faces_webface_112x112 # convert mxnet records into images
    ln -s ~/data/face_recognition/faces_webface_112x112 data/webface

    Optionally, if you want to test on MegaFace. Download testing set from here into your data storage folder, e.g., ~/data/face_recognition/. Then:

    cd ~/data/face_recognition/
    mkdir -p megaface_test/raw
    cd megaface_test/raw
    mv ../../megaface_testpack_v1.0.zip .
    unzip -q megaface_testpack_v1.0.zip
    cd $THIS_REPO # back to the repo root
    ln -s  ~/data/face_recognition/megaface_test data/megaface_test

    Next, download MegaFace lists from here into ~/data/face_recognition/megaface_test/. Finally, the folder data/megaface_test/ looks like:

    data
      ├── megaface_test
        ├── concat_list.txt
        ├── facescrub3530
        ├── megaface_distractor
        ├── raw
    
  4. Training.

    sh experiments/webface/res50-bs64-sz224-ep35/train.sh
    
  5. Monitoring.

    tensorboard --logdir experiments
    
  6. Resume training.

    sh experiments/webface/res50-bs64-sz224-ep35/resume.sh 10 # e.g., resume from epoch 10
    
  7. Evalution.

    sh experiments/webface/res50-bs64-sz224-ep35/evaluation.sh 35 # e.g., evaluate epoch 35
    
  8. Feature extraction.

    Firstly, specify the data_name, data_root and data_list under extract_info in the config file. The data_list is a txt file containing an image relative filename in each line. Then execute:

    # e.g., extract features with epoch 35 model.
    # The feature file is stored in checkpoints/ckpt_epoch_35_[data_name].bin
    sh experiments/webface/res50-bs64-sz224-ep35/extract.sh 35 
    

Baselines

  • Trained using Webface
arch LFW CFP-FF CFP-FP AgeDB-30 calfw cplfw
resnet-50 0.9850 0.9804 0.9117 0.8967 0.9013 0.8423
  • Trained using MS1M
arch LFW CFP-FF CFP-FP AgeDB-30 calfw cplfw vgg2-FP megaface
densenet-121 0.9948 0.9946 0.9594 0.9615 0.9500 0.9057 0.9418 0.8665
densenet-121-arc 0.9973 0.9979 0.9601 0.9728 0.9558 0.9063 0.9496 0.9287

Note that the hyper-parameters are not adjusted to optimal. Hence, they are not the state-of-the-art face recognition models. You may download those pre-trained models here.

Bibtex

If you find this code useful in your research, please cite:

@inproceedings{zhan2018consensus,
  title={Consensus-Driven Propagation in Massive Unlabeled Data for Face Recognition},
  author={Zhan, Xiaohang and Liu, Ziwei and Yan, Junjie and Lin, Dahua and Change Loy, Chen},
  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
  pages={568--583},
  year={2018}
}

TODO (Will carry out in a "Buddha-like" way)

  1. Implement distributed training.
  2. Adjust hyper-parameters.
  3. Multi-task experiments.

About

Multi-task face recognition framework based on PyTorch

Resources

Readme
MIT license
Activity

Stars

251 stars

Watchers

18 watching

Forks

53 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.