While deep learning has advanced single-image deraining, existing models suffer from a fundamental limitation: they employ a static inference paradigm that fails to adapt to the complex, coupled degradations (e.g., noise artifacts, blur, and color deviation) of real-world rain. Consequently, restored images often exhibit residual artifacts and inconsistent perceptual quality. In this work, we present Derain-Agent, a plug-and-play refinement framework that transitions deraining from static processing to dynamic, agent-based restoration. Derain-Agent equips a base deraining model with two core capabilities: 1) a Planning Network that intelligently schedules an optimal sequence of restoration tools for each instance, and 2) a Strength Modulation mechanism that applies these tools with spatially adaptive intensity. This design enables precise, region-specific correction of residual errors without the prohibitive cost of iterative search. Our method demonstrates strong generalization, consistently boosting the performance of state-of-the-art deraining models on both synthetic and real-world benchmarks.
Figures & tables
Figure 1: Preliminary findings: a) static deraining leaves coupled residual degradations; b) agent-based adaptive refinement markedly improves visual quality.
Figure 2: Overview of the Derain-Agent framework. Given a preliminary deraining output Ibase , the perception stage analyzes residual degradations to produce an executable restoration program Π=(P,Λ) . The execution stage then applies the scheduled tools T(ℓ) sequentially, modulated by pixel-wise strength maps λ(ℓ) , to yield the final enhanced image Ifinal .
Figure 3: Visual results on LHP-Rain. Top: Baseline derainers; Bottom: Derain-Agent enhanced. Please zoom in for a better view.
Figure 4: Visual results on LHP-Rain. Top: Baseline derainers; Bottom: Derain-Agent enhanced. Please zoom in for a better view.
Figure 5: Visual results on RE-Rain. Top: Baseline derainers; Bottom: Derain-Agent enhanced. Please zoom in for a better view.
Strategy
PSNR
SSIM
LPIPS
Baseline
31.59
0.8835
0.219
IQA-Greedy
31.65
0.8864
0.214
Rollback-Replanning
31.69
0.8873
0.215
Derain-Agent
32.34
0.9074
0.177
Table 5: Ablation study on Execution Strategies under the same toolbox, backbone, and step budget.
Figure 6: Performance–throughput trade-off of different tool-path scheduling strategies across different backbones.
Figure 7: Visual comparison of object detection and instance segmentation on LHP-Rain. Top: Baseline derainers; Bottom: Derain-Agent enhanced. Our method significantly reduces false negatives and improves mask precision.
Figure 8: Qualitative comparison of local detail recovery. Strength modulation facilitates the reconstruction of fine spatial structures.
Strategy
PSNR
SSIM
Params (M)
FLOPs (G)
w / o SM
32.25
0.9037
21.42
4.804
w / SM
32.34
0.9074
22.93
4.901
Table 6: Ablation study on strength modulation (SM).
Training Stages
One
Two
Three
PSNR
32.04
32.34
32.16
SSIM
0.8986
0.9074
0.9014
Toolbox Size
One
Two
Three
PSNR
31.97
32.21
32.34
SSIM
0.8925
0.9034
0.9074
Table 7: Ablation study on training strategy and Toolbox Size.