Skip to content

Commit

Permalink
DOCS markdown updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gregunz committed Oct 14, 2019
1 parent c50d751 commit b421725
Show file tree
Hide file tree
Showing 26 changed files with 570 additions and 599 deletions.
44 changes: 43 additions & 1 deletion docs/affine.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Module invertransforms.affine
=============================
Affine Module.

This module contains transform classes to apply affine transformations to images.
The transformation can be random or fixed.
Including specific transformations for rotations.

Classes
-------

`Affine(matrix)`
:
: Apply affine transformation on the image.

Args:
matrix (list of int): transformation matrix (from destination image to source)
because we want to interpolate the (discrete) destination pixel from the local
area around the (floating) source pixel.

### Ancestors (in MRO)

Expand Down Expand Up @@ -41,4 +51,36 @@ Classes
### Ancestors (in MRO)

* torchvision.transforms.transforms.RandomAffine
* invertransforms.util.invertible.Invertible

`RandomRotation(degrees, resample=False, expand=False, center=None)`
: Rotate the image by angle.

Args:
degrees (sequence or float or int): Range of degrees to select from.
If degrees is a number instead of sequence like (min, max), the range of degrees
will be (-degrees, +degrees).
resample ({PIL.Image.NEAREST, PIL.Image.BILINEAR, PIL.Image.BICUBIC}, optional):
An optional resampling filter. See `filters`_ for more information.
If omitted, or if the image has mode "1" or "P", it is set to PIL.Image.NEAREST.
expand (bool, optional): Optional expansion flag.
If true, expands the output to make it large enough to hold the entire rotated image.
If false or omitted, make the output image the same size as the input image.
Note that the expand flag assumes rotation around the center and no translation.
center (2-tuple, optional): Optional center of rotation.
Origin is the upper left corner.
Default is the center of the image.

.. _filters: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters

### Ancestors (in MRO)

* torchvision.transforms.transforms.RandomRotation
* invertransforms.util.invertible.Invertible

`Rotation(angle, resample=False, expand=False, center=None)`
:

### Ancestors (in MRO)

* invertransforms.util.invertible.Invertible
18 changes: 0 additions & 18 deletions docs/center_crop.md

This file was deleted.

64 changes: 64 additions & 0 deletions docs/color.md
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
27 changes: 0 additions & 27 deletions docs/color_jitter.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/compose.md

This file was deleted.

63 changes: 0 additions & 63 deletions docs/crop.md

This file was deleted.

Loading

0 comments on commit b421725

Please sign in to comment.