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

Method __init__

tensorpack/dataflow/imgaug/meta.py:104–113  ·  view source on GitHub ↗

Args: func: a function which takes an image array and return an augmented one coord_func: optional. A function which takes coordinates and return augmented ones. Coordinates should be Nx2 array of (x, y)s.

(self, func, coord_func=None)

Source from the content-addressed store, hash-verified

102 """
103
104 def __init__(self, func, coord_func=None):
105 """
106 Args:
107 func: a function which takes an image array and return an augmented one
108 coord_func: optional. A function which takes coordinates and return augmented ones.
109 Coordinates should be Nx2 array of (x, y)s.
110 """
111 super(MapImage, self).__init__()
112 self.func = func
113 self.coord_func = coord_func
114
115 def get_transform(self, img):
116 if self.coord_func:

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected