(img, center, scale, output_size, rot=0)
| 82 | |
| 83 | |
| 84 | def crop(img, center, scale, output_size, rot=0): |
| 85 | trans = get_affine_transform(center, scale, rot, output_size) |
| 86 | |
| 87 | dst_img = cv2.warpAffine(img, |
| 88 | trans, |
| 89 | (int(output_size[0]), int(output_size[1])), |
| 90 | flags=cv2.INTER_LINEAR) |
| 91 | |
| 92 | return dst_img |
| 93 | |
| 94 | |
| 95 | def gaussian_radius(det_size, min_overlap=0.7): |
nothing calls this directly
no test coverage detected