A pytorch code of paper Dual Variational Generation for Low Shot Heterogeneous Face Recognition, written with Xiang Wu.
- Python 2.7
- Pytorch 0.4.1 && torchvision 0.2.1
- Download LightCNN-29 model (Google Drive) pretrained on the MS-Celeb-1M dataset.
- Train the generator:
sh run_train_generator.sh
- Note that this is a simplified version of our original code:
1. The diversity loss and the adversarial loss in the paper are removed.
2. The distribution alignment loss is replaced by a Maximum Mean Discrepancy (MMD) loss. - The generated results during training will be saved in
./results.
- Use the trained generator to sample 100,000 paired heterogeneous data:
Python val.py --pre_model './model/netG_model_epoch_50_iter_0.pth'
- The generated fake NIR and VIS images will be saved in
./fake_images/nir_noiseand./fake_images/vis_noise, respectively.
- Use the real data and the generated fake data to train lightcnn:
sh run_train_lightcnn.sh
The performance on the 1-fold of CASIA NIR-VIS 2.0 dataset after running the above code:
| Rank-1 | VR@FAR=0.1% | VR@FAR=0.01% |
|---|---|---|
| 99.9% | 99.8% | 98.9% |
If you use our code for your research, please cite the following paper:
@inproceedings{fu2019dual,
title={Dual Variational Generation for Low-Shot Heterogeneous Face Recognition},
author={Fu, Chaoyou and Wu, Xiang and Hu, Yibo and Huang, Huaibo and He, Ran},
booktitle={NeurIPS},
year={2019}
}