OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Attentive Gan Derainnet

Attentive Gan Derainnet is an unofficial Python and TensorFlow implementation of an attentive generative adversarial network for removing raindrops from single images. Its repository provides trained weights, a script to test an image, data-preparation and training scripts, and model-export scripts.

Independent OpenViST project profile, based on linked sources.

Attentive Gan Derainnet — Single-image raindrop removal experiments
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need a code-based starting point for single-image raindrop removal, or want to examine and train the described attentive GAN. Its documented workflow is built around paired rainy and clean images for training.

Who it is for

  • Researchers studying attention-based image deraining or reproducing the referenced CVPR 2018 approach.
  • Developers exploring raindrop removal as an image-restoration or computer-vision preprocessing step.

Documented uses

  • Apply the included trained model to an individual image and inspect the derained output and attention maps.
  • Prepare paired rainy and clean images as TensorFlow records for training.
  • Train or resume training from a checkpoint.
  • Export a trained checkpoint as a TensorFlow SavedModel or convert it for TensorFlow.js.
Before you choose

Requirements & limits

The public GitHub repository identifies the project as MIT-licensed. The README includes an online demo URL, but this profile describes the repository workflows.

  • The implementation uses TensorFlow 1.x-era setup guidance: TensorFlow 1.15.0 is specified, and other versions are described as untested.
  • Training data must provide paired raindrop-degraded and clean images.
  • The repository includes trained weights for single-image testing, as well as scripts to export a trained model.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Test the included model on one image

Run the repository's documented single-image inference workflow with the included checkpoint.

Before you start

  • A local copy of the repository.
  • TensorFlow 1.15.0 and the required packages installed with pip3 install -r requirements.txt.
  • The included checkpoint at ./weights/derain_gan/derain_gan.ckpt-100000 and an image file.

Steps

  1. Change to the repository root directory.

  2. Run python tools/test_model.py with --weights_path ./weights/derain_gan/derain_gan.ckpt-100000 and --image_path set to the image file.

Expected outcome

The script is documented to produce a derained image and attention maps.

Guide limitations

  • The README's stated test environment is Ubuntu 16.04, Python 3.5, CUDA 9.0, cuDNN 7.0 and a GTX 1070 GPU.
  • The README says TensorFlow 1.15.0 is required; other versions were not tested.
Source-based practical guide

Prepare paired images and start model training

Convert paired rainy and clean images to TensorFlow records and launch training.

Before you start

  • A local copy of the repository and the documented TensorFlow dependencies.
  • Rainy images in SOURCE_DATA_ROOT_DIR/rain_image and corresponding clean images in SOURCE_DATA_ROOT_DIR/clean_image.

Steps

  1. Organize rainy and clean examples in the two required folders.

  2. From the project root, run python data_provider/data_feed_pipline.py with --dataset_dir SOURCE_DATA_ROOT_DIR and --tfrecords_dir TFRECORDS_SAVE_DIR.

  3. Run python tools/train_model.py with --dataset_dir SOURCE_DATA_ROOT_DIR.

  4. To continue from a checkpoint, add --weights_path path/to/your/last/checkpoint.

Expected outcome

The preparation script scales images according to the configuration and converts them to TensorFlow records; the training script starts or resumes training.

Guide limitations

  • Training examples must include both raindrop-degraded images and clean label images.
  • The README reports a batch size of 1 and an experimental run of 100010 epochs; these are notes about the author's experiment, not a stated requirement for every run.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
21 November 2026
Original website title
MaybeShewill-CV/attentive-gan-derainnet · Official homepage title · retained in its source language