All models
Imagev1.0.0

Segment Anything 2 (Masks)

Segment every region of an image into one combined mask.

4 inputsIMAGE
Segment Anything 2 (Masks) input
Segment Anything 2 (Masks) output

Every region segmented into one mask

Run the node

IMAGE
4 – 64INT
0 – 1FLOAT
0 – 1FLOAT
Sign in to run

Running a model executes it on your account. Browsing the catalog stays free and needs no account.

Output

Fill in the inputs and run the node to see its output here.

Run it from your code

The same node, called by id from any surface. Every tab pins sam-2 and passes the ports below. Full guide.

import { BlitClient } from "@blitflow/sdk";

const { runNode } = new BlitClient({ apiKey: process.env.BLITFLOW_TOKEN });

const { outputs } = await runNode("sam-2", {
  image: { ref: "https://..." },
  pointsPerSide: { value: 32 },
  iouThreshold: { value: 0.88 },
  stabilityThreshold: { value: 0.95 },
});

Schema

Inputs

image*IMAGE
pointsPerSideINT32
iouThresholdFLOAT0.88
stabilityThresholdFLOAT0.95

Outputs

maskIMAGE