text: Title: 🚀🚀Real-time Face Recognition in TensorLayer
  Body: ## A discussion for:
  - Face recognition algorithm
  - Face recognition history
  - Face recognition implementation using TensorLayer and TensorFlow. 
  
  **Feel free to add more papers and discuss here or in the [Slack channel](https://join.slack.com/t/tensorlayer/shared_invite/enQtMjUyMjczMzU2Njg4LWI0MWU0MDFkOWY2YjQ4YjVhMzI5M2VlZmE4YTNhNGY1NjZhMzUwMmQ2MTc0YWRjMjQzMjdjMTg2MWQ2ZWJhYzc).**
  
  ### Background
  
  SphereFace : Face recognition (FP) can be categorized as face identification and face verification. The **identification** classifies a face to a specific identity, while the **verification** determines whether a pair of faces belongs to the same identity.
  
  For **closed-set protocol**, all testing identities are predefined in training set. Therefore, closed- set FR can be well addressed as a classification problem.
  
  For **open-set protocol**, the testing identities are usually not in the training set, so we need to map faces to a discriminative feature space. Then face identification can be viewed as performing face verification between the probe face and every identity in the gallery (given some faces of the identities). **<--- industry usually use this one.**
  
  ### Paper History
  
  - [Dimensionality reduction by learning an invariant mapping. In CVPR, 2006.]() 
    - triplet loss
  - [Deep learning face representation from predicting 10,000 classes. In CVPR, 2014.]()
    - softmax loss, treats open-set FR as a multi-class classification problem
    - open-set
  - [Deepface: Closing the gap to human-level performance in face verifica- tion. In CVPR, 2014.]()
    - softmax loss, treats open-set FR as a multi-class classification problem
    - open-set
  - [Deep learning face representation by joint identification-verification. In NIPS, 2014]() 
    - softmax loss + contrastive loss (Euclidean margin based loss)
    - greatly boosting the performance.
  - [Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015]() 
    - triplet loss
    - [**code** davidsandberg](https://github.com/davidsandberg/facenet)
    - learn a unified face embedding, 200 million face images, current state-of-the-art FR accuracy
  - [A discriminative feature learning approach for deep face recognition. In ECCV, 2016]() 
    - softmax loss + centre loss (Euclidean margin based loss)
  
  SphereFace : One could notice that state-of-the-art FR meth- ods usually adopt ideas (e.g. contrastive loss, triplet loss) from metric learning, showing open-set FR could be well addressed by discriminative metric learning.
  
  - [Sparsifying neural network connections for face recognition. In CVPR, 2016]() 
    - softmax loss + contrastive loss (Euclidean margin based loss)
  - [Targeting ultimate accuracy: Face recognition via deep embedding. arXiv preprint:1506.07310, 2015.]()
    - ? loss
  
  - [Large-margin softmax loss for convolutional neural networks. In ICML, 2016. 2,]()
    - L-Softmax loss, also **implicitly** involves the concept of angles like SphereFace. Differently, SphereFace A-Softmax loss is developed to **explicitly** learn discriminative face embedding.
    - it shows great improvement on closed-set classification problems. 
  
  SphereFace : Center loss only explicitly encourages intra-class compactness. Both contrastive loss and triplet loss can not constrain on each individual sample, and thus require carefully designed pair/triplet mining procedure, which is both time-consuming and performance-sensitive.
  
  - [SphereFace: Deep Hypersphere Embedding for Face Recognition. In CVPR, 2017]()
    - angular softmax (A-Softmax) loss
    - open-set
    - haijun : 100x100 still works fine
    - [**code** wy1iu](https://github.com/wy1iu/sphereface)
    - We extract the deep features (SphereFace) from the output of the FC1 layer. For all experiments, the final representation of a testing face is obtained by **concatenating its original face features and its horizontally flipped features**. The score (metric) is computed by the **cosine distance** of two features.
  - [CosFace: Large Margin Cosine Loss for Deep Face Recognition In ArXiv, 2018]()
  - [ArcFace/InsightFace: Additive Angular Margin Loss for Deep Face Recognition. ArXiv, 2018](https://arxiv.org/abs/1801.07698)
    - jiankang : follows sphereface and cosface
    - [**code** insightface](https://github.com/deepinsight/insightface) (ArcFace) from Imperial College and DeepInsight using MXNET
    - [**code** InsightFace_TF](https://github.com/auroua/InsightFace_TF) (ArcFace)  using **TensorLayer** 
  - [MobileFaceNets: Efficient CNNs for Accurate Real-time Face Verification on Mobile Devices. ArXiv, 2018](https://arxiv.org/abs/1804.07573)
  
  ### Implementation Hints
  - https://github.com/auroua/InsightFace_TF/blob/master/losses/face_losses.py
  - http://tensorlayer.readthedocs.io/en/latest/modules/cost.html#cosine-similarity
  - https://github.com/sirius-ai/MobileFaceNet_TF