MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / _convert_boxes

Method _convert_boxes

utils/visualizer.py:1218–1225  ·  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

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

Callers 1

overlay_instancesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected