Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
220126a4
Unverified
Commit
220126a4
authored
Jan 19, 2017
by
Thomas Grainger
Browse files
cleanup headings from pandoc
parent
15ce0363
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
README.rst
README.rst
+13
-13
No files found.
README.rst
View file @
220126a4
...
@@ -201,7 +201,7 @@ Transforms are common image transforms. They can be chained together
...
@@ -201,7 +201,7 @@ Transforms are common image transforms. They can be chained together
using ``transforms.Compose``
using ``transforms.Compose``
``transforms.Compose``
``transforms.Compose``
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
One can compose several transforms together. For example.
One can compose several transforms together. For example.
...
@@ -216,10 +216,10 @@ One can compose several transforms together. For example.
...
@@ -216,10 +216,10 @@ One can compose several transforms together. For example.
])
])
Transforms on PIL.Image
Transforms on PIL.Image
-----------------------
~~~~~~~~~~~~~~~~~~~~~~~
``Scale(size, interpolation=Image.BILINEAR)``
``Scale(size, interpolation=Image.BILINEAR)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rescales the input PIL.Image to the given 'size'. 'size' will be the
Rescales the input PIL.Image to the given 'size'. 'size' will be the
size of the smaller edge.
size of the smaller edge.
...
@@ -229,14 +229,14 @@ height / width, size) - size: size of the smaller edge - interpolation:
...
@@ -229,14 +229,14 @@ height / width, size) - size: size of the smaller edge - interpolation:
Default: PIL.Image.BILINEAR
Default: PIL.Image.BILINEAR
``CenterCrop(size)`` - center-crops the image to the given size
``CenterCrop(size)`` - center-crops the image to the given size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Crops the given PIL.Image at the center to have a region of the given
Crops the given PIL.Image at the center to have a region of the given
size. size can be a tuple (target\_height, target\_width) or an integer,
size. size can be a tuple (target\_height, target\_width) or an integer,
in which case the target will be of a square shape (size, size)
in which case the target will be of a square shape (size, size)
``RandomCrop(size, padding=0)``
``RandomCrop(size, padding=0)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Crops the given PIL.Image at a random location to have a region of the
Crops the given PIL.Image at a random location to have a region of the
given size. size can be a tuple (target\_height, target\_width) or an
given size. size can be a tuple (target\_height, target\_width) or an
...
@@ -245,13 +245,13 @@ If ``padding`` is non-zero, then the image is first zero-padded on each
...
@@ -245,13 +245,13 @@ If ``padding`` is non-zero, then the image is first zero-padded on each
side with ``padding`` pixels.
side with ``padding`` pixels.
``RandomHorizontalFlip()``
``RandomHorizontalFlip()``
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
Randomly horizontally flips the given PIL.Image with a probability of
Randomly horizontally flips the given PIL.Image with a probability of
0.5
0.5
``RandomSizedCrop(size, interpolation=Image.BILINEAR)``
``RandomSizedCrop(size, interpolation=Image.BILINEAR)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Random crop the given PIL.Image to a random size of (0.08 to 1.0) of the
Random crop the given PIL.Image to a random size of (0.08 to 1.0) of the
original size and and a random aspect ratio of 3/4 to 4/3 of the
original size and and a random aspect ratio of 3/4 to 4/3 of the
...
@@ -261,23 +261,23 @@ This is popularly used to train the Inception networks - size: size of
...
@@ -261,23 +261,23 @@ This is popularly used to train the Inception networks - size: size of
the smaller edge - interpolation: Default: PIL.Image.BILINEAR
the smaller edge - interpolation: Default: PIL.Image.BILINEAR
``Pad(padding, fill=0)``
``Pad(padding, fill=0)``
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^
Pads the given image on each side with ``padding`` number of pixels, and
Pads the given image on each side with ``padding`` number of pixels, and
the padding pixels are filled with pixel value ``fill``. If a ``5x5``
the padding pixels are filled with pixel value ``fill``. If a ``5x5``
image is padded with ``padding=1`` then it becomes ``7x7``
image is padded with ``padding=1`` then it becomes ``7x7``
Transforms on torch.\*Tensor
Transforms on torch.\*Tensor
----------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``Normalize(mean, std)``
``Normalize(mean, std)``
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^
Given mean: (R, G, B) and std: (R, G, B), will normalize each channel of
Given mean: (R, G, B) and std: (R, G, B), will normalize each channel of
the torch.\*Tensor, i.e. channel = (channel - mean) / std
the torch.\*Tensor, i.e. channel = (channel - mean) / std
Conversion Transforms
Conversion Transforms
---------------------
~~~~~~~~~~~~~~~~~~~~~
- ``ToTensor()`` - Converts a PIL.Image (RGB) or numpy.ndarray (H x W x
- ``ToTensor()`` - Converts a PIL.Image (RGB) or numpy.ndarray (H x W x
C) in the range [0, 255] to a torch.FloatTensor of shape (C x H x W)
C) in the range [0, 255] to a torch.FloatTensor of shape (C x H x W)
...
@@ -287,10 +287,10 @@ Conversion Transforms
...
@@ -287,10 +287,10 @@ Conversion Transforms
shape H x W x C to a PIL.Image of range [0, 255]
shape H x W x C to a PIL.Image of range [0, 255]
Generic Transofrms
Generic Transofrms
------------------
~~~~~~~~~~~~~~~~~~
``Lambda(lambda)``
``Lambda(lambda)``
~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^
Given a Python lambda, applies it to the input ``img`` and returns it.
Given a Python lambda, applies it to the input ``img`` and returns it.
For example:
For example:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment