DriftCapture · interface
SamPromptLayout
Where a checkpoint keeps its prompt encoder, and how its processor places a prompt: SAM's and MobileSAM's, or Transformers' SAM 2.
Explained in DriftCapture.
interface SamPromptLayoutimport type { SamPromptLayout } from '@driftengine/capture';Properties
| Name | Type | Description |
|---|---|---|
gaussianreadonly | string | The Fourier matrix, [2, dim / 2]. |
embeddingreadonly | (kind: number) => readonly [name: string, row: number] | A learned point embedding by kind — 0 off, 1 on, 2 and 3 a box's corners — as name and row. |
notAPointreadonly | string | |
boxPaddingreadonly | boolean | Whether a box is followed by a padding point, as SAM 2's is. |
boxAsPointsreadonly | boolean | Whether a box's corners come first as points and a padding point always ends the prompt, as a SAM 2 video session orders them — where a prompt of nothing is a point meaning none, padded. |
preparedreadonly | (height: number, width: number, size: number) => readonly [number, number] | The prepared image's size for an original one: the longest side to size for SAM, the whole
frame to a size square for SAM 2 — and whether a coordinate is scaled in double precision, as
SAM's predictor does with numpy, or single, as SAM 2's processor does with a tensor. |
singleScalereadonly | boolean |