SAM 2.1 segments anything in images and video
Segment Anything 2.1 (SAM 2, often written SAM2) is Meta AI's model that turns a few clicks or a box into a precise mask and carries that mask through a video. In Supervisely it runs inside the Smart Tool, labels batches of images, and can be fine-tuned on your own data.

- Publisher
- Meta AI
- Labels
- Bitmap masks from points and boxes
- Apps
- Serve, Fine-tune
Apps in the Supervisely Ecosystem
Every model in Supervisely comes as a Supervisely App: a module from the Ecosystem that plugs into the platform and runs on your own GPU, with no code to install. A Serve App puts the model behind the labeling tools, and where the model can be trained, a Train App fits it to your labeled project. All Apps work on the same projects, so you add a model, update it or swap it for another without changing anything else.
ServeServe Segment Anything 2.1SAM 2.1 for the Smart Tool, box prompts and video object segmentation.
Fine-tuneFine-tune Segment Anything 2.1Fine-tunes SAM 2.1 on your labeled project.
ServeServe Segment Anything ModelThe original SAM with points, boxes or no prompt, in images and video.
ServeServe Segment Anything in High QualityHQ-SAM, SAM with sharper masks on objects of intricate structure.
What is SAM 2?
Segment Anything Model 2 is a foundation model from Meta for promptable segmentation of images and videos (paper, code). It extends the first Segment Anything to video: frames are processed one after another, and a memory attention module conditions each new frame on what the model stored about the object in earlier frames and in the frames you prompted. On a single image that memory is empty, so SAM 2 works as an image segmenter.
The model is class-agnostic. It does not know what a weld seam or a pallet is; it finds the boundary of whatever you point at, and the annotator gives the object its class. That makes it a labeling assistant first, not a production model.
Four ways to label with SAM 2.1
- Clicks in the Smart Tool of the image labeling toolbox: a left click adds a positive point, Shift + left click a negative one that cuts an area out, and Space finishes the current mask. Shift + H colors the instances at random, Ctrl + H hides every label while you check an edge.
- A box as the prompt: draw a bounding box around the object and the model returns the mask inside it.
- No prompt at all: through the NN Image Labeling app the model generates masks for everything in an image automatically.
- Many images at once: the Batched Smart Tool app labels a batch of images quickly.
The serve app needs a GPU. Pick a pretrained architecture and press Serve, or load a custom SAM 2 checkpoint instead. On Supervisely Cloud the interactive models are already deployed for every user, and Free accounts have limits on running these apps on their own agent.
Track a mask through a video with SAM 2
In the video labeling toolbox, segment an object on one frame and let SAM 2.1 carry the mask forward. Annotators then check the track and redraw only the frames where it drifts, for example after an occlusion. The SAM 2 tutorial on our blog walks through segmenting and tracking objects this way.
Fine-tune SAM 2.1 on your own objects
General-purpose weights can miss edges on imagery unlike what they were trained on, such as microscopy, X-rays or thin cracks. The Fine-tune Segment Anything 2.1 app trains it further on a labeled images project. Start it on the project, choose a GPU in the Agent field and press Run; the dashboard lets you choose the checkpoint, the train and validation split and the hyperparameters.
The Smart Tool can switch between interactive models, including one fine-tuned on your data, so annotators keep the same clicks and get tighter masks. Outside the platform, the fine-tuned weights load with the inference notebook from the app's repository.
Masks you already have can seed the project: import PNG masks or COCO polygons and RLE, or follow masks to Supervisely JSON.
The original SAM and HQ-SAM
Two image models of the family remain in the catalog. Serve Segment Anything Model runs the first Segment Anything with three pretrained models, or a custom one from Team Files, on a GPU or a CPU. Prompts are points, a box, both together, or none, in which case it proposes masks for everything in the image; a replace_masks setting overwrites the old mask with the new one.
Serve Segment Anything in High Quality runs HQ-SAM, which keeps the SAM weights and prompts and adds a small number of parameters to sharpen masks of objects with intricate structure. It offers four pretrained models and needs a GPU; the HQ-SAM post compares it with SAM. Try either when thin parts and holes are what annotators keep fixing.
When another model fits better
- You want objects found by name, not by clicking: SAM 3 segments everything a short phrase names, and Grounding DINO or Florence-2 return boxes from text.
- You need a model that recognizes your classes on new data: train YOLO segmentation or Detectron2 on the masks SAM helped you draw.
- The video is long or the object leaves and comes back: XMem was built for long-term mask tracking, and CoTracker follows points and keypoints instead of masks.
More on interactive models in the Smart Tool post and the Segment Anything integration.
Frequently asked questions.
Is SAM 2.1 the same thing as the Smart Tool?
No. The Smart Tool is the labeling tool annotators click with; SAM 2.1 is one of the interactive models it can run. A team can switch the Smart Tool to SAM 3 or to its own fine-tuned SAM 2.1 without changing how people label.
Do I have to fine-tune SAM 2.1 before using it?
No. It segments objects it has never seen. Fine-tuning pays off when annotators keep correcting the same kind of edge on your imagery.
What is SAM 2 used for?
Segmenting objects from prompts: a few clicks or a box give a precise mask of any object, and in video SAM 2 carries that mask through the frames. In Supervisely it powers the Smart Tool, mask tracking in the video labeling tool and labeling of image batches, and it can be fine-tuned on your data.
Is SAM 3 better than SAM 2?
For finding many objects, yes: SAM 3 segments every object a short noun phrase or an example names, while SAM 2 segments the one you click or box. For a single object from clicks, SAM 2.1 already does the job. Both run in Supervisely.
Train and serve models on your own data.
Label a project in a free account, train a model on it from the browser and deploy it on your own GPU. Or book a demo to run Supervisely on your servers.



