`WSIReader` does not support `TiffFile` backend
See original GitHub issueimage_reader.WSIReader
supports tifffile (https://github.com/Project-MONAI/MONAI/blob/e4624678cc15b5a5670776715c935279f7837c89/monai/data/image_reader.py#L1257), but it does not supported in wsi_reader.WSIReader
. Can I ask what is the purpose here to remove the supports?
I’m not sure but it seems tifffile
loads faster in some cases.
For example:
Issue Analytics
- State:
- Created a year ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Source code for monai.data.image_reader
This function must return two objects, the first is a numpy array of image data, the second is a dictionary of metadata. Args:...
Read more >imageio.plugins.tifffile
Backend: internal. Provides support for a wide range of Tiff images using the tifffile backend. ... If 1, no prediction scheme was used...
Read more >CHANGELOG.md · Gitee 极速下载/MONAI - Gitee.com
Fixed issue of not skipping post activations in Convolution when input ... Issue of WSIReader when the backend is TiffFile; Issue of deprecated_args...
Read more >An End-to-End Toolbox for Advanced Tissue Image Analytics
However, OpenSlide does not support several image formats. For ... OpenSlide5 backend, OME-TIFF files using a tifffile ...
Read more >pandas remove trailing zeros from float - Kantam projects
Convert the bounding boxes of the current mode to corners. backend the name ... WebWe would like to show you a description here...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @yiheng-wang-nv and @drbeh
Image information
Test code
This is the result
@yiheng-wang-nv Since MONAI’s image loader force to have
channel first
tensor, if your pipeline works good withchannel last
tensor, please use cuCIM directly (14 secs-> 6 secs for 1 thread, 14 -> 1 sec for 32 thread)And you can also get similar data with the image loaded by MONAI if you directly use cuCIM. In this case, you can use multithreadeds to load the image faster (5 secs) And if you use MONAI with the patch (https://github.com/Project-MONAI/MONAI/pull/4934) applied, monai cucim loader will get a similar performance with using cuCIM directly (14 secs -> 10 secs).
In current MONAI’s implementation, cuCIM backend has a disadvantage over tifffile backend (For tifffile backend, converting to contiguous array is applied first before converting data type [uint8 -> float32] ).
I think that could be a reason for the differences in a different system.
With #4934 applied, I can see the following results (14 secs to 10 secs for monai cucim loader)
Since data type and tensor shape conversion takes time, it might be a good idea to do that in GPU.
cc @grlee77 @jakirkham
FWIW,
006388_0.tif
is not really a WSI, more a regular TIFF: no pyramid levels, wrong resolution metadata, small tiles, ZIP compression, horizontal predictor.