(img, shape)
| 164 | |
| 165 | |
| 166 | def center_crop(img, shape): |
| 167 | h, w = shape[0], shape[1] |
| 168 | y = (img.shape[0] - h) // 2 |
| 169 | x = (img.shape[1] - w) // 2 |
| 170 | return img[y : y + h, x : x + w] |
| 171 | |
| 172 | |
| 173 | def random_crop(img, gt, size): |
nothing calls this directly
no outgoing calls
no test coverage detected