No items found.
Use the widget below to experiment with OWL ViT. You can detect COCO classes such as people, vehicles, animals, household items.
OWL-ViT is a transformer-based object detection model developed by Google Research.
OWL ViT
is licensed under a
license.
You can use Roboflow Inference to deploy a
OWL ViT
API on your hardware. You can deploy the model on CPU (i.e. Raspberry Pi, AI PCs) and GPU devices (i.e. NVIDIA Jetson, NVIDIA T4).
Below are instructions on how to deploy your own model API.
First, install Autodistill and Autodistill OWL-ViT:
pip install autodistill autodistill-owl-vit
Then, run:
from autodistill_owl_vit import OWLViT
from autodistill.detection import CaptionOntology
# define an ontology to map class names to our OWLViT 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 = OWLViT(
ontology=CaptionOntology(
{
"person": "person",
"a forklift": "forklift"
}
)
)
result = base_model.predict("image.jpeg")
print(result)