jiangsutx / SRN-Deblur

Repository for Scale-recurrent Network for Deep Image Deblurring
http://www.xtao.website/projects/srndeblur/srndeblur_cvpr18.pdf
MIT License
719 stars 185 forks source link

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

Open zylee233 opened 5 years ago

zylee233 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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