Deep-Masking Generative Network: A Unified Framework for Background Restoration from Superimposed Images

Xin Feng, Wenjie Pei, Zihui Jia, Fanglin Chen, David Zhang, Guangming Lu · DOI

TL;DR

The Deep-Masking Generative Network (DMGN) provides a unified, task-agnostic framework for restoring clean backgrounds from images plagued by reflections, rain streaks, or haze. By leveraging a novel "Residual Deep-Masking Cell" and a coarse-to-fine generative process that uses noise as a contrasting cue, DMGN consistently outperforms specialized state-of-the-art models across multiple restoration tasks.

What Problem Does This Paper Address?

Image restoration tasks like reflection removal, deraining, and dehazing share a common mathematical crux: the input is a "superimposed" image composed of a clean background layer and a noisy layer. However, because the appearance patterns of rain, haze, and reflections are so diverse, researchers have traditionally treated them as separate problems, designing bespoke architectures for each.

Existing deep learning approaches often try to map noisy images to clean ones in a "brute-force" manner or use recurrent structures that are computationally expensive. The authors identify a gap: the lack of a generalized model that can adapt to different noise patterns without task-specific engineering, while effectively using the noise itself as a guide for restoration.

Methods

The authors propose the Deep-Masking Generative Network (DMGN), which operates in two main stages:

  1. Coarse Phase: The model decomposes the input into background and noise constituents in a deep embedding space. It then generates a coarse background image and a noise image (e.g., a rain streak map) in parallel.
  2. Refining Phase: The coarse background is refined by using the generated noise image as an explicit "contrasting cue."
Fig. 2. Architecture of the proposed Deep-Masking Generative Network (DMGN). It restores the background image following a coarse-to-fine framework: a coarse background image and a noise image (rain streak image in this example of rain streak removal) are first generated in the coarse phase, then the noise (rain streak) image is further leveraged to refine the coarse background image and achieve a higher-quality background image in the refining phase (presented in Section III-C and Figure 4). The Residual Deep-Masking Cell (presented in Section III-B and Figure 3) is specifically designed as the core operating unit for image generation in both the coarse phase and the refining phase.

Key Innovations:

  • Residual Deep-Masking Cell (RDMC): This is the core operating unit. Unlike standard convolutional layers, the RDMC learns a gating mask via an attention mechanism to control information flow. It enhances effective features and suppresses noise dynamically. As restoration progresses, these masks naturally converge toward zero, indicating that less information is needed to "fix" the image.
  • Two-Pronged Refinement Strategy: To make the most of the generated noise image, the authors use it to regularize both the source information (via an Adapted Channel-wise Attention layer) and the masking mechanism of the RDMCs in the refining phase. This forces the model to explicitly recognize what is not background.

Datasets

The model was evaluated across three distinct restoration tasks using several standard benchmarks:

  • Image Reflection Removal: Real20, Solid, Postcard, and Wild datasets.
  • Image Rain Streak Removal: Rain100H (heavy rain) and Rain100L (light rain).
  • Image Dehazing: RESIDE (SOTS indoor/outdoor), O-HAZE (real hazy images), and TestA-DCPDN.

Key Insights and Ideas

  • Unified is Better: A single architecture, when designed to be adaptive, can beat specialized models. DMGN doesn't rely on task-specific priors (like the "dark channel prior" for haze); it learns to summarize noise patterns directly from data.
  • Noise as a Teacher: Instead of just trying to "remove" noise, DMGN explicitly generates a noise layer and uses it as a negative reference. This "contrastive" approach helps the refining stage focus on local details that the coarse stage missed.
  • Dynamic Information Filtering: The RDMC's behavior is physically intuitive. In early iterations, the masks are active, filtering out heavy noise. As the image becomes cleaner, the masks "quiet down," preventing the model from over-processing and losing background details.
Fig. 1. Given an input image with reflection, our DMGN first generates a coarse background image and a noise (reflection in this task) image in the coarse phase by iteratively employing the proposed Residual Deep-Masking Cell, then the generated reflection image is further utilized to refine the background image. Here Residual Deep-Masking Cell learns a gating mask to control information propagation in each iteration during image generation (darker value indicate less information flow): enhance the effective information and suppress the negative information. As the proceeding of the background generation, the restoration of background is gradually finished and less information is required. Hence, more and more pixel values in the mask tend to converge to 0. Consequently, our DMGN is able to generate a cleaner background image than other methods.

Key Results

DMGN achieved state-of-the-art (SOTA) performance across all three tasks:

  • Reflection Removal: On the Real20 dataset, DMGN achieved a PSNR of 23.05 and SSIM of 0.823, significantly higher than previous SOTA models like ERRNet (22.86 / 0.798).
  • Rain Removal: On Rain100H, it reached a PSNR of 30.72, outperforming the popular PReNet (29.46).
  • Dehazing: On the O-HAZE dataset, DMGN hit a PSNR of 25.11, a substantial lead over the next best model, DM$^2$F-Net (23.46).
  • Efficiency: Despite its performance, DMGN is more efficient than many competitors. For reflection removal, it requires only 232.5 GFLOPs, compared to 371.9 for ERRNet, while maintaining faster inference times.

Limitations and Future Work

The authors note that nighttime image restoration remains a significant challenge. The low light contrast at night makes it extremely difficult to distinguish the background from noise layers (like glare or rain). Future work will focus on improving the model's ability to handle these low-contrast, high-noise scenarios.

Summary updated

BibTeX
@article{feng2021deep,
  author = {Xin Feng and Wenjie Pei and Zihui Jia and Fanglin Chen and David Zhang and Guangming Lu},
  title = {{Deep-Masking Generative Network: A Unified Framework for Background Restoration from Superimposed Images}},
  journal = {IEEE Trans. Image Process.},
  year = {2021},
  url = {https://openreview.net/forum?id=6FEA41vqYx},
}
Figure