{"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/a-realistic-approach-to-generate-masked-faces","title":"A realistic approach to generate masked faces applied on two novel masked face recognition data sets","arxiv_id":"2109.01745","date":"2021-09-03","proceeding":null,"authors":["Tudor Mare","Georgian Duta","Mariana-Iuliana Georgescu","Adrian Sandru","Bogdan Alexe","Marius Popescu","Radu Tudor Ionescu"],"abstract":"The COVID-19 pandemic raises the problem of adapting face recognition systems to the new reality, where people may wear surgical masks to cover their noses and mouths. Traditional data sets (e.g., CelebA, CASIA-WebFace) used for training these systems were released before the pandemic, so they now seem unsuited due to the lack of examples of people wearing masks. We propose a method for enhancing data sets containing faces without masks by creating synthetic masks and overlaying them on faces in the original images. Our method relies on SparkAR Studio, a developer program made by Facebook that is used to create Instagram face filters. In our approach, we use 9 masks of different colors, shapes and fabrics. We employ our method to generate a number of 445,446 (90%) samples of masks for the CASIA-WebFace data set and 196,254 (96.8%) masks for the CelebA data set, releasing the mask images at https://github.com/securifai/masked_faces. We show that our method produces significantly more realistic training examples of masks overlaid on faces by asking volunteers to qualitatively compare it to other methods or data sets designed for the same task. We also demonstrate the usefulness of our method by evaluating state-of-the-art face recognition systems (FaceNet, VGG-face, ArcFace) trained on our enhanced data sets and showing that they outperform equivalent systems trained on original data sets (containing faces without masks) or competing data sets (containing masks generated by related methods), when the test benchmarks contain masked faces.","url_abs":"https://arxiv.org/abs/2109.01745v5","url_pdf":"https://arxiv.org/pdf/2109.01745v5.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":"a-realistic-approach-to-generate-masked-faces","repo_url":"https://github.com/securifai/masked_faces","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"a-realistic-approach-to-generate-masked-faces","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":"a-realistic-approach-to-generate-masked-faces","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"}}],"tasks":[{"task_slug":"face-recognition","task_name":"Face Recognition"}],"methods":[],"datasets_introduced":[{"slug":"casia-webface-masks","name":"CASIA-WebFace+masks","full_name":""},{"slug":"celeba-masks","name":"CelebA+masks","full_name":""}],"methods_introduced":[],"results":[{"leaderboard":"/sota/face-recognition-on-casia-webface-masks","task":"Face Recognition","dataset":"CASIA-WebFace+masks","model":"Fine-tuned ArcFace","rank_in_archive_order":1,"of":6,"metrics":{"Accuracy":"91.47"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-casia-webface-masks","task":"Face Recognition","dataset":"CASIA-WebFace+masks","model":"Fine-tuned FaceNet","rank_in_archive_order":2,"of":6,"metrics":{"Accuracy":"88.06"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-casia-webface-masks","task":"Face Recognition","dataset":"CASIA-WebFace+masks","model":"Fine-tuned VGG-Face","rank_in_archive_order":4,"of":6,"metrics":{"Accuracy":"86.85"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-celeba-masks","task":"Face Recognition","dataset":"CelebA+masks","model":"Fine-tuned ArcFace","rank_in_archive_order":1,"of":6,"metrics":{"Accuracy":"95.43"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-celeba-masks","task":"Face Recognition","dataset":"CelebA+masks","model":"Fine-tuned FaceNet","rank_in_archive_order":2,"of":6,"metrics":{"Accuracy":"93.58"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-celeba-masks","task":"Face Recognition","dataset":"CelebA+masks","model":"Fine-tuned VGG-Face","rank_in_archive_order":4,"of":6,"metrics":{"Accuracy":"91.51"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2109.01745","atlas_url":"https://app.syntology.ai/?focus=2109.01745","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.01745"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/securifai/masked_faces","reach":null},{"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/Faceplugin-ltd/FaceRecognition-Android","reach":{"status":"ok"}}],"summary":{"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":0,"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":"489f2686ec1a0f48","entry":"overlay_image_alpha","repo":"securifai/masked_faces","repo_kind":"official","path":"apply_masks_casia.py","file_url":"https://github.com/securifai/masked_faces/blob/HEAD/apply_masks_casia.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"489f2686ec1a0f48"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}