{"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/towards-privacy-protection-by-generating","title":"Towards Face Encryption by Generating Adversarial Identity Masks","arxiv_id":"2003.06814","date":"2020-03-15","proceeding":"ICCV 2021 10","authors":["Xiao Yang","Yinpeng Dong","Tianyu Pang","Hang Su","Jun Zhu","Yuefeng Chen","Hui Xue"],"abstract":"As billions of personal data being shared through social media and network, the data privacy and security have drawn an increasing attention. Several attempts have been made to alleviate the leakage of identity information from face photos, with the aid of, e.g., image obfuscation techniques. However, most of the present results are either perceptually unsatisfactory or ineffective against face recognition systems. Our goal in this paper is to develop a technique that can encrypt the personal photos such that they can protect users from unauthorized face recognition systems but remain visually identical to the original version for human beings. To achieve this, we propose a targeted identity-protection iterative method (TIP-IM) to generate adversarial identity masks which can be overlaid on facial images, such that the original identities can be concealed without sacrificing the visual quality. Extensive experiments demonstrate that TIP-IM provides 95\\%+ protection success rate against various state-of-the-art face recognition models under practical test scenarios. Besides, we also show the practical and effective applicability of our method on a commercial API service.","url_abs":"https://arxiv.org/abs/2003.06814v2","url_pdf":"https://arxiv.org/pdf/2003.06814v2.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":"towards-privacy-protection-by-generating","repo_url":"https://github.com/shawnxyang/tip-im","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"face-recognition","task_name":"Face Recognition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2003.06814","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.06814"}},"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/shawnxyang/tip-im","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":1,"ran_honours":2,"ran_draft_wrong":2,"unverified":18},"by_repo_kind":{"official":{"samples":23,"ran":5,"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":0,"samples":[{"code_sha256_prefix":"9348919b3a8be935","entry":"IOU","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/align.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/align.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9348919b3a8be935"}},{"code_sha256_prefix":"ad5dbf57f3ea2633","entry":"get_block","repo":"shawnxyang/tip-im","repo_kind":"official","path":"networks/ArcFace.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/networks/ArcFace.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ad5dbf57f3ea2633"}},{"code_sha256_prefix":"ea7941eb1ea8ffb2","entry":"get_blocks","repo":"shawnxyang/tip-im","repo_kind":"official","path":"networks/ArcFace.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/networks/ArcFace.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea7941eb1ea8ffb2"}},{"code_sha256_prefix":"c54fea429589425d","entry":"l2_norm","repo":"shawnxyang/tip-im","repo_kind":"official","path":"networks/ArcFace.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/networks/ArcFace.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c54fea429589425d"}},{"code_sha256_prefix":"29507ad0ee182d8c","entry":"to_rgb","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/align.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/align.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"29507ad0ee182d8c"}},{"code_sha256_prefix":"32918e149a737ef6","entry":"LResNet50E_IR","repo":"shawnxyang/tip-im","repo_kind":"official","path":"networks/CosFace.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/networks/CosFace.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"32918e149a737ef6"}},{"code_sha256_prefix":"86226494dfd08ce2","entry":"RandomCrop","repo":"shawnxyang/tip-im","repo_kind":"official","path":"input_diversify.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/input_diversify.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"86226494dfd08ce2"}},{"code_sha256_prefix":"919b0ccbc0ed8a63","entry":"Resize","repo":"shawnxyang/tip-im","repo_kind":"official","path":"input_diversify.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/input_diversify.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"919b0ccbc0ed8a63"}},{"code_sha256_prefix":"00e18ccd3f1f30c4","entry":"affine","repo":"shawnxyang/tip-im","repo_kind":"official","path":"input_diversify.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/input_diversify.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"00e18ccd3f1f30c4"}},{"code_sha256_prefix":"edfa6042244eb012","entry":"create_mtcnn","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/detect_face.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/detect_face.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"edfa6042244eb012"}},{"code_sha256_prefix":"96bf1c60f74fc61d","entry":"detect_face","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/detect_face.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/detect_face.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"96bf1c60f74fc61d"}},{"code_sha256_prefix":"00f2288642d682fa","entry":"gaussian_kernel_matrix","repo":"shawnxyang/tip-im","repo_kind":"official","path":"mmd.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/mmd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"00f2288642d682fa"}},{"code_sha256_prefix":"924034eebb04536f","entry":"get_dataset_celeb","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/face_image.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/face_image.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"924034eebb04536f"}},{"code_sha256_prefix":"baa6487e16d2b4a8","entry":"get_dataset_webface","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/face_image.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/face_image.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"baa6487e16d2b4a8"}},{"code_sha256_prefix":"01506ca0db5cb1e7","entry":"get_model","repo":"shawnxyang/tip-im","repo_kind":"official","path":"networks/FaceModel.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/networks/FaceModel.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"01506ca0db5cb1e7"}},{"code_sha256_prefix":"fab32b621c712604","entry":"layer","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/detect_face.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/detect_face.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fab32b621c712604"}},{"code_sha256_prefix":"a0e97123727a9fb0","entry":"load_property","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/face_image.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/face_image.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a0e97123727a9fb0"}},{"code_sha256_prefix":"d848d80fdf341607","entry":"maximum_mean_discrepancy","repo":"shawnxyang/tip-im","repo_kind":"official","path":"mmd.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/mmd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d848d80fdf341607"}},{"code_sha256_prefix":"4edba53421463c1a","entry":"myphi","repo":"shawnxyang/tip-im","repo_kind":"official","path":"networks/SphereFace.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/networks/SphereFace.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4edba53421463c1a"}},{"code_sha256_prefix":"21454b651fb3987f","entry":"pairwise_distance","repo":"shawnxyang/tip-im","repo_kind":"official","path":"mmd.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/mmd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"21454b651fb3987f"}},{"code_sha256_prefix":"82b10a215c8cd30f","entry":"parse_lst_line","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/face_preprocess.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/face_preprocess.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"82b10a215c8cd30f"}},{"code_sha256_prefix":"1586a591b369e039","entry":"preprocess","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/face_preprocess.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/face_preprocess.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1586a591b369e039"}},{"code_sha256_prefix":"79625c2830b046be","entry":"read_image","repo":"shawnxyang/tip-im","repo_kind":"official","path":"align_methods/face_preprocess.py","file_url":"https://github.com/shawnxyang/tip-im/blob/HEAD/align_methods/face_preprocess.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"79625c2830b046be"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}