← Open Source
AlfredXiangWu

LightCNN

A Light CNN for Deep Face Representation with Noisy Labels, TIFS 2018.

ModelsVision modelsPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
959
Stars
167
Forks
+0
This week
1
Contributors
Created 2017-07-04 · Updated 2026-09-23 · #12380 today
Top developers
AlfredXiangWu

AlfredXiangWu/LightCNN is ranked 12,380 with 959 stars.

Same-category comparison

AlfredXiangWu/LightCNN is ranked 12,380 among these 8 peers; nvidia-cosmos/cosmos-reason1 is ranked 12,379.

Same-category comparison
NameRankMetrics
dexmal/opendw12,313
Language:
Python
Stars:
970
Forks:
56
Description:
An Open-Source World Model for Action-Conditioned Embodied Intelligence.
mbzuai-oryx/groundingLMM12,324
Language:
Python
Stars:
969
Forks:
56
Description:
[CVPR 2024 🔥] Grounding Large Multimodal Model (GLaMM), the first-of-its-kind model capable of generating natural language responses that are seamlessly integrated with object segmentation masks.
Vchitect/SEINE12,337
Language:
Python
Stars:
966
Forks:
63
Description:
[ICLR 2024] SEINE: Short-to-Long Video Diffusion Model for Generative Transition and Prediction.
nvidia-cosmos/cosmos-reason112,379
Language:
Python
Stars:
960
Forks:
85
Description:
Cosmos-Reason1 models understand the physical common sense and generate appropriate embodied decisions in natural language through long chain-of-thought reasoning processes.
chuanyangjin/fast-DiT12,387
Language:
Python
Stars:
958
Forks:
124
Description:
Fast Diffusion Models with Transformers.
FudanDISC/DISC-LawLLM12,391
Language:
Python
Stars:
957
Forks:
94
UCSC-VLAA/story-iter12,392
Language:
Python
Stars:
957
Forks:
131
Description:
[ICLR 2026] A Training-free Iterative Framework for Long Story Visualization.
FORTH-ModelBasedTracker/MocapNET12,398
Language:
C++
Stars:
955
Forks:
145
Description:
A real-time method that estimates the 3D human pose directly in the popular Bio Vision Hierarchy (BVH) format, given estimations of the 2D body joints originating from monocular color images. Our contributions include: (a) A novel and compact 2D pose NSRM representation. (b) A human body orientation classifier and an ensemble of orientation-tuned.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModels
SubcategoryVision models
Stars959
Forks167
Contributors1
Created date2017-07-04
Updated date2026-09-23
Stars in 1 day0
Stars in 7 days0
Rank12,380
Previous rank12,306
Rank change-74
7-day stars rank13,391
Previous 7-day stars rank13,403
7-day stars rank change12
Total stars rank11,513
Previous total stars rank11,493
Total stars rank change-20
CountryChina
README summary

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 Installation Datasets Training Evaluate Performance Citation References Updates Feb 9, 2022 Jan 17, 2018 Sep 12, 2017 Jul 12, 2017 Jul 4, 2017 Installation Install pytorch following the website. 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. Tips

: Evaluation To evaluate a trained network: You can use or to evaluate the features on ROC and obtain and for your testing datasets. The model of LightCNN-9 is released on Google Drive. 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. The model of LightCNN v4 is released on Google Drive. The detailed structure of LightCNN

v4 is shown in light_cnn_v4. py The input is an aligned 128*128 **BGR** face image. The input pixel value is normalized by mean ([0. Performance The Light CNN performance on lfw 6,000 pairs. | Model | 100% - EER | TPR@FAR=1% | TPR@FAR=0. 27% | The Light CNN performance on lfw BLUFR protocols | Model | VR@FAR=0. 740% | Citation If you use our models, please cite the following paper: References Original Light CNN implementation (caffe).

Frequently asked questions

How many stars and forks are recorded?

AlfredXiangWu/LightCNN has 959 stars and 167 forks.

What is the repository rank?

AlfredXiangWu/LightCNN is ranked 12,380.

What language and category are recorded?

AlfredXiangWu/LightCNN has 959 stars, uses Python and belongs to Models.

Which repository is closest in rank?

AlfredXiangWu/LightCNN is compared with nvidia-cosmos/cosmos-reason1, ranked 12,379 with 960 stars.

README

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

  • Feb 9, 2022
    • Light CNN v4 pretrained model is released.
  • 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 TPR@FAR=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 TPR@FAR=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 TPR@FAR=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 TPR@FPR 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.
  • The model of LightCNN v4 is released on Google Drive.
    • The detailed structure of LightCNN v4 is shown in light_cnn_v4.py
    • The input is an aligned 128*128 BGR face image.
    • The input pixel value is normalized by mean ([0.0, 0.0, 0.0]) and std ([255.0, 255.0, 255.0]).

Performance

The Light CNN performance on lfw 6,000 pairs.

Model 100% - EER TPR@FAR=1% TPR@FAR=0.1% TPR@FAR=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%
LightCNN v4 99.67% 99.67% 99.57% 99.27%

The Light CNN performance on lfw BLUFR protocols

Model VR@FAR=0.1% DIR@FAR=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 TPR@FAR=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

Nearby in the ranking
Similar items