Skip to content

Face Attribute Prediction on CelebA benchmark with PyTorch Implementation

License

Notifications You must be signed in to change notification settings

NIRVANALAN/face-attribute-prediction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

face-attribute-prediction

Face Attribute Prediction on CelebA benchmark with PyTorch Implemantation.

Dependencies

  • Anaconda3 (Python 3.6+, with Numpy etc.)
  • PyTorch 0.4+
  • tensorboard, tensorboardX

Dataset

  • CelebA dataset is a large-scale face dataset with attribute-based annotations. Cropped and aligned face regions are utilized as the training source.
  • Pre-processed data and specific split list has been uploaded to list directory.
  • lfwA+ dataset is the private test dataset.

Features

  • BCE loss for attributes recognition.
  • Good capacity as well as generalization ability.Achieve 92%+ average accuracy on CelebA Val as well as >73% on LFWA+.
  • ResNet-50 as backbone
  • Focal Loss
  • Class balanced sampler
  • fast convergence: 91% acc on CelebA Val after 1 epoch.

Result

Method CelebA Acc LFWA ACC
BCE Baseline 91.3 72.2
Cos Decay + US + focal 92.14 73.31
Cos Decay + BS + focal 91.7 73.9
  • link to pretrained model(ResNet50)
  • see train.sh script for more details.

Attention:

  • I manually changed CE loss to BCE to lint code as well as try some tricks. Basically they are the same.
  • Normalization value are calculated on CelebA train_split set. You can refer to the code here
  • Class Balance Sampler may hurt general representation learning, but lead to better generalization on tail classes. Better used in fiine-tuning process. For more details, kindly refer to the paper

About

Face Attribute Prediction on CelebA benchmark with PyTorch Implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Shell 0.7%