otx.algo.visual_prompting#

Module for OTX visual prompting models.

Classes

SAM(backbone_type, ], label_info, ...)

OTX visual prompting model class for Segment Anything Model (SAM).

class otx.algo.visual_prompting.SAM(backbone_type: Literal['tiny_vit', 'vit_b'], label_info: LabelInfoTypes = NullLabelInfo(label_names=[], label_ids=[], label_groups=[[]]), input_size: tuple[int, int] = (1024, 1024), optimizer: OptimizerCallable = <function _default_optimizer_callable>, scheduler: LRSchedulerCallable | LRSchedulerListCallable = <function _default_scheduler_callable>, metric: MetricCallable = <function _visual_prompting_metric_callable>, torch_compile: bool = False, freeze_image_encoder: bool = True, freeze_prompt_encoder: bool = True, freeze_mask_decoder: bool = False, use_stability_score: bool = False, return_single_mask: bool = True, return_extra_metrics: bool = False, stability_score_offset: float = 1.0)[source]#

Bases: CommonSettingMixin, OTXVisualPromptingModel

OTX visual prompting model class for Segment Anything Model (SAM).