Convert different format of boxes to an NxB array, where B = 4 or 5 is the box dimension.
(self, boxes)
| 1216 | return modified_color |
| 1217 | |
| 1218 | def _convert_boxes(self, boxes): |
| 1219 | """ |
| 1220 | Convert different format of boxes to an NxB array, where B = 4 or 5 is the box dimension. |
| 1221 | """ |
| 1222 | if isinstance(boxes, Boxes) or isinstance(boxes, RotatedBoxes): |
| 1223 | return boxes.tensor.detach().numpy() |
| 1224 | else: |
| 1225 | return np.asarray(boxes) |
| 1226 | |
| 1227 | def _convert_masks(self, masks_or_polygons): |
| 1228 | """ |