Skip to content

viam-devrel/yolo-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO object detection training

A Python project for building, testing, and deploying a YOLOv8 object detection model exported as ONNX to the Viam registry. From the registry, the script can be used in the Viam custom training scripts flow for training ML models in the Viam cloud.

The script has been published to the Viam Registry as yolo-onnx-training.

If you'd like to learn how train and run your own YOLO model, check out this codelab!

Usage

In the app:

Follow the steps listed in the Viam docs. Make sure to select the latest version of the yolo-onnx-training script.

From the command line:

In order to submit this script with custom arguments, you must use the Viam CLI. One such example is included below:

viam train submit custom from-registry \
--dataset-id=<DATASET-ID> \ 
--org-id=<ORG-ID> \
--model-name=yolo-detection \
--model-type=object_detection \
--script-name=yolo-onnx-training \
--args=num_epochs=100,labels="'green_square blue_star'"

Be sure to note that labels is surrounded with single quotes then enclosed with double quotes to ensure it is submitted properly. If you are running the script from a previous version or from the website, you will not be able to use custom arguments.

You can find your organization ID when viewing your organization settings and invites. The dataset ID can be copied from the ... menu on your dataset overview page.

Development

This project is managed using uv and make.

After installing uv, sync the project dependencies:

make install

Build and publish a new version of the script:

  1. Update the pyproject.toml with the new version number.
  2. Run the following command with the new version number in place of <version>:
    version=<version> make publish
    
    You must be authenticated with the Viam CLI and have access to the Viam devrel organization.

About

A custom training script for YOLO models from a Viam dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published