https://github.com/autodistill/autodistill-gemini
Use Gemini to auto-label images for use with Autodistill.
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 (14.8%) to scientific vocabulary
Keywords
Repository
Use Gemini to auto-label images for use with Autodistill.
Basic Info
- Host: GitHub
- Owner: autodistill
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://docs.autodistill.com
- Size: 15.6 KB
Statistics
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Autodistill Gemini Module
This repository contains the code supporting the Gemini base model for use with Autodistill.
Gemini, developed by Google, is a multimodal computer vision model that allows you to ask questions about images. You can use Gemini with Autodistill for image classification.
You can combine Gemini with other base models to label regions of an object. For example, you can use Grounding DINO to identify abstract objects (i.e. a vinyl record) then Gemini to classify the object (i.e. say which of five vinyl records the region represents). Read the Autodistill Combine Models guide for more information.
[!NOTE] Using this project will incur billing charges for API calls to the Gemini API. Refer to the Google Cloud pricing page for more information and to calculate your expected pricing. This package makes one API call per image you want to label.
Read the full Autodistill documentation.
Installation
To use Gemini with autodistill, you need to install the following dependency:
bash
pip3 install autodistill-gemini
Quickstart
```python from autodistill_gemini import Gemini
define an ontology to map class names to our Gemini 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
basemodel = Gemini( ontology=CaptionOntology( { "person": "person", "a forklift": "forklift" } ), gcpregion="us-central1", gcp_project="project-name", model="gemini-1.5-flash" )
run inference on an image
result = base_model.predict("image.jpg")
print(result)
label a folder of images
basemodel.label("./contextimages", extension=".jpeg") ```
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
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 22 hours
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- 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
- lab176344 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 45 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: autodistill-gemini
Model for use with Autodistill
- Homepage: https://github.com/autodistill/autodistill-gemini
- Documentation: https://autodistill-gemini.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.0
published about 2 years ago