/SphereFace-pytorch

Implement SphereFace in Pytorch

Primary LanguagePython

SphereFace in Pytorch

An implementation of SphereFace:Deep Hypersphere Embedding for Face Recognition. This project use MNIST as train data, which include network SphereFace4, SphereFace20 etc. and take shortcut connection implementation.

Install & Run:

1.Download

git clone git@github.com:Joyako/SphereFace-pytorch.git
  1. Execution
python train.py

Result

Angular softmax loss feature map in MNIST.
Train:
train features
Test:
test features

Formula

1.The original softmax loss is defined as:
Original Softmax Loss

2.The L-Softmax loss is defined as:
L-Softmax Loss

3.Modified softmax loss(Normalization: ||w|| = 1, bais = 0):
Modified softmax loss

4.A-Softmax loss:
A-Softmax loss

Network

SphereFace20 network framework: network