{"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/exploiting-deep-generative-prior-for","title":"Exploiting Deep Generative Prior for Versatile Image Restoration and Manipulation","arxiv_id":"2003.13659","date":"2020-03-30","proceeding":"ECCV 2020 8","authors":["Xingang Pan","Xiaohang Zhan","Bo Dai","Dahua Lin","Chen Change Loy","Ping Luo"],"abstract":"Learning a good image prior is a long-term goal for image restoration and manipulation. While existing methods like deep image prior (DIP) capture low-level image statistics, there are still gaps toward an image prior that captures rich image semantics including color, spatial coherence, textures, and high-level concepts. This work presents an effective way to exploit the image prior captured by a generative adversarial network (GAN) trained on large-scale natural images. As shown in Fig.1, the deep generative prior (DGP) provides compelling results to restore missing semantics, e.g., color, patch, resolution, of various degraded images. It also enables diverse image manipulation including random jittering, image morphing, and category transfer. Such highly flexible restoration and manipulation are made possible through relaxing the assumption of existing GAN-inversion methods, which tend to fix the generator. Notably, we allow the generator to be fine-tuned on-the-fly in a progressive manner regularized by feature distance obtained by the discriminator in GAN. We show that these easy-to-implement and practical changes help preserve the reconstruction to remain in the manifold of nature image, and thus lead to more precise and faithful reconstruction for real images. Code is available at https://github.com/XingangPan/deep-generative-prior.","url_abs":"https://arxiv.org/abs/2003.13659v4","url_pdf":"https://arxiv.org/pdf/2003.13659v4.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":"exploiting-deep-generative-prior-for","repo_url":"https://github.com/XingangPan/deep-generative-prior","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":null,"task_name":"Generative Adversarial Network"},{"task_slug":"image-manipulation","task_name":"Image Manipulation"},{"task_slug":"image-morphing","task_name":"Image Morphing"},{"task_slug":"image-restoration","task_name":"Image Restoration"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2003.13659","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.13659"}},"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/XingangPan/deep-generative-prior","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":4,"ran":1,"ran_honours":1,"ran_violates":1,"unverified":11},"by_repo_kind":{"official":{"samples":18,"ran":7,"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":"85eb95cce203dfc7","entry":"D_arch","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/biggan.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/biggan.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"85eb95cce203dfc7"}},{"code_sha256_prefix":"e8c308c9283407d7","entry":"G_arch","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/biggan.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/biggan.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e8c308c9283407d7"}},{"code_sha256_prefix":"7aa5f3eab66d010a","entry":"get_kernel","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/downsampler.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/downsampler.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7aa5f3eab66d010a"}},{"code_sha256_prefix":"c41836f3e51fa8f1","entry":"gram_schmidt","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/layers.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/layers.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c41836f3e51fa8f1"}},{"code_sha256_prefix":"7122d07d4047b8cf","entry":"join_strings","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"utils/biggan_utils.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/utils/biggan_utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7122d07d4047b8cf"}},{"code_sha256_prefix":"f321f54723433661","entry":"pil_loader","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/dataset.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f321f54723433661"}},{"code_sha256_prefix":"f017532fc389cbfe","entry":"str2bool","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"utils/common_utils.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/utils/common_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f017532fc389cbfe"}},{"code_sha256_prefix":"404fb2b2daa1ae78","entry":"accimage_loader","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"404fb2b2daa1ae78"}},{"code_sha256_prefix":"fc1652eff79b0594","entry":"add_dgp_parser","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"utils/common_utils.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/utils/common_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fc1652eff79b0594"}},{"code_sha256_prefix":"ec78b98a363a7f6b","entry":"apply_ablation_replacement","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/nethook.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/nethook.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ec78b98a363a7f6b"}},{"code_sha256_prefix":"7bf07d5f59aae36d","entry":"default_loader","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7bf07d5f59aae36d"}},{"code_sha256_prefix":"d018a85605be6cab","entry":"dist_init","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"utils/distributed_utils.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/utils/distributed_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d018a85605be6cab"}},{"code_sha256_prefix":"6c0ebc8eafe7a5f7","entry":"get_SVs","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"utils/biggan_utils.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/utils/biggan_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c0ebc8eafe7a5f7"}},{"code_sha256_prefix":"d8685300387a8464","entry":"load_weights","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"utils/biggan_utils.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/utils/biggan_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d8685300387a8464"}},{"code_sha256_prefix":"aa579182467201ac","entry":"make_matching_tensor","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/nethook.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/nethook.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa579182467201ac"}},{"code_sha256_prefix":"28d3a35157f2916d","entry":"power_iteration","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/layers.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28d3a35157f2916d"}},{"code_sha256_prefix":"4015ab1f3ab9b881","entry":"proj","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/layers.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4015ab1f3ab9b881"}},{"code_sha256_prefix":"9c68f929b9f35f78","entry":"subsequence","repo":"XingangPan/deep-generative-prior","repo_kind":"official","path":"models/nethook.py","file_url":"https://github.com/XingangPan/deep-generative-prior/blob/HEAD/models/nethook.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c68f929b9f35f78"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}