← all repositories
rui1996/DeRaindrop

Teaching GANs to notice raindrops, not hallucinate past them

A 2018 CVPR spotlight paper that uses attention maps to stop generative networks from inventing plausible-looking but wrong background details behind raindrops.

DeRaindrop
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

DeRaindrop removes raindrops from single images by training a GAN with a twist: both the generator and discriminator receive explicit attention maps highlighting raindrop regions. The network learns to focus reconstruction effort where it’s actually needed and verify local consistency there, rather than treating the whole image uniformly. It ships with 861 training pairs and 239 test pairs, plus a pre-trained PyTorch 0.3.1 model you can run with predict.py.

The interesting bit

The attention injection is the actual contribution, not just the raindrop removal. Most inpainting-style methods let the generator guess blindly; here the attention mechanism learns raindrop shapes and their surrounding structure, forcing the discriminator to check whether specifically the restored regions look right. It’s a neat way to reduce the “hallucinated brick wall” problem in generative repair.

Key highlights

  • CVPR 2018 spotlight; code and dataset are public (Google Drive link provided)
  • Attention maps fed to both generator and discriminator, not just one or the other
  • Quantitative evaluation on aligned test pairs (Test A) plus qualitative set (Test B, 239 pairs)
  • Demo script included: point at ./demo/input/, get cleaned ./demo/output/
  • PSNR drops 0.06 from paper results due to masked license plates in released data — the authors note this explicitly

Caveats

  • PyTorch 0.3.1 only; you’ll need CUDA 8.0 and Python 2.7, which are increasingly archaeological
  • Linux-only; no Windows or macOS support mentioned
  • Slides and video links are still TBA six years later

Verdict

Worth studying if you’re building attention mechanisms for image restoration or need a baseline for raindrop removal. Skip it if you want production-ready code — the toolchain is frozen in 2018 and the repo appears unmaintained.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.