Skip to content

Commit

Permalink
Add notes and warnings to docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
aleju committed Oct 14, 2019
1 parent baa0437 commit ea8988f
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions imgaug/augmenters/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,13 @@ def _augment_images(self, images, random_state, parents, hooks):
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
images : (N,H,W,C) ndarray or list of (H,W,C) ndarray
Expand Down Expand Up @@ -861,6 +868,13 @@ def _augment_heatmaps(self, heatmaps, random_state, parents, hooks):
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
heatmaps : list of imgaug.augmentables.heatmaps.HeatmapsOnImage
Expand Down Expand Up @@ -922,6 +936,13 @@ def _augment_segmentation_maps(self, segmaps, random_state, parents, hooks):
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
segmaps : list of imgaug.augmentables.segmaps.SegmentationMapsOnImage
Expand Down Expand Up @@ -1020,6 +1041,13 @@ def _augment_keypoints(self, keypoints_on_images, random_state, parents,
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
keypoints_on_images : list of imgaug.augmentables.kps.KeypointsOnImage
Expand Down Expand Up @@ -1258,6 +1286,13 @@ def _augment_bounding_boxes(self, bounding_boxes_on_images, random_state,
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
bounding_boxes_on_images : list of imgaug.augmentables.bbs.BoundingBoxesOnImage
Expand Down Expand Up @@ -1293,6 +1328,13 @@ def _augment_polygons(self, polygons_on_images, random_state, parents,
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
polygons_on_images : list of imgaug.augmentables.polys.PolygonsOnImage
Expand Down Expand Up @@ -1329,6 +1371,13 @@ def _augment_line_strings(self, line_strings_on_images, random_state,
Augmenter instance's ``random_state`` variable. The parameter
``random_state`` takes care of both of these.
.. note ::
This method exists mostly for legacy-support.
Overwriting :func:`imgaug.augmenters.meta.Augmenter._augment_batch`
is now the preferred way of implementing custom augmentation
routines.
Parameters
----------
line_strings_on_images : list of imgaug.augmentables.lines.LineStringsOnImage
Expand Down Expand Up @@ -1388,6 +1437,14 @@ def _augment_polygons_as_keypoints(self, polygons_on_images, random_state,
"""
Augment polygons by applying keypoint augmentation to their vertices.
.. warning ::
This method calls
:func:`imgaug.augmenters.meta.Augmenter._augment_keypoints` and
expects it to do keypoint augmentation. The default for that
method is to do nothing. It must therefore be overwritten,
otherwise the polygon augmentation will also do nothing.
Parameters
----------
polygons_on_images : list of imgaug.augmentables.polys.PolygonsOnImage or imgaug.augmentables.polys.PolygonsOnImage
Expand Down

0 comments on commit ea8988f

Please sign in to comment.