Segment Anything model for use with Autodistill
Project description
Autodistill Segment Anything Module
This repository contains the code supporting the Segment Anything base model for use with Autodistill.
Segment Anything (SAM) is a segmentation model developed by Meta AI Research. Segment Anything can segment an entire image into masks, or use points to segment specific parts of an object. You can use Segment Anything with Autodistill to segment objects. Segment Anything does not assign classes, so you should use the model with a tool like Grounding DINO or GPT-4V.
Read the full Autodistill documentation.
Read the SAM Autodistill documentation.
Installation
To use SAM with autodistill, you need to install the following dependency:
pip3 install autodistill-segment-anything
Quickstart
from autodistill_segment_anything import SegmentAnything
base_model = SegmentAnything(None)
masks = base_model.predict("./image.jpeg")
print(masks)
License
This project is licensed under an Apache 2.0 license.
🏆 Contributing
We love your input! Please see the core Autodistill contributing guide to get started. Thank you 🙏 to all our contributors!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file autodistill-segment-anything-0.1.1.tar.gz
.
File metadata
- Download URL: autodistill-segment-anything-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b29e006386cc2354f3eafe6394fd226562277f68c4f948533e6596586a2120c |
|
MD5 | 9152c6ab77aa4f15093dd069f9625953 |
|
BLAKE2b-256 | bba505d8ee7ea036b52e34ea5d7df66af35f1b21eb065d85577504e4fb8fde49 |
File details
Details for the file autodistill_segment_anything-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: autodistill_segment_anything-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c5f63f74b77f3e333644ad1b8f4b13ae2615bc32df75978e7f45cdcad0cd735 |
|
MD5 | debdfaf3f587ed69a61f01412bdafd7f |
|
BLAKE2b-256 | 555a7fa375fb28c55aa58a23f8eee2cca0073f962948a12ef96697778bafc3c2 |