(box_width, patch_size)
| 110 | |
| 111 | def get_extended_from_box(img_size, box, patch_size): |
| 112 | def _decide_patch_num(box_width, patch_size): |
| 113 | num = np.ceil(box_width / patch_size).astype(np.int) |
| 114 | if (num * patch_size - box_width) < (patch_size // 2): |
| 115 | num += 1 |
| 116 | return num |
| 117 | |
| 118 | x1, y1 = box[0] |
| 119 | x2, y2 = box[1] |
no outgoing calls
no test coverage detected