Skip to content
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

Monai equivalent to tio.OneOf transform? (ETA 8/13) #1847

Closed
neuronflow opened this issue Mar 25, 2021 · 9 comments · Fixed by #2551
Closed

Monai equivalent to tio.OneOf transform? (ETA 8/13) #1847

neuronflow opened this issue Mar 25, 2021 · 9 comments · Fixed by #2551
Labels
Feature request Module: transform data transforms for preprocessing and postprocessing. WG: Transforms For the transforms working group

Comments

@neuronflow
Copy link
Contributor

Is your feature request related to a problem? Please describe.
sometimes it is useful to have multiple augmentation paths

Describe the solution you'd like
I am a fan of tio.OneOf
https://torchio.readthedocs.io/_modules/torchio/transforms/augmentation/composition.html#OneOf

Describe alternatives you've considered
currently I use the tio function
Additional context
I find it so useful that I think it should be part of monai core.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Mar 29, 2021

Hi @neuronflow ,

May I know what's the usage case of this transform? What's the difference between a list of random transforms with different probabilities?

Thanks.

@neuronflow
Copy link
Contributor Author

@Nic-Ma sorry I missed your response. The difference is that only one of the transforms will be picked from the list. While in the the other case you can end up with 0 to n transforms.

You could use it if you want to run an affine OR elastic transformation on your data but not both.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Apr 15, 2021

Hi @wyli @ericspod @rijobro ,

Sounds interesting, what do you guys think about this feature?
Thanks.

@ericspod
Copy link
Member

Imgaug uses these sorts of meta-augments as does other libraries like albumentations. Adding the meta-transforms for doing a sequence of transforms (sometimes) or selecting from a list (someof or oneof) wouldn't be difficult. These would be treated like any other randomized transform and not cached by dataset classes.

@neuronflow
Copy link
Contributor Author

Yes, OneOf and SomeOf would be highly appreciated :)

@wyli wyli added Module: transform data transforms for preprocessing and postprocessing. WG: Transforms For the transforms working group labels May 13, 2021
@lyndonboone
Copy link
Contributor

Hi @wyli , has anybody started working on this yet? If not, would you like me to try to submit a PR?

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Jun 28, 2021

Hi @lyndonboone ,

Thanks for your interest here, welcome your contribution if you like.
I think maybe you can make it as subclass of Compose or another Compose mechanism, @wyli @ericspod @rijobro what do you think?

Thanks.

@wyli
Copy link
Contributor

wyli commented Jun 28, 2021

Sure, sounds great @lyndonboone @Nic-Ma . I haven't looked into the details about how to implement this, but happy to help review/revise the PRs.

@lyndonboone
Copy link
Contributor

@Nic-Ma @wyli great. I'll start to put something together for it.

Thanks!

@lyndonboone lyndonboone mentioned this issue Jul 7, 2021
7 tasks
@wyli wyli added this to the Kaggle usable components milestone Jul 26, 2021
@wyli wyli changed the title Monai equivalent to tio.OneOf transform? Monai equivalent to tio.OneOf transform? (Sept/2) Jul 26, 2021
@wyli wyli changed the title Monai equivalent to tio.OneOf transform? (Sept/2) Monai equivalent to tio.OneOf transform? Jul 26, 2021
@deepib deepib changed the title Monai equivalent to tio.OneOf transform? Monai equivalent to tio.OneOf transform? (ETA 8/13) Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Module: transform data transforms for preprocessing and postprocessing. WG: Transforms For the transforms working group
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants