MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / _convert_boxes

Method _convert_boxes

detectron2/utils/visualizer.py:1157–1164  ·  view source on GitHub ↗

Convert different format of boxes to an NxB array, where B = 4 or 5 is the box dimension.

(self, boxes)

Source from the content-addressed store, hash-verified

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 """

Callers 1

overlay_instancesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected