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

Method fill

tensorpack/dataflow/imgaug/paste.py:18–29  ·  view source on GitHub ↗

Return a proper background image of background_shape, given img. Args: background_shape (tuple): a shape (h, w) img: an image Returns: a background image

(self, background_shape, img)

Source from the content-addressed store, hash-verified

16 """ Base class for all BackgroundFiller"""
17
18 def fill(self, background_shape, img):
19 """
20 Return a proper background image of background_shape, given img.
21
22 Args:
23 background_shape (tuple): a shape (h, w)
24 img: an image
25 Returns:
26 a background image
27 """
28 background_shape = tuple(background_shape)
29 return self._fill(background_shape, img)
30
31 @abstractmethod
32 def _fill(self, background_shape, img):

Callers 4

draw_patchesMethod · 0.80
_implMethod · 0.80
_implMethod · 0.80
_pad_sampleMethod · 0.80

Calls 1

_fillMethod · 0.95

Tested by

no test coverage detected