FastSAM module for use with Autodistill
Project description
Autodistill FastSAM Module
This repository contains the code supporting the FastSAM base model for use with Autodistill.
FastSAM is a segmentation model trained on 2% of the SA-1B dataset used to train the Segment Anything Model.
Read the full Autodistill documentation.
Read the FastSAM Autodistill documentation.
Installation
To use FastSAM with autodistill, you need to install the following dependency:
pip3 install autodistill-fastsam
Quickstart
from autodistill_fastsam import FastSAM
# define an ontology to map class names to our FastSAM prompt
# the ontology dictionary has the format {caption: class}
# where caption is the prompt sent to the base model, and class is the label that will
# be saved for that caption in the generated annotations
# then, load the model
base_model = FastSAM(
ontology=CaptionOntology(
{
"person": "person",
"a forklift": "forklift"
}
)
)
base_model.label("./context_images", extension=".jpeg")
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
Close
Hashes for autodistill-fastsam-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d57e607065b40d020ce1c93fa8dcb956527022d7018a2f8654b35422c30cf85 |
|
MD5 | 0197940899e392c2592d7036650d4890 |
|
BLAKE2b-256 | 6429c4645b88ed3bc0de293089e8d293b562645ddcf792b70d0308501700c9bb |
Close
Hashes for autodistill_fastsam-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb25782a1e9a75e8ea1118c608e5f0783ac8d888ba8f86f6ba43f429b5c09b8 |
|
MD5 | 164a6bf40b869d53fa4561e2a5770f3a |
|
BLAKE2b-256 | 445e26aec15cd62c0f04bde74bd41453cbbfdea20fb6a6f0a08eeb57342bf6f5 |