Skip to content

malik-anhar/MobileFaceNet_TF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MobileFaceNet_TF

Tensorflow implementation of MobileFaceNet

Dependencies

  • tensorflow >= r1.5
  • opencv-python 3.x
  • python 3.x
  • scipy
  • sklearn
  • numpy
  • mxnet
  • pickle

Dataset

Download the MS1M-refine-v2 datasets here

Create TFrecord

Run python utils/data_process.py

Start Training

Run python train_nets.py and there are some flags you can use:
--max_epoch to set the maximum number of epoch, default is 12
--class_number the number of calsses, if you use MS1M-V2 you need to set the class_number to 85742
--embedding_size the embedding size, default of MobileFaceNet is 128
--weight_decay weight decay of the optimizer, default is 5e-5
--train_batch_size batch size for the training, default is 90
--tfrecords_file_path path to MS1M-V2 tfrecord (generated by data_process.py)
--optimizer the optimizer for training, default is ADAM
--loss_type the loss type, there are insightface loss, cosineface loss, and combine loss. Default is insightface
--margin_m insightface loss, cosineface loss, or combine loss margin. Default is 0.5

Test Model

Run python test_nets.py and you need to use these flags:
--model Could be either a directory containing the meta_file and ckpt_file or a model protobuf (.pb) file
--eval_db_path Data test base path (consisting of lfw.bin, cfp_ff.bin, cfp_fp.bin, and agedb_30.bin files

About

Tensorflow implementation for MobileFaceNet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%