Git Product home page Git Product logo

autodistill-yolo-world's Introduction

Autodistill: YOLO-World Base Model

This repository contains the code implementing YOLO-World as a Base Model for use with autodistill.

YOLO-World combines YOLO-World brings YOLO like efficiency for training and inferring open-vocabulary models

Read the full Autodistill documentation.

Installation

To use the YOLO-World, simply install it along with a Target Model supporting the detection task:

pip3 install autodistill-yolo-world

You can find a full list of detection Target Models on the main autodistill repo.

Quickstart

from autodistill_yolo_world import YoloWorld
from autodistill.detection import CaptionOntology
from autodistill.utils import plot
import cv2

# define an ontology to map class names to our GroundedSAM 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 = YoloWorld(
    ontology=CaptionOntology(
        {
            "person": "person",
            "car": "car",
        }
    ),
    model_type = "yolov8s-world.pt"
)

# run inference on a single image
results = base_model.predict("assets/test.jpg")

plot(
    image=cv2.imread("assets/test.jpg"),
    classes=base_model.ontology.classes(),
    detections=results
)
# label all images in a folder called `context_images`
base_model.label("./context_images", extension=".jpeg")

License

The code in this repository is licensed under an Apache 2.0 license.

๐Ÿ† Thanks

Thanks to autodistill and ultralytics

autodistill-yolo-world's People

Contributors

lakshmanmoiiai avatar lab176344 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.