Circle Loss: A Unified Perspective of Pair Similarity Optimization
Yifan Sun, Changmao Cheng, Yuhan Zhang, Chi Zhang, Liang Zheng, Zhongdao Wang, Yichen Wei
Code Available — Be the first to reproduce this paper.
ReproduceCode
- github.com/layumi/Person_reID_baseline_pytorchpytorch★ 4,415
- github.com/alibaba/EasyCVpytorch★ 1,949
- github.com/TinyZeaMays/CircleLosspytorch★ 475
- github.com/Faceplugin-ltd/FaceRecognition-Androidnone★ 460
- github.com/lzx551402/ASLFeattf★ 313
- github.com/XuyangBai/D3Feattf★ 273
- github.com/Recognito-Vision/Android-FaceRecognition-FaceLivenessDetectionnone★ 110
- github.com/zhen8838/Circle-Losstf★ 109
- github.com/qianjinhao/circle-losspytorch★ 44
- github.com/FEIfei-coder/circle-loss-for-reidpytorch★ 4
Abstract
This paper provides a pair similarity optimization viewpoint on deep feature learning, aiming to maximize the within-class similarity s_p and minimize the between-class similarity s_n. We find a majority of loss functions, including the triplet loss and the softmax plus cross-entropy loss, embed s_n and s_p into similarity pairs and seek to reduce (s_n-s_p). Such an optimization manner is inflexible, because the penalty strength on every single similarity score is restricted to be equal. Our intuition is that if a similarity score deviates far from the optimum, it should be emphasized. To this end, we simply re-weight each similarity to highlight the less-optimized similarity scores. It results in a Circle loss, which is named due to its circular decision boundary. The Circle loss has a unified formula for two elemental deep feature learning approaches, i.e. learning with class-level labels and pair-wise labels. Analytically, we show that the Circle loss offers a more flexible optimization approach towards a more definite convergence target, compared with the loss functions optimizing (s_n-s_p). Experimentally, we demonstrate the superiority of the Circle loss on a variety of deep feature learning tasks. On face recognition, person re-identification, as well as several fine-grained image retrieval datasets, the achieved performance is on par with the state of the art.
Tasks
Benchmark Results
| Dataset | Model | Metric | Claimed | Verified | Status |
|---|---|---|---|---|---|
| CFP-FP | CircleLoss(ours) | Accuracy | 0.96 | — | Unverified |
| LFW | CircleLoss | Accuracy | 1 | — | Unverified |