{"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/transweather-transformer-based-restoration-of","title":"TransWeather: Transformer-based Restoration of Images Degraded by Adverse Weather Conditions","arxiv_id":"2111.14813","date":"2021-11-29","proceeding":"CVPR 2022 1","authors":["Jeya Maria Jose Valanarasu","Rajeev Yasarla","Vishal M. Patel"],"abstract":"Removing adverse weather conditions like rain, fog, and snow from images is an important problem in many applications. Most methods proposed in the literature have been designed to deal with just removing one type of degradation. Recently, a CNN-based method using neural architecture search (All-in-One) was proposed to remove all the weather conditions at once. However, it has a large number of parameters as it uses multiple encoders to cater to each weather removal task and still has scope for improvement in its performance. In this work, we focus on developing an efficient solution for the all adverse weather removal problem. To this end, we propose TransWeather, a transformer-based end-to-end model with just a single encoder and a decoder that can restore an image degraded by any weather condition. Specifically, we utilize a novel transformer encoder using intra-patch transformer blocks to enhance attention inside the patches to effectively remove smaller weather degradations. We also introduce a transformer decoder with learnable weather type embeddings to adjust to the weather degradation at hand. TransWeather achieves improvements across multiple test datasets over both All-in-One network as well as methods fine-tuned for specific tasks. TransWeather is also validated on real world test images and found to be more effective than previous methods. Implementation code can be accessed at https://github.com/jeya-maria-jose/TransWeather .","url_abs":"https://arxiv.org/abs/2111.14813v2","url_pdf":"https://arxiv.org/pdf/2111.14813v2.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":"transweather-transformer-based-restoration-of","repo_url":"https://github.com/jeya-maria-jose/TransWeather","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"architecture-search","task_name":"Neural Architecture Search"},{"task_slug":"single-image-dehazing","task_name":"Single Image Dehazing"},{"task_slug":"single-image-deraining","task_name":"Single Image Deraining"},{"task_slug":"single-image-desnowing","task_name":"Single Image Desnowing"},{"task_slug":"snow-removal","task_name":"Snow Removal"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-restoration-on-cdd-11","task":"Image Restoration","dataset":"CDD-11","model":"TransWeather","rank_in_archive_order":13,"of":14,"metrics":{"Average PSNR (dB)":"23.13","SSIM":"0.7810"},"uses_additional_data":false},{"leaderboard":"/sota/single-image-deraining-on-raindrop","task":"Single Image Deraining","dataset":"Raindrop","model":"TransWeather","rank_in_archive_order":1,"of":3,"metrics":{"PSNR":"34.55"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2111.14813","atlas_url":"https://app.syntology.ai/?focus=2111.14813","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.14813"}},"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/jeya-maria-jose/TransWeather","reach":null}],"summary":{"unverified":1},"by_repo_kind":{"official":{"samples":1,"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":"11acef810dc5071c","entry":"resize","repo":"jeya-maria-jose/TransWeather","repo_kind":"official","path":"transweather_model.py","file_url":"https://github.com/jeya-maria-jose/TransWeather/blob/HEAD/transweather_model.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":"11acef810dc5071c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}