{"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/resolution-robust-large-mask-inpainting-with","title":"Resolution-robust Large Mask Inpainting with Fourier Convolutions","arxiv_id":"2109.07161","date":"2021-09-15","proceeding":null,"authors":["Roman Suvorov","Elizaveta Logacheva","Anton Mashikhin","Anastasia Remizova","Arsenii Ashukha","Aleksei Silvestrov","Naejin Kong","Harshith Goka","Kiwoong Park","Victor Lempitsky"],"abstract":"Modern image inpainting systems, despite the significant progress, often struggle with large missing areas, complex geometric structures, and high-resolution images. We find that one of the main reasons for that is the lack of an effective receptive field in both the inpainting network and the loss function. To alleviate this issue, we propose a new method called large mask inpainting (LaMa). LaMa is based on i) a new inpainting network architecture that uses fast Fourier convolutions (FFCs), which have the image-wide receptive field; ii) a high receptive field perceptual loss; iii) large training masks, which unlocks the potential of the first two components. Our inpainting network improves the state-of-the-art across a range of datasets and achieves excellent performance even in challenging scenarios, e.g. completion of periodic structures. Our model generalizes surprisingly well to resolutions that are higher than those seen at train time, and achieves this at lower parameter&time costs than the competitive baselines. The code is available at \\url{https://github.com/saic-mdal/lama}.","url_abs":"https://arxiv.org/abs/2109.07161v2","url_pdf":"https://arxiv.org/pdf/2109.07161v2.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":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/saic-mdal/lama","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/Moldoteck/lama","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/NilsBochow/lama_reconstruction","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/advimman/lama","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/geekyutao/inpaint-anything","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/geomagical/lama-with-refiner","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/haiv-lab/ospcoop_imagenet-bg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"resolution-robust-large-mask-inpainting-with","repo_url":"https://github.com/rawmean/lama","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"seeing-beyond-the-visible","task_name":"Seeing Beyond the Visible"}],"methods":[{"method_slug":"pixel-prediction","method_name":"Inpainting"},{"method_slug":"lama","method_name":"LAMA"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-inpainting-on-celeba-hq","task":"Image Inpainting","dataset":"CelebA-HQ","model":"LaMa","rank_in_archive_order":5,"of":6,"metrics":{"FID":"8.15","P-IDS":"2.07","U-IDS":"7.58"},"uses_additional_data":false},{"leaderboard":"/sota/image-inpainting-on-places2-1","task":"Image Inpainting","dataset":"Places2","model":"LAMA","rank_in_archive_order":5,"of":14,"metrics":{"FID":"2.97","P-IDS":"13.09","U-IDS":"32.29"},"uses_additional_data":false},{"leaderboard":"/sota/seeing-beyond-the-visible-on-kitti360-ex","task":"Seeing Beyond the Visible","dataset":"KITTI360-EX","model":"LaMa","rank_in_archive_order":3,"of":7,"metrics":{"Average PSNR":"18.98"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2109.07161","atlas_url":"https://app.syntology.ai/?focus=2109.07161","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.07161"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/advimman/lama","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/saic-mdal/lama","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Moldoteck/lama","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/geekyutao/inpaint-anything","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rawmean/lama","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/NilsBochow/lama_reconstruction","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/haiv-lab/ospcoop_imagenet-bg","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/geomagical/lama-with-refiner","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"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":0,"samples":[{"code_sha256_prefix":"af46f33c9fa16139","entry":"create_rectangle_mask","repo":"saic-mdal/lama","repo_kind":"official","path":"bin/evaluator_example.py","file_url":"https://github.com/saic-mdal/lama/blob/HEAD/bin/evaluator_example.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"af46f33c9fa16139"}},{"code_sha256_prefix":"4505106e1843b843","entry":"draw_score","repo":"saic-mdal/lama","repo_kind":"official","path":"bin/analyze_errors.py","file_url":"https://github.com/saic-mdal/lama/blob/HEAD/bin/analyze_errors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4505106e1843b843"}},{"code_sha256_prefix":"b158b43946f45555","entry":"get_checkpoint_files","repo":"saic-mdal/lama","repo_kind":"official","path":"bin/make_checkpoint.py","file_url":"https://github.com/saic-mdal/lama/blob/HEAD/bin/make_checkpoint.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b158b43946f45555"}},{"code_sha256_prefix":"5c5eb60a1db7d6a9","entry":"is_good_key","repo":"saic-mdal/lama","repo_kind":"official","path":"bin/filter_sharded_dataset.py","file_url":"https://github.com/saic-mdal/lama/blob/HEAD/bin/filter_sharded_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5c5eb60a1db7d6a9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}