Git Product home page Git Product logo

desnownet_context-aware_deep_network_for_snow_removal's Introduction

DesnowNet: Context-Aware DeepNetwork for Snow Removal

This project is an unofficial code of the paper DesnowNet: Context-Aware DeepNetwork for Snow Removal.

Example

Example

(a) Snowy Image $x$ (b) Estimated snow-free output $\hat{y}$ (c) Estimated snow-free output $y'$ (d) Estimated snow mask $\hat{z}$

Environment

To generate the recovered result you need:

  1. Python3
  2. CPU or NVIDIA GPU + CUDA CuDNN

The required packages can refer to requirements.txt.

Model Checkpoints

  • create a log directory to save your checkpoints, e.g

    mkdir ./log
    

How to use the code?

  • Train
  python3 train.py --device [Device] -r [Root path for training set] -dir [Checkpoints directory] -iter [Iterations] --save_schedule [Save Checkpoints]
  • Test
  python3 Test.py --device [Device] -dir [Checkpoints directory] -root [Root path for test set] -path [Image Path] --checkpoint [The checkpoint you choose]
  • Inference
  python3 inference.py --device [Device] -dir [Checkpoints directory] -path [Image Path] --checkpoint [The checkpoint you choose]

train.py will automatically choose the latest checkpoint and continue the training process.

The Improvements

Two-stage training

  • Train
python3 multi_stage_train.py --device [Device] -iter [Iterations for training RG] -dir [Checkpoints directory] -r [Root path for training set] --save_schedule [Save Checkpoints] --TR_iterations [Iterations for training TR]
  • Test, Inference: It's the same with the original model.

Predict the product of z and a

  • Train
python3 train.py --device [Device] -r [Root path for training set] -dir [Checkpoints directory] -iter [Iterations] --save_schedule [Save Checkpoints] --mode za
  • Test
  python3 test.py --device [Device] -dir [Checkpoints directory]  -root [Root path for test set] -path [Image Path] --checkpoint [The checkpoint you choose] --mode za
  • Inference:
  python3 inference.py --device [Device] -dir [Checkpoints directory] -path [Image Path] --checkpoint [The checkpoint you choose] --mode za

Reference Code

Pretrained models for Pytorch https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/models/inceptionv4.py

pytorch-msssim https://github.com/jorge-pessoa/pytorch-msssim

desnownet_context-aware_deep_network_for_snow_removal's People

Contributors

linydthu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

desnownet_context-aware_deep_network_for_snow_removal's Issues

Some concerns about the test.

Hi,
Thanks for sharing the code of your great work! Here, we wonder about the detailed setting of testing on Snow 100K dataset. (1)Is this test process implemented on the original resolution or 64 \times 64 or 256 \times 256, or something else? (2) is the calculation of PSNR and SSIM performed on RGB or Y channel?
Looking forward to your answer!
Best,
josh

pre-trained models

Hi, thank you for sharing this reop.
the link you shared for pre-trained models doesn't work. can you provide a new link to the pre-trained models?

@linYDTHU

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.