Skip to content

deanmark/ultralytics-custom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultralytics Custom CLI Boilerplate Code

Boilerplate code for extending the Ultralytics YOLOv8 codebase and CLI, using the Ultralytics repository as an external dependency.

Brief Introduction

The most common method for adding custom code to the Ultralytics codebase, is by editing the Ultralytics repository, and adding the custom functionality into the existing codebase. Compared to this method, I suggest adding custom code on top of the Ultralytics codebase, using the Ultralytics repository as an external dependency.

Advantages:

  • Reduced code clutter
  • Changes are more visible
  • Easily update the base Ultralytics version

The boilerplate code contains a simple extension, that includes adding a textual indication whenever the epoch has currently achieved the best fitness score. This is done by printing (*) best while training.

Installation

The functionality depends on a PR currently pending in the Ultralytics repository. These changes can be previewed here:

git clone -b extend-cli https://github.com/deanmark/ultralytics.git

Install the current repo, and the modified ultralytics code by runnning pip install . in both directories.

Usage

Use the Ultralytics CLI as usual, but using the new yolo-custom command. For example:

yolo-custom train data=coco128.yaml model=yolov8n.pt epochs=10 lr0=0.01

logo

About

Ultralytics Custom CLI Boilerplate Code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages