Colorspace Transformations
ByteToFloat
- class augmax.ByteToFloat(input_types: Array | Tuple[Array | Tuple[PyTree, ...] | List[PyTree] | Dict[Hashable, PyTree] | InputType | None, ...] | List[Array | Tuple[PyTree, ...] | List[PyTree] | Dict[Hashable, PyTree] | InputType | None] | Dict[Hashable, Array | Tuple[PyTree, ...] | List[PyTree] | Dict[Hashable, PyTree] | InputType | None] | InputType | None = None)[source]
Transforms images from uint8 representation (values 0-255) to normalized float representation (values 0.0-1.0)
Augmentation Examples for ByteToFloat()
Normalize
- class augmax.Normalize(mean: Array = array([0.485, 0.456, 0.406]), std: Array = array([0.229, 0.224, 0.225]), input_types=None)[source]
Normalizes images using given coefficients using the mapping
\[p_k \longmapsto \frac{p_k - \mathtt{mean}_k}{\mathtt{std}_k}\]- Parameters:
mean (jnp.ndarray) – Mean values for each channel
std (jnp.ndarray) – Standard deviation for each channel
Augmentation Examples for Normalize()
ChannelShuffle
- class augmax.ChannelShuffle(p: float = 0.5, input_types=None)[source]
Randomly shuffles an images channels.
- Parameters:
p (float) – Probability of applying the transformation
Augmentation Examples for ChannelShuffle(p=1.0)
ChannelDrop
- class augmax.ChannelDrop(p: float = 0.5, input_types=None)[source]
Randomly drops a channelf from the image
- Parameters:
p (float) – Probability of applying the transformation
Augmentation Examples for ChannelDrop(p=1.0)
RandomGrayscale
- class augmax.RandomGrayscale(p: float = 0.5, input_types=None)[source]
Randomly converts the image to grayscale.
- Parameters:
p (float) – Probability of applying the transformation
Augmentation Examples for RandomGrayscale(p=1.0)
RandomBrightness
- class augmax.RandomBrightness(range: Tuple[float, float] = (-1.0, 1.0), p: float = 0.5, input_types=None)[source]
Randomly adjusts the image brightness.
- Parameters:
range (float, float)
p (float) – Probability of applying the transformation
Augmentation Examples for RandomBrightness(p=1.0)
RandomContrast
- class augmax.RandomContrast(range: Tuple[float, float] = (-1.0, 1.0), p: float = 0.5, input_types=None)[source]
Randomly adjusts the image contrast.
- Parameters:
range (float, float)
p (float) – Probability of applying the transformation
Augmentation Examples for RandomContrast(p=1.0)
RandomGamma
- class augmax.RandomGamma(range: Tuple[float, float] = (0.25, 4.0), p: float = 0.5, input_types=None)[source]
Randomly adjusts the image gamma.
- Parameters:
range (float, float)
p (float) – Probability of applying the transformation
Augmentation Examples for RandomGamma(p=1.0)
RandomChannelGamma
- class augmax.RandomChannelGamma(range: Tuple[float, float] = (0.25, 4.0), p: float = 0.5, input_types=None)[source]
Randomly adjusts each channel’s gamma.
- Parameters:
range (float, float)
p (float) – Probability of applying the transformation
Augmentation Examples for RandomChannelGamma(p=1.0)
ColorJitter
- class augmax.ColorJitter(brightness: float = 0.1, contrast: float = 0.1, saturation: float = 0.1, hue: float = 0.1, p: float = 0.5, input_types=None)[source]
Randomly jitter the image colors.
- Parameters:
range (float, float)
p (float) – Probability of applying the transformation
Augmentation Examples for ColorJitter(p=1.0)
Solarization
- class augmax.Solarization(threshold: float = 0.5, p: float = 0.5, input_types=None)[source]
Randomly solarizes the image.
- Parameters:
range (float, float)
p (float) – Probability of applying the transformation
Augmentation Examples for Solarization(p=1.0)