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

Class RejectTooSmallImages

examples/SuperResolution/data_sampler.py:63–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62
63class RejectTooSmallImages(MapDataComponent):
64 def __init__(self, ds, thresh=384, index=0):
65 def func(img):
66 h, w, _ = img.shape
67 if (h < thresh) or (w < thresh):
68 return None
69 else:
70 return img
71 super(RejectTooSmallImages, self).__init__(ds, func, index=index)
72
73
74class CenterSquareResize(MapDataComponent):

Callers 2

get_dataFunction · 0.90
data_sampler.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected