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

Method semantic_masks

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

Source from the content-addressed store, hash-verified

210 return (self._seg != empty_ids[0]).numpy().astype(np.bool)
211
212 def semantic_masks(self):
213 for sid in self._seg_ids:
214 sinfo = self._sinfo.get(sid)
215 if sinfo is None or sinfo["isthing"]:
216 # Some pixels (e.g. id 0 in PanopticFPN) have no instance or semantic predictions.
217 continue
218 yield (self._seg == sid).numpy().astype(np.bool), sinfo
219
220 def instance_masks(self):
221 for sid in self._seg_ids:

Callers 1

draw_panoptic_segMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected