Convert different format of boxes to an NxB array, where B = 4 or 5 is the box dimension.
(self, boxes)
| 1155 | return modified_color |
| 1156 | |
| 1157 | def _convert_boxes(self, boxes): |
| 1158 | """ |
| 1159 | Convert different format of boxes to an NxB array, where B = 4 or 5 is the box dimension. |
| 1160 | """ |
| 1161 | if isinstance(boxes, Boxes) or isinstance(boxes, RotatedBoxes): |
| 1162 | return boxes.tensor.numpy() |
| 1163 | else: |
| 1164 | return np.asarray(boxes) |
| 1165 | |
| 1166 | def _convert_masks(self, masks_or_polygons): |
| 1167 | """ |