emilwallner / Coloring-greyscale-images

Coloring black and white images with deep learning.
MIT License
1.03k stars 227 forks source link

Failed to run #5

Closed ChrisFH97 closed 5 years ago

ChrisFH97 commented 6 years ago

X = np.array(X, dtype=float) ValueError: setting an array element with a sequence on Line 15

Any reason why this would happen

joshink commented 5 years ago

Better late than never...

You're loading images with different sizes which makes it impossible for numpy to determine the dimensions. I used opencv to resize, but you can use PIL or skimage.

import cv2

X = np.array([cv2.resize(i, (256, 256)) for i in X], dtype=float)