-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
570 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Module invertransforms.color | ||
============================ | ||
Color Module | ||
|
||
This modules contains transformations on the image channels (RBG, grayscale). | ||
Generally this transformation cannot be reversed or it simply makes not much sense. | ||
|
||
Classes | ||
------- | ||
|
||
`ColorJitter(brightness=0, contrast=0, saturation=0, hue=0)` | ||
: Randomly change the brightness, contrast and saturation of an image. | ||
|
||
Args: | ||
brightness (float or tuple of float (min, max)): How much to jitter brightness. | ||
brightness_factor is chosen uniformly from [max(0, 1 - brightness), 1 + brightness] | ||
or the given [min, max]. Should be non negative numbers. | ||
contrast (float or tuple of float (min, max)): How much to jitter contrast. | ||
contrast_factor is chosen uniformly from [max(0, 1 - contrast), 1 + contrast] | ||
or the given [min, max]. Should be non negative numbers. | ||
saturation (float or tuple of float (min, max)): How much to jitter saturation. | ||
saturation_factor is chosen uniformly from [max(0, 1 - saturation), 1 + saturation] | ||
or the given [min, max]. Should be non negative numbers. | ||
hue (float or tuple of float (min, max)): How much to jitter hue. | ||
hue_factor is chosen uniformly from [-hue, hue] or the given [min, max]. | ||
Should have 0<= hue <= 0.5 or -0.5 <= min <= max <= 0.5. | ||
|
||
### Ancestors (in MRO) | ||
|
||
* torchvision.transforms.transforms.ColorJitter | ||
* invertransforms.util.invertible.Invertible | ||
|
||
`Grayscale(num_output_channels=1)` | ||
: Convert image to grayscale. | ||
|
||
Args: | ||
num_output_channels (int): (1 or 3) number of channels desired for output image | ||
|
||
Returns: | ||
PIL Image: Grayscale version of the input. | ||
- If num_output_channels == 1 : returned image is single channel | ||
- If num_output_channels == 3 : returned image is 3 channel with r == g == b | ||
|
||
### Ancestors (in MRO) | ||
|
||
* torchvision.transforms.transforms.Grayscale | ||
* invertransforms.util.invertible.Invertible | ||
|
||
`RandomGrayscale(p=0.1)` | ||
: Randomly convert image to grayscale with a probability of p (default 0.1). | ||
|
||
Args: | ||
p (float): probability that image should be converted to grayscale. | ||
|
||
Returns: | ||
PIL Image: Grayscale version of the input image with probability p and unchanged | ||
with probability (1-p). | ||
- If input image is 1 channel: grayscale version is 1 channel | ||
- If input image is 3 channel: grayscale version is 3 channel with r == g == b | ||
|
||
### Ancestors (in MRO) | ||
|
||
* torchvision.transforms.transforms.RandomGrayscale | ||
* invertransforms.util.invertible.Invertible |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.