Skip to content

An implementation of Channel Pruning on face recognition algorithm Sphereface.

License

Notifications You must be signed in to change notification settings

isthatyoung/Sphereface-prune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sphereface-Prune

An implementation of Channel Pruning on face recognition model Sphereface by Caffe, Caffe's Python interface, realize Convolutional neural network compression and acceleration.

Requirement

Caffe 1.0.0
Python 2.7.6
Matplotlib 1.3.1
Numpy 1.13.1

Sphereface

Structure

Train

Trained by CASIA-Webface dataset
enter image description here

Test accuracy

10-folds cross validation by LFW dataset

Prune

We adopt a greedy algorithm based channel selection methods to choose the weak channels in every layer of convolutional neural network and prune them.
Channel selection follows the key criterion of convolutional neural network
· The output of i layer is the input of i+1 layer.
· The input channels of i+1-th layer have one-to-one correspondence with the filters in i-th layer.
· If a set of filters in i layer are removed without affecting the output of i+1 layer, that means that this set of filters could be safely removed. enter image description here enter image description here

Sphereface-4

Sphereface-10

Deal with the residual block in Sphereface-10

Fine-tuning

1 epoch fine-tuning after pruning every layer. Becuase CASIA Webface contains 452,723 face images, so 1 epoch means 1768 times iteration by setting batch size to 256. Basic leaning rate is set to 1 × 10−3.
After all layers are pruned, do 8 to 9 epochs fine-tuning, basic learning rate is 1 × 10−3.
enter image description here enter image description here

Comparison

enter image description here

References

SphereFace: Deep Hypersphere Embedding for Face Recognition
ThiNet: A Filter Level Pruning Method for Deep Neural Network Compression

About

An implementation of Channel Pruning on face recognition algorithm Sphereface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages