English | 中文
This is a MindSpore Implementation of Language SAM.
Language SAM is built on Meta model, Segment Anything Model 2, and the GroundingDINO detection model. Is can be used for object detection and image segmentation given text prompt.
| mindspore | ascend driver | cann |
|---|---|---|
| >=2.6.0 | >=24.1.RC1 | >=8.1.RC1 |
- Install CANN 8.1.RC1 and MindSpore according to the official instructions.
- Install requirements
cd examples/lang_sam pip install -r requirements.txt - Install mindone
Try
cd mindone pip install -e .python -c "import mindone". If no error occurs, the installation is successful.
- 📍 Language SAM with the following features
- ✅ Prediction of masks given a static image and a textual prompt.
You contributions are welcome.
Please download checkpoints using:
cd checkpoints && \
./download_ckpts.sh && \
cd ..predict_image.py is a script to infer the mask given an input image and a text prompt. Please download the images for inference first:
mkdir -p assets
wget -P assets https://raw.githubusercontent.com/luca-medeiros/lang-segment-anything/refs/heads/main/assets/car.jpegThen run python predict_image.py.
