AdjustContrast
does what commonly called gamma correction
#6027
Replies: 2 comments
-
Hi @function2-llx, we could already use PyTorch TorchVision transform based on the specified transform name and args. Here is an example. https://github.com/Project-MONAI/tutorials/blob/4d4c565c681fd7df0b01889c9d599b9b73e0b401/pathology/hovernet/training.py#L209-L216 For the naming convention, do you have some comments here @wyli? |
Beta Was this translation helpful? Give feedback.
-
@KumoLiu Thank you for the reply. Yes, we can use torchvision-based transform, though we cannot specify the probability (no |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Seems like what
AdjustContrast
transformation does is commonly called "gamma correction". The operation of contrast adjustment is commonly defined as multiplying some factor (possibly blending with (1-factor) * mean). The link provided in #114, torchvision implementation for adjust_contrast, adjust_gamma, and Pillow suggest the same naming convention.This can be confusing sometimes, e.g., in #5535, when talking about
AdjustContrast
in MONAI, one may refer toadjust_contrast
in torchvision (like this comment), while they do different stuffs.Shall we consider renaming this? Or maybe we're supposed to used
ColorJitter
from torchvision in this case.MONAI/monai/transforms/intensity/array.py
Lines 801 to 809 in f5708ea
Beta Was this translation helpful? Give feedback.
All reactions