Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

'Image is None' Problem #48

Closed
jiyoungAn opened this issue May 25, 2018 · 5 comments
Closed

'Image is None' Problem #48

jiyoungAn opened this issue May 25, 2018 · 5 comments

Comments

@jiyoungAn
Copy link

Hello, JiahuiYu.
Thank you for answering me.
However, I got this error again..
[2018-05-25 17:43:37 @data_from_fnames.py:153] image is None, sleep this thread for 0.1s. Exception in thread Thread-16: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.5/dist-packages/neuralgym/data/feeding_queue_runner.py", line 194, in _run data = func() File "/usr/local/lib/python3.5/dist-packages/neuralgym/data/data_from_fnames.py", line 143, in <lambda> feed_dict_op=[lambda: self.next_batch()], File "/usr/local/lib/python3.5/dist-packages/neuralgym/data/data_from_fnames.py", line 182, in next_batch img = cv2.resize(img, tuple(self.shapes[i][:-1])) cv2.error: /io/opencv/modules/imgproc/src/resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

It seems like there is no image.
I used code in #15 for creating flist.
They are all in "data_flist" file.
At inpaint.yml, I add DATA_FLIST: city: ['data_flist/city/train_shuffled.flist','data_flist/city/validation_shuffled.flist']
and Set dataset as city.

Below is log about my Dataset
[2018-05-25 17:42:59 @dataset.py:26] --------------------------------- Dataset Info --------------------------------- [2018-05-25 17:42:59 @dataset.py:36] fn_preprocess: None [2018-05-25 17:42:59 @dataset.py:36] file_length: 726 [2018-05-25 17:42:59 @dataset.py:36] return_fnames: False [2018-05-25 17:42:59 @dataset.py:36] nthreads: 16 [2018-05-25 17:42:59 @dataset.py:36] batch_phs: [<tf.Tensor 'Placeholder:0' shape=(?, 256, 256, 3) dtype=float32>] [2018-05-25 17:42:59 @dataset.py:36] dtypes: [tf.float32] [2018-05-25 17:42:59 @dataset.py:36] index: 0 [2018-05-25 17:42:59 @dataset.py:36] queue_size: 256 [2018-05-25 17:42:59 @dataset.py:36] filetype: image [2018-05-25 17:42:59 @dataset.py:36] enqueue_size: 32 [2018-05-25 17:42:59 @dataset.py:36] random_crop: False [2018-05-25 17:42:59 @dataset.py:36] random: False [2018-05-25 17:42:59 @dataset.py:36] shapes: [[256, 256, 3]] [2018-05-25 17:42:59 @dataset.py:37] --------------------------------------------------------------------------------

What should I do?
Thank you.

@jiyoungAn
Copy link
Author

It was my mistake.
sorry I solved it! thank you

@Lsiming
Copy link

Lsiming commented Jul 18, 2018

@jiyoungAn Hi~ How did you solve this problem? I have the same problem

@JiahuiYu
Copy link
Owner

@Lsiming Please check carefully of your file list locations. Issue #15 is a reference.

@QishengLi
Copy link

New to DL here...

I am also having the same problem. The log information from Dataset Info was all correct (having the correct length, etc.), and the paths in filelist is the absolute path and have been tested (e.g. cv2.imread(path) will work).

Where else could the problem be? Any help is appreciated!

@JiahuiYu
Copy link
Owner

JiahuiYu commented Aug 3, 2019

@QishengLi Hi thanks for your interest first.

You can try to print inside the DataFromFNames function in our neuralgym code. I would still believe the problem is the path is incorrect. Double check the file paths especially if you are using Windows.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants