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

Method has_holes

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

Source from the content-addressed store, hash-verified

109
110 @property
111 def has_holes(self):
112 if self._has_holes is None:
113 if self._mask is not None:
114 self._polygons, self._has_holes = self.mask_to_polygons(self._mask)
115 else:
116 self._has_holes = False # if original format is polygon, does not have holes
117 return self._has_holes
118
119 def mask_to_polygons(self, mask):
120 # cv2.RETR_CCOMP flag retrieves all the contours and arranges them to a 2-level

Callers

nothing calls this directly

Calls 1

mask_to_polygonsMethod · 0.95

Tested by

no test coverage detected