The official PyTorch Implementation of AnyIR for All-in-One Image Restoration
Bin Ren 1,2, Eduard Zamfir3, Yawei Li 4, Zongwei Wu3, Danda Pani Paudel4,5, Radu Timofte 3, Nicu Sebe 2, and Luc Van Gool 4,5
1 University of Pisa, Italy,
2 University of Trento, Italy,
3 University of Würzburg, Germany,
4 ETH Zürich, Switzerland,
5 INSAIT Sofia University, Bulgaria,
07/18/2024
: Repository is created. Our code will be made publicly available upon acceptance.
Abstract
Reconstructing missing details from degraded low-quality inputs poses a significant challenge. Recent progress in image restoration has demonstrated the efficacy of learning large models capable of addressing various degradations simultaneously. With the emergence of mobile devices, there is a growing demand for an efficient model to restore any degraded image for better perceptual quality. However, existing models often require specific learning modules tailored for each degradation, resulting in complex architectures and high computation costs. Different from previous work, in this paper, we propose a unified manner to achieve joint embedding by leveraging the inherent similarities across various degradations for efficient and comprehensive restoration. Specifically, we first dig into the sub-latent space of each input to analyze the key components and reweight their contributions in a gated manner. The intrinsic awareness is further integrated with contextualized attention in an X-shaped scheme, maximizing local-global intertwining. Extensive comparison on benchmarking all-in-one restoration setting validates our efficiency and effectiveness, i.e., our network sets new SOTA records while reducing model complexity by approximately \textbf{-82\%} in trainable parameters and \textbf{-85\%} in FLOPs. Our code will be made publicly available upon acceptance.# Step1: Create the virtual environments via micromamba or conda:
micromamba create -n anyir python=3.9 -y
or
conda create -n anyir python=3.9 -y
# Step2: Prepare PyTorch and other libs
pip install -r requirements.txt
If you find our work helpful, please consider citing the following paper and/or ⭐ the repo.
@misc{ren2024any,
title={Any Image Restoration with Efficient Automatic Degradation Adaptation},
author={Bin Ren and Eduard Zamfir and Yawei Li and Zongwei Wu and Danda Pani Paudel and Radu Timofte and Nicu Sebe and Luc Van Gool},
year={2024},
eprint={2407.13372},
archivePrefix={arXiv},
primaryClass={cs.CV}
}