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

Error in opening pdf and labels #16

Closed
mu745511 opened this issue Apr 29, 2021 · 1 comment
Closed

Error in opening pdf and labels #16

mu745511 opened this issue Apr 29, 2021 · 1 comment

Comments

@mu745511
Copy link

Hi there , thanx for this wonderful library i am getting this error is it because of the directory management i think , i have a dataset of masks where i have sampled it to pdf and the labels but they are on separate directory but have a same root folder , i am not able to create a tiledataset using your RandomTileDataset or TileDataset the path that i am using is '/content/masks_scale2/' and it has two sub folders labels and pdf

/usr/local/lib/python3.7/dist-packages/deepflash2/data.py in _read_msk(path, n_classes, instance_labels, **kwargs)
268 msk = tifffile.imread(path, **kwargs)
269 else:
--> 270 msk = imageio.imread(path, **kwargs)
271 if not instance_labels:
272 if np.max(msk)>n_classes:

/usr/local/lib/python3.7/dist-packages/imageio/core/functions.py in imread(uri, format, **kwargs)
219
220 # Get reader and read first
--> 221 reader = read(uri, format, "i", **kwargs)
222 with reader:
223 return reader.get_data(0)

/usr/local/lib/python3.7/dist-packages/imageio/core/functions.py in get_reader(uri, format, mode, **kwargs)
137 if format is None:
138 raise ValueError(
--> 139 "Could not find a format to read the specified file " "in mode %r" % mode
140 )
ValueError: Could not find a format to read the specified file in mode 'i'

@mu745511
Copy link
Author

Found the solution :- i was not using the correct file path :) Thanx for this wonderful library though !

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