{"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/shadow-generation-for-composite-image-in-real","title":"Shadow Generation for Composite Image in Real-world Scenes","arxiv_id":"2104.10338","date":"2021-04-21","proceeding":null,"authors":["Yan Hong","Li Niu","Jianfu Zhang","Liqing Zhang"],"abstract":"Image composition targets at inserting a foreground object into a background image. Most previous image composition methods focus on adjusting the foreground to make it compatible with background while ignoring the shadow effect of foreground on the background. In this work, we focus on generating plausible shadow for the foreground object in the composite image. First, we contribute a real-world shadow generation dataset DESOBA by generating synthetic composite images based on paired real images and deshadowed images. Then, we propose a novel shadow generation network SGRNet, which consists of a shadow mask prediction stage and a shadow filling stage. In the shadow mask prediction stage, foreground and background information are thoroughly interacted to generate foreground shadow mask. In the shadow filling stage, shadow parameters are predicted to fill the shadow area. Extensive experiments on our DESOBA dataset and real composite images demonstrate the effectiveness of our proposed method. Our dataset and code are available at https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA.","url_abs":"https://arxiv.org/abs/2104.10338v3","url_pdf":"https://arxiv.org/pdf/2104.10338v3.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":"shadow-generation-for-composite-image-in-real","repo_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"object","task_name":"Object"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2104.10338","atlas_url":"https://app.syntology.ai/?focus=2104.10338","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.10338"}},"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/bcmi/Object-Shadow-Generation-Dataset-DESOBA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"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":"2383223cfe77b76c","entry":"is_image_file","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"data_processing/soba_training_pairs.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/data_processing/soba_training_pairs.py","link_basis":"plan_row","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":"2383223cfe77b76c"}},{"code_sha256_prefix":"c0d7139178892d99","entry":"im_relit","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"data_processing/compute_params_DESOBA.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/data_processing/compute_params_DESOBA.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":"c0d7139178892d99"}},{"code_sha256_prefix":"151b7d36c7b1ba39","entry":"load","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"data_processing/soba_training_pairs.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/data_processing/soba_training_pairs.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":"151b7d36c7b1ba39"}},{"code_sha256_prefix":"d61e18f527623b40","entry":"relit","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"data_processing/compute_params_DESOBA.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/data_processing/compute_params_DESOBA.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":"d61e18f527623b40"}},{"code_sha256_prefix":"e78551eb220b2349","entry":"tensor2cvim","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"DESOBA_DATASET_util/util.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/DESOBA_DATASET_util/util.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":"e78551eb220b2349"}},{"code_sha256_prefix":"f126c47406596b9e","entry":"tensor2im","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"DESOBA_DATASET_util/util.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/DESOBA_DATASET_util/util.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":"f126c47406596b9e"}},{"code_sha256_prefix":"c4600ec9d2a1bc45","entry":"tensor2imonechannel","repo":"bcmi/Object-Shadow-Generation-Dataset-DESOBA","repo_kind":"official","path":"DESOBA_DATASET_util/util.py","file_url":"https://github.com/bcmi/Object-Shadow-Generation-Dataset-DESOBA/blob/HEAD/DESOBA_DATASET_util/util.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":"c4600ec9d2a1bc45"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}