| 61 | |
| 62 | |
| 63 | class 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 | |
| 74 | class CenterSquareResize(MapDataComponent): |
no outgoing calls
no test coverage detected