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

Method instance_masks

utils/visualizer.py:220–227  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

218 yield (self._seg == sid).numpy().astype(np.bool), sinfo
219
220 def instance_masks(self):
221 for sid in self._seg_ids:
222 sinfo = self._sinfo.get(sid)
223 if sinfo is None or not sinfo["isthing"]:
224 continue
225 mask = (self._seg == sid).numpy().astype(np.bool)
226 if mask.sum() > 0:
227 yield mask, sinfo
228
229
230def _create_text_labels(classes, scores, class_names, is_crowd=None):

Callers 1

draw_panoptic_segMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected