Abstract
The learning of rain masks is important for finely extracting the rain streaks and helping the recovery of rain-removed images. However, the rain mask attention blocks involved in existing methods cannot be directly applied to other deraining frameworks, resulting in weak universality. In this paper, we propose a fuzzy mask extraction module with better flexibility, which can be easily embedded into the current rain-attention-based single image deraining approaches. Specifically, we first propose to optimize a convex combination of several grouping functions to extract the corresponding fuzzy mask maps which are taken as ground-truth. Then, under the supervision of the extracted fuzzy mask maps, we design the corresponding fuzzy rain mask extraction network module. Finally, we integrate the fuzzy mask extraction module into several state-of-the-art single image deraining methods. Extensive experiments show that the proposed approach can improve the performance of the existing single image deraining methods and further boost their generalization ability.
Introduction
Single-image deraining is a critical task in computer vision, aimed at restoring clean backgrounds from images degraded by rain. While many deep learning models utilize rain masks or attention maps to identify rainy pixels, these components are often tightly coupled with specific architectures, limiting their portability. This paper introduces a universal, "plug-and-play" fuzzy mask extraction module (PnP-FM) designed to overcome these limitations by leveraging fuzzy logic to better characterize the varying degrees of image degradation caused by rain.
Problem Statement: Beyond Binary Masks
Traditional deraining methods often treat rain as a binary presence—a pixel is either rainy or not. However, rain in the real world is complex; it blurs, occludes, and accumulates, creating a gradient of degradation. Existing rain-attention modules face two primary challenges:
- Lack of Universality: Attention blocks are typically "hard-coded" into specific models, making them difficult to adapt to other frameworks.
- Binary Limitations: Standard binary masks fail to capture the "fuzzy" nature of rain, where intensity varies across the image, often leading to lost textures or residual artifacts in the restored image.
Proposed Method: The PnP-FM Framework
The researchers developed a three-stage framework to create a flexible and accurate mask extraction system that can be integrated into various state-of-the-art (SOTA) models.
- Stage 1: Fuzzy Ground Truth Extraction: Instead of simple image subtraction, the authors use Restricted Equivalence Functions (REF) and a convex combination of grouping functions to generate "fuzzy masks." These masks assign a membership value (0 to 1) to each pixel, representing the degree of rain impact.
- Stage 2: Training the PnP-FM Module: A dedicated network module, utilizing Resblocks and Long Short-Term Memory (LSTM) units, is trained to predict these fuzzy masks from rainy inputs. The LSTM helps capture the directional and spatial context of rain streaks.
- Stage 3: Plug-and-Play Integration: The self-contained module is designed to replace internal attention mechanisms in existing frameworks like JORDER-E, SPANet, MPRNet, and ECNet.
Experimental Setup
The module was evaluated using a mix of synthetic and real-world datasets:
- Synthetic Benchmarks: Rain100L, Rain100H, and Rain800 provided ground truth for quantitative evaluation.
- Real-World Data: The SPA-Data dataset (~29,500 image pairs from real videos) and a collection of 147 "in the wild" rainy images were used to test generalization.
Results and Discussion
The PnP-FM module consistently enhanced the performance of original SOTA models. On the Rain100H dataset, integrating PnP-FM into the SPANet model increased the PSNR from 24.35 dB to 26.52 dB.
Qualitative results demonstrate that the fuzzy approach preserves fine background textures—such as distant foliage or text—that are often smoothed away by standard models. The module showed superior generalization on real-world data, achieving higher Structural Similarity Index (SSIM) scores on the SPA-Data benchmark compared to original architectures.
Conclusion
By treating rain degradation as a gradient rather than a binary state, the PnP-FM module provides a more nuanced and effective way to handle image restoration. Its "plug-and-play" nature allows it to serve as a universal enhancement for various deraining architectures. Future work will explore extending this fuzzy logic approach to other weather effects like snow or haze and addressing multi-degradation scenarios.
Summary updated