Presented at NeurIPS 2024, RestoreAgent introduces an autonomous system that leverages Multimodal Large Language Models (MLLMs) to tackle one of the most complex challenges in computer vision: restoring images afflicted by multiple, overlapping degradations.
By acting as an "intelligent conductor," RestoreAgent uses an MLLM to autonomously identify image corruptions, plan the optimal sequence of restoration tasks, and select the best specialized models for each step. Treating image restoration as a sequential decision-making problem allows it to outperform both "all-in-one" generalist models and human experts in recovering high-quality images from real-world conditions.
The Challenge of Complex Degradations
In reality, a single photograph rarely suffers from just one issue. An image might be simultaneously noisy, slightly blurry, and captured in low light. Traditional image restoration typically isolates these problems, focusing on a single task like denoising or dehazing.
The authors identify three major hurdles in current restoration approaches:
- The Generalist Trap: "All-in-one" models attempt to handle every degradation simultaneously. However, because they struggle to fit the vast distribution of all possible degradations, they often produce overly smooth, low-fidelity results.
- The Order of Operations: Restoration tasks are not commutative. For instance, if an image is both hazy and rainy, performing dehazing before deraining might alter the rain patterns so drastically that the deraining model fails. Finding the correct sequence is a combinatorial nightmare.
- Model Selection: Different models excel at different intensities of noise or blur. Choosing the wrong tool from the toolbox inevitably leads to suboptimal results.
How RestoreAgent Works
To overcome these hurdles, the researchers built RestoreAgent on top of Llava-Llama3-8b, a state-of-the-art MLLM. They fine-tuned the model using Low-Rank Adaptation (LoRA) to transform it into a specialized agent equipped with four core capabilities:
- Degradation Identification: The agent visually analyzes the image to detect specific issues (e.g., identifying medium noise alongside JPEG artifacts).
- Adaptive Sequencing: Rather than relying on a fixed, hardcoded pipeline, the agent dynamically determines the optimal order of operations (e.g., Denoise $\rightarrow$ DeJPEG $\rightarrow$ Dehaze).
- Model Selection: It selects the specific model from its library that is best suited for the detected intensity of the degradation.
- Iterative Refinement & Rollback: Crucially, the agent re-evaluates the image after each step. If a particular restoration step degrades the image quality further, it can "rollback" to a previous state and attempt an alternative path.
Training and Evaluation
The authors constructed a massive training dataset of over 23,000 image pairs. To establish the "ground truth" for training the agent, they performed an exhaustive search across all possible permutations of restoration sequences and models for each degraded image. They used a comprehensive scoring function—combining metrics like PSNR and LPIPS—to identify the absolute best restoration path.
For evaluation, they assembled a rigorous test set of 200 images featuring seven distinct combinations of degradations, such as Motion Blur combined with Rain, Noise, and JPEG compression.
Key Insights and Results
- Restoration as Logic: High-level reasoning is just as critical as low-level pixel processing. An MLLM can leverage its "visual common sense" to understand how different degradations interact.
- The Specialist Advantage: The paper demonstrates that a "manager" agent coordinating specialized, single-task models is significantly more effective and flexible than a single, massive "all-in-one" model.
- Sequence is King: Results confirm that even with identical tools, altering the execution order can mean the difference between a crystal-clear image and a blurry failure.
- Outperforming Humans and SOTA: In a ranking metric where 0% represents the best possible sequence and 100% the worst, RestoreAgent achieved a score of 12.9%, comfortably beating human experts who scored 19.5%. It also consistently outperformed state-of-the-art all-in-one models like AirNet and PromptIR across multiple metrics (PSNR, SSIM, LPIPS).
- Fast Adaptation: The system's modular design allows for rapid updates. The authors demonstrated that they could teach the agent a brand-new task (desnowing) and integrate a new model for it with just 30 minutes of fine-tuning.
Limitations and Future Work
The primary limitation of RestoreAgent is the size of its current toolbox. The system is restricted to the six restoration tasks and specific models currently included in its library. If the underlying restoration models exhibit poor generalization, the agent's overall performance is inherently capped.
Future work will focus on expanding this library to encompass a broader range of state-of-the-art models and more diverse degradation types, paving the way toward a truly universal, autonomous image restoration framework.
Summary updated