datamint.api.dto
- class datamint.api.dto.BoxPrompt(*, x_min, y_min, x_max, y_max)
Bases:
BaseModelA bounding box prompt, in original image pixel space.
- Parameters:
x_min (
float)y_min (
float)x_max (
float)y_max (
float)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- x_max: float
- x_min: float
- y_max: float
- y_min: float
- class datamint.api.dto.CreateAnnotationDto(type, identifier, scope, annotation_worklist_id=None, value=None, imported_from=None, import_author=None, frame_index=None, is_model=None, model_id=None, geometry=None, units=None, source=None, frame_range=None)
Bases:
object- Parameters:
type (
AnnotationType|str)identifier (
str)scope (
str)annotation_worklist_id (
str|None)imported_from (
str|None)import_author (
str|None)frame_index (
int|None)is_model (
bool|None)model_id (
str|None)geometry (
Geometry|None)units (
str|None)source (
str|None)frame_range (
tuple[int,int] |None)
- to_dict()
- Return type:
dict[str,Any]
- class datamint.api.dto.InferencePrompts(*, text=None, points=None, boxes=None)
Bases:
BaseModelPrompts for promptable segmentation models (e.g. SAM3-based).
At least one of
text,points, orboxesmust be provided. Whether a given deployed model actually uses the prompts is up to that model; a model that doesn’t support prompts simply ignores them.- Parameters:
text (
str|None)points (
list[PointPrompt] |None)boxes (
list[BoxPrompt] |None)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- points: list[PointPrompt] | None
- text: str | None
- to_dict()
Return a JSON-compatible dict with only the set fields.
- Return type:
dict
- class datamint.api.dto.PointPrompt(*, label, x, y)
Bases:
BaseModelA single point prompt, in original image pixel space.
- label
1for foreground,0for background.- Type:
int
- x
X coordinate.
- Type:
float
- y
Y coordinate.
- Type:
float
- Parameters:
label (
int)x (
float)y (
float)
- label: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- x: float
- y: float
- class datamint.api.dto.SaveResultsOptions(*, worklist_id=None, annotation_source='model_deploy', imported_from=None, author_email=None)
Bases:
BaseModelConfiguration for saving inference results as annotations on Datamint.
These options are only applied when
save_results=Trueon the prediction request.- worklist_id
Annotation worklist ID to associate saved annotations with.
- Type:
str|None
- annotation_source
Source tag for saved annotations. Use
'model_deploy'for deployed model inference or'model_pipeline'for pipeline-based runs.- Type:
Literal['model_pipeline','model_deploy'] |None
- imported_from
Free-text describing the origin or context of this inference run.
- Type:
str|None
- author_email
Email to attribute as the author of saved annotations. Defaults to the API key owner if not provided.
- Type:
str|None
- Parameters:
worklist_id (
str|None)annotation_source (
Literal['model_pipeline','model_deploy'] |None)imported_from (
str|None)author_email (
str|None)
- annotation_source: Literal['model_pipeline', 'model_deploy'] | None
- author_email: str | None
- imported_from: str | None
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- to_dict()
Return a dict with only the set (non-
None) fields.- Return type:
dict[str,str]
- worklist_id: str | None