Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

('DATASET/.../0.tiff'): can't open/read file: check file path/integrity #3

Open
Utricularor opened this issue Aug 25, 2022 · 1 comment

Comments

@Utricularor
Copy link

python 020_cropper_yellow.py --start_from_zero

The following error occurred when executing the above command.

[ WARN:[email protected]] global /io/opencv/modules/imgcodecs/src/loadsave.cpp (239) findDecoder imread_('DATASET/train_val/full_size/all_images/images/0.tiff'): can't open/read file: check file path/integrity

Since you just changed image_ids to .tiff and did not convert the train_val images to .tiff of the dataset, the argument 'images_path+image_id' passed to cv2.imread() is 'DATASET/... /0.tiff', which doesn't exist in the path.

Therefore, the cv2.imread(images_path + image_id) in utils.py is causing the error.

Should I have done something before running 020_cropper_yellow.py?

@Utricularor
Copy link
Author

I make some lines commentout.

68#Number = [int(num.split('.')[0]) for num in image_ids]
69#Number.sort()
70#image_ids = [str(num) + '.tiff' for num in Number]

And then, this worked.

python 020_cropper_yellow.py --start_from_zero

I'll keep this issue open, because I'm not sure if this change will affect in the future.

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

No branches or pull requests

1 participant