GithubHelp home page GithubHelp logo

raisr's Introduction

RAISR

A unofficial Python implementation of Google Rapid and Accurate Image Super Resolution

forthebadge forthebadge

Prepare

Dataset will use 291

./getdataset.sh
python train.py

Train

usage: train.py [-h] [--rate RATE] [--patch PATCH] [--Qangle QANGLE]
                [--Qstrength QSTRENGTH] [--Qcoherence QCOHERENCE]
                [--datasets DATASETS]

RAISR

optional arguments:
  -h, --help            show this help message and exit
  --rate RATE           upscale scale rate
  --patch PATCH         image patch size
  --Qangle QANGLE       Training Qangle size
  --Qstrength QSTRENGTH
                        Training Qstrength size
  --Qcoherence QCOHERENCE
                        Training Qcoherence size
  --datasets DATASETS   path save the train dataset

Todo:

  • left test.py implment to get PSNR/SSIM/Runtime

raisr's People

Contributors

easononfire avatar mkfmiku 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  avatar  avatar

Watchers

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

raisr's Issues

encountered an OverflowError when running train.py

I've add the line in the other issue and then i run the train.py. There i get an OverflowError: cannot convert float infinity to integer in the line:
File "/home/hatai/code/tensorflow/picZip/RAISR-master/model/hashTable.py", line 29, in hashTable
return int(angle),int(strength),int(coherence)
Anyone knows how to fix it? Thanks a lot

Error

Traceback (most recent call last):
File "train.py", line 44, in
LR = cv2.GaussianBlur(LR,(0,0),2);
NameError: name 'LR' is not defined

New Error

y, cb, cr = lr.split()
AttributeError: 'Array' object has no attribute 'split'

and integer or boolean arrays are valid indices

Hi friend, thanks for the project,

I know that your time is valuable, but I would appreciate it too much if you could guide me,

I am trying to run the file train.py in python 3.5, it shows me the following error:
File "train.py", line 57, in
Q[angle,strength,coherence] = Q[angle,strength,coherence] + patch.T*patch
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Beforehand thank you very much,

Greetings from Colombia

Excuse my English I use the google translator

some doubts about your code

hi,dear author
recently,i have read this paper,and luckily i have found your code.but i have some question about it.
1.i guess you wrote your code in python 3.0,because i can't run it in python2.7,then i changed some codes,and succeed.
2.i have some doubts about your codes in reconstruction your low solution image.
the following are some codes of you:
[angle,strength,coherence] = hashTable(patch,Qangle,Qstrenth,Qcoherence) f = H[angle,strength,coherence] patch = patch.reshape(1,-1) LRImage[jPixel,iPixel] = patch*np.matrix(f).T jPixel = jPixel+1

in google's paper,after we classified our patches into buckets,there may be no patch or a little patches in buckets because there are often many more horizontal and vertical structures in imagery,and flat regions are common,but i can't see what solution you make in your paper.

为了表述更清楚,我下面使用中文(见笑):在谷歌论文分桶的时候,有些结构经常出现有些出现得少使得桶子里面的图像块数非常少,你是怎样处理这个的?

my email is :[email protected]
i am looking forward your reply!

create folders to store LR / HR seperately

seems like the codes downscale and upscale in train.py at real time. Suggest to do it offline. FFMPEG has different scaling filter. we can reuse that to generate training picture. I can give a hand if you want.

Problem with test.py

Hi, can you please have a look at your test.py -- I don't think it is working properly. Looks like you are reading images separately from a directory and then again you are relying on image read from the training set. I understand you are trying to show the comparison but LR is not defined if we comment out after line 37.

Error when run ./train.py

when I run with python3 ./train.py, I got an error:

HashMap of ./datasets/BSDS200/100075.png

Traceback (most recent call last):
File "./train.py", line 81, in
main()
File "./train.py", line 68, in main
Q[j, t] += A * A.T
ValueError: operands could not be broadcast together with shapes (121,121) (66,66) (121,121)

Error :S

I keep getting this error:

StephenPereira@tuwigmlt7nbymh2 ~/RAISR$ python train.py
Namespace(Qangle=24, Qcoherence=3, Qstrength=3, datasets='./datasets/291/', patch=11, rate=3)
('Load dataset ', 161)
  0%|                                                                                                                                                                                                                                                   | 0/161 [00:00<?, ?it/s]HashMap of ./datasets/291/ACC_ 974959_THA_33.jpg

Traceback (most recent call last):
  File "train.py", line 80, in <module>
    main()
  File "train.py", line 40, in main
    im = misc.imread(image_path, mode='YCbCr')
AttributeError: 'module' object has no attribute 'imread'

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.