Coder Social home page Coder Social logo

ahn1340 / jrgr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guyii54/jrgr

0.0 0.0 0.0 11.07 MB

Torch implementation for CVPR 2021: Closing the Loop: Joint Rain Generation and Removal via Disentangled Image Translation.

License: Other

Python 100.00%

jrgr's Introduction

Closing the Loop: Joint Rain Generation and Removal via Disentangled Image Translation

Torch implementation Closing the Loop: Joint Rain Generation and Removal via Disentangled Image Translation in CVPR 2021. [paper]

Demo

Rain Removal and Generation


Real Rain Removal


Real Rain Generation

Network Architecture


Architecture

Prerequisites

  • Linux or Windows
  • Python 3.6
  • CPU or NVIDIA GPU + CUDA CuDNN

Get Started

Installation

  • clone this repo

  • Install Pytorch 1.6.0 and other dependencies (e.g., torchvision, visdom and dominate). The requirment of main dependencies are listed in requirements.txt

Dataset and Model

Synthetic Datasets

The JRGR models for synthetic rainy cityscape dataset are here.

https://pan.baidu.com/s/1Q3nn61-LhA3Zo9eBcfNt_g

extracting code:8x9g

Real Datasets

The JRGR model along with the large number of real captured photos will be released soon.

JRGR train/test

  • Download our dataset or make your own dataset, the dataset should have the following structure:
    -train
      -Ot
      -Os
      -Bs
    -test
      -Ot
      -Os
      -Bs
    

The directory Ot, Os, Bs save the real rainy images, synthetic rainy images and the corresponding backgrounds of synthetic rainy images.

If you have the ground truth of real rainy images and you want to visualize them in the results, you can add Bt directory in the dataset and add the config --Bt_access 1 during training and testing.

  • Train the model

    # Proposed training strategy: pre-train and joint train
    python train.py --dataroot ./dataset/cityscape --dataset_mode rain --model unetderain --name UnetDerain
    python train.py --dataroot ./dataset/cityscape --dataset_mode rain --unet_load_path ./checkpoints/UnetDerain --model raincycle --name JRGR --init_derain 1,3
    # Sencondary training strategy: directly joint train
    python train.py --dataroot ./dataset/cityscape --dataset_mode rain --model raincycle --name JRGR --init_derain 0
    
  • Test the model

    python test.py --dataroot ./dataset/cityscape --dataset_mode rain --model raincycle --name JRGR
    

    The test results will be saved to a html file here: ./results/RO_JRGR/latest_test/index.html.

Citation

Our code is inspired by Cycle GAN.

jrgr's People

Contributors

existever avatar guyii54 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.