  The aim of image restoration is to recover high-quality images from distorted
ones. However, current methods usually focus on a single task (\emph{e.g.},
denoising, deblurring or super-resolution) which cannot address the needs of
real-world multi-task processing, especially on mobile devices. Thus,
developing an all-in-one method that can restore images from various unknown
distortions is a significant challenge. Previous works have employed
contrastive learning to learn the degradation representation from observed
images, but this often leads to representation drift caused by deficient
positive and negative pairs. To address this issue, we propose a novel
All-in-one Multi-degradation Image Restoration Network (AMIRNet) that can
effectively capture and utilize accurate degradation representation for image
restoration. AMIRNet learns a degradation representation for unknown degraded
images by progressively constructing a tree structure through clustering,
without any prior knowledge of degradation information. This tree-structured
representation explicitly reflects the consistency and discrepancy of various
distortions, providing a specific clue for image restoration. To further
enhance the performance of the image restoration network and overcome domain
gaps caused by unknown distortions, we design a feature transform block (FTB)
that aligns domains and refines features with the guidance of the degradation
representation. We conduct extensive experiments on multiple distorted
datasets, demonstrating the effectiveness of our method and its advantages over
state-of-the-art restoration methods both qualitatively and quantitatively.
