https://github.com/autodistill/autodistill-target-model-template
A template for use in creating Autodistill Target Model packages.
https://github.com/autodistill/autodistill-target-model-template
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
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Keywords
Repository
A template for use in creating Autodistill Target Model packages.
Basic Info
- Host: GitHub
- Owner: autodistill
- Language: Python
- Default Branch: main
- Homepage: https://docs.autodistill.com/contributing/
- Size: 6.84 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
Autodistill Target Model Template
⚠️ Note: Before you start building a Target Model, check out our Available Models directory to see if a model is already being implemented. If your desired model is being implemented, check the Autodistill GitHub Issues for progress. We encourage you to offer support to models you want to see in Autodistill if work is already being done on them.
This repository contains a template for use in creating a Target Model for Autodistill.
Autodistill works with two categories of model:
- A Base Model. This is a large model that knows (or combination of models that know) how to identify many different objects.
- A Target Model. This is a model architecture on which you can train a smaller model using labeled data from the Base Model.
Autodistill is an ecosystem of Base and Target Models, with the main Autodistill repository acting as the bridge between the two.
This repository contains a starter template from which you can create a Target Model extension.
Read the full Autodistill documentation.
Steps to Build a Target Model
To build a target model, first rename the autodistill_target_model directory to the name of the model you want to implement:
autodistill_model_name
Use underscores to separate words in the folder name.
Next, open the model.py file. This is the file where your model loading and inference code will be stored. If you need to write helper functions for use with your model -- for example, long methods for loading data, processing extensions -- you may opt to create new files to store the helper scripts.
In model.py, replace the Model class name with the name of your model.
Next, implement the following functions:
__init__: Code for loading the model.predict: A function that takes in an image name, runs inference, and returns asupervisionDetections object (object detection) or asupervisionClassifications object (classification).train: A function that takes a dataset and trains a model. For object detection, we prefer YOLOv5 PyTorch TXT if possible. For classification, we prefer Classification Folder structure.
Replace the import statement in the __init__.py file in your model directory to point to your model. You only need to import the model, such as:
from autodistill_yolov5.model import YOLOv5
Your version should be set in the __init__.py file as 0.1.0 before submitting your model for review.
Update the setup.py file to use the name of your model where appropriate. Add all of the requisite dependencies to the install_requires section.
Your Target Model must feature a README that shows a minimal example of how to use the model. This should only be a few lines of code. Refer to README_EXAMPLE.md for an example of an Autodistill Target Model README. Feel free to copy this example and replace all parts as required.
Your package must be licensed under the same license as the model you are using (i.e. if your model uses an Apache 2.0 license, your Autodistill extension must use the same license). Your license should be in a file called LICENSE, stored in the root directory of your Autodistill extension GitHub repository.
Update your README to note the license applied to your package.
When your Autodistill extension is ready for testing, open an Issue in the main Autodistill repository with a link to a public GitHub repository that contains your code.
An Autodistill maintainer will review your code. If accepted, we will:
- Add your package to the Autodistill documentation.
- Package your project up to PyPi and publish it as an official
autodistillextension. - Announce your project on social media.
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
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| James Gallagher | j****g@j****g | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- EwoutH (2)