MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / StaticCenterCrop

Class StaticCenterCrop

CV/PWCNet/data/datasets.py:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41
42class StaticCenterCrop(object):
43 def __init__(self, image_size, crop_size):
44 self.th, self.tw = crop_size
45 self.h, self.w = image_size
46
47 def __call__(self, img):
48 return img[(self.h - self.th) // 2:(self.h + self.th) // 2, (self.w - self.tw) // 2:(self.w + self.tw) // 2, :]
49
50
51class MpiSintel(object):

Callers 5

__getitem__Method · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected