{"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/free-form-image-inpainting-with-gated","title":"Free-Form Image Inpainting with Gated Convolution","arxiv_id":"1806.03589","date":"2018-06-10","proceeding":"ICCV 2019 10","authors":["Jiahui Yu","Zhe Lin","Jimei Yang","Xiaohui Shen","Xin Lu","Thomas Huang"],"abstract":"We present a generative image inpainting system to complete images with free-form mask and guidance. The system is based on gated convolutions learned from millions of images without additional labelling efforts. The proposed gated convolution solves the issue of vanilla convolution that treats all input pixels as valid ones, generalizes partial convolution by providing a learnable dynamic feature selection mechanism for each channel at each spatial location across all layers. Moreover, as free-form masks may appear anywhere in images with any shape, global and local GANs designed for a single rectangular mask are not applicable. Thus, we also present a patch-based GAN loss, named SN-PatchGAN, by applying spectral-normalized discriminator on dense image patches. SN-PatchGAN is simple in formulation, fast and stable in training. Results on automatic image inpainting and user-guided extension demonstrate that our system generates higher-quality and more flexible results than previous methods. Our system helps user quickly remove distracting objects, modify image layouts, clear watermarks and edit faces. Code, demo and models are available at: https://github.com/JiahuiYu/generative_inpainting","url_abs":"https://arxiv.org/abs/1806.03589v2","url_pdf":"https://arxiv.org/pdf/1806.03589v2.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":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/JiahuiYu/generative_inpainting","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/CS269-Capstone/t-snake-capstone","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/CS269-Capstone/t-snake-mask-generation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/ChopsticksAN/generative_inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/Ir1d/tf-models","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/SayedNadim/Free_Form_Image_Inpainting_Gated_Conv","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/SayedNadim/Gated_Convolution_Tensorflow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/ShnitzelKiller/generative_inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/TerminatorSd/generative","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/avalonstrel/GatedConvolution","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/boge8888/Watermark-removal-GUI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/btxuyenHCMUS/generative","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/btxuyenHCMUS/inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/csqiangwen/DeepFillv2_Pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/feixuetuba/inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/feixuetuba/inpating","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/g2zac/generative_inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/huynhhoanghuy/Image-Inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/jiajunhua/JiahuiYu-generative_inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/katychou/generative01","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/nipponjo/deepfillv2-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/nuneslu/VeIGAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/pfnet-research/Chainer-DeepFill","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/rajprakrit/DeepFillv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/runze-wang-sjtu/generative_inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/sirius-image-inpainting/Free-Form-Image-Inpainting-With-Gated-Convolution","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/vrindaprabhu/deepfillv2_colab","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/xurongchao/mv-inpainting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/zuruoke/watermark-removal","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"free-form-image-inpainting-with-gated","repo_url":"https://github.com/avalonstrel/GatedConvolution_pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"form","task_name":"Form"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"feature-selection","task_name":"feature selection"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"gated-convolution","method_name":"Gated Convolution"},{"method_slug":"glu","method_name":"Gated Linear Unit"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-inpainting-on-places2-1","task":"Image Inpainting","dataset":"Places2","model":"DeepFill v2","rank_in_archive_order":8,"of":14,"metrics":{"FID":"9.27","P-IDS":"4.01","U-IDS":"21.32"},"uses_additional_data":false},{"leaderboard":"/sota/image-inpainting-on-places2-val","task":"Image Inpainting","dataset":"Places2 val","model":"DeepFillv2 (20-30% free form)","rank_in_archive_order":3,"of":7,"metrics":{"FID":"13.5","PD":"63.0"},"uses_additional_data":false},{"leaderboard":"/sota/image-inpainting-on-places2-val","task":"Image Inpainting","dataset":"Places2 val","model":"DeepFillv2 (128×128\ncenter mask)","rank_in_archive_order":5,"of":7,"metrics":{"FID":"15.3","PD":"96.3"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1806.03589","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1806.03589"}},"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/feixuetuba/inpainting","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/btxuyenHCMUS/generative","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nipponjo/deepfillv2-pytorch","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huynhhoanghuy/Image-Inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ChopsticksAN/generative_inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vrindaprabhu/deepfillv2_colab","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/feixuetuba/inpating","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/boge8888/Watermark-removal-GUI","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TerminatorSd/generative","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ShnitzelKiller/generative_inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/avalonstrel/GatedConvolution","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/CS269-Capstone/t-snake-capstone","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pfnet-research/Chainer-DeepFill","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xurongchao/mv-inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sirius-image-inpainting/Free-Form-Image-Inpainting-With-Gated-Convolution","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/g2zac/generative_inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jiajunhua/JiahuiYu-generative_inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rajprakrit/DeepFillv2","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SayedNadim/Gated_Convolution_Tensorflow","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JiahuiYu/generative_inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/btxuyenHCMUS/inpainting","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/katychou/generative01","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SayedNadim/Free_Form_Image_Inpainting_Gated_Conv","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zuruoke/watermark-removal","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/runze-wang-sjtu/generative_inpainting","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"listed":{"samples":7,"ran":1,"repositories":3}},"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":"bedff51745d2cf84","entry":"l2normalize","repo":"csqiangwen/DeepFillv2_Pytorch","repo_kind":"listed","path":"network_module.py","file_url":"https://github.com/csqiangwen/DeepFillv2_Pytorch/blob/HEAD/network_module.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bedff51745d2cf84"}},{"code_sha256_prefix":"4caf963a3beebcf2","entry":"batch_postprocess_images","repo":"pfnet-research/Chainer-DeepFill","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/pfnet-research/Chainer-DeepFill/blob/HEAD/src/utils.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":"4caf963a3beebcf2"}},{"code_sha256_prefix":"74b8bbb02eed8073","entry":"bbox2mask","repo":"pfnet-research/Chainer-DeepFill","repo_kind":"listed","path":"src/inpaint_ops.py","file_url":"https://github.com/pfnet-research/Chainer-DeepFill/blob/HEAD/src/inpaint_ops.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":"74b8bbb02eed8073"}},{"code_sha256_prefix":"d6d0565ac9e754d3","entry":"dataset_files","repo":"SayedNadim/Free_Form_Image_Inpainting_Gated_Conv","repo_kind":"listed","path":"flist_maker.py","file_url":"https://github.com/SayedNadim/Free_Form_Image_Inpainting_Gated_Conv/blob/HEAD/flist_maker.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":"d6d0565ac9e754d3"}},{"code_sha256_prefix":"5e0f61f83bc68c0f","entry":"free_form_mask","repo":"pfnet-research/Chainer-DeepFill","repo_kind":"listed","path":"src/inpaint_ops.py","file_url":"https://github.com/pfnet-research/Chainer-DeepFill/blob/HEAD/src/inpaint_ops.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":"5e0f61f83bc68c0f"}},{"code_sha256_prefix":"06995870b9c8a9ae","entry":"random_bbox","repo":"pfnet-research/Chainer-DeepFill","repo_kind":"listed","path":"src/inpaint_ops.py","file_url":"https://github.com/pfnet-research/Chainer-DeepFill/blob/HEAD/src/inpaint_ops.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":"06995870b9c8a9ae"}},{"code_sha256_prefix":"2c0f9420e07c7b34","entry":"text_readlines","repo":"csqiangwen/DeepFillv2_Pytorch","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/csqiangwen/DeepFillv2_Pytorch/blob/HEAD/utils.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":"2c0f9420e07c7b34"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}