{"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/local-relighting-of-real-scenes","title":"Local Relighting of Real Scenes","arxiv_id":"2207.02774","date":"2022-07-06","proceeding":null,"authors":["Audrey Cui","Ali Jahanian","Agata Lapedriza","Antonio Torralba","Shahin Mahdizadehaghdam","Rohit Kumar","David Bau"],"abstract":"We introduce the task of local relighting, which changes a photograph of a scene by switching on and off the light sources that are visible within the image. This new task differs from the traditional image relighting problem, as it introduces the challenge of detecting light sources and inferring the pattern of light that emanates from them. We propose an approach for local relighting that trains a model without supervision of any novel image dataset by using synthetically generated image pairs from another model. Concretely, we collect paired training images from a stylespace-manipulated GAN; then we use these images to train a conditional image-to-image model. To benchmark local relighting, we introduce Lonoff, a collection of 306 precisely aligned images taken in indoor spaces with different combinations of lights switched on. We show that our method significantly outperforms baseline methods based on GAN inversion. Finally, we demonstrate extensions of our method that control different light sources separately. We invite the community to tackle this new task of local relighting.","url_abs":"https://arxiv.org/abs/2207.02774v1","url_pdf":"https://arxiv.org/pdf/2207.02774v1.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":"local-relighting-of-real-scenes","repo_url":"https://github.com/audreycui/relight","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"local-relighting-of-real-scenes","repo_url":"https://github.com/audreycui/relighting","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-relighting","task_name":"Image Relighting"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.02774","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.02774"}},"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/audreycui/relighting","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/audreycui/relight","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":9},"by_repo_kind":{"official":{"samples":10,"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":"29bb0088c8c38ae4","entry":"get_norm_layer","repo":"audreycui/relight","repo_kind":"official","path":"models/networks.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/models/networks.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":"29bb0088c8c38ae4"}},{"code_sha256_prefix":"69e273e3d4d3702a","entry":"apply_ablation_replacement","repo":"audreycui/relight","repo_kind":"official","path":"rewrite_utils/nethook.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/rewrite_utils/nethook.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":"69e273e3d4d3702a"}},{"code_sha256_prefix":"34fd565f2856a69f","entry":"create_model","repo":"audreycui/relight","repo_kind":"official","path":"models/models.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/models/models.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":"34fd565f2856a69f"}},{"code_sha256_prefix":"6b05ff6ac40aab1f","entry":"define_D","repo":"audreycui/relight","repo_kind":"official","path":"models/networks.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/models/networks.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":"6b05ff6ac40aab1f"}},{"code_sha256_prefix":"e1763bb6022b8fc0","entry":"define_G","repo":"audreycui/relight","repo_kind":"official","path":"models/networks.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/models/networks.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":"e1763bb6022b8fc0"}},{"code_sha256_prefix":"1fbe849c025411da","entry":"invertibility_loss","repo":"audreycui/relight","repo_kind":"official","path":"rewrite_utils/losses.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/rewrite_utils/losses.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":"1fbe849c025411da"}},{"code_sha256_prefix":"39175c94bd9a0052","entry":"l1_loss","repo":"audreycui/relight","repo_kind":"official","path":"rewrite_utils/losses.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/rewrite_utils/losses.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":"39175c94bd9a0052"}},{"code_sha256_prefix":"21522a921f8fca95","entry":"l2_loss","repo":"audreycui/relight","repo_kind":"official","path":"rewrite_utils/losses.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/rewrite_utils/losses.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":"21522a921f8fca95"}},{"code_sha256_prefix":"3ad9c7c45efc52b5","entry":"make_matching_tensor","repo":"audreycui/relight","repo_kind":"official","path":"rewrite_utils/nethook.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/rewrite_utils/nethook.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":"3ad9c7c45efc52b5"}},{"code_sha256_prefix":"e678289f478b4652","entry":"recursive_copy","repo":"audreycui/relight","repo_kind":"official","path":"rewrite_utils/nethook.py","file_url":"https://github.com/audreycui/relight/blob/HEAD/rewrite_utils/nethook.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":"e678289f478b4652"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}