This repository is a simplified version of the official PyTorch implementation of CurricularFace.
This will be useful for those who want to train the model on a custom dataset or with the specific option.
- Kang Dong Won & Won Bin
- Kim Suk Jin & Min Yun Ki
- download checkpoint from here
- simple test
python scripts/test.py
- make a grid
python scripts/grid.py
- Download MS-Celeb-1M-Align_112x112 (85K ids/5.8M imgs) from here
- unzip the zip file and make a lst file.
python im2rec.py --list --resize 112 --recursive {prefix} {path_to_imgs}
ex) python im2rec.py --list --resize 112 --recursive ./my_data ../dataset/ms1m_align_112_imgs
- set path in "config.py"
- line 5: DATA_ROOT = '~/dataset/ms1m_align_112_imgs', # the parent root where your data are stored
- line 6: RECORD_DIR = '~/CurricularFace/my_data.lst', # the dataset record dir
- train
python scripts/train.py
-
Note that we modified some lines in the original code as below.
- use wandb instead of tensorboard
- add a line, "if cfg['RANK'] % ngpus_per_node == 0:", when a multi processing error occurs
- fix a few lines in 'dataset.py' as below:
- line 71: image_dir = line[0]--> image_dir = line[2]
- line 74: image_dir, label = line[0], line[1] --> image_dir, label = line[2], line[1]
- line 75: label = int(label) --> label = int(float(label))
Yukyeong Lee | yukyeongleee@gmail.com
Wonjong Ryu | 1zong2@innerverz.com
If you find this code useful in your research, please consider citing the authors:
@article{huang2020curricularface,
title={CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition},
author={Yuge Huang and Yuhan Wang and Ying Tai and Xiaoming Liu and Pengcheng Shen and Shaoxin Li and Jilin Li, Feiyue Huang},
booktitle={CVPR},
pages={1--8},
year={2020}
}