(
self,
model: Sam,
return_single_mask: bool,
use_stability_score: bool = False,
return_extra_metrics: bool = False,
)
| 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( |
nothing calls this directly
no outgoing calls
no test coverage detected