{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/sphereface-deep-hypersphere-embedding-for","title":"SphereFace: Deep Hypersphere Embedding for Face Recognition","arxiv_id":"1704.08063","date":"2017-04-26","proceeding":"CVPR 2017 7","authors":["Weiyang Liu","Yandong Wen","Zhiding Yu","Ming Li","Bhiksha Raj","Le Song"],"abstract":"This paper addresses deep face recognition (FR) problem under open-set\nprotocol, where ideal face features are expected to have smaller maximal\nintra-class distance than minimal inter-class distance under a suitably chosen\nmetric space. However, few existing algorithms can effectively achieve this\ncriterion. To this end, we propose the angular softmax (A-Softmax) loss that\nenables convolutional neural networks (CNNs) to learn angularly discriminative\nfeatures. Geometrically, A-Softmax loss can be viewed as imposing\ndiscriminative constraints on a hypersphere manifold, which intrinsically\nmatches the prior that faces also lie on a manifold. Moreover, the size of\nangular margin can be quantitatively adjusted by a parameter $m$. We further\nderive specific $m$ to approximate the ideal feature criterion. Extensive\nanalysis and experiments on Labeled Face in the Wild (LFW), Youtube Faces (YTF)\nand MegaFace Challenge show the superiority of A-Softmax loss in FR tasks. The\ncode has also been made publicly available.","url_abs":"http://arxiv.org/abs/1704.08063v4","url_pdf":"http://arxiv.org/pdf/1704.08063v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/wy1iu/sphereface","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/alililia/ascend_sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mindspore","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/alililia/gpu_sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mindspore","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/clcarwin/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/clcarwin/sphereface_pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/cvqluu/Additive-Margin-Softmax-Loss-Pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/cvqluu/Angular-Penalty-Softmax-Losses-Pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/sevenHsu/Face_Recognition_IN_Video","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/vnbot2/arcface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/vohoaiviet/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/yangyucheng000/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mindspore","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/zuoqing1988/mobile-sphereface-caffe","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/2023-MindSpore-4/Code11/tree/main/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/2023-MindSpore-4/Code7/tree/main/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/2023-MindSpore-4/Code7/tree/main/squeezenet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/Armxyz1/Results-on-RFW","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/FaceOnLive/Face-Recognition-SDK-Android","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/Faceplugin-ltd/FaceRecognition-Android","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/Recognito-Vision/Android-FaceRecognition-FaceLivenessDetection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/RocketFlash/easy_metric_learning/tree/master/tools","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/code-implementation1/Code8/tree/main/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"sphereface-deep-hypersphere-embedding-for","repo_url":"https://github.com/mindspore-ai/models/tree/master/official/cv/sphereface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"face-identification","task_name":"Face Identification"},{"task_slug":"face-recognition","task_name":"Face Recognition"},{"task_slug":"face-verification","task_name":"Face Verification"}],"methods":[{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/face-identification-on-megaface","task":"Face Identification","dataset":"MegaFace","model":"SphereFace (3-patch ensemble)","rank_in_archive_order":10,"of":13,"metrics":{"Accuracy":"75.766%"},"uses_additional_data":false},{"leaderboard":"/sota/face-identification-on-megaface","task":"Face Identification","dataset":"MegaFace","model":"SphereFace (single model)","rank_in_archive_order":12,"of":13,"metrics":{"Accuracy":"72.729%"},"uses_additional_data":false},{"leaderboard":"/sota/face-identification-on-trillion-pairs-dataset","task":"Face Identification","dataset":"Trillion Pairs Dataset","model":"A-Softmax","rank_in_archive_order":4,"of":6,"metrics":{"Accuracy":"43.89"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-ck","task":"Face Verification","dataset":"CK+","model":"SphereFace","rank_in_archive_order":1,"of":1,"metrics":{"Accuracy":"93.80"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-megaface","task":"Face Verification","dataset":"MegaFace","model":"SphereFace (3-patch ensemble)","rank_in_archive_order":10,"of":12,"metrics":{"Accuracy":"89.142%"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-megaface","task":"Face Verification","dataset":"MegaFace","model":"SphereFace (single model)","rank_in_archive_order":11,"of":12,"metrics":{"Accuracy":"85.561%"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-trillion-pairs-dataset","task":"Face Verification","dataset":"Trillion Pairs Dataset","model":"A-Softmax","rank_in_archive_order":4,"of":6,"metrics":{"Accuracy":"43.76"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-youtube-faces-db","task":"Face Verification","dataset":"YouTube Faces DB","model":"SphereFace","rank_in_archive_order":10,"of":12,"metrics":{"Accuracy":"95.0%"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1704.08063","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1704.08063"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zuoqing1988/mobile-sphereface-caffe","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yangyucheng000/sphereface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-4/Code7/tree/main/sphereface","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-4/Code7/tree/main/squeezenet","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alililia/ascend_sphereface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-4/Code11/tree/main/sphereface","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vnbot2/arcface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/clcarwin/sphereface_pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wy1iu/sphereface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/code-implementation1/Code8/tree/main/sphereface","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Armxyz1/Results-on-RFW","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vohoaiviet/sphereface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cvqluu/Additive-Margin-Softmax-Loss-Pytorch","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/FaceOnLive/Face-Recognition-SDK-Android","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/clcarwin/sphereface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alililia/gpu_sphereface","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Recognito-Vision/Android-FaceRecognition-FaceLivenessDetection","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Faceplugin-ltd/FaceRecognition-Android","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/RocketFlash/easy_metric_learning/tree/master/tools","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sevenHsu/Face_Recognition_IN_Video","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cvqluu/Angular-Penalty-Softmax-Losses-Pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mindspore-ai/models/tree/master/official/cv/sphereface","reach":null}],"summary":{"ran_fixture":1,"unverified":1},"by_repo_kind":{"listed":{"samples":1,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"c9a3a206dbb3075f","entry":"eval_acc","repo":"clcarwin/sphereface_pytorch","repo_kind":"listed","path":"lfw_eval.py","file_url":"https://github.com/clcarwin/sphereface_pytorch/blob/HEAD/lfw_eval.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c9a3a206dbb3075f"}},{"code_sha256_prefix":"e984e4da60619384","entry":"get_embeds","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"e984e4da60619384"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}