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

Method __init__

tensorpack/dataflow/imgaug/crop.py:64–78  ·  view source on GitHub ↗

Randomly crop a box of shape (h, w), sampled from [min, max] (both inclusive). If max is None, will use the input image shape. Args: wmin, hmin, wmax, hmax: range to sample shape. max_aspect_ratio (float): this argument has no effect and is deprecate

(self, wmin, hmin,
                 wmax=None, hmax=None,
                 max_aspect_ratio=None)

Source from the content-addressed store, hash-verified

62 """ Random crop with a random shape"""
63
64 def __init__(self, wmin, hmin,
65 wmax=None, hmax=None,
66 max_aspect_ratio=None):
67 """
68 Randomly crop a box of shape (h, w), sampled from [min, max] (both inclusive).
69 If max is None, will use the input image shape.
70
71 Args:
72 wmin, hmin, wmax, hmax: range to sample shape.
73 max_aspect_ratio (float): this argument has no effect and is deprecated.
74 """
75 super(RandomCropRandomShape, self).__init__()
76 if max_aspect_ratio is not None:
77 log_deprecated("RandomCropRandomShape(max_aspect_ratio)", "It is never implemented!", "2020-06-06")
78 self._init(locals())
79
80 def get_transform(self, img):
81 hmax = self.hmax or img.shape[0]

Callers

nothing calls this directly

Calls 3

log_deprecatedFunction · 0.85
__init__Method · 0.45
_initMethod · 0.45

Tested by

no test coverage detected