<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 OWL-ViT Module
This repository contains the code supporting the OWL-ViT base model for use with [Autodistill](https://github.com/autodistill/autodistill).
[OWL-ViT](https://huggingface.co/google/owlvit-base-patch32) is a transformer-based object detection model developed by Google Research.
Read the full [Autodistill documentation](https://autodistill.github.io/autodistill/).
Read the [OWL-ViT Autodistill documentation](https://autodistill.github.io/autodistill/base_models/owlvit/).
## Installation
To use OWL-ViT with autodistill, you need to install the following dependency:
```bash
pip3 install autodistill-owl-vit
```
## Quickstart
```python
from autodistill_owl_vit import OWLViT
# define an ontology to map class names to our OWLViT 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 = OWLViT(
ontology=CaptionOntology(
{
"person": "person",
"a forklift": "forklift"
}
)
)
base_model.label("./context_images", extension=".jpg")
```
## License
The code in this repository is licensed under an [Apache 2.0 license](LICENSE).
## 🏆 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-owl-vit",
"name": "autodistill-owl-vit",
"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/5c/dc/c4117f733147098d8068ac4270ac75a23152d4e113cc238bcbbb23ac0466/autodistill_owl_vit-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 OWL-ViT Module\n\nThis repository contains the code supporting the OWL-ViT base model for use with [Autodistill](https://github.com/autodistill/autodistill).\n\n[OWL-ViT](https://huggingface.co/google/owlvit-base-patch32) is a transformer-based object detection model developed by Google Research.\n\nRead the full [Autodistill documentation](https://autodistill.github.io/autodistill/).\n\nRead the [OWL-ViT Autodistill documentation](https://autodistill.github.io/autodistill/base_models/owlvit/).\n\n## Installation\n\nTo use OWL-ViT with autodistill, you need to install the following dependency:\n\n\n```bash\npip3 install autodistill-owl-vit\n```\n\n## Quickstart\n\n```python\nfrom autodistill_owl_vit import OWLViT\n\n# define an ontology to map class names to our OWLViT 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 = OWLViT(\n ontology=CaptionOntology(\n {\n \"person\": \"person\",\n \"a forklift\": \"forklift\"\n }\n )\n)\nbase_model.label(\"./context_images\", extension=\".jpg\")\n```\n\n## License\n\nThe code in this repository is licensed under an [Apache 2.0 license](LICENSE).\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": "OWL-ViT module for use with Autodistill",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/autodistill/autodistill-owl-vit"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "275f845a8240f8a09a473d07026a81b1cd523a4a50107bdb00849047f99259ae",
"md5": "3b9a0372b01e39c0e00ed1460fc27029",
"sha256": "9763242677b87f1c18ad01063993514b33111621fcd8ed42002c9f47aa9ebc0a"
},
"downloads": -1,
"filename": "autodistill_owl_vit-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b9a0372b01e39c0e00ed1460fc27029",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 10904,
"upload_time": "2023-12-06T09:18:43",
"upload_time_iso_8601": "2023-12-06T09:18:43.475857Z",
"url": "https://files.pythonhosted.org/packages/27/5f/845a8240f8a09a473d07026a81b1cd523a4a50107bdb00849047f99259ae/autodistill_owl_vit-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5cdcc4117f733147098d8068ac4270ac75a23152d4e113cc238bcbbb23ac0466",
"md5": "7037776a2ded583fe7dac5241b5cd7ed",
"sha256": "3e8ed1c9562d4c4e86aa654e209a88c6089b2fc4f25c1e2eaae8b8ff0e641148"
},
"downloads": -1,
"filename": "autodistill_owl_vit-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "7037776a2ded583fe7dac5241b5cd7ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9730,
"upload_time": "2023-12-06T09:18:45",
"upload_time_iso_8601": "2023-12-06T09:18:45.263272Z",
"url": "https://files.pythonhosted.org/packages/5c/dc/c4117f733147098d8068ac4270ac75a23152d4e113cc238bcbbb23ac0466/autodistill_owl_vit-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-06 09:18:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "autodistill",
"github_project": "autodistill-owl-vit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "autodistill-owl-vit"
}