<ahref="https://console.paperspace.com/github/ultralytics/ultralytics"><imgsrc="https://assets.paperspace.io/img/gradient-badge.svg"alt="Run Ultralytics on Gradient"></a>
<ahref="https://console.paperspace.com/github/ultralytics/ultralytics"><imgsrc="https://assets.paperspace.io/img/gradient-badge.svg"alt="Run Ultralytics on Gradient"></a>
<ahref="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open Ultralytics In Colab"></a>
<ahref="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open Ultralytics In Colab"></a>
<ahref="https://www.kaggle.com/models/ultralytics/yolo11"><imgsrc="https://kaggle.com/static/images/open-in-kaggle.svg"alt="Open Ultralytics In Kaggle"></a>
<ahref="https://www.kaggle.com/models/ultralytics/yolo11"><imgsrc="https://kaggle.com/static/images/open-in-kaggle.svg"alt="Open Ultralytics In Kaggle"></a>
<ahref="https://mybinder.org/v2/gh/ultralytics/ultralytics/HEAD?labpath=examples%2Ftutorial.ipynb"><imgsrc="https://mybinder.org/badge_logo.svg"alt="Open Ultralytics In Binder"></a>
<ahref="https://console.paperspace.com/github/ultralytics/ultralytics"><imgsrc="https://assets.paperspace.io/img/gradient-badge.svg"alt="Run Ultralytics on Gradient"></a>
<ahref="https://console.paperspace.com/github/ultralytics/ultralytics"><imgsrc="https://assets.paperspace.io/img/gradient-badge.svg"alt="Run Ultralytics on Gradient"></a>
<ahref="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open Ultralytics In Colab"></a>
<ahref="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open Ultralytics In Colab"></a>
<ahref="https://www.kaggle.com/models/ultralytics/yolo11"><imgsrc="https://kaggle.com/static/images/open-in-kaggle.svg"alt="Open Ultralytics In Kaggle"></a>
<ahref="https://www.kaggle.com/models/ultralytics/yolo11"><imgsrc="https://kaggle.com/static/images/open-in-kaggle.svg"alt="Open Ultralytics In Kaggle"></a>
<ahref="https://mybinder.org/v2/gh/ultralytics/ultralytics/HEAD?labpath=examples%2Ftutorial.ipynb"><imgsrc="https://mybinder.org/badge_logo.svg"alt="Open Ultralytics In Binder"></a>
As of **`ultralytics>=8.3.10`**, Ultralytics explorer support has been deprecated. But don't worry! You can now access similar and even enhanced functionality through [Ultralytics HUB](https://hub.ultralytics.com/), our intuitive no-code platform designed to streamline your workflow. With Ultralytics HUB, you can continue exploring, visualizing, and managing your data effortlessly, all without writing a single line of code. Make sure to check it out and take advantage of its powerful features!🚀
Create [embeddings](https://www.ultralytics.com/glossary/embeddings) for your dataset, search for similar images, run SQL queries, perform semantic search and even search using natural language! You can get started with our GUI app or build your own using the API. Learn more [here](explorer/index.md).
Create [embeddings](https://www.ultralytics.com/glossary/embeddings) for your dataset, search for similar images, run SQL queries, perform semantic search and even search using natural language! You can get started with our GUI app or build your own using the API. Learn more [here](explorer/index.md).
description: Discover SAM 2, the next generation of Meta's Segment Anything Model, supporting real-time promptable segmentation in both images and videos with state-of-the-art performance. Learn about its key features, datasets, and how to use it.
description: Discover SAM 2, the next generation of Meta's Segment Anything Model, supporting real-time promptable segmentation in both images and videos with state-of-the-art performance. Learn about its key features, datasets, and how to use it.
keywords: SAM 2, SAM 2.1, Segment Anything, video segmentation, image segmentation, promptable segmentation, zero-shot performance, SA-V dataset, Ultralytics, real-time segmentation, AI, machine learning
---
---
!!! tip "SAM 2.1"
We have just supported the more accurate SAM2.1 model. Please give it a try!
# SAM 2: Segment Anything Model 2
# SAM 2: Segment Anything Model 2
SAM 2, the successor to Meta's [Segment Anything Model (SAM)](sam.md), is a cutting-edge tool designed for comprehensive object segmentation in both images and videos. It excels in handling complex visual data through a unified, promptable model architecture that supports real-time processing and zero-shot generalization.
SAM 2, the successor to Meta's [Segment Anything Model (SAM)](sam.md), is a cutting-edge tool designed for comprehensive object segmentation in both images and videos. It excels in handling complex visual data through a unified, promptable model architecture that supports real-time processing and zero-shot generalization.
@ -115,11 +119,15 @@ pip install ultralytics
The following table details the available SAM 2 models, their pre-trained weights, supported tasks, and compatibility with different operating modes like [Inference](../modes/predict.md), [Validation](../modes/val.md), [Training](../modes/train.md), and [Export](../modes/export.md).
The following table details the available SAM 2 models, their pre-trained weights, supported tasks, and compatibility with different operating modes like [Inference](../modes/predict.md), [Validation](../modes/val.md), [Training](../modes/train.md), and [Export](../modes/export.md).
| Model Type | Pre-trained Weights | Tasks Supported | Inference | Validation | Training | Export |
| Model Type | Pre-trained Weights | Tasks Supported | Inference | Validation | Training | Export |
@ -136,13 +136,13 @@ INT8 quantization is an excellent way to compress the model and speed up inferen
from ultralytics import YOLO
from ultralytics import YOLO
model = YOLO("yolo11n.pt") # Load a model
model = YOLO("yolo11n.pt") # Load a model
model.export(format="onnx", int8=True)
model.export(format="engine", int8=True)
```
```
=== "CLI"
=== "CLI"
```bash
```bash
yolo export model=yolo11n.pt format=onnx int8=True # export model with INT8 quantization
yolo export model=yolo11n.pt format=engine int8=True # export TensorRT model with INT8 quantization
```
```
INT8 quantization can be applied to various formats, such as TensorRT and CoreML. More details can be found in the [Export section](../modes/export.md).
INT8 quantization can be applied to various formats, such as TensorRT and CoreML. More details can be found in the [Export section](../modes/export.md).