{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/prompt-based-all-in-one-image-restoration","title":"Prompt-based Ingredient-Oriented All-in-One Image Restoration","arxiv_id":"2309.03063","date":"2023-09-06","proceeding":null,"authors":["Hu Gao","Depeng Dang"],"abstract":"Image restoration aims to recover the high-quality images from their degraded observations. Since most existing methods have been dedicated into single degradation removal, they may not yield optimal results on other types of degradations, which do not satisfy the applications in real world scenarios. In this paper, we propose a novel data ingredient-oriented approach that leverages prompt-based learning to enable a single model to efficiently tackle multiple image degradation tasks. Specifically, we utilize a encoder to capture features and introduce prompts with degradation-specific information to guide the decoder in adaptively recovering images affected by various degradations. In order to model the local invariant properties and non-local information for high-quality image restoration, we combined CNNs operations and Transformers. Simultaneously, we made several key designs in the Transformer blocks (multi-head rearranged attention with prompts and simple-gate feed-forward network) to reduce computational requirements and selectively determines what information should be persevered to facilitate efficient recovery of potentially sharp images. Furthermore, we incorporate a feature fusion mechanism further explores the multi-scale information to improve the aggregated features. The resulting tightly interlinked hierarchy architecture, named as CAPTNet, extensive experiments demonstrate that our method performs competitively to the state-of-the-art.","url_abs":"https://arxiv.org/abs/2309.03063v2","url_pdf":"https://arxiv.org/pdf/2309.03063v2.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":"prompt-based-all-in-one-image-restoration","repo_url":"https://github.com/Tombs98/CAPTNet","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"deblurring","task_name":"Deblurring"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-deblurring","task_name":"Image Deblurring"},{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"single-image-deraining","task_name":"Single Image Deraining"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/deblurring-on-hide-trained-on-gopro","task":"Deblurring","dataset":"HIDE (trained on GOPRO)","model":"CAPTNet","rank_in_archive_order":4,"of":26,"metrics":{"PSNR (sRGB)":"31.86","SSIM (sRGB)":"0.949"},"uses_additional_data":false},{"leaderboard":"/sota/image-deblurring-on-gopro","task":"Image Deblurring","dataset":"GoPro","model":"CAPTNet","rank_in_archive_order":16,"of":55,"metrics":{"PSNR":"33.74","SSIM":"0.967"},"uses_additional_data":false},{"leaderboard":"/sota/single-image-deraining-on-rain100l","task":"Single Image Deraining","dataset":"Rain100L","model":"CAPTNet","rank_in_archive_order":6,"of":19,"metrics":{"PSNR":"39.22","SSIM":"0.981"},"uses_additional_data":false},{"leaderboard":"/sota/single-image-deraining-on-test1200","task":"Single Image Deraining","dataset":"Test1200","model":"CAPTNet","rank_in_archive_order":1,"of":14,"metrics":{"PSNR":"34.77","SSIM":"0.937"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2309.03063","atlas_url":"https://app.syntology.ai/?focus=2309.03063","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.03063"},"calls":[{"tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2309.03063"},"returns":"the samples harvested from this paper, each with its run record; it does not verify the paper"},{"tool":"get_code","arguments_in":"samples[].code_sha256","returns":"one stored sample by its code_sha256; not shown on this site"}]},"developers":"https://syntology.ai/developers","held":true,"reason":"in_graph_layer","checked_against":null,"agent_calls":[{"tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2309.03063"},"call":"get_harvested_code_for_paper(arxiv_id=\"2309.03063\")"},{"tool":"get_code","arguments_in":{"code_sha256":"syntology.samples[].code_sha256"},"call":"get_code(code_sha256=\"…\")"},{"tool":"get_citation_path","arguments":{"paper_1":"2309.03063"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2309.03063\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2309.03063"},"call":"get_concepts_for_paper(arxiv_id=\"2309.03063\")"}],"by_repo":[{"repo":"Tombs98/CAPTNet","kind":"official","samples":12,"ran":11,"instrument":1,"unverified":1}],"by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code","read_at":"2026-10-05T00:36:11+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","ran_record":{"url":"https://syntology.ai/api/ran/2309.03063.json","schema":"syntology.ran_record/1","counts_crosswalk":{"n_samples":"syntology.counts.lifted","n_ran":"syntology.counts.executed","n_ran_checked":"syntology.counts.checked","n_instrument":"syntology.counts.instrument_failures","n_unverified":"syntology.counts.no_recorded_run"},"note":"live record, measured at request time; may be newer than this page's graph read","badge":"https://syntology.ai/api/ran/2309.03063.svg"},"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/Tombs98/CAPTNet","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":6,"ran_violates":2,"ran_honours":2,"ran_draft_wrong":1,"unverified":1},"n_samples":12,"n_ran":11,"n_constructed":0,"n_ran_checked":10,"n_instrument":1,"n_unverified":1,"n_instrument_is":"failures of Syntology's instrument, not of the code","every_run_is_an_instrument_failure":false,"key_notes":{"n_ran_checked":"legacy name, kept unchanged so existing readers do not break: it counts the samples that ran with no instrument failure (honoured, violated, and ran with no contract checked); it does not mean a contract was checked, and the pages print it as 'K with no instrument failure', not 'K checked'","n_constructed":"a sub-count of the samples that ran, never subtracted from them and never a failure: an executed sample whose run returned an instance of its own class (fixture_out_type equals the entry name): the run built an object and did not compute a result (Syntology's RAN record, counts.constructed)"},"by_repo_kind":{"official":{"samples":12,"ran":11,"n_ran_checked":10,"n_instrument":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":12,"inline_ok_is":"inline_ok is true only when both licence gates allow Syntology to serve this code's text: this paper's link (inline_ok_link, from the licence of this paper's copy) and the stored copy of the same code that Syntology serves, which may have been first harvested from another repository. withheld_clause is Syntology's own wording of which gate keeps the text a pointer and why, and is null when inline_ok is true. This site shows no code text either way; n_pointer_only_for_licence counts samples with inline_ok false (both gates), n_pointer_only_link_allows those of them whose inline_ok_link is true","n_pointer_only_link_allows":0,"fixture_fields_is":{"signature_and_fixture_out_type":"the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right","level_recorded_at":"when Syntology's graph wrote the sample's verification level, not when the code executed; absent where the level was written before the date was kept, and never filled in with the build date","present_on":"samples that ran only; a key is absent, never empty, where the graph records nothing"},"n_ran_with_level_date":11,"n_ran_without_level_date":0,"n_ran_signature_not_shown":0,"levels_written_between":{"first":"2026-09-24","last":"2026-09-24","is":"the first and last UTC dates on which Syntology's graph wrote a verification level for a sample on this page that ran, not when the code executed"},"code_page_min_papers":5,"code_page_is":"a page for the entry name across every paper's harvested code; the name is a string, not an identity","samples":[{"code_sha256":"b0a14f63a15e798e","code_sha256_prefix":"b0a14f63a15e798e","entry":"calculate_psnr","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"cal.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/cal.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"img1:ndarray/3/int, img2:ndarray/3/int, crop_border:int/0/int, test_y_channel:bool/0/bool","fixture_out_type":"float32","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/calculate-psnr","census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"b0a14f63a15e798e"}},{"code_sha256":"cd7e5b7320aed3d2","code_sha256_prefix":"cd7e5b7320aed3d2","entry":"flow_warp","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/arch_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/arch_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"x:Tensor/4/float, flow:Tensor/4/float, interp_mode:str/0/str, padding_mode:str/0/str, align_corners:bool/0/bool","fixture_out_type":"Tensor","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/flow-warp","census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"cd7e5b7320aed3d2"}},{"code_sha256":"930cddf0a4d80ab1","code_sha256_prefix":"930cddf0a4d80ab1","entry":"is_frozen","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/model_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"model:callable/0/?","fixture_out_type":"bool","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/is-frozen","census":null,"licence":"NONE","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub detected no licence in this paper's repository, Tombs98/CAPTNet when it was checked","mcp_get_code":{"code_sha256":"930cddf0a4d80ab1"}},{"code_sha256":"91fca7a2b44569ad","code_sha256_prefix":"91fca7a2b44569ad","entry":"is_image_file","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"dataset_RGB.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/dataset_RGB.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"filename:str/0/str","fixture_out_type":"bool","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/is-image-file","census":null,"licence":"NONE","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub detected no licence in this paper's repository, Tombs98/CAPTNet when it was checked","mcp_get_code":{"code_sha256":"91fca7a2b44569ad"}},{"code_sha256":"c3bea8c4ee6bef4a","code_sha256_prefix":"c3bea8c4ee6bef4a","entry":"load_start_epoch","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/model_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"weights:str/0/str","fixture_out_type":"int","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/load-start-epoch","census":null,"licence":"NONE","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub detected no licence in this paper's repository, Tombs98/CAPTNet when it was checked","mcp_get_code":{"code_sha256":"c3bea8c4ee6bef4a"}},{"code_sha256":"09ff3a6c27965536","code_sha256_prefix":"09ff3a6c27965536","entry":"make_layer","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/arch_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/arch_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"basic_block:callable/0/?, num_basic_block:int/0/int, in_channels:int/0/int, out_channels:int/0/int","fixture_out_type":"Sequential","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/make-layer","census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"09ff3a6c27965536"}},{"code_sha256":"92bb8e7c6d06af3f","code_sha256_prefix":"92bb8e7c6d06af3f","entry":"numpyPSNR","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/image_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/image_utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"tar_img:ndarray/2/int, prd_img:ndarray/2/int","fixture_out_type":"float32","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":null,"census":null,"licence":"NONE","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub detected no licence in this paper's repository, Tombs98/CAPTNet when it was checked","mcp_get_code":{"code_sha256":"92bb8e7c6d06af3f"}},{"code_sha256":"9081354b1a5b7c3e","code_sha256_prefix":"9081354b1a5b7c3e","entry":"resize_flow","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/arch_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/arch_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"flow:Tensor/4/float, size_type:str/0/str, sizes:list/1/float, interp_mode:str/0/str, align_corners:bool/0/bool","fixture_out_type":"Tensor","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/resize-flow","census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"9081354b1a5b7c3e"}},{"code_sha256":"c87a3a8603bcab49","code_sha256_prefix":"c87a3a8603bcab49","entry":"rgb2ycbcr","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"cal.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/cal.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"img:ndarray/3/int, y_only:bool/0/bool","fixture_out_type":"ndarray","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","code_page":"/code/rgb2ycbcr","census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"c87a3a8603bcab49"}},{"code_sha256":"73f51043ee4046f1","code_sha256_prefix":"73f51043ee4046f1","entry":"to_y_channel","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"cal.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/cal.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"signature":"img:ndarray/3/int","fixture_out_type":"ndarray","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","retrieve_with":{"tool":"get_code","code_sha256":"73f51043ee4046f1"},"code_page":null,"census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"73f51043ee4046f1"}},{"code_sha256":"deaed84dcb1ccde1","code_sha256_prefix":"deaed84dcb1ccde1","entry":"torchPSNR","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/image_utils.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/image_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"signature":"tar_img:Tensor/4/float, prd_img:Tensor/4/float","fixture_out_type":"Tensor","level_recorded_at":"2026-09-24T15:16:18.137819+00:00","retrieve_with":{"tool":"get_code","code_sha256":"deaed84dcb1ccde1"},"code_page":null,"census":null,"licence":"NONE","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub detected no licence in this paper's repository, Tombs98/CAPTNet when it was checked","mcp_get_code":{"code_sha256":"deaed84dcb1ccde1"}},{"code_sha256":"a2bb271e0661073c","code_sha256_prefix":"a2bb271e0661073c","entry":"master_only","repo":"Tombs98/CAPTNet","repo_kind":"official","path":"utils/dist_util.py","file_url":"https://github.com/Tombs98/CAPTNet/blob/HEAD/utils/dist_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":"/code/master-only","census":null,"licence":"NOASSERTION","inline_ok":false,"inline_ok_link":false,"withheld_clause":"GitHub could not classify the licence of this paper's repository, Tombs98/CAPTNet (NOASSERTION)","mcp_get_code":{"code_sha256":"a2bb271e0661073c"}}]},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"ee222b2b38b9983af3ad55db6113bbf2952290c69213a49a3154ab6100959b0d","record_changed_at":"2026-10-05","record_changed_at_basis":"changed"}