SAM-2 uses a custom dataset format for use in fine-tuning models.
You can convert and export data to the SAM 2 format in Roboflow.
Below, learn the structure of Segment Anything 2.
{"image":{"image_id":3,"license":1,"file_name":"A2_jpg.rf.1aa89274b154e74a1f960fbb192c6bf2.jpg","height":416,"width":416,"date_captured":"2024-10-07T11:35:58+00:00"},"annotations":[{"id":3,"bbox":[92,153,193.077471,199.115617],"area":38444.7397669646,"segmentation":{"counts":"...","size":[416,416]}}]}
With Roboflow supervision, an open source Python package with utilities for completing computer vision tasks, you can merge and split detections in Segment Anything 2. Read our dedicated guides to learn how to merge and split Segment Anything 2 detections.
Below, see model architectures that require data in the Segment Anything 2 format when training a new model.
On each page below, you can find links to our guides that show how to plot predictions from the model, and complete other common tasks like detecting small objects with the model.
SAM-2 uses a custom dataset format for use in fine-tuning models.
You can convert and export data to the SAM 2 format in Roboflow.
With Roboflow, you can deploy a computer vision model without having to build your own infrastructure.
Below, we show how to convert data to and from
Segment Anything 2
. We also list popular models that use the
Segment Anything 2
data format. Our conversion tools are free to use.
Free data conversion
SOC II Type 2 Compliant
Trusted by 250,000+ developers
Free data conversion
SOC II Type 1 Compliant
Trusted by 250,000+ developers
The
models all use the
data format.
{"image":{"image_id":3,"license":1,"file_name":"A2_jpg.rf.1aa89274b154e74a1f960fbb192c6bf2.jpg","height":416,"width":416,"date_captured":"2024-10-07T11:35:58+00:00"},"annotations":[{"id":3,"bbox":[92,153,193.077471,199.115617],"area":38444.7397669646,"segmentation":{"counts":"...","size":[416,416]}}]}