Skip to main content

Autodistill EfficientYOLOWorld Module

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

EfficientYOLOWorld is a combination of two models:

  1. YOLO-World, a zero-shot object detection model, and;
  2. EfficientSAM, an image segmentation model.

This model runs EfficientSAM on each bounding box region generated by YOLO-World. This allows you to retrieve both the bounding box and the segmentation mask for each object of interest in an image.

Read the full Autodistill documentation.

Read the EfficientYOLOWorld Autodistill documentation.

Installation

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

pip3 install autodistill-efficient-yolo-world

Quickstart

from autodistill_efficient_yolo_world import EfficientYOLOWorld
from autodistill.detection import CaptionOntology
import cv2
import supervision as sv

# define an ontology to map class names to our EfficientYOLOWorld 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 = EfficientYOLOWorld(ontology=CaptionOntology({"book": "book"}))

# predict on an image
result = base_model.predict("bookshelf.jpeg", confidence=0.1)

image = cv2.imread("bookshelf.jpeg")

mask_annotator = sv.MaskAnnotator()
annotated_frame = mask_annotator.annotate(
	scene=image.copy(),
	detections=result,
)

sv.plot_image(annotated_frame)

base_model.label("./context_images", extension=".jpeg")

License

EfficientSAM is licensed under an Apache 2.0 license.

YOLO-World is licensed under a GPL-3.0 license.

🏆 Contributing

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

Metadata

Release files for autodistill-efficient-yolo-world 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autodistill-efficient-yolo-world 0.1.1
File Size Uploaded Provenance Actions
autodistill-efficient-yolo-world-0.1.1.tar.gz 5.7 kB Without provenance Details for autodistill-efficient-yolo-world-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autodistill-efficient-yolo-world 0.1.1
File Interpreter ABI Platform Actions
autodistill_efficient_yolo_world-0.1.1-py3-none-any.whl Python 3 none any Details for autodistill_efficient_yolo_world-0.1.1-py3-none-any.whl

Total release size: 9.4 kB

Release files / autodistill-efficient-yolo-world-0.1.1.tar.gz

Download URL autodistill-efficient-yolo-world-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a23f90388868e5d1f40482e85a64e5753d24e88f3e38c70231b9657e2eca0bca
BLAKE2b-256 checksum
How to use checksums
632f145af030407771d48be1bb862a9fc6efdba085376bee681dd74fbe85df4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / autodistill_efficient_yolo_world-0.1.1-py3-none-any.whl

Download URL autodistill_efficient_yolo_world-0.1.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef631c6f1413c4c66d66ae7c94675d3613a63d777f7d849e0955b55fe45494b2
BLAKE2b-256 checksum
How to use checksums
6bdec28b11dead9f88ea3551ef11b477fd286f130a1654e4f2619e801777e5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for autodistill-efficient-yolo-world 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page