All Projects → AlfredXiangWu → Lightcnn

AlfredXiangWu / Lightcnn

Licence: mit
A Light CNN for Deep Face Representation with Noisy Labels, TIFS 2018

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Lightcnn

Libfacerec
Face Recognition Library for OpenCV.
Stars: ✭ 341 (-44.1%)
Mutual labels:  face-recognition
Face specific augm
Face Renderer to perform Domain (Face) Specific Data Augmentation
Stars: ✭ 398 (-34.75%)
Mutual labels:  face-recognition
Face Pose Net
Estimate 3D face pose (6DoF) or 11 parameters of 3x4 projection matrix by a Convolutional Neural Network
Stars: ✭ 464 (-23.93%)
Mutual labels:  face-recognition
Ganfit
Project Page of 'GANFIT: Generative Adversarial Network Fitting for High Fidelity 3D Face Reconstruction' [CVPR2019]
Stars: ✭ 350 (-42.62%)
Mutual labels:  face-recognition
Cdp
Code for our ECCV 2018 work.
Stars: ✭ 391 (-35.9%)
Mutual labels:  face-recognition
Deepface
Deep Learning Models for Face Detection/Recognition/Alignments, implemented in Tensorflow
Stars: ✭ 409 (-32.95%)
Mutual labels:  face-recognition
Face recognition
🍎 My own face recognition with deep neural networks.
Stars: ✭ 328 (-46.23%)
Mutual labels:  face-recognition
Php Opencv
PHP extensions for OpenCV
Stars: ✭ 524 (-14.1%)
Mutual labels:  face-recognition
Facerecognitionapp
Face Recognition Android App
Stars: ✭ 391 (-35.9%)
Mutual labels:  face-recognition
Aidlearning Framework
🔥🔥AidLearning is a powerful mobile development platform, AidLearning builds a linux env supporting GUI, deep learning and visual IDE on Android...Now Aid supports OpenCL (GPU+NPU) for high performance acceleration...Linux on Android or HarmonyOS
Stars: ✭ 4,537 (+643.77%)
Mutual labels:  face-recognition
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (-41.97%)
Mutual labels:  face-recognition
Curated List Of Awesome 3d Morphable Model Software And Data
The idea of this list is to collect shared data and algorithms around 3D Morphable Models. You are invited to contribute to this list by adding a pull request. The original list arised from the Dagstuhl seminar on 3D Morphable Models https://www.dagstuhl.de/19102 in March 2019.
Stars: ✭ 375 (-38.52%)
Mutual labels:  face-recognition
Tp Gan
Official TP-GAN Tensorflow implementation for paper "Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis"
Stars: ✭ 412 (-32.46%)
Mutual labels:  face-recognition
Face Recognition
Deep face recognition with Keras, Dlib and OpenCV
Stars: ✭ 342 (-43.93%)
Mutual labels:  face-recognition
Learn To Cluster
Learning to Cluster Faces (CVPR 2019, CVPR 2020)
Stars: ✭ 480 (-21.31%)
Mutual labels:  face-recognition
Artificial Intelligence
Awesome Artificial Intelligence Projects
Stars: ✭ 330 (-45.9%)
Mutual labels:  face-recognition
Imdb Face
A new large-scale noise-controlled face recognition dataset.
Stars: ✭ 399 (-34.59%)
Mutual labels:  face-recognition
Face pytorch
face recognition algorithms in pytorch framework, including arcface, cosface, sphereface and so on
Stars: ✭ 610 (+0%)
Mutual labels:  face-recognition
Facecropper
✂️ Crop faces, inside of your image, with iOS 11 Vision api.
Stars: ✭ 479 (-21.48%)
Mutual labels:  face-recognition
Amsoftmax
A simple yet effective loss function for face verification.
Stars: ✭ 443 (-27.38%)
Mutual labels:  face-recognition

Light CNN for Deep Face Recognition, in pytorch

A pytorch implementation of A Light CNN for Deep Face Representation with Noisy Labels from the paper by Xiang Wu, Ran He, Zhenan Sun and Tieniu Tan. The official and original Caffe code can be found here.

Table of Contents

Updates

  • Jan 17, 2018
    • Light CNN-29 v2 model and training code are released. The 100% - EER on LFW achieves 99.43%.
    • The performance of set 1 on MegaFace achieves 76.021% for rank-1 accuracy and 89.740% for [email protected]=10^-6.
  • Sep 12, 2017
    • Light CNN-29 model and training code are released. The 100% - EER on LFW achieves 99.40%.
    • The performance of set 1 on MegaFace achieves 72.704% for rank-1 accuracy and 85.891% for [email protected]=10^-6.
  • Jul 12, 2017
    • Light CNN-9 model and training code are released. The 100% - EER on LFW obtains 98.70%.
    • The performance of set 1 on MegaFace achieves 65.782% for rank-1 accuracy and 76.288% for [email protected]=10^-6.
  • Jul 4, 2017
    • The repository was built.

Installation

  • Install pytorch following the website.
  • Clone this repository.
    • Note: We currently only run it on Python 2.7.

Datasets

  • Download face dataset such as CASIA-WebFace, VGG-Face and MS-Celeb-1M.

  • All face images are converted to gray-scale images and normalized to 144x144 according to landmarks.

  • According to the five facial points, we not only rotate two eye points horizontally but also set the distance between the midpoint of eyes and the midpoint of mouth(ec_mc_y), and the y axis of midpoint of eyes(ec_y) .

  • The aligned LFW images are uploaded on Baidu Yun.

    Dataset size ec_mc_y ec_y
    Training set 144x144 48 48
    Testing set 128x128 48 40

Training

  • To train Light CNN using the train script simply specify the parameters listed in train.py as a flag or manually change them.
python train.py --root_path=/path/to/your/datasets/ \
		--train_list=/path/to/your/train/list.txt \
		--val_list=/path/to/your/val/list.txt \
		--save_path=/path/to/your/save/path/ \
		--model="LightCNN-9/LightCNN-29" --num_classes=n
  • Tips:
    • The lists of train and val datasets are followed by the format of caffe. The details of data loader is shown in load_imglist.py. Or you can use torchvision.datasets.ImageFolder to load your datasets.
    • The num_classes denotes the number of identities in your training dataset.
    • When training by pytorch, you can set a larger learning rate than caffe and it is faster converaged by pytorch than caffe for Light CNN.
    • We enlarge the learning rate for the parameters of fc2 which may lead better performance. If the training is collapsed on your own datasets, you can decrese it.
    • We modify the implementation of SGD with momentum since the official pytorch implementation is different from Sutskever et. al. The details are shown in here.
    • The training datasets for LightCNN-29v2 are CASIA-WebFace and MS-Celeb-1M, therefore, the num_classes is 80013.

Evaluation

  • To evaluate a trained network:
python extract_features.py --resume=/path/to/your/model \
			   --root_path=/path/to/your/datasets/ \
			   --img_list=/path/to/your/list.txt \
			   --save_path=/path/to/your/save/path/ \
			   --model="LightCNN-9/LightCNN-29/LightCNN-29v2"\
			   --num_classes=n (79077 for LightCNN-9/LightCNN-29, 80013 for LightCNN-29v2)
  • You can use vlfeat or sklearn to evaluate the features on ROC and obtain EER and [email protected] for your testing datasets.
  • The model of LightCNN-9 is released on Google Drive.
    • Note that the released model contains the whole state of the light CNN module and optimizer. The details of loading model can be found in train.py.
  • The model of LightCNN-29 is released on Google Drive.
  • The model of LightCNN-29 v2 is released on Google Drive.
  • The features of lfw and megaface of LightCNN-9 are released.

Performance

The Light CNN performance on lfw 6,000 pairs.

Model 100% - EER [email protected]=1% [email protected]=0.1% [email protected]=0
LightCNN-9 98.70% 98.47% 95.13% 89.53%
LightCNN-29 99.40% 99.43% 98.67% 95.70%
LightCNN-29v2 99.43% 99.53% 99.30% 96.77%

The Light CNN performance on lfw BLUFR protocols

Model [email protected]=0.1% [email protected]=1%
LightCNN-9 96.80% 83.06%
LightCNN-29 98.95% 91.33%
LightCNN-29v2 99.41% 94.43%

The Light CNN performance on MegaFace

Model Rank-1 [email protected]=1e-6
LightCNN-9 65.782% 76.288%
LightCNN-29 72.704% 85.891%
LightCNN-29v2 76.021% 89.740%

Citation

If you use our models, please cite the following paper:

@article{wu2018light,
  title={A light CNN for deep face representation with noisy labels},
  author={Wu, Xiang and He, Ran and Sun, Zhenan and Tan, Tieniu},
  journal={IEEE Transactions on Information Forensics and Security},
  volume={13},
  number={11},
  pages={2884--2896},
  year={2018},
  publisher={IEEE}
}

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].