Home

Awesome

mxnet_center_loss

This is a simple implementation of the center loss introduced by this paper : 《A Discriminative Feature Learning Approach for Deep Face Recognition》,Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao, Shenzhen check their site

中文

Prerequisities

install mxnet

for visualization, you may have to install seaborn and matplotlib

sudo pip install seaborn matplotlib

code

running the tests

1 set path of mxnet

change mxnet_root to your mxnet root folder in data.py

2 train

then you can see the output by typing

tail -f log.txt

3 visualize the result

run

python vis.py

You will see something like right picture... Now compare it with the 'softmax only' experiment in left, all the samples are well clustered, therefor we can expect better generalization performance. But the difference is not fatal here(center loss does help with convergence, see the last figure), since the number of classes is actually the same during train and test stages. For other application such as face recognition, the potential number of classes is unknown, then a good embedding is essential.

center_loss

training log:

train_log