This repository contains the implementation of the Segment Anything Model (SAM), a powerful image segmentation model developed by Meta AI Research.
Before using this repository, you need to download the model weights:
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pthThe model weights file is approximately 2.4GB. Make sure you have sufficient disk space and a stable internet connection.
The Segment Anything Model (SAM) is a promptable segmentation system that can generate high-quality object masks from input prompts such as points or boxes. It has been trained on a dataset of 11 million images and 1.1 billion masks.
- Python 3.8+
- PyTorch 1.7+
- CUDA-compatible GPU (recommended)
- Clone this repository:
git clone https://github.com/yourusername/SAM-model.git
cd SAM-model- Install the required dependencies:
pip install -r requirements.txt[Usage instructions will be added as the project develops]
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Meta AI Research for developing the SAM model
- The original SAM paper: "Segment Anything" by Kirillov et al.