Coder Social home page Coder Social logo

rakeshraj97 / edsr-super-resolution Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 10.91 MB

This repository is an implementation of EDSR model implemented in PyTorch

License: MIT License

Python 95.03% Shell 4.97%
edsr super-resolution pytorch python satellite deep-learning deep-neural-networks cnn memnet srcnn iqa

edsr-super-resolution's Introduction

EDSR-Super-Resolution

This repository is an implementation of EDSR model using PyTorch Check the official code and paper (The video input/output super-resolution will be added soon to the Master branch)

This model was trained on NVIDIA P100 with ~4500 annotated satellite Low Resolution image pathches which were obtained by Image degradation and Image downsampling of the High Resolution images. You can download the dataset which I used for training the model here

Required Dependencies

  • Python 3.6
  • PyTorch >= 1.0.0
  • Pillow
  • Utility
  • Imageio
  • tqdm
  • scikit-image
  • OpenCV (Only for Video input/output)
  • matplotlib

Quickstart (Demo)

You can test the pretrained model EDSR_baseline_x2 by placing the images in test folder. The supported formats are png and jpeg files. The pretrained model can be downloaded using this link

Run the script in src folder. Uncomment the appropriate line in demo.sh to test your image. sh demo.sh The output images can be found under experiment/test/results-Demo folder.

Output of the trained model

image

edsr-super-resolution's People

Contributors

rakeshraj97 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

anshulgrover96

edsr-super-resolution's Issues

EDSRx2.pt from gdrive is crashing main.py

Hello.
I download the pretrained models from gdrive.
While model_best.pt works smoothly, the EDSRx2.pt is crashing with a tensor size error.
how is it possible?
the debug output is the below

/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py:477: UserWarning: This DataLoader will create 6 worker processes in total. Our suggested max number of worker in current system is 4, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
cpuset_checked))
Making model...
Load the model from ../../pt-models/EDSR_x2.pt
Traceback (most recent call last):
File "/content/EDSR-Super-Resolution/src/model/edsr.py", line 74, in load_state_dict
own_state[name].copy_(param)
RuntimeError: The size of tensor a (64) must match the size of tensor b (256) at non-singleton dimension 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 33, in
main()
File "main.py", line 23, in main
_model = model.Model(args, checkpoint)
File "/content/EDSR-Super-Resolution/src/model/init.py", line 34, in init
cpu=args.cpu
File "/content/EDSR-Super-Resolution/src/model/init.py", line 103, in load
self.model.load_state_dict(load_from, strict=False)
File "/content/EDSR-Super-Resolution/src/model/edsr.py", line 80, in load_state_dict
.format(name, own_state[name].size(), param.size()))
RuntimeError: While copying the parameter named head.0.weight, whose dimensions in the model are torch.Size([64, 3, 3, 3]) and whose dimensions in the checkpoint are torch.Size([256, 3, 3, 3]).

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.