Skip to content

german36-del/autodistill-omdet_turbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autodistill OmdetTurbo Module

This repository contains the code supporting the OmdetTurbo base model for use with Autodistill.

OmdetTurbo, developed by Binjiang Institute of Zhejiang University, is a computer vision model for zero-shot detection in real time.

Read the full Autodistill documentation.

Read the Omdet-turbo Autodistill documentation.

Installation

To use OmdetTurbo with autodistill, you need to install the following dependency:

pip3 install autodistill-omdet_turbo

Quickstart

from autodistill_omdet_turbo import OmdetTurbo
from autodistill.detection import CaptionOntology
from autodistill.utils import plot
import cv2

# define an ontology to map class names to our OmdetTurbo 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 = OmdetTurbo(
    ontology=CaptionOntology({"person": "person", "a forklift": "forklift"})
)

results = base_model.predict("iamge.png")

plot(
    image=cv2.imread("image.png"),
    classes=base_model.ontology.classes(),
    detections=results,
)
base_model.label("./context_images", extension=".jpeg")

License

This model is licensed under an Apache 2.0 (see original model implementation license, and the corresponding HuggingFace Transformers documentation).

🏆 Contributing

We love your input! Please see the core Autodistill contributing guide to get started. Thank you 🙏 to all our contributors!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published