CosFace: Large Margin Cosine Loss for Deep Face Recognition
By H. Wang, Yitong Wang, Zheng Zhou, Xing Ji, Zhifeng Li, Dihong Gong, Jin Zhou. 2018
3,012 citations recorded by the source corpus.
Face recognition has made extraordinary progress owing to the advancement of deep convolutional neural networks (CNNs). The central task of face recognition, including face verification and identification, involves face feature discrimination. However, the traditional softmax loss of deep CNNs usually lacks the power of discrimination. To address this problem, recently several loss functions such as center loss, large margin softmax loss, and angular softmax loss have been proposed. All these improved losses share the same idea: maximizing inter-class variance and minimizing intra-class variance. In this paper, we propose a novel loss function, namely large margin cosine loss (LMCL), to realize this idea from a different perspective. More specifically, we reformulate the softmax loss as a cosine loss by L2 normalizing both features and weight vectors to remove radial variations, based on which a cosine margin term is introduced to further maximize the decision margin in the angular space. As a result, minimum intra-class variance and maximum inter-class variance are achieved by virtue of normalization and cosine decision margin maximization. We refer to our model trained with LMCL as CosFace. Extensive experimental evaluations are conducted on the most popular public-domain face recognition datasets such as MegaFace Challenge, Youtube Faces (YTF) and Labeled Face in the Wild (LFW). We achieve the state-of-the-art performance on these benchmarks, which confirms the effectiveness of our proposed approach.
Subfields: Computer Vision and Pattern Recognition
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Computer Vision and Pattern Recognition
- Luc Van Gool
- Xiaogang Wang
- Dacheng Tao
- Ming-Hsuan Yang
- Yi Yang
- Andrew Zisserman
- Chen Change Loy
- Trevor Darrell
Citations in the corpus
- Continual Learning by Modeling Intra-Class Variation (2022, methodology): “The intuition of why MOCA can well regularize the representation space also comes from the series of works in large-margin softmax (Liu et al., 2016; 2017a;b; 2022; Wang et al., 2018a;b; Deng et al., 2019).”
- Margin-Based Few-Shot Class-Incremental Learning with Class-Level Overfitting Mitigation (2022, background): “Margin-based classification [29, 34, 11, 21] has been widely utilized in metric learning.”
- Few-Shot Class-Incremental Learning from an Open-Set Perspective (2022, positive): “Following SphereFace, CosFace [21] and ArcFace [6] were proposed to reduce the complex loss calculation and make the training procedure more stable.”
- Learning with Selective Forgetting (2021, background): “A typical choice would be softmax cross entropy (CE) or additive margin softmax (AMS) loss [Wang et al. , 2018a; Wang et al. , 2018b].”
- Improving Generalization via Scalable Neighborhood Component Analysis (2018, background): “There are many metric learning approaches [17,8], some achieving the state-of-the-art performance in image retrieval [47], face recognition [35,40,44], and person re-identification [49].”
- Channel Augmented Joint Learning for Visible-Infrared Recognition (2021, methodology): “A widely-used technique to measure the pair distance difference is ℓ 1 norm [29, 31, 34], as done Eq.”
- The Devil is in the Channels: Mutual-Channel Loss for Fine-Grained Image Classification (2020, background): “[41] embraced the idea of the Fisher criterion and proposed the large margin cosine loss (LMCL) to learn highly discriminative deep features for image recognition.”
- CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition (2020, background): “For example, explicit margin, i.e. , Cos-Face [30], Sphereface [14], ArcFace [8], and implicit margin, i.e. , Adacos [38], supplement the original softmax function to enforce greater intra-class compactness and inter-class discrepancy, which result in more discriminate features.”
- Face Anti-Spoofing: Model Matters, so Does Data (2019, background): “Therefore, face anti-spoofing is quite vital to the security of face recognition systems [39].”
- SphereFace Revived: Unifying Hyperspherical Face Recognition (2021, methodology): “Based on how ψ(θ(x,Wy)) is constructed, loss functions in hyperspherical FR can be divided into additive margin [3], [4], [5] and multiplicative margin [1], [2].”
- AdaFace: Quality Adaptive Margin for Face Recognition (2022, methodology): “The margin based softmax loss function is widely used for training face recognition (FR) models [4, 13, 20, 35].”
- Learning Compatible Embeddings (2021, background): “For example, μ(w, f) = ν(w, f) = w f ∥wT f∥ for NormFace [45] while μ(w, f) = w f ∥wT f∥ − m, ν(w, f) = w T f ∥wT f∥ for CosFace [46].”
- Learning from the Past: Meta-Continual Learning with Knowledge Embedding for Jointly Sketch, Cartoon, and Caricature Face Recognition (2020, methodology): “Baselines for Face Recognition We compare against various state-of-the-art baselines for face recognition, including CenterLoss Face [49], SphereFace [26], CosFace [45] and ArcFace [9].”
- Learning towards Minimum Hyperspherical Energy (2018, background): “Current state-of-the-art face recognition methods [49, 28, 51, 6, 31] usually only focus on compressing the intra-class features, which makes MHE a potentially useful tool in order to further improve these face recognition methods.”
- Multi-Domain Multi-Task Rehearsal for Lifelong Learning (2020, neutral): “CosFace (Wang et al. 2018b,a) and ArcFace (Deng et al. 2019) add additive cosine margin and angular margin, respectively, for easier optimization.”
- FSCE: Few-Shot Object Detection via Contrastive Proposal Encoding (2021, methodology): “We visualize the pairwise cosine similarity between class prototypes [19, 20, 21] of a Faster R-CNN box classifier trained with PASCAL VOC [22, 23].”
- Additive Margin Softmax for Face Verification (2018, background): “two concurrent works [1], [22] also shows the effectiveness of additive margin based on softmax loss function.”
- Survey on Deep Neural Networks in Speech and Vision Systems (2019, background): “Wang et al. [102] have constructed a cost function called large margin cosine loss (LMCL), which achieves the desired variational properties.”