Map bboxes from testing scale to original image scale.
(bboxes,
img_shape,
scale_factor,
flip,
flip_direction='horizontal')
| 61 | |
| 62 | |
| 63 | def bbox_mapping_back(bboxes, |
| 64 | img_shape, |
| 65 | scale_factor, |
| 66 | flip, |
| 67 | flip_direction='horizontal'): |
| 68 | """Map bboxes from testing scale to original image scale.""" |
| 69 | new_bboxes = bbox_flip(bboxes, img_shape, |
| 70 | flip_direction) if flip else bboxes |
| 71 | new_bboxes = new_bboxes.view(-1, 4) / new_bboxes.new_tensor(scale_factor) |
| 72 | return new_bboxes.view(bboxes.shape) |
| 73 | |
| 74 | |
| 75 | def bbox2roi(bbox_list): |
nothing calls this directly
no test coverage detected