VLPart for use with Autodistill
Project description
Autodistill VLPart Module
This repository contains the code supporting the VLPart base model for use with Autodistill.
VLPart, developed by Meta Research, is an object detection and segmentation model that works with an open vocabulary. autodistill-vlpart
enables you to use VLPart to auto-label images for use in training a fine-tuned model. autodistill-vlpart
supports the LVIS vocabulary.
Read the full Autodistill documentation.
Read the VLPart Autodistill documentation.
Installation
To use VLPart with autodistill, you need to install the following dependency:
pip3 install autodistill-vlpart
Quickstart
from autodistill_vlpart import VLPart
from autodistill.detection import CaptionOntology
# define an ontology to map class names to our VLPart 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 = VLPart(
ontology=CaptionOntology(
{
"person": "person",
"a forklift": "forklift"
}
)
)
predictions = base_model.predict("./image.png")
print(predictions)
# label the images in the context_images folder
base_model.label("./context_images", extension=".jpeg")
License
This project 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
Hashes for autodistill_vlpart-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4a2f9a0d7f50c78644ba45595f6aa08a5766ff98e2ff3629301bbaf891af22d |
|
MD5 | 8a5232855a4bd646242d2bfbcf6a037d |
|
BLAKE2b-256 | e887d0c0b9b0f547c1eef9d929fd6b9d84e4e5298d04bb438ebebf9593bd4917 |