{"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/dynamic-pre-training-towards-efficient-and","title":"Dynamic Pre-training: Towards Efficient and Scalable All-in-One Image Restoration","arxiv_id":"2404.02154","date":"2024-04-02","proceeding":null,"authors":["Akshay Dudhane","Omkar Thawakar","Syed Waqas Zamir","Salman Khan","Fahad Shahbaz Khan","Ming-Hsuan Yang"],"abstract":"All-in-one image restoration tackles different types of degradations with a unified model instead of having task-specific, non-generic models for each degradation. The requirement to tackle multiple degradations using the same model can lead to high-complexity designs with fixed configuration that lack the adaptability to more efficient alternatives. We propose DyNet, a dynamic family of networks designed in an encoder-decoder style for all-in-one image restoration tasks. Our DyNet can seamlessly switch between its bulkier and lightweight variants, thereby offering flexibility for efficient model deployment with a single round of training. This seamless switching is enabled by our weights-sharing mechanism, forming the core of our architecture and facilitating the reuse of initialized module weights. Further, to establish robust weights initialization, we introduce a dynamic pre-training strategy that trains variants of the proposed DyNet concurrently, thereby achieving a 50% reduction in GPU hours. Our dynamic pre-training strategy eliminates the need for maintaining separate checkpoints for each variant, as all models share a common set of checkpoints, varying only in model depth. This efficient strategy significantly reduces storage overhead and enhances adaptability. To tackle the unavailability of large-scale dataset required in pre-training, we curate a high-quality, high-resolution image dataset named Million-IRD, having 2M image samples. We validate our DyNet for image denoising, deraining, and dehazing in all-in-one setting, achieving state-of-the-art results with 31.34\\% reduction in GFlops and a 56.75\\% reduction in parameters compared to baseline models. The source codes and trained models are available at https://github.com/akshaydudhane16/DyNet.","url_abs":"https://arxiv.org/abs/2404.02154v2","url_pdf":"https://arxiv.org/pdf/2404.02154v2.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":"dynamic-pre-training-towards-efficient-and","repo_url":"https://github.com/akshaydudhane16/dynet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"image-denoising","task_name":"Image Denoising"},{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"rain-removal","task_name":"Rain Removal"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.02154","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.02154"}},"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/akshaydudhane16/dynet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"ran_fixture":2,"unverified":3},"by_repo_kind":{"official":{"samples":15,"ran":12,"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":"b921438690ac017f","entry":"contributions","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/imresize.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/imresize.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b921438690ac017f"}},{"code_sha256_prefix":"8ade57fc1fb950bb","entry":"crop_a_image","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/image_io.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/image_io.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ade57fc1fb950bb"}},{"code_sha256_prefix":"11c75b3b8bc61c21","entry":"crop_img","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/image_utils.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/image_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"11c75b3b8bc61c21"}},{"code_sha256_prefix":"86abcfa12b6612f0","entry":"crop_patch","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/image_utils.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/image_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"86abcfa12b6612f0"}},{"code_sha256_prefix":"ee75635bb6c497f1","entry":"fix_scale_and_size","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/imresize.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/imresize.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee75635bb6c497f1"}},{"code_sha256_prefix":"cd569444547de84f","entry":"get_position_from_periods","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/schedulers.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/schedulers.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cd569444547de84f"}},{"code_sha256_prefix":"c38287d2acea0ce0","entry":"imresize","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/imresize.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/imresize.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c38287d2acea0ce0"}},{"code_sha256_prefix":"442cb54f21dcfe50","entry":"linear_warmup_decay","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/schedulers.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/schedulers.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"442cb54f21dcfe50"}},{"code_sha256_prefix":"e91553b51010dfd6","entry":"prepare_gt_img","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/image_io.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/image_io.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e91553b51010dfd6"}},{"code_sha256_prefix":"8564be766b7cda56","entry":"prepare_hazy_image","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/image_io.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/image_io.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8564be766b7cda56"}},{"code_sha256_prefix":"82a15cc1e46f7e4d","entry":"to_3d","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"net/DyNet_large.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/net/DyNet_large.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"82a15cc1e46f7e4d"}},{"code_sha256_prefix":"b20f2a5df739a59e","entry":"to_4d","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"net/DyNet_large.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/net/DyNet_large.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b20f2a5df739a59e"}},{"code_sha256_prefix":"418284b6911ecae5","entry":"accuracy","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/val_utils.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/val_utils.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":"418284b6911ecae5"}},{"code_sha256_prefix":"c25cfc27015346f2","entry":"compute_psnr_ssim","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/val_utils.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/val_utils.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":"c25cfc27015346f2"}},{"code_sha256_prefix":"779d9bd47765629e","entry":"slice_image2patches","repo":"akshaydudhane16/dynet","repo_kind":"official","path":"utils/image_utils.py","file_url":"https://github.com/akshaydudhane16/dynet/blob/HEAD/utils/image_utils.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":"779d9bd47765629e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}