Skip to main content

OWLv2 base model for use with Autodistill.

Project description

Autodistill OWLv2 Module

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

OWLv2 is a zero-shot object detection model that follows from on the OWL-ViT architecture. OWLv2 has an open vocabulary, which means you can provide arbitrary text prompts for the model. You can use OWLv2 with autodistill for object detection.

Read the full Autodistill documentation.

Read the OWLv2 Autodistill documentation.

Installation

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

pip3 install autodistill-owlv2

Quickstart

from autodistill_owlv2 import OWLv2

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodistill-owlv2-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autodistill_owlv2-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file autodistill-owlv2-0.1.0.tar.gz.

File metadata

  • Download URL: autodistill-owlv2-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for autodistill-owlv2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4fab700b9fcd62925e768a22f4f127be34233ad01970997ac111cebe148f9aed
MD5 b94bfa5cc7a945d2d88e743b2f385e66
BLAKE2b-256 92d0c95043e3b041ebde62253d75882b5d3f392797ad0ef1b555444b3e256c13

See more details on using hashes here.

File details

Details for the file autodistill_owlv2-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autodistill_owlv2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 811e11ee2488c4d24107d785b6c5393043a530ce2582198b3de9ca52a66ec26d
MD5 dd71d0cbfed749fd9a6293d3f3868c24
BLAKE2b-256 cbd4de193329d46f3bb8e2d38e662872bb1c235444c354a2054ee24858c78066

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page