Home

Awesome

Attention Similarity Knowledge Distillation (A-SKD)

Official Implementation of the "Teaching Where to Look: Attention Similarity Knowledge Distillation for Low Resolution Face Recognition (ECCV 2022)".

concept.png

[Paper] [ArXiv] [Presentation] [Demo]

Updates & TODO Lists

Getting Started

Environment Setup

Dataset Preparation

Train & Evaluation

All networks (iResNet50 with CBAM module) were trained using a single A100 GPU (batchsize=128)

  1. Train Teacher Network (112x112 face images) <br /> [Teacher Checkpoint]

    python train_teacher.py --save_dir $CHECKPOINT_DIR --down_size $DOWN_SIZE --total_iters $TOTAL_ITERS \
                            --batch_size $BATCH_SIZE --gpus $GPU_ID --data_dir $FACE_DIR
    
  2. Train Student Network (14x14, 28x28, 56x56 face images) or (24x24 face images for tinyface test) <br /> [Student 14x14], [Student 28x28], [Student 56x56], [Student 24x24].

    python train_student.py --save_dir $CHECKPOINT_DIR --down_size $DOWN_SIZE --total_iters $TOTAL_ITERS \
                            --batch_size $BATCH_SIZE --teacher_path $TEACHER_CHECKPOINT_PATH --gpus $GPU_ID \
                            --data_dir $FACE_DIR
    
  3. Evaluation

    • Evaluation on AgeDB-30 (Verification)

      python test_agedb.py --checkpoint_path $CHECKPOINT_PATH --down_size $DOWN_SIZE --batch_size $BATCH_SIZE \
                          --data_dir $FACE_DIR --gpus $GPU_ID
      
    • Evaluation on TinyFace (Identification)

      • Download the pre-processed TinyFace dataset. After unzip, the directory structure can be defined as follows:

        - aligned_pad_0.1_pad_high/  # TINYFACE_DIR
            - Probe/
            - Train/
            - Gallery_Match/
            - Gallery_Disctractor/
        
      • We employ LR network trained on 24 x 24 resolution for TinyFace evaluation

        python test_tinyface.py --checkpoint_path $CHECKPOINT_PATH --batch_size $BATCH_SZIE \
                                --tinyface_dir $TINYFACE_DIR --save_dir $SAVE_DIR --gpus $GPU_ID
        

License

The source code of this repository is released only for academic use. See the license file for details.

Notes

The codes of this repository are built upon the following open sources. Thanks to the authors for sharing the code!

Issues

  1. OpenCV install error
    • libGL.so.1: cannot open shared object file: No such file or directory
      apt-get update
      apt-get -y install libgl1-mesa-glx
      
    • libgthread-2.0.so.0: cannot open shared object file: No such file or directory
      apt-get -y install libglib2.0-0
      

Citation

@InProceedings{10.1007/978-3-031-19775-8_37,
author="Shin, Sungho and Lee, Joosoon and Lee, Junseok and Yu, Yeonguk and Lee, Kyoobin",
title="Teaching Where to Look: Attention Similarity Knowledge Distillation for Low Resolution Face Recognition",
booktitle="Computer Vision -- ECCV 2022",
year="2022",
publisher="Springer Nature Switzerland",
address="Cham",
pages="631--647"
}

References

[1] Yi, D., Lei, Z., Liao, S., Li, S.Z.: Learning Face Representation from Scratch (2014), http://arxiv.org/abs/1411.7923 
[2] Moschoglou, S., Papaioannou, A., Sagonas, C., Deng, J., Kotsia, I., Zafeiriou, S.: AgeDB: The First Manually Collected, In-the-Wild Age Database, pp. 1997–2005 (2017), https://doi.org/10.1109/CVPRW.2017.250