anguyen8 / face-vit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fast and Interpretable Face Identification for Out-Of-Distribution Data Using Vision Transformers

Official Implementation for the paper Fast and Interpretable Face Identification for Out-Of-Distribution Data Using Vision Transformers (WACV 2023) by Hai Phan, Cindy Le, Vu Le, Yihui He, and Anh Nguyen.

If you use this software, please consider citing:

@article{hai2023facevit,
  title={Fast and Interpretable Face Identification for Out-Of-Distribution Data Using Vision Transformers},
  author={Hai Phan, Cindy Le, Vu Le, Yihui He, Anh Nguyen},
  journal={arXiv preprint arXiv:2311.02803},
  year={2023}
}

1. Requirements

Python >= 3.5
Pytorch > 1.0
Opencv >= 3.4.4
pip install tqmd
pip install mxnet
pip install wandb

2. Download datasets and pretrained models

  1. Download LFW, out-of-distribution (OOD) LFW test sets: Google Drive

  2. Download CASIA for training: Here

  3. Download pretrained models:

  4. Download arranged pairs: Google Drive

  5. Create the following folders:

mkdir results
mkdir pretrained

Then put pretrained models to results folder and pretrained for testing and training, respectively.

3. How to run

  1. Training: Revise directory in train.py and config.py with your own directory. Then, run

    python train.py
    
  2. Testing: Revise directory in test.py with your own directory. Then, run

    python test.py
    

4. License

MIT

5. References

  1. W. Zhao, Y. Rao, Z. Wang, J. Lu, Zhou. Towards interpretable deep metric learning with structural matching, ICCV 2021 DIML
  2. J. Deng, J. Guo, X. Niannan, and StefanosZafeiriou. Arcface: Additive angular margin loss for deepface recognition, CVPR 2019 Arcface Pytorch
  3. H. Phan, A. Nguyen. DeepFace-EMD: Re-ranking Using Patch-wise Earth Mover’s Distance Improves Out-Of-Distribution Face Identification, CVPR 2022 DeepFace-EMD
  4. F. Schroff, D. Kalenichenko, J. Philbin. Facenet: A unified embedding for face recognition and clustering. CVPR 2015 FaceNet Pytorch
  5. L. Weiyang, W. Yandong, Y. Zhiding, L. Ming, R. Bhiksha, S. Le. SphereFace: Deep Hypersphere Embedding for Face Recognition, CVPR 2017 sphereface, sphereface pytorch
  6. Chi Zhang, Yujun Cai, Guosheng Lin, Chunhua Shen. Deepemd: Differentiable earth mover’s distance for few-shotlearning, CVPR 2020 paper

About


Languages

Language:Python 100.0%