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

not enough values to unpack (expected 3, got 2) #30

Open
zylee233 opened this issue Jan 11, 2019 · 3 comments
Open

not enough values to unpack (expected 3, got 2) #30

zylee233 opened this issue Jan 11, 2019 · 3 comments

Comments

@zylee233
Copy link

Traceback (most recent call last):
File "run_model.py", line 50, in
tf.app.run()
File "D:\Anaconda3\envs\tf18\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
_sys.exit(main(argv))
File "run_model.py", line 42, in main
deblur.test(args.height, args.width, args.input_path, args.output_path)
File "F:\python\SRN-Deblur-master\models\model.py", line 282, in test
h, w, c = blur.shape
ValueError: not enough values to unpack (expected 3, got 2)

If the Bit Resolution of a picture is 8, there will be error.
Then I change "blur = scipy.misc.imread(os.path.join(input_path, imgName))" to blur = scipy.misc.imread(os.path.join(input_path, imgName),mode='RGB') and solve it.

@jiangsutx
Copy link
Owner

I think your image has only one channel ?
Then you can use --model=gray and modify a little the code to process only one channel.

@zylee233 zylee233 reopened this Jun 17, 2019
@zylee233
Copy link
Author

I think your image has only one channel ?
Then you can use --model=gray and modify a little the code to process only one channel.

There're three channels, i'm sure.

@jiangsutx
Copy link
Owner

Actually, you can check blur.shape to see what exactly it is.

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

2 participants