You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WSIReader is now imported from from monai.data.wsi_reader import WSIReader. If changing the import to the old way (now deprecated) from monai.data.image_reader import WSIReader, and setting backend=tifffile, then training is ~10% faster. seems like a performance regression.
Training time on 8gpu, 1 epoch
from monai.data.wsi_reader import WSIReader, (backend=cucim) 313 seconds
from monai.data.wsi_reader import WSIReader, (backend=tiffile) 303 seconds
from monai.data.image_reader import WSIReader, (backend=tiffile) 283 seconds
The text was updated successfully, but these errors were encountered:
Hi @myron, thank you very much for reporting this. I have investigated this issue and realized that the root cause is an "unnecessary" array copy in the wsi_reader.WSIReader. After fixing this, wsi_reader.WSIReader seems to be faster than image_reader.WSIReader (see blow). I will submit the PR momentarily. It would be great if you can check the run time of MIL tutorial after the PR is merged. Thanks
Fixes#5580
### Description
This PR remove an "unnecessary" array copy in WSITiffFileReader, which
was causing an slow down in loading whole slide images.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
okay, there was a very short time window for me to test it before merging. but since it's already merged, I'll just test it a bit later, when I get to it. But thank you for debugging and fixing it!
with pathology MIL classification tutorial, as an example
https://github.com/Project-MONAI/tutorials/blob/main/pathology/multiple_instance_learning/panda_mil_train_evaluate_pytorch_gpu.py
WSIReader is now imported from
from monai.data.wsi_reader import WSIReader
. If changing the import to the old way (now deprecated)from monai.data.image_reader import WSIReader
, and setting backend=tifffile, then training is ~10% faster. seems like a performance regression.Training time on 8gpu, 1 epoch
The text was updated successfully, but these errors were encountered: