{"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/pd-gan-probabilistic-diverse-gan-for-image","title":"PD-GAN: Probabilistic Diverse GAN for Image Inpainting","arxiv_id":"2105.02201","date":"2021-05-05","proceeding":"CVPR 2021 1","authors":["Hongyu Liu","Ziyu Wan","Wei Huang","Yibing Song","Xintong Han","Jing Liao"],"abstract":"We propose PD-GAN, a probabilistic diverse GAN for image inpainting. Given an input image with arbitrary hole regions, PD-GAN produces multiple inpainting results with diverse and visually realistic content. Our PD-GAN is built upon a vanilla GAN which generates images based on random noise. During image generation, we modulate deep features of input random noise from coarse-to-fine by injecting an initially restored image and the hole regions in multiple scales. We argue that during hole filling, the pixels near the hole boundary should be more deterministic (i.e., with higher probability trusting the context and initially restored image to create natural inpainting boundary), while those pixels lie in the center of the hole should enjoy more degrees of freedom (i.e., more likely to depend on the random noise for enhancing diversity). To this end, we propose spatially probabilistic diversity normalization (SPDNorm) inside the modulation to model the probability of generating a pixel conditioned on the context information. SPDNorm dynamically balances the realism and diversity inside the hole region, making the generated content more diverse towards the hole center and resemble neighboring image content more towards the hole boundary. Meanwhile, we propose a perceptual diversity loss to further empower PD-GAN for diverse content generation. Experiments on benchmark datasets including CelebA-HQ, Places2 and Paris Street View indicate that PD-GAN is effective for diverse and visually realistic image restoration.","url_abs":"https://arxiv.org/abs/2105.02201v1","url_pdf":"https://arxiv.org/pdf/2105.02201v1.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":"pd-gan-probabilistic-diverse-gan-for-image","repo_url":"https://github.com/KumapowerLIU/PD-GAN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"image-restoration","task_name":"Image Restoration"}],"methods":[{"method_slug":"pixel-prediction","method_name":"Inpainting"},{"method_slug":"spade","method_name":"SPADE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2105.02201","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.02201"}},"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/KumapowerLIU/PD-GAN","reach":null}],"summary":{"ran":1,"unverified":4},"by_repo_kind":{"official":{"samples":5,"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":0,"samples":[{"code_sha256_prefix":"9a4568c7d23bf0cd","entry":"GANLoss","repo":"KumapowerLIU/PD-GAN","repo_kind":"official","path":"models/PDGAN.py","file_url":"https://github.com/KumapowerLIU/PD-GAN/blob/HEAD/models/PDGAN.py","link_basis":"first_harvest_node","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":"9a4568c7d23bf0cd"}},{"code_sha256_prefix":"3bc17832bf883051","entry":"BaseModel","repo":"KumapowerLIU/PD-GAN","repo_kind":"official","path":"models/PDGAN.py","file_url":"https://github.com/KumapowerLIU/PD-GAN/blob/HEAD/models/PDGAN.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":"3bc17832bf883051"}},{"code_sha256_prefix":"bc8b042f40429d87","entry":"Diversityloss","repo":"KumapowerLIU/PD-GAN","repo_kind":"official","path":"models/PDGAN.py","file_url":"https://github.com/KumapowerLIU/PD-GAN/blob/HEAD/models/PDGAN.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":"bc8b042f40429d87"}},{"code_sha256_prefix":"7142388e0d4ccd1a","entry":"PDGAN","repo":"KumapowerLIU/PD-GAN","repo_kind":"official","path":"models/PDGAN.py","file_url":"https://github.com/KumapowerLIU/PD-GAN/blob/HEAD/models/PDGAN.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":"7142388e0d4ccd1a"}},{"code_sha256_prefix":"71a9bd930dcba919","entry":"StyleLoss","repo":"KumapowerLIU/PD-GAN","repo_kind":"official","path":"models/PDGAN.py","file_url":"https://github.com/KumapowerLIU/PD-GAN/blob/HEAD/models/PDGAN.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":"71a9bd930dcba919"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}