Tip Of AI
Discover what you can do with AI
SAM (Segment Anything Model) is an AI model developed by Meta AI that has the ability to accurately segment any object in an image with just a single click. Unlike traditional segmentation models, SAM is promptable, meaning it can be guided by prompts or instructions to perform a wide range of segmentation tasks without the need for additional training. SAM's key features include the ability to generate multiple valid masks for ambiguous prompts, enabling users to obtain accurate segmentations even in challenging scenarios. It also has zero-shot generalization capabilities, allowing it to segment unfamiliar objects and images without requiring additional training. The design of SAM enables flexible integration with other systems. It can take input prompts from different sources, such as gaze data from AR/VR headsets or bounding box prompts from object detectors, to perform specific segmentation tasks. The output masks generated by SAM can be used as inputs for other AI systems, enabling applications such as object tracking in videos, image editing, 3D modeling, and creative tasks like collaging. SAM has been trained on millions of images and masks using a model-in-the-loop "data engine." This training approach, combined with SAM's sophisticated ambiguity-aware design, has resulted in impressive performance. The dataset used for training includes over 1.1 billion segmentation masks collected from approximately 11 million licensed and privacy-preserving images. In terms of model size, the image encoder has 632 million parameters, while the prompt encoder and mask decoder have approximately 4 million parameters. Inference times for the model are efficient, with the image encoder taking around 0.15 seconds on an NVIDIA A100 GPU, and the prompt encoder and mask decoder running in just ~50ms on a CPU in a web browser using multithreaded SIMD execution. SAM is compatible with PyTorch and can be run on GPU or CPU using the ONNX runtime across a variety of platforms. The code for SAM is available on GitHub, allowing researchers and developers to explore and utilize the model for their own segmentation tasks.