This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 59d7170  Hotfix mx.image documents (#7404)
59d7170 is described below

commit 59d717074aae05cf47f69ab8589747bca572cd49
Author: Joshua Z. Zhang <cheungc...@gmail.com>
AuthorDate: Thu Aug 10 09:54:42 2017 -0700

    Hotfix mx.image documents (#7404)
    
    * fix typo and incorrect doc
    
    * Fix doc formats
    
    * fix doc con't
---
 python/mxnet/image/detection.py | 36 ++++++++++++++++++------------------
 python/mxnet/image/image.py     | 31 +++++++++++++++++--------------
 2 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/python/mxnet/image/detection.py b/python/mxnet/image/detection.py
index 142ba25..43131f0 100644
--- a/python/mxnet/image/detection.py
+++ b/python/mxnet/image/detection.py
@@ -483,15 +483,15 @@ def CreateDetAugmenter(data_shape, resize=0, rand_crop=0, 
rand_pad=0, rand_gray=
                        rand_mirror=False, mean=None, std=None, brightness=0, 
contrast=0,
                        saturation=0, pca_noise=0, hue=0, inter_method=2, 
min_object_covered=0.1,
                        aspect_ratio_range=(0.75, 1.33), area_range=(0.05, 3.0),
-                       min_eject_coverage=0.3, max_attempts=50, pad_val=(128, 
128, 128)):
+                       min_eject_coverage=0.3, max_attempts=50, pad_val=(127, 
127, 127)):
     """Create augmenters for detection.
 
     Parameters
     ----------
     data_shape : tuple of int
-        shape for output data
+        Shape for output data
     resize : int
-        resize shorter edge if larger than 0 at the begining
+        Resize shorter edge if larger than 0 at the begining
     rand_crop : float
         [0, 1], probability to apply random cropping
     rand_pad : float
@@ -499,23 +499,23 @@ def CreateDetAugmenter(data_shape, resize=0, rand_crop=0, 
rand_pad=0, rand_gray=
     rand_gray : float
         [0, 1], probability to convert to grayscale for all channels
     rand_mirror : bool
-        whether apply horizontal flip to image with probability 0.5
+        Whether to apply horizontal flip to image with probability 0.5
     mean : np.ndarray or None
-        mean pixel values for [r, g, b]
+        Mean pixel values for [r, g, b]
     std : np.ndarray or None
-        standard deviations for [r, g, b]
+        Standard deviations for [r, g, b]
     brightness : float
-        brightness jittering range (percent)
+        Brightness jittering range (percent)
     contrast : float
-        contrast jittering range
+        Contrast jittering range (percent)
     saturation : float
-        saturation jittering range
+        Saturation jittering range (percent)
     hue : float
-        hue jittering range
+        Hue jittering range (percent)
     pca_noise : float
-        pca noise level
+        Pca noise level (percent)
     inter_method : int, default=2(Area-based)
-        interpolation method for all resizing operations
+        Interpolation method for all resizing operations
 
         Possible values:
         0: Nearest Neighbors Interpolation.
@@ -550,7 +550,7 @@ def CreateDetAugmenter(data_shape, resize=0, rand_crop=0, 
rand_pad=0, rand_gray=
         Number of attempts at generating a cropped/padded region of the image 
of the
         specified constraints. After max_attempts failures, return the 
original image.
     pad_val: float
-        pixel value to be filled when padding is enabled. pad_val will 
automatically
+        Pixel value to be filled when padding is enabled. pad_val will 
automatically
         be subtracted by mean and divided by std if applicable.
 
     Examples
@@ -627,7 +627,7 @@ class ImageDetIter(ImageIter):
     Parameters
     ----------
     aug_list : list or None
-        augmenter list for generating distorted images
+        Augmenter list for generating distorted images
     batch_size : int
         Number of examples per batch.
     data_shape : tuple
@@ -657,7 +657,7 @@ class ImageDetIter(ImageIter):
     data_name : str
         Data name for provided symbols.
     label_name : str
-        name for detection labels
+        Name for detection labels
     kwargs : ...
         More arguments for creating augmenter. See mx.image.CreateDetAugmenter.
     """
@@ -723,7 +723,7 @@ class ImageDetIter(ImageIter):
         obj_width = int(raw[1])
         if (raw.size - header_width) % obj_width != 0:
             msg = "Label shape %s inconsistent with annotation width %d." \
-                %(str(raw.shape, obj_width))
+                %(str(raw.shape), obj_width)
             raise RuntimeError(msg)
         out = np.reshape(raw[header_width:], (-1, obj_width))
         # remove bad ground-truths
@@ -738,9 +738,9 @@ class ImageDetIter(ImageIter):
         Parameters
         ----------
         data_shape : tuple or None
-            reshape the data_shape to the new shape if not None
+            Reshape the data_shape to the new shape if not None
         label_shape : tuple or None
-            reshape label shape to new shape if not None
+            Reshape label shape to new shape if not None
         """
         if data_shape is not None:
             self.check_data_shape(data_shape)
diff --git a/python/mxnet/image/image.py b/python/mxnet/image/image.py
index 02cd3cd..ce44029 100644
--- a/python/mxnet/image/image.py
+++ b/python/mxnet/image/image.py
@@ -826,31 +826,34 @@ def CreateAugmenter(data_shape, resize=0, 
rand_crop=False, rand_resize=False, ra
     Parameters
     ----------
     data_shape : tuple of int
-        shape for output data
+        Shape for output data
     resize : int
-        resize shorter edge if larger than 0 at the begining
-    rand_resize : float
-        [0, 1], probability to apply random resizing
+        Resize shorter edge if larger than 0 at the begining
+    rand_crop : bool
+        Whether to enable random cropping other than center crop
+    rand_resize : bool
+        Whether to enable random sized cropping, require rand_crop to be 
enabled
     rand_gray : float
-        [0, 1], probability to convert to grayscale for all channels
+        [0, 1], probability to convert to grayscale for all channels, the 
number
+        of channels will not be reduced to 1
     rand_mirror : bool
-        whether apply horizontal flip to image with probability 0.5
+        Whether to apply horizontal flip to image with probability 0.5
     mean : np.ndarray or None
-        mean pixel values for [r, g, b]
+        Mean pixel values for [r, g, b]
     std : np.ndarray or None
-        standard deviations for [r, g, b]
+        Standard deviations for [r, g, b]
     brightness : float
-        brightness jittering range (percent)
+        Brightness jittering range (percent)
     contrast : float
-        contrast jittering range
+        Contrast jittering range (percent)
     saturation : float
-        saturation jittering range
+        Saturation jittering range (percent)
     hue : float
-        hue jittering range
+        Hue jittering range (percent)
     pca_noise : float
-        pca noise level
+        Pca noise level (percent)
     inter_method : int, default=2(Area-based)
-        interpolation method for all resizing operations
+        Interpolation method for all resizing operations
 
         Possible values:
         0: Nearest Neighbors Interpolation.

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" <comm...@mxnet.apache.org>'].

Reply via email to