Coder Social home page Coder Social logo

yjn870 / rednet-pytorch Goto Github PK

View Code? Open in Web Editor NEW
98.0 98.0 34.0 3.42 MB

PyTorch Implementation of image Restoration Using Very Deep Convolutional Encoder-Decoder Networks with Symmetric Skip Connections (NIPS 2016)

Home Page: https://arxiv.org/abs/1603.09056

Python 100.00%
image-denoising

rednet-pytorch's People

Contributors

yjn870 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

rednet-pytorch's Issues

extension

Very nice job!
One little extension concerns the number of channels, ie. RGB=3 but it can nicely be genralized

def init(self, num_layers=5, num_features=64, num_channels=1):

then the 1st conv_layer

nn.Conv2d(num_channels, ...
and the last deconv_layer
deconv_layers.append(nn.ConvTranspose2d(num_features, num_channels,...
Thanks

upsampling issue

Hi @yjn870, thank you for the implementation.

It works reasonably well for the most cases.

However, for the images that has some even dimensions such as [370, 545], [663, 962], [359, 478],

the forward pass does not preserve the dimensions at their original form. As a result, I receive the following error :

...
in forward
    x += residual
RuntimeError: The expanded size of the tensor (360) 
              must match the existing size (359) at non-singleton dimension 2
torch.Size([1, 3, 360, 478]) torch.Size([1, 3, 359, 478])

Can you suggest a solution to this problem?

residual adding in the model

I was confused that you are using MSE loss for the input and output but there is a direct residual adding of original input in the model. Would this model just make the encoder decoder to output 0 to reduce the MSE loss. Hoping you could point me out.
Best regards.

image

some differences from the original paper

Hello @yjn870, thank you for the implementation.
After training with your code, I found that the psnr and ssim is lower than that of the original paper. Is it caused by different data processing or training methods?

Image size problem

Getting following error during testing. Original image size is 481x321.

File "example.py", line 55, in
pred = model(input)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/content/gdrive/My Drive/rednet/model.py", line 123, in forward
x += residual
RuntimeError: The size of tensor a (482) must match the size of tensor b (481) at non-singleton dimension 3

I'm curious about the number of images and epochs used in training.

Hello.
I used the BSD dataset as stated in the paper, and your code for training. I trained for 20 epochs using all of train data, validation data, and test data, but the final loss was around 0.002 ~ 0.003. This is not enough for PSNR to be 30, which is not the quality of the sample output you uploaded.
Can you tell me your learning environment? Thanks in advance.

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.