EvaClip module for use with Autodistill
Project description
Autodistill EvaCLIP Module
This repository contains the code supporting the CLIP base model for use with Autodistill.
EvaCLIP, is a computer vision model trained using pairs of images and text. It can be used for classification of images.
Read the full Autodistill documentation.
Read the EvaCLIP Autodistill documentation.
Installation
To use EvaCLIP with autodistill, you need to install the following dependency:
pip3 install autodistill-evaclip
Quickstart
from autodistill_evaclip import EvaCLIP
from autodistill.detection import CaptionOntology
# define an ontology to map class names to our EvaCLIP 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 = EvaCLIP(
ontology=CaptionOntology(
{
"person": "person",
"a forklift": "forklift"
}
)
)
results = base_model.predict("./context_images/test.jpg")
print(results)
base_model.label("./context_images", extension=".jpeg")
License
The code in this repository is licensed under an MIT 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autodistill_eva_clip-0.1.0.tar.gz.
File metadata
- Download URL: autodistill_eva_clip-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5218108010e98c9b3b855cac0e53c9f270b3d7dacb783eb3d9e519c4789dbf33
|
|
| MD5 |
7094d738eb4802c0b5a5a7fb9c56ba08
|
|
| BLAKE2b-256 |
af76ae0a3de8882e98ec28d81433ad799cc0efcd2e9e1d2f3b65ba8f6941c879
|
File details
Details for the file autodistill_eva_clip-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autodistill_eva_clip-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3269301b9f96d8564bd22727b380cd8248dd0f779fe4a48aaff24f2787ad808
|
|
| MD5 |
8b2686a3fe4fd3beabbce6c27792713f
|
|
| BLAKE2b-256 |
b116ac5366a62164fe1e252a3c800b62505ccfdd0f42b38eb1325c3ac85d7f53
|