SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.08091 · 2024

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

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 18 functions out of this paper's own repositories and ran 13 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
toummHus/HAIR canonical 13 of 18
FunctionStatusWhere it lives
contributions Ran toummHus/HAIR/utils/imresize.py
pointer only (licence: NONE) · get_code("b921438690ac017f")
crop_a_image Ran toummHus/HAIR/utils/image_io.py
pointer only (licence: NONE) · get_code("8ade57fc1fb950bb")
crop_img Ran toummHus/HAIR/utils/image_utils.py
pointer only (licence: NONE) · get_code("11c75b3b8bc61c21")
crop_patch Ran toummHus/HAIR/utils/image_utils.py
pointer only (licence: NONE) · get_code("86abcfa12b6612f0")
fix_scale_and_size Ran toummHus/HAIR/utils/imresize.py
pointer only (licence: NONE) · get_code("ee75635bb6c497f1")
get_position_from_periods Ran toummHus/HAIR/utils/schedulers.py
pointer only (licence: NONE) · get_code("cd569444547de84f")
imresize Ran toummHus/HAIR/utils/imresize.py
pointer only (licence: NONE) · get_code("c38287d2acea0ce0")
linear_warmup_decay Ran toummHus/HAIR/utils/schedulers.py
pointer only (licence: NONE) · get_code("442cb54f21dcfe50")
nonlinearity Ran toummHus/HAIR/utils/ResNet.py
pointer only (licence: NONE) · get_code("3137073275f8c21a")
prepare_gt_img Ran toummHus/HAIR/utils/image_io.py
pointer only (licence: NONE) · get_code("e91553b51010dfd6")
prepare_hazy_image Ran toummHus/HAIR/utils/image_io.py
pointer only (licence: NONE) · get_code("8564be766b7cda56")
to_3d Ran toummHus/HAIR/net/HAIR.py
pointer only (licence: NONE) · get_code("82a15cc1e46f7e4d")
to_4d Ran toummHus/HAIR/net/HAIR.py
pointer only (licence: NONE) · get_code("b20f2a5df739a59e")
Normalize Not yet run toummHus/HAIR/utils/ResNet.py
pointer only (licence: NONE) · get_code("6898a9a13d3e78e9")
accuracy Not yet run toummHus/HAIR/utils/val_utils.py
pointer only (licence: NONE) · get_code("418284b6911ecae5")
compute_psnr_ssim Not yet run toummHus/HAIR/utils/val_utils.py
pointer only (licence: NONE) · get_code("ece599323dc49d4a")
make_attn Not yet run toummHus/HAIR/utils/ResNet.py
pointer only (licence: NONE) · get_code("e6bdfc1df5bf356d")
slice_image2patches Not yet run toummHus/HAIR/utils/image_utils.py
pointer only (licence: NONE) · get_code("779d9bd47765629e")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2408.08091")
get_code_for_paper("2408.08091")
have("2408.08091")

Connect an agent — have() is free.