pavelgonchar / colornet

Neural Network to colorize grayscale images
3.56k stars 324 forks source link

not find jpg files #16

Open favouriter opened 6 years ago

favouriter commented 6 years ago

filenames = sorted(glob.glob("../colornet//.jpg")) File "train.py", line 179, in colorimage = input_pipeline(filenames, batch_size, num_epochs=num_epochs) File "train.py", line 31, in input_pipeline filenames, num_epochs=num_epochs, shuffle=False)

RibbonsAlmark commented 5 years ago

filenames = sorted(glob.glob("../colornet//.jpg")) File "train.py", line 179, in colorimage = input_pipeline(filenames, batch_size, num_epochs=num_epochs) File "train.py", line 31, in input_pipeline filenames, num_epochs=num_epochs, shuffle=False)

This problem cause by:

filenames = sorted(glob.glob("../colornet//.jpg"))

at line 8 of train.py.Program can't find any .jpg file under this direction because all images are .png form.You can solve this problem by put some jpg image files in this direction or just change this line into:

filenames = sorted(glob.glob("../colornet//"))

yes,just remove the '.jpg'..........=.= But another bug will appear:

Traceback (most recent call last): File "train.py", line 185, in grayscale = tf.concat(3, [grayscale, grayscale, grayscale]) File "/root/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper return target(*args, **kwargs) File "/root/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py", line 1297, in concat tensor_shape.scalar()) File "/root/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 1103, in assert_is_compatible_with raise ValueError("Shapes %s and %s are incompatible" % (self, other)) ValueError: Shapes (3, 1, 224, 224, 1) and () are incompatible

I'm still work on it now. =.=

PS: My English is sucks,So I will appreciate whoever point out any mistake I made in this answer

Rive4 commented 4 years ago

Any update about shape error? @RibbonsAlmark