Skip to content

Add channel_wise option to RandShiftIntensity and RandScaleIntensity #6629

Closed

Description

@philnovv

It is very common practice to independently augment intensities of separate modalities. Yet currently RandShiftIntensity and RandScaleIntensity do not have this option, and instead randomly shift/scale along all channels at once.

It is noteworthy that RandStdShiftIntensity has a "channel_wise" option to do just this. I suggest we add a similar option to RandShiftIntensity and RandScaleIntensity.

Activity

  1. KumoLiu commented on Jun 28, 2023

    @KumoLiu
    Contributor

    Hi @philnovv, I think for RandScaleIntensity and RandShiftIntensity since we will randomly choose a factor or offset then no matter do it channel_wise or not, the result will be the same. Or do you mean randomly select a factor or offset for each channel?
    If I have misunderstood, just correct me.
    Thanks!

  2. philnovv commented on Jul 19, 2023

    @philnovv
    Author

    Hi @KumoLiu, the latter is what I mean. The option to randomly select and apply a factor/offset for each channel would be (I think) more closely aligned with standard practice.

  3. philnovv commented on Jul 19, 2023

    @philnovv
    Author

    BTW this applies to all intensity-based augmentation transforms. For example we may want to apply random blurring with an independent blurring kernel for each channel. This makes sense as an augmentation strategy because the different contrasts in real-world multi-contrast images are often acquired with very different resolutions/slice thicknesses etc...

  4. added a commit that references this issue on Sep 22, 2023
    62d5d79
  5. added a commit that references this issue on Sep 22, 2023
    c21df49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions