autodistill-yolo-world


Nameautodistill-yolo-world JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/autodistill/autodistill-yolo-world
SummaryYOLO World for use with Autodistill
upload_time2024-02-19 10:26:56
maintainer
docs_urlNone
authorRoboflow
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="850"
        src="https://media.roboflow.com/open-source/autodistill/autodistill-banner.png"
      >
    </a>
  </p>
</div>

# Autodistill YOLO-World Module

This repository contains the code supporting the YOLO-World base model for use with [Autodistill](https://github.com/autodistill/autodistill).

[YOLO-World](https://github.com/AILab-CVC/YOLO-World), developed by Tencent's AI Lab, is a zero-shot object detection model that can run in close-to-real-time on powerful GPUs. You can provide arbitrary text prompts to detect objects in images, and the model will return bounding boxes and class labels for the objects it finds.

You can use YOLO-World in Autodistill to detect objects.

Read the full [Autodistill documentation](https://autodistill.github.io/autodistill/).

Read the [YOLO-World Autodistill documentation](https://autodistill.github.io/autodistill/base_models/yolo_world/).

## Installation

To use YOLO-World with autodistill, you need to install the following dependency:

```bash
pip3 install autodistill-yolo-world
```

## Quickstart

```python
from autodistill_yolo_world import YOLOWorldModel
from autodistill.detection import CaptionOntology
from autodistill.utils import plot
import cv2

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

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

plot(
    image=cv2.imread("./bookshelf.jpeg"),
    classes=base_model.ontology.classes(),
    detections=result
)
```


## License

The YOLO-World model is released under a [GPT-3.0 license](https://github.com/AILab-CVC/YOLO-World).

## 🏆 Contributing

We love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/autodistill/autodistill-yolo-world",
    "name": "autodistill-yolo-world",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Roboflow",
    "author_email": "support@roboflow.com",
    "download_url": "https://files.pythonhosted.org/packages/4e/4f/0a3039d5bf7511871e863de2e10a7ef467c361c623dccd12b82383f26fcb/autodistill-yolo-world-0.1.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <p>\n    <a align=\"center\" href=\"\" target=\"_blank\">\n      <img\n        width=\"850\"\n        src=\"https://media.roboflow.com/open-source/autodistill/autodistill-banner.png\"\n      >\n    </a>\n  </p>\n</div>\n\n# Autodistill YOLO-World Module\n\nThis repository contains the code supporting the YOLO-World base model for use with [Autodistill](https://github.com/autodistill/autodistill).\n\n[YOLO-World](https://github.com/AILab-CVC/YOLO-World), developed by Tencent's AI Lab, is a zero-shot object detection model that can run in close-to-real-time on powerful GPUs. You can provide arbitrary text prompts to detect objects in images, and the model will return bounding boxes and class labels for the objects it finds.\n\nYou can use YOLO-World in Autodistill to detect objects.\n\nRead the full [Autodistill documentation](https://autodistill.github.io/autodistill/).\n\nRead the [YOLO-World Autodistill documentation](https://autodistill.github.io/autodistill/base_models/yolo_world/).\n\n## Installation\n\nTo use YOLO-World with autodistill, you need to install the following dependency:\n\n```bash\npip3 install autodistill-yolo-world\n```\n\n## Quickstart\n\n```python\nfrom autodistill_yolo_world import YOLOWorldModel\nfrom autodistill.detection import CaptionOntology\nfrom autodistill.utils import plot\nimport cv2\n\n# define an ontology to map class names to our GroundingDINO prompt\n# the ontology dictionary has the format {caption: class}\n# where caption is the prompt sent to the base model, and class is the label that will\n# be saved for that caption in the generated annotations\n# then, load the model\nbase_model = YOLOWorldModel(ontology=CaptionOntology({\"book\": \"book\"}))\n\n# predict on an image\nresult = base_model.predict(\"bookshelf.jpeg\", confidence=0.1)\n\nplot(\n    image=cv2.imread(\"./bookshelf.jpeg\"),\n    classes=base_model.ontology.classes(),\n    detections=result\n)\n```\n\n\n## License\n\nThe YOLO-World model is released under a [GPT-3.0 license](https://github.com/AILab-CVC/YOLO-World).\n\n## \ud83c\udfc6 Contributing\n\nWe love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you \ud83d\ude4f to all our contributors!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "YOLO World for use with Autodistill",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/autodistill/autodistill-yolo-world"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d17ad1183f0224df14ffcc2267677c9c8b00a18a435f9af7e7dbd735ede2fe1",
                "md5": "5425a1d457d9f25a0f49e9798853e435",
                "sha256": "6e70303a8dd8e6733ecebde805ad9fff7a019ca5c03b7ce79440c97785602447"
            },
            "downloads": -1,
            "filename": "autodistill_yolo_world-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5425a1d457d9f25a0f49e9798853e435",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3277,
            "upload_time": "2024-02-19T10:26:54",
            "upload_time_iso_8601": "2024-02-19T10:26:54.135731Z",
            "url": "https://files.pythonhosted.org/packages/2d/17/ad1183f0224df14ffcc2267677c9c8b00a18a435f9af7e7dbd735ede2fe1/autodistill_yolo_world-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e4f0a3039d5bf7511871e863de2e10a7ef467c361c623dccd12b82383f26fcb",
                "md5": "2acc186156ccdf8b34945d505bb9decf",
                "sha256": "2bcdda892f342f5bff7be1fad409b2cd60aaafebe3d66504b429b9fb71503412"
            },
            "downloads": -1,
            "filename": "autodistill-yolo-world-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2acc186156ccdf8b34945d505bb9decf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3068,
            "upload_time": "2024-02-19T10:26:56",
            "upload_time_iso_8601": "2024-02-19T10:26:56.039002Z",
            "url": "https://files.pythonhosted.org/packages/4e/4f/0a3039d5bf7511871e863de2e10a7ef467c361c623dccd12b82383f26fcb/autodistill-yolo-world-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-19 10:26:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "autodistill",
    "github_project": "autodistill-yolo-world",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "autodistill-yolo-world"
}
        
Elapsed time: 0.49899s