-
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
Full lazy resampling implementation #6011
Conversation
…es, manually merged with updated dev Signed-off-by: Ben Murray <ben.murray@gmail.com>
…hat the default hasn't been modified yet). Adding tests for functional resize Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
…skeleton of consolidated resampler; bug fixes on randomizers Signed-off-by: Ben Murray <ben.murray@gmail.com>
…ies (moved traits to traits.py, moved transforms.utils classes that call back into compose.py out of transforms.utils.py); minor fix to apply_transforms Signed-off-by: Ben Murray <ben.murray@gmail.com>
… new compose inverse; minor miscellaneous fixes
… across from old branch; bug fix for swapped parameters in DiscreteRandomizer Signed-off-by: Ben Murray <ben.murray@gmail.com>
Hi @atbenmurray , Sorry I didn't follow all the previous discussions, could you please help provide a typical usage example of your proposal? Thanks in advance. |
Let me prepare something to illustrate how it can work.
For now I'll say the following:
The ultimate goal of compose compiler is to take a number of disparate
mechanisms in different areas of the code base and make them more easily
able to work together because they make use of common mechanisms. The way
it does this is to modify the user-provided sequence of transforms using
transforms designed for that purpose. Each of the features that compose
compile implements can be "switched on" independently:
1. Lazy resampling is needed right away: what it does is add ApplyResample
objects where they are needed in the pipeline
2. Multi-sampling modifies the pipeline so that the transforms downstream
of a multisample transform are contained within a Transform that can run
those multiple samples efficiently. Initially I thought it might be
required to not increase the required memory, but it looks like it might
not be
3. Caching modifies the pipeline so that the cacheable transforms are
separated from the remaining transforms and put into a CachedTransform
object. This isn't needed at all unless we are happy that the replacement
functionality is fully ready
I'm more than happy to talk you through the various mechanisms, of course.
Best,
Ben
…On Thu, 16 Feb 2023 at 12:08, Nic Ma ***@***.***> wrote:
Hi @atbenmurray <https://github.com/atbenmurray> ,
Sorry I didn't follow all the previous discussions, could you please help
provide a typical usage example of your proposal?
I don't quite understand how to use the ComposeCompiler.
Seems it refactored several important components of MONAI: multi-sampling,
caching and lazy-resampling? I think we should avoid breaking change as
we are already in v1.1, especially the user API.
Thanks in advance.
—
Reply to this email directly, view it on GitHub
<#6011 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUU3YMSFMMIRYTY3W5WIJDWXYKDPANCNFSM6AAAAAAU56EVUM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…unctions, consolidated resampler work including unit_translate test function Signed-off-by: Ben Murray <ben.murray@gmail.com>
…to MetaMatrix initialisation matrix identification code Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
…rng; bug fixes for rand spatial array lazy transforms
…lasses Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
Signed-off-by: Ben Murray <ben.murray@gmail.com>
could you please clean up the unused LR related branches @atbenmurray ? https://github.com/Project-MONAI/MONAI/branches |
Yep, there are a few that can go |
sure, thanks, all of us use forks to develop instead of creating branches in this primary repo. I'll make a backup of these branches and remove them. |
…ing code Signed-off-by: Ben Murray <ben.murray@gmail.com>
Renamed lazy_evaluation parameters to lazy Added tests for flip function Removed redundant Croppadd class Signed-off-by: Ben Murray <ben.murray@gmail.com>
functions to be called by resample Signed-off-by: Ben Murray <ben.murray@gmail.com>
…ive resampler Signed-off-by: Ben Murray <ben.murray@gmail.com>
Closing this PR, as the initial prototype design is already on the dev branch, and this branch diverged. (This branch is backed up here https://github.com/wyli/MONAI/tree/lr_development) |
@wyli. This pr and branch should not have been closed and deleted. This is ongoing work that was paused to ensure that the 1.2 lazy resampling was ready for release. This could easily have been handled by asking me if this branch was still relevant. This work is still the v+1 (full) lazy resampling implementation and is still the ultimate design goal for it. |
Could you please start from your fork? |
@wyli, if you would like me to move this branch to my fork for further development (as I understand we are moving a purely fork-based contribution model) then I am happy to do so. I will then delete this branch subsequent to doing so. |
Please leave the development branch intact for the time being, until I have ensured that the fork is intact and up to date. |
Sure, I'll keep the branch till the end of this month. And then remove it to avoid any confusions. |
I'll remove it later today when I am happy that the fork is fine. |
Refactor of compose, transforms and related functionality deliver full lazy resampling functionality. This PR reworks the spatial transforms to decouple the description of the transform from the execution of the transform, as per the design specified in #4855. It also decouples compose from various sources of modification to a sequence of transforms that may occur due to multi-sampling, lazy execution, caching, and potential other augmentations, through the provision of a compose compiler.
Description
Key: n - not done, p - partial, c - code complete
Refactored transforms:
Compose
Consolidated resample
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.