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

Method __init__

utils/sam_utils/onnx.py:25–39  ·  view source on GitHub ↗
(
        self,
        model: Sam,
        return_single_mask: bool,
        use_stability_score: bool = False,
        return_extra_metrics: bool = False,
    )

Source from the content-addressed store, hash-verified

23 """
24
25 def __init__(
26 self,
27 model: Sam,
28 return_single_mask: bool,
29 use_stability_score: bool = False,
30 return_extra_metrics: bool = False,
31 ) -> None:
32 super().__init__()
33 self.mask_decoder = model.mask_decoder
34 self.model = model
35 self.img_size = model.image_encoder.img_size
36 self.return_single_mask = return_single_mask
37 self.use_stability_score = use_stability_score
38 self.stability_score_offset = 1.0
39 self.return_extra_metrics = return_extra_metrics
40
41 @staticmethod
42 def resize_longest_image_size(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected