Abstract
All-in-one image restoration seeks to recover high-quality images from various types of degradation using a single model, without prior knowledge of the corruption source. However, existing methods often struggle to effectively and efficiently handle multiple degradation types. We present Cat-AIR, a novel Content And Task-aware framework for All-in-one Image Restoration. Cat-AIR incorporates an alternating spatial-channel attention mechanism that adaptively balances the local and global information for different tasks. Specifically, we introduce cross-layer channel attentions and cross-feature spatial attentions that allocate computations based on content and task complexity. Furthermore, we propose a smooth learning strategy that allows for seamless adaptation to new restoration tasks while maintaining performance on existing ones. Extensive experiments demonstrate that Cat-AIR achieves state-of-the-art results across a wide range of restoration tasks, requiring fewer FLOPs than previous methods, establishing new benchmarks for efficient all-in-one image restoration.
Introduction
Image restoration—the process of removing noise, rain, haze, or blur—has traditionally relied on specialized models tailored to specific degradations. While "all-in-one" models aim to unify these tasks within a single network, they face significant hurdles. Uniform processing treats every pixel identically, ignoring the fact that low-complexity regions (like a clear sky) require far less computation than high-complexity textures (like animal fur). Additionally, different tasks have conflicting requirements; for instance, denoising thrives on local spatial details, while deblurring requires a broader global context to correct motion artifacts.
Methodology
Cat-AIR (Content and Task-Aware Image Restoration) employs a U-shaped architecture designed to dynamically allocate resources based on the input's specific needs through several key innovations:
Alternating Spatial-Channel Attention
The framework introduces a dual-attention mechanism to balance local and global information:
- Cross-Layer Channel Attention: Recognizing that global context becomes more critical in deeper layers, the model utilizes lightweight Squeeze-and-Excitation (SE) blocks in shallow stages and more complex self-channel attention at the bottleneck.
- Cross-Feature Spatial Attention (The Patch Router): This core innovation analyzes the input and partitions it into "hard" and "easy" patches. Hard patches, containing intricate details or representing difficult tasks, are routed to a high-capacity self-attention branch. Easy patches, such as smooth regions or simpler tasks, are processed by a lightweight, efficient convolution branch.
Smooth Learning Strategy
To facilitate scalability, Cat-AIR uses task-specific learnable prompts and an Exponential Moving Average (EMA) update rule. This strategy allows the model to adapt to new restoration tasks seamlessly while preventing the "catastrophic forgetting" of previously learned tasks.
Experimental Results
The model was evaluated on standard benchmarks including BSD68 (denoising), Rain100L (deraining), SOTS (dehazing), GoPro (deblurring), and LOL (low-light enhancement).
Performance and Efficiency
Cat-AIR sets new benchmarks for both quality and computational efficiency. In a three-task setting (denoise, derain, dehaze), Cat-AIR-3D outperformed the previous state-of-the-art PromptIR by 0.66 dB in average PSNR, while requiring only 9.29G FLOPs (compared to PromptIR's 10.79G). When extended to five tasks, Cat-AIR-5D outperformed the previous best model (IDR) by a massive 2.23 dB on average across all tasks.
Content and Task Awareness
Visualizations of the router's masks reveal that the model naturally selects self-attention for high-frequency details and motion-affected areas. Furthermore, the model demonstrates adaptive behavior: as task difficulty increases (e.g., higher noise levels), it automatically expands the "hard" regions processed by self-attention to maintain restoration quality.
Conclusion
Cat-AIR demonstrates that a content- and task-aware approach to image restoration can achieve superior results with reduced computational overhead. By hybridizing self-attention and convolution through an intelligent routing mechanism, the framework provides a scalable and efficient solution for multi-degradation image recovery. Future work will investigate learnable mask ratios and the integration of semantic guidance to further refine routing decisions.
Summary updated