Skip to content
Image De-raining Using a Conditional Generative Adversarial Network
Branch: master
Clone or download
Latest commit 7c8f1bc Mar 20, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
IDCGAN Add files via upload Feb 4, 2017
image Add files via upload Jan 25, 2017
model_trained Update and rename to download_model.txt Jan 25, 2017 Update Mar 20, 2017

Image De-raining Using a Conditional Generative Adversarial Network

[Paper Link]

[Project Page]

He Zhang, Vishwanath Sindagi, Vishal M. Patel

In this paper, we investigate a new point of view in addressing single image de-raining problem. Instead of focusing only on deciding what is a good prior or a good framework to achieve good quantitative and qualitative performance, we also ensure that the de-rained image does not degrade the performance of a given computer vision algorithm such as detection and classification. In other words, the de-rained result should be indistinguishable from its corresponding clear image to a given discriminator. This criterion can be directly incorporated into the optimization framework by using the recently introduced conditional generative adversarial networks (GANs). To minimize artifacts introduced by GANs and ensure better visual quality, a new refined loss function is introduced.

  title={Image De-raining Using a Conditional Generative Adversarial Network},
  author={Zhang, He and Sindagi, Vishwanath and Patel, Vishal M},
  journal={arXiv preprint arXiv:1701.05957},


Instal torch7

Install nngraph

Install hdf5

Download the dataset from ( and put the dataset folder into the "IDCGAN" folder


DATA_ROOT=./datasets/rain name=rain which_direction=BtoA th train.lua


DATA_ROOT=./datasets/rain name=rain which_direction=BtoA phase=test_nature th test.lua

Testing using ID-CGAN model

The trained ID-CGAN model and our training and testing datasets can be found at (

*Make sure you download the vgg model that used for perceotual loss and put it in the ./IDCGAN/per_loss/models


Code borrows heavily from [pix2pix] and [Perceptual Loss]. Thanks for the sharing.

You can’t perform that action at this time.