Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirements #23

Open
impactcolor opened this issue Mar 12, 2018 · 10 comments
Open

Requirements #23

impactcolor opened this issue Mar 12, 2018 · 10 comments

Comments

@impactcolor
Copy link

Hi is there any doc on requirements? I'm running tensor flow with keras and I get errors on both python 2.7 and python 3.5.

Any help would be appreciated, thank you!

@titu1994
Copy link
Owner

Could you specify what error you got? I tested this with TF backend, Keras 2.1.3 and Python 3.5

@impactcolor
Copy link
Author

I ran python main.py input_images/testme.jpg and got
Using TensorFlow backend.
Traceback (most recent call last):
File "main.py", line 1, in
import models
File "/root/Image-Super-Resolution/models.py", line 12, in
import img_utils
File "/root/Image-Super-Resolution/img_utils.py", line 7, in
import cv
ImportError: No module named 'cv'

@impactcolor
Copy link
Author

@titu1994 error above

@titu1994
Copy link
Owner

Open cv is a requirement for this. Try conda install opencv

@impactcolor
Copy link
Author

@titu1994 Still no luck I reinstalled everything to make sure I'm running correctly:

Using TensorFlow backend.
Traceback (most recent call last):
File "main.py", line 1, in
import models
File "/root/Image-Super-Resolution/models.py", line 12, in
import img_utils
File "/root/Image-Super-Resolution/img_utils.py", line 7, in
import cv
ModuleNotFoundError: No module named 'cv'

CV installed through conda I checked it and it's there. I ran import cv2

@titu1994
Copy link
Owner

On Windows, opencv has many problems during installation. It should be import cv2.

Even then, there can be some internal import problems from open cv itself.

@impactcolor
Copy link
Author

@titu1994 Hi I got it working I was having problems with my cv. One file was set to "import cv" once I fixed that it worked. When I scale to 5 it gives this error:

File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 78, in h5py.h5f.open
OSError: Unable to open file (Unable to open file: name = 'weights/distilledresnetsr 5x.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)

running this: python main.py input_images/testme.jpg --scale=5

any ideas?

@titu1994
Copy link
Owner

That's because there are no pretrained models for scale 5. You'll have to train your own, or pass the scale 2 model 3 (8x scale) times and then downscale.

@impactcolor
Copy link
Author

I'm confused on this one: model 3. These are the options: python main.py "imgpath" --model="type", where type = sr, esr, dsr, ddsr
which would it be?

@priyanshu2210
Copy link

@titu1994 I am having the same issue, as I am new to this I am unable to process your recommendations of March 16 , Thank you so much for uploading source code It helps me understanding a few details. Thank you again for helping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants