Giter Club home page Giter Club logo

rescsnet's Introduction

ResCSNet

Code for ResCSNet which compresses and restores images using convolutional neural network.

The code is in pytorch. As of coding torch.utils.tensorboard wasn't available, so I used tensorboardX. (But as it turns out there is no big difference between the two)

It should run in Google Colaboratory. The notebook should be self-explanatory.

NOTE During my experiments I notice that certain versions of numpy or pytorch is broken. This will cause the recovered image to have ridiculous 'holes'. For example the demo image of parrot in commit 9b8376fc402160c7b8330b15d9ee75a61822906b. More recent versions of numpy (or maybe pytorch) has fixed the bug.

Reconstruction demo

The 'ratio' in the table below refers to the compression ratio, i.e. ratio=M/N

Original ratio=0.25 ratio=0.20 ratio=0.15
house house_rescsnet_r25 house_rescsnet_r20 house_rescsnet_r15
parrot parrot_rescsnet_r25 parrot_rescsnet_r20 parrot_rescsnet_r15
barbara barbara_rescsnet_r25 barbara_rescsnet_r20 barbara_rescsnet_r15
Original ratio=0.10 ratio=0.04 ratio=0.01
house house_rescsnet_r10 house_rescsnet_r04 house_rescsnet_r01
parrot parrot_rescsnet_r10 parrot_rescsnet_r04 parrot_rescsnet_r01
barbara barbara_rescsnet_r10 barbara_rescsnet_r04 barbara_rescsnet_r01

Ways to improve this work?

  • Allow the input image to be of arbitary size as this issue points out.
  • Improve the loss function. Currently the DW-SSIM loss is interpreted as something multiplied by the absolute value of a cosine similarity loss. It's weired to some extent if you derive the absolute value of a cosine similarity loss. We did that to limit the range of the loss to 0-1, but is this really necessary?
  • Try to remove Batchnorm layers? Although they seem to accelerate training, I read in some papers about image superesolution that Batchnorms might introduce undesired artifacts.

Citation

@article{Zhang2019Image,
    author = {Zhang, Fan and Xu, Zhichao and Chen, Wei and Zhang, Zizhe and Zhong, Hao and Luan, Jiaxing and Li, Chuang},
    title = {An Image Compression Method for Video Surveillance System in Underground Mines Based on Residual Networks and Discrete Wavelet Transform},
    abstact = {Video surveillance systems play an important role in underground mines. Providing clear surveillance images is the fundamental basis for safe mining and disaster alarming. It is of significance to investigate image compression methods since the underground wireless channels only allow low transmission bandwidth. In this paper, we propose a new image compression method based on residual networks and discrete wavelet transform (DWT) to solve the image compression problem. The residual networks are used to compose the codec network. Further, we propose a novel loss function named discrete wavelet similarity (DW-SSIM) loss to train the network. Because the information of edges in the image is exposed through DWT coefficients, the proposed network can learn to preserve the edges better. Experiments show that the proposed method has an edge over the methods being compared in regards to the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM), particularly at low compression ratios. Tests on noise-contaminated images also demonstrate the noise robustness of the proposed method. Our main contribution is that the proposed method is able to compress images at relatively low compression ratios while still preserving sharp edges, which suits the harsh wireless communication environment in underground mines.},
    journal = {Electronics},
    issn = {2079-9292},
    keywords = {underground mines; intelligent surveillance; residual networks; compressed sensing; image compression; image restoration; discrete wavelet transform},
    number = {12},
    volume = {8},
    article-number = {1559},
    year = {2019},
    doi = {10.3390/electronics8121559},
    url = {https://www.mdpi.com/2079-9292/8/12/1559},
}

rescsnet's People

Contributors

y0umu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

rescsnet's Issues

The input train/test images must be resized to certain size (e.g. 100*100)?

@y0umu
Your CS net is interesting, but when I try to train and test it. I observe that it only fits to the fixed size (e.g. 100*100) images during the process of training and testing due to the limitations of the EncoderLinear layer used to CS sampling.
(1) Is it correct for my suggestion?
(2) How can it support for train/test images of the arbitrary size?
(3) The code is reconstructed for running on local computers, which is show as below.
ResCSNet-v0.01.tar.gz

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.