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

Method to_numpy

utils/sam_utils/amg.py:72–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 raise TypeError(f"MaskData key {k} has an unsupported type {type(v)}.")
71
72 def to_numpy(self) -> None:
73 for k, v in self._stats.items():
74 if isinstance(v, torch.Tensor):
75 self._stats[k] = v.detach().cpu().numpy()
76
77
78def is_box_near_crop_edge(

Callers 1

_generate_masksMethod · 0.95

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected