Papers › HAIR: Hypernetworks-based All-in-One Image Restoration

HAIR: Hypernetworks-based All-in-One Image Restoration

15 Aug 2024arXiv:2408.08091archive 2025-07-28

Jin Cao, Yi Cao, Li Pang, Deyu Meng, Xiangyong Cao

Image restoration aims to recover a high-quality clean image from its degraded version. Recent progress in image restoration has demonstrated the effectiveness of All-in-One image restoration models in addressing various unknown degradations simultaneously. However, these existing methods typically utilize the same parameters to tackle images with different types of degradation, forcing the model to balance the performance between different tasks and limiting its performance on each task. To alleviate this issue, we propose HAIR, a Hypernetworks-based All-in-One Image Restoration plug-and-play method that generates parameters based on the input image and thus makes the model to adapt to specific degradation dynamically. Specifically, HAIR consists of two main components, i.e., Classifier and Hyper Selecting Net (HSN). The Classifier is a simple image classification network used to generate a Global Information Vector (GIV) that contains the degradation information of the input image, and the HSN is a simple fully-connected neural network that receives the GIV and outputs parameters for the corresponding modules. Extensive experiments demonstrate that HAIR can significantly improve the performance of existing image restoration models in a plug-and-play manner, both in single-task and All-in-One settings. Notably, our proposed model Res-HAIR, which integrates HAIR into the well-known Restormer, can obtain superior or comparable performance compared with current state-of-the-art methods. Moreover, we theoretically demonstrate that to achieve a given small enough error, our proposed HAIR requires fewer parameters in contrast to mainstream embedding-based All-in-One methods. The code is available at https://github.com/toummHus/HAIR.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2408.08091")

Code

Syntology Ran 13 of 18 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 3 ran · fixture could not drive it; 9 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

toummHus/HAIR officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 13 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
3ran · fixture could not drive it
9ran
5unverified

Licence: 18 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from toummHus/HAIR. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

contributions toummHus/HAIR/utils/imresize.py official repository ran no licence file found · pointer only · b921438690ac017f · report
crop_a_image toummHus/HAIR/utils/image_io.py official repository ran no licence file found · pointer only · 8ade57fc1fb950bb · report
crop_img toummHus/HAIR/utils/image_utils.py official repository ran fingerprinted no licence file found · pointer only · 11c75b3b8bc61c21 · report
crop_patch toummHus/HAIR/utils/image_utils.py official repository ran fingerprinted no licence file found · pointer only · 86abcfa12b6612f0 · report
fix_scale_and_size toummHus/HAIR/utils/imresize.py official repository ran no licence file found · pointer only · ee75635bb6c497f1 · report
get_position_from_periods toummHus/HAIR/utils/schedulers.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · cd569444547de84f · report
imresize toummHus/HAIR/utils/imresize.py official repository ran no licence file found · pointer only · c38287d2acea0ce0 · report
linear_warmup_decay toummHus/HAIR/utils/schedulers.py official repository ran no licence file found · pointer only · 442cb54f21dcfe50 · report
nonlinearity toummHus/HAIR/utils/ResNet.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 3137073275f8c21a · report
prepare_gt_img toummHus/HAIR/utils/image_io.py official repository ran no licence file found · pointer only · e91553b51010dfd6 · report
prepare_hazy_image toummHus/HAIR/utils/image_io.py official repository ran no licence file found · pointer only · 8564be766b7cda56 · report
to_3d toummHus/HAIR/net/HAIR.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 82a15cc1e46f7e4d · report
to_4d toummHus/HAIR/net/HAIR.py official repository ran · fixture could not drive it no licence file found · pointer only · b20f2a5df739a59e · report
Normalize toummHus/HAIR/utils/ResNet.py official repository unverified no licence file found · pointer only · 6898a9a13d3e78e9 · report
accuracy toummHus/HAIR/utils/val_utils.py official repository unverified no licence file found · pointer only · 418284b6911ecae5 · report
compute_psnr_ssim toummHus/HAIR/utils/val_utils.py official repository unverified no licence file found · pointer only · ece599323dc49d4a · report
make_attn toummHus/HAIR/utils/ResNet.py official repository unverified no licence file found · pointer only · e6bdfc1df5bf356d · report
slice_image2patches toummHus/HAIR/utils/image_utils.py official repository unverified no licence file found · pointer only · 779d9bd47765629e · report

Tasks

5-Degradation Blind All-in-One Image RestorationAllBlind All-in-One Image RestorationImage ClassificationImage Restorationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
5-Degradation Blind All-in-One Image Restoration 5-Degradation Blind All-in-One Image Restoration HAIR Average PSNR 30.37 #3 of 7 Archive leaderboard report
Blind All-in-One Image Restoration 3-Degradations HAIR Average PSNR 32.70 #3 of 9 Archive leaderboard report
Blind All-in-One Image Restoration 3-Degradations HAIR SSIM 0.919 #3 of 9 Archive leaderboard report
Blind All-in-One Image Restoration 5-Degradations HAIR Average PSNR 30.37 #4 of 9 Archive leaderboard report
Blind All-in-One Image Restoration 5-Degradations HAIR SSIM 0.914 #4 of 9 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections