https://github.com/autodistill/autodistill-roboflow-universe
Use models on Roboflow Universe to auto-label data for use in model training.
https://github.com/autodistill/autodistill-roboflow-universe
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Keywords
Repository
Use models on Roboflow Universe to auto-label data for use in model training.
Basic Info
- Host: GitHub
- Owner: autodistill
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://docs.autodistill.com
- Size: 22.5 KB
Statistics
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Autodistill Roboflow Universe Module
This repository contains the code supporting the Roboflow Universe base model for use with Autodistill.
Roboflow Universe is a community where people share computer vision models and datasets. Over 50,000 models and 250,000 datasets have been shared on Universe, with new models available every day. You can use Autodistill to run object detection, classification, and segmentation models hosted on Roboflow Universe.
[!NOTE] Using this project will use Roboflow API calls. You will need a free Roboflow account to use this project. Sign up for a free Roboflow account to get started. Learn more about pricing.
Read the full Autodistill documentation.
Read the Roboflow Universe Autodistill documentation.
Installation
To use models hosted on Roboflow Universe with autodistill, you need to install the following dependency:
bash
pip3 install autodistill-roboflow-universe
Quickstart
[!NOTE] Autodistill uses ontology to map model predictions to the expected class labels. For other Autodistill models, the term 'caption' is used when the model accepts prompting or a description for a prediction. When using Roboflow Universe as an Autodistill base model, the 'caption' will be the class name/label that the Universe model will return.
```python from autodistillroboflowuniverse import RoboflowUniverseModel from autodistill.detection import CaptionOntology from autodistill.utils import plot import cv2
define an ontology to map class names to our Roboflow model 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 in the generated annotations
modelconfigs = [ ("PROJECTID", VERSION_NUMBER) ]
basemodel = RoboflowUniverseModel( ontology=CaptionOntology( { "person": "person", "forklift": "vehicle" } ), apikey="ROBOFLOWAPIKEY", modelconfigs=modelconfigs, )
run inference on a single image
result = base_model.predict("image.jpeg")
print(result)
plot( image=cv2.imread("image.jpeg"), detections=result, classes=base_model.ontology.classes(), )
label a folder of images
basemodel.label("./contextimages", extension=".jpeg") ```
Above, replace:
API_KEY: with your Roboflow API keyPROJECT_NAME: with your Roboflow project ID.VERSION: with your Roboflow model version.model_type: with the type of model you want to run. Options areobject-detection,classification, orsegmentation. This value must be the same as the model type trained on Roboflow Universe.
You can run multiple models on a single image. This is ideal if you need to identify multiple objects using different models hosted on Roboflow Universe. To run multiple models, add the models you want to run in the model_configs list. For example:
python
model_configs = [
("PROJECT_ID", VERSION_NUMBER),
("PROJECT_ID", VERSION_NUMBER)
]
All models will be run on every image.
Learn how to retrieve your Roboflow API key. Learn how to retrieve a model ID.
License
This project is licensed under an MIT license.
🏆 Contributing
We love your input! Please see the core Autodistill contributing guide to get started. Thank you 🙏 to all our contributors!
Owner
- Name: Autodistill
- Login: autodistill
- Kind: organization
- Email: autodistill@roboflow.com
- Website: https://autodistill.com
- Repositories: 1
- Profile: https://github.com/autodistill
Use bigger slower models to train smaller faster ones
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: about 24 hours
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- stellasphere (2)
- artyaltanzaya (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- autodistill *
- supervision *