woshildh / center_loss

This my center_loss implementation by Pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Center loss by PyTorch

This is an implementation of center loss A Discriminative Feature Learning Approach for Deep Face Recognition. ECCV 2016.

Requirements:

PyTorch(0.4 or later)
Torchvision
tensorboardX
imageio(2.5.0)
matplotlib
numpy

train

$ cd center_loss
$ python3 main.py

After train, you can get about 98.6% accuracy. All feature picture is in logs/images. The gif(at logs dir) is below:

train_gif train_gif
left is feature distribution in train step, right is feature distribution in test step.

show results by tensorboard

$ cd logs
$ tensorboard --logdir=tblog --port=6006

Then, go to http://0.0.0.0:6006. You can get that:

train

Reference

  1. https://github.com/KaiyangZhou/pytorch-center-loss

About

This my center_loss implementation by Pytorch


Languages

Language:Python 100.0%