Git Product home page Git Product logo

dncnn-tensorflow's Introduction

DnCNN-tensorflow

AUR Docker Automated build Contributions welcome

A tensorflow implement of the TIP2017 paper Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising

Model Architecture

graph

Results

compare

  • BSD68 Average Result

The average PSNR(dB) results of different methods on the BSD68 dataset.

Noise Level BM3D WNNM EPLL MLP CSF TNRD DnCNN-S DnCNN-B DnCNN-tensorflow
25 28.57 28.83 28.68 28.96 28.74 28.92 29.23 29.16 29.17
  • Set12 Average Result
Noise Level DnCNN-S DnCNN-tensorflow
25 30.44 30.38

For the dataset and denoised images, please download here

Environment

๐Ÿณ With docker (recommended):

  • Install docker support

You may do it like this(ubuntu):

$ sudo apt-get install -y curl
$ curl -sSL https://get.docker.com/ | sh
$ sudo usermod -aG docker ${USER}
  • Install nvidia-docker support(to make your GPU available to docker containers)

You may do it like this(ubuntu):

$ wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
$ sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb
  • Pull dncnn image and start a container
$ docker pull wenbodut/dncnn
$ ./rundocker.sh

Then you could train the model.

Without docker:

You should make sure the following environment is contented

tensorflow == 1.4.1
numpy

One-Key-To-Denoise

$ ./oneKeyToDenoise.sh
(need docker support)

Then you could find the noisy Set12 images and denoised images in test folder. Have fun!

Train

$ python generate_patches.py
$ python main.py
(note: You can add command line arguments according to the source code, for example
    $ python main.py --batch_size 64 )

For the provided model, it took about 4 hours in GTX 1080TI.

Here is my training loss:

Note: This loss figure isn't suitable for this trained model any more, but I don't want to update the figure ๐ŸŒš

loss

Test

$ python main.py --phase test

TODO

  • Fix bug #13. (bug #13 fixed, thanks to @sdlpkxd)
  • Clean source code. For instance, merge similar functions(e.g., 'load_images 'and 'load_image' in utils.py).
  • Add one-key denoising, with the help of docker.
  • Compare with original DnCNN.
  • Replace tf.nn with tf.layer.
  • Replace PIL with OpenCV.
  • Try tf.dataset API to speed up training process.
  • Train a noise level blind model.

Thanks for their contributions

  • @lizhiyuanUSTC
  • @husqin
  • @sdlpkxd
  • and so on ...

dncnn-tensorflow's People

Contributors

lizhiyuanustc avatar sdlpkxd avatar

Watchers

 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.