-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
LoadImageD performance #3322
Comments
Hi @myron, MONAI/monai/transforms/io/array.py Line 215 in fb66ba0
which should cause that much of overhead since in this scenario data is already in @Nic-Ma are you aware of any overhead that |
result summary:
this runs fast. I suggest we make a PR for it, we can compare if dtype matches the provided type, and if they don't match do the conversion |
Hi @myron , Thanks for your interesting experiments. Thanks. |
Mark: I will try to check all the transforms for this converting issue next week. Thanks. |
|
how interesting. I wasn't aware of that @Nic-Ma @wyli I think we should use astype(copy=False) everywhere in the Monai codebase, I see no downsides only an advantage. Especially in all the loading/augmentation transforms. We'll get performance improvements, and and less memory peak pressure |
Hi @myron , Thanks for your suggestion, I will try to make it clear next week, also for Tensor data. Thanks. |
Hi @myron , Could you please help try again with Thanks in advance. |
I tried it and np.asarray(data, dtype=np.uint8) is Fast (as fast as not attempting the data conversion) |
Hi @myron , Sorry maybe I didn't make it clear.
Thanks. |
ok, nice! |
@drbeh @Nic-Ma
Can I ask, why is LoadImageD with WSIReader is slower than WSIReader directly (both use tiffile backend)
#3251
wsi time 0.02141376216002185 transform_time time 0.026847357701773596
which is 20% slower, and my overall code runs 10% slower
The text was updated successfully, but these errors were encountered: