Colorizing-with-GANs icon indicating copy to clipboard operation
Colorizing-with-GANs copied to clipboard

Test image not working

Open urikobi opened this issue 6 years ago • 2 comments

Are there instruction on how to test using my own pictures? Trying to use a picture and got the error Cannot feed value of shape (1,240,159,1,3) for tensor 'input_gray:0', which has shape '(?,?,?, 1)'

urikobi avatar Aug 21 '19 08:08 urikobi

It expects a 1-color-channel image (-> greyscale), said with shape '(?,?,?, 1)'. A regular color image has 3 channels, just as your image input as you can see your shape has these 3 channels in the last number. So you have to convert your 3-channel color image to a 1-channel one. Or google for one for testing.

xAnatoliDick avatar Sep 15 '19 22:09 xAnatoliDick

As mentioned in Issue #12 you can change one line to convert the color image to 1-channel greyscale directly 'In dataset.py changed line 147 to: img = imread(path, mode='L') from img = imread(path). Now the shape is (1, 184, 274, 1).'

xAnatoliDick avatar Sep 15 '19 22:09 xAnatoliDick