Coder Social home page Coder Social logo

serissa / sphereface Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yunyang1994/sphereface

0.0 3.0 0.0 52.15 MB

This is a MNIST Implementation for <SphereFace: Deep Hypersphere Embedding for Face Recognition> in CVPR'17.

License: MIT License

Python 100.00%

sphereface's Introduction

Build Status license

Author YunYang1994
E-mail [email protected]

SphereFace

This is a quick implementation for Deep Hypersphere Embedding for Face Recognition(CVPR 2017).This paper proposed the angular softmax loss that enables convolutional neural networks(CNNs) to learn angularly discriminative features. The main content I replicated contains:

  • 1. mathematical comparison among original softmax, modified softmax and angular softmax;
  • 2. show the accuracy and loss comparison of different softmax in the experiment;
  • 3. 2D and 3D visualization of embeddings learned with different softmax loss on MNIST dataset;
  • 4. I replicated SphereFace-20 model with tensorflow.and here is code and graph.

CNN-network

many current CNNS can viewed as convolution feature learning guided by softmax loss on top. however, softmax is easy to to optimize but does not explicitly encourage large margin between different classes.

on this situation, the author proposed a new loss function that always encourages an angular decision margin between different classes.

softmax loss

softmax formula test acc(MNIST)
original softmax weibo-logo 0.9775
modified softmax weibo-logo 0.9847
angular softmax weibo-logo 0.9896

A toy example on MNIST dataset, CNN features can be visualized by setting the output dimension as 2 or 3, as shown in following figures.

2D visualization

original softmax modified softmax angular softmax
weibo-logo weibo-logo weibo-logo

3D visualization

original softmax modified softmax angular softmax
weibo-logo weibo-logo weibo-logo

loss and accuracy

training loss training accuracy
weibo-logo weibo-logo

sphereface's People

Contributors

yunyang1994 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.