{"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/tpsence-towards-artifact-free-realistic-rain","title":"TPSeNCE: Towards Artifact-Free Realistic Rain Generation for Deraining and Object Detection in Rain","arxiv_id":"2311.00660","date":"2023-11-01","proceeding":null,"authors":["Shen Zheng","Changjie Lu","Srinivasa G. Narasimhan"],"abstract":"Rain generation algorithms have the potential to improve the generalization of deraining methods and scene understanding in rainy conditions. However, in practice, they produce artifacts and distortions and struggle to control the amount of rain generated due to a lack of proper constraints. In this paper, we propose an unpaired image-to-image translation framework for generating realistic rainy images. We first introduce a Triangular Probability Similarity (TPS) constraint to guide the generated images toward clear and rainy images in the discriminator manifold, thereby minimizing artifacts and distortions during rain generation. Unlike conventional contrastive learning approaches, which indiscriminately push negative samples away from the anchors, we propose a Semantic Noise Contrastive Estimation (SeNCE) strategy and reassess the pushing force of negative samples based on the semantic similarity between the clear and the rainy images and the feature similarity between the anchor and the negative samples. Experiments demonstrate realistic rain generation with minimal artifacts and distortions, which benefits image deraining and object detection in rain. Furthermore, the method can be used to generate realistic snowy and night images, underscoring its potential for broader applicability. Code is available at https://github.com/ShenZheng2000/TPSeNCE.","url_abs":"https://arxiv.org/abs/2311.00660v3","url_pdf":"https://arxiv.org/pdf/2311.00660v3.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":"tpsence-towards-artifact-free-realistic-rain","repo_url":"https://github.com/shenzheng2000/tpsence","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-to-image-translation","task_name":"Image-to-Image Translation"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"rain-removal","task_name":"Rain Removal"},{"task_slug":"scene-understanding","task_name":"Scene Understanding"},{"task_slug":"semantic-similarity","task_name":"Semantic Similarity"},{"task_slug":"semantic-textual-similarity","task_name":"Semantic Textual Similarity"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2311.00660","atlas_url":"https://app.syntology.ai/?focus=2311.00660","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.00660"}},"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/shenzheng2000/tpsence","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":3,"ran_honours":1,"ran":1,"ran_fixture":2,"unverified":1},"by_repo_kind":{"official":{"samples":8,"ran":7,"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":8,"samples":[{"code_sha256_prefix":"44c69c91b5434020","entry":"fused_leaky_relu","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/stylegan_networks.py","file_url":"https://github.com/shenzheng2000/tpsence/blob/HEAD/models/stylegan_networks.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"44c69c91b5434020"}},{"code_sha256_prefix":"acc24402a2d089fa","entry":"get_filter","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/networks.py","file_url":"https://github.com/shenzheng2000/tpsence/blob/HEAD/models/networks.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"acc24402a2d089fa"}},{"code_sha256_prefix":"b27dffc0609fbec0","entry":"get_norm_layer","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/networks.py","file_url":"https://github.com/shenzheng2000/tpsence/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b27dffc0609fbec0"}},{"code_sha256_prefix":"50aa4a59fe718c61","entry":"get_pad_layer","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/networks.py","file_url":"https://github.com/shenzheng2000/tpsence/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"50aa4a59fe718c61"}},{"code_sha256_prefix":"fb73c79b58608d62","entry":"sinkhorn","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/sinkhorn.py","file_url":"https://github.com/shenzheng2000/tpsence/blob/HEAD/models/sinkhorn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fb73c79b58608d62"}},{"code_sha256_prefix":"c5d084250637f1f8","entry":"upfirdn2d","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/stylegan_networks.py","file_url":"https://github.com/shenzheng2000/tpsence/blob/HEAD/models/stylegan_networks.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c5d084250637f1f8"}},{"code_sha256_prefix":"200baf9e83c9a4de","entry":"upfirdn2d_native","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/stylegan_networks.py","file_url":"https://github.com/shenzheng2000/tpsence/blob/HEAD/models/stylegan_networks.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"200baf9e83c9a4de"}},{"code_sha256_prefix":"e4907e9c222e38ac","entry":"OT","repo":"shenzheng2000/tpsence","repo_kind":"official","path":"models/sinkhorn.py","file_url":"https://github.com/shenzheng2000/tpsence/blob/HEAD/models/sinkhorn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e4907e9c222e38ac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}