image-analogies
image-analogies copied to clipboard
Mismatch of Images
I get this error when I run the app with images I insert, I check with numpy/cv2 and they have the same shape, so I was wondering where this error is coming from?
Using Theano backend.
/usr/local/lib/python2.7/site-packages/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
"downsample module has been moved to the theano.tensor.signal.pool module.")
Theano CPU mode detected. Forcing a-scale-mode to "match"
Using PatchMatch model
Scale factor 0.25 "A" shape (1, 4, 132, 186) "B" shape (1, 3, 132, 186)
Building loss...
Precomputing static features...
Traceback (most recent call last):
File "/usr/local/bin/make_image_analogy.py", line 27, in
Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer): File "/usr/local/lib/python2.7/site-packages/keras/layers/convolutional.py", line 496, in get_output X = self.get_input(train) File "/usr/local/lib/python2.7/site-packages/keras/layers/core.py", line 175, in get_input previous_output = self.previous.get_output(train=train) File "/usr/local/lib/python2.7/site-packages/keras/layers/convolutional.py", line 312, in get_output X = self.get_input(train) File "/usr/local/lib/python2.7/site-packages/keras/layers/core.py", line 175, in get_input previous_output = self.previous.get_output(train=train) File "/usr/local/lib/python2.7/site-packages/keras/layers/convolutional.py", line 763, in get_output X = self.get_input(train) File "/usr/local/lib/python2.7/site-packages/keras/layers/core.py", line 175, in get_input previous_output = self.previous.get_output(train=train) File "/usr/local/lib/python2.7/site-packages/keras/layers/convolutional.py", line 317, in get_output filter_shape=self.W_shape) File "/usr/local/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 624, in conv2d filter_shape=filter_shape)
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
Input and Output images must both be 2-dimensional, 3-dimensional, etc.
If you go into image-analogies/main.py you'll see on line 65 the method for getting dimensions from from image_analogy import img_utils, vgg16 and this will help to troubleshoot the problem.
Make sure your images do not contain an alpha channel. You can check with
identify -verbose your_image.png
To switch it off
convert -alpha off your_image.png new_image.png