MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/dataflow/image.py:131–151  ·  view source on GitHub ↗

Args: ds (DataFlow): input DataFlow. augmentors (AugmentorList): a list of :class:`imgaug.ImageAugmentor` to be applied in order. img_index (int or str): the index/key of the image component to be augmented. coords_index (int or str): the inde

(self, ds, augmentors, img_index=0, coords_index=1, copy=True, catch_exceptions=False)

Source from the content-addressed store, hash-verified

129 """
130
131 def __init__(self, ds, augmentors, img_index=0, coords_index=1, copy=True, catch_exceptions=False):
132
133 """
134 Args:
135 ds (DataFlow): input DataFlow.
136 augmentors (AugmentorList): a list of :class:`imgaug.ImageAugmentor` to be applied in order.
137 img_index (int or str): the index/key of the image component to be augmented.
138 coords_index (int or str): the index/key of the coordinate component to be augmented.
139 copy, catch_exceptions: same as in :class:`AugmentImageComponent`
140 """
141 if isinstance(augmentors, AugmentorList):
142 self.augs = augmentors
143 else:
144 self.augs = AugmentorList(augmentors)
145
146 self._img_index = img_index
147 self._coords_index = coords_index
148 self._copy = copy
149 self._exception_handler = ExceptionHandler(catch_exceptions)
150
151 super(AugmentImageCoordinates, self).__init__(ds, self._aug_mapper)
152
153 def reset_state(self):
154 self.ds.reset_state()

Callers

nothing calls this directly

Calls 3

AugmentorListClass · 0.85
ExceptionHandlerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected