Adaptive multi-occlusion face recognition (including face with mask, glasses and hat) model based on CLIP(openai/CLIP: CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image (github.com)), based on FaceX-Zoo(JDAI-CV/FaceX-Zoo: A PyTorch Toolbox for Face Recognition (github.com)) framework.
-
python >= 3.7.1
-
pytorch >= 1.1.0
-
torchvision >= 0.3.0
See the detail requirements in requirements.txt
run ./train.sh with the train dataset CASIA-Webface (baidu Pan Link).
Download teacher model (ElasticFace-Arc) from ElasticFace.
Download CLIP model (RN50x16) from CLIP.
run ./test_lfw_adapt.sh with the test dataset LFW-MASK (baidu Pan Link), or the dataset MEGLSS(baidu Pan Link), CALFW-SUNGLASSES(baidu Pan Link), CPLFW(baidu Pan Link)
You can generate a new simulated occluded dataset by running the python file mask_data_generation.py and changing the dataset path and occlusion image in the file.