{"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/gan-prior-embedded-network-for-blind-face","title":"GAN Prior Embedded Network for Blind Face Restoration in the Wild","arxiv_id":"2105.06070","date":"2021-05-13","proceeding":"CVPR 2021 1","authors":["Tao Yang","Peiran Ren","Xuansong Xie","Lei Zhang"],"abstract":"Blind face restoration (BFR) from severely degraded face images in the wild is a very challenging problem. Due to the high illness of the problem and the complex unknown degradation, directly training a deep neural network (DNN) usually cannot lead to acceptable results. Existing generative adversarial network (GAN) based methods can produce better results but tend to generate over-smoothed restorations. In this work, we propose a new method by first learning a GAN for high-quality face image generation and embedding it into a U-shaped DNN as a prior decoder, then fine-tuning the GAN prior embedded DNN with a set of synthesized low-quality face images. The GAN blocks are designed to ensure that the latent code and noise input to the GAN can be respectively generated from the deep and shallow features of the DNN, controlling the global face structure, local face details and background of the reconstructed image. The proposed GAN prior embedded network (GPEN) is easy-to-implement, and it can generate visually photo-realistic results. Our experiments demonstrated that the proposed GPEN achieves significantly superior results to state-of-the-art BFR methods both quantitatively and qualitatively, especially for the restoration of severely degraded face images in the wild. The source code and models can be found at https://github.com/yangxy/GPEN.","url_abs":"https://arxiv.org/abs/2105.06070v1","url_pdf":"https://arxiv.org/pdf/2105.06070v1.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":"gan-prior-embedded-network-for-blind-face","repo_url":"https://github.com/yangxy/GPEN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"gan-prior-embedded-network-for-blind-face","repo_url":"https://github.com/woctezuma/SimSwap-colab","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"gan-prior-embedded-network-for-blind-face","repo_url":"https://github.com/bitcjm/GPEN_REPO","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":{"status":"ok"}}],"tasks":[{"task_slug":"blind-face-restoration","task_name":"Blind Face Restoration"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":null,"task_name":"Generative Adversarial Network"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/blind-face-restoration-on-celeba-hq","task":"Blind Face Restoration","dataset":"CelebA-HQ","model":"GPEN","rank_in_archive_order":1,"of":6,"metrics":{"FID":"31.72","LPIPS":"0.346","PSNR":"20.80"},"uses_additional_data":false},{"leaderboard":"/sota/blind-face-restoration-on-celeba-hq","task":"Blind Face Restoration","dataset":"CelebA-HQ","model":"HiFaceGAN","rank_in_archive_order":2,"of":6,"metrics":{"FID":"56.67","LPIPS":"0.392","PSNR":"21.33"},"uses_additional_data":false},{"leaderboard":"/sota/blind-face-restoration-on-celeba-hq","task":"Blind Face Restoration","dataset":"CelebA-HQ","model":"Pix2PixHD","rank_in_archive_order":3,"of":6,"metrics":{"FID":"76.89","LPIPS":"0.494","PSNR":"20.45"},"uses_additional_data":false},{"leaderboard":"/sota/blind-face-restoration-on-celeba-hq","task":"Blind Face Restoration","dataset":"CelebA-HQ","model":"GFRNet","rank_in_archive_order":4,"of":6,"metrics":{"FID":"134.92","LPIPS":"0.597","PSNR":"21.70"},"uses_additional_data":false},{"leaderboard":"/sota/blind-face-restoration-on-celeba-hq","task":"Blind Face Restoration","dataset":"CelebA-HQ","model":"GWAInet","rank_in_archive_order":5,"of":6,"metrics":{"FID":"135.84","LPIPS":"0.569","PSNR":"19.84"},"uses_additional_data":false},{"leaderboard":"/sota/blind-face-restoration-on-celeba-hq","task":"Blind Face Restoration","dataset":"CelebA-HQ","model":"Super-FAN","rank_in_archive_order":6,"of":6,"metrics":{"FID":"136.83","LPIPS":"0.616","PSNR":"21.56"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2105.06070","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.06070"}},"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/yangxy/GPEN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/woctezuma/SimSwap-colab","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bitcjm/GPEN_REPO","reach":{"status":"ok"}}],"summary":{"ran":13,"ran_fixture":3,"unverified":5},"by_repo_kind":{"official":{"samples":21,"ran":16,"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":21,"samples":[{"code_sha256_prefix":"817b02137d001af3","entry":"Blur","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"817b02137d001af3"}},{"code_sha256_prefix":"ded6faa949d33e01","entry":"ConvLayer","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ded6faa949d33e01"}},{"code_sha256_prefix":"6671b8310bdd070f","entry":"EqualConv2d","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6671b8310bdd070f"}},{"code_sha256_prefix":"86832aeb38a30381","entry":"EqualLinear","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"86832aeb38a30381"}},{"code_sha256_prefix":"2c52e908a19ce0ec","entry":"FusedLeakyReLU","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c52e908a19ce0ec"}},{"code_sha256_prefix":"2986127aefd3f811","entry":"FusedLeakyReLUFunction","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2986127aefd3f811"}},{"code_sha256_prefix":"d86087185b547dc5","entry":"FusedLeakyReLUFunctionBackward","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d86087185b547dc5"}},{"code_sha256_prefix":"31acaa629c342156","entry":"NoiseInjection","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"31acaa629c342156"}},{"code_sha256_prefix":"44c74356425e3a9a","entry":"PixelNorm","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"44c74356425e3a9a"}},{"code_sha256_prefix":"e752706dac396c70","entry":"ScaledLeakyReLU","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e752706dac396c70"}},{"code_sha256_prefix":"29c4ccc455835238","entry":"UpFirDn2d","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"29c4ccc455835238"}},{"code_sha256_prefix":"0ecd7eb47f14bf8f","entry":"UpFirDn2dBackward","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0ecd7eb47f14bf8f"}},{"code_sha256_prefix":"30864eacf1de8c4b","entry":"Upsample","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30864eacf1de8c4b"}},{"code_sha256_prefix":"507f73ae37ec8dda","entry":"fused_leaky_relu","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"507f73ae37ec8dda"}},{"code_sha256_prefix":"e0b304c618b82986","entry":"upfirdn2d","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e0b304c618b82986"}},{"code_sha256_prefix":"054eb982e90af080","entry":"upfirdn2d_native","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"054eb982e90af080"}},{"code_sha256_prefix":"451b73e4c7da557b","entry":"FullGenerator","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.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":"451b73e4c7da557b"}},{"code_sha256_prefix":"5d1d764abd180e05","entry":"Generator","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.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":"5d1d764abd180e05"}},{"code_sha256_prefix":"56ce990d99525f1d","entry":"ModulatedConv2d","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.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":"56ce990d99525f1d"}},{"code_sha256_prefix":"f99fbc31c41473fc","entry":"StyledConv","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.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":"f99fbc31c41473fc"}},{"code_sha256_prefix":"cb0a65c2bec8bb30","entry":"ToRGB","repo":"yangxy/GPEN","repo_kind":"official","path":"face_model/gpen_model.py","file_url":"https://github.com/yangxy/GPEN/blob/HEAD/face_model/gpen_model.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":"cb0a65c2bec8bb30"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}