-
Notifications
You must be signed in to change notification settings - Fork 25
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
Issue reading the images. #3
Comments
Hi Fernando,
The TIF file format of the Camelyon dataset cannot be read by the built-in
python functions, such as "misc.imread". To do so, you need to use the
OpenSlide library as described on the Camelyon website and forum.
Apart from this implementation issue, the released colour normalization
code works with the image patches and not the Whole-Slide Images (WSIs). It
is better you first extract some patches (this can be a very big piece of
the image from each slides, and saved them as jpg or tif file) from the
Camelyon data for training the colour normalization model.
I hope this answers your question.
Best,
Farhad
…On Fri, 7 Sep 2018 at 17:54, Fernando Pérez ***@***.***> wrote:
Dear Farhad,
I'm having issues with your code when I try to read some .tif images from
de Camelyon dataset. I get the following error:
Traceback (most recent call last):
File "Stain_Color_Normalization.py", line 116, in
main()
File "Stain_Color_Normalization.py", line 38, in main
db = SampleProvider("Train_dataset", config.data_dir, config.fileformat,
config.image_options, is_train)
File "./StainNorm/Sample_Provider.py", line 18, in *init*
self._read_images()
File "./StainNorm/Sample_Provider.py", line 35, in _read_images
self.images_org = np.array([misc.imread(filename) for filename in
self.files])
File
"./anaconda3/envs/PaStain27/lib/python2.7/site-packages/numpy/lib/utils.py",
line 101, in newfunc
return func(*args, **kwds)
File
"./anaconda3/envs/PaStain27/lib/python2.7/site-packages/scipy/misc/pilutil.py",
line 164, in imread
im = Image.open(name)
File
"./anaconda3/envs/PaStain27/lib/python2.7/site-packages/PIL/Image.py", line
2622, in open
% (filename if filename else fp))
IOError: cannot identify image file './CAMELYON17/patient_015_node_0.tif'
I think that it might be something related to the PIL version or usage.
Could you please let me know how you avoid this issue?
Thanks in advance,
Fernando.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ5xaApksdUzD3iA-dhW6tOOn3Kb1Pn5ks5uYpbBgaJpZM4WfE4f>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Farhad,
I'm having issues with your code when I try to read some .tif images from de Camelyon dataset. I get the following error:
Traceback (most recent call last):
File "Stain_Color_Normalization.py", line 116, in
main()
File "Stain_Color_Normalization.py", line 38, in main
db = SampleProvider("Train_dataset", config.data_dir, config.fileformat, config.image_options, is_train)
File "./StainNorm/Sample_Provider.py", line 18, in init
self._read_images()
File "./StainNorm/Sample_Provider.py", line 35, in _read_images
self.images_org = np.array([misc.imread(filename) for filename in self.files])
File "./anaconda3/envs/PaStain27/lib/python2.7/site-packages/numpy/lib/utils.py", line 101, in newfunc
return func(*args, **kwds)
File "./anaconda3/envs/PaStain27/lib/python2.7/site-packages/scipy/misc/pilutil.py", line 164, in imread
im = Image.open(name)
File "./anaconda3/envs/PaStain27/lib/python2.7/site-packages/PIL/Image.py", line 2622, in open
% (filename if filename else fp))
IOError: cannot identify image file './CAMELYON17/patient_015_node_0.tif'
I think that it might be something related to the PIL version or usage. Could you please let me know how you avoid this issue?
Thanks in advance,
Fernando.
The text was updated successfully, but these errors were encountered: