DriftCapture · function
sam21MasksToImage
masks, [count, size / 4, size / 4], to image, [count, height, width]: the tracker's masks
brought to the original frame bilinearly, as the upstream's post_process_masks brings them —
straight from a quarter of the square, since SAM 2 resizes a frame without padding it. Reads no
weights.
Explained in DriftCapture.
function sam21MasksToImage(config: Sam21Config, count: number, height: number, width: number): Architectureimport { sam21MasksToImage } from '@driftengine/capture';Parameters
| Parameter | Type | Description |
|---|---|---|
config | Sam21Config | |
count | number | |
height | number | |
width | number |