CLI
CLI Basics
If you want to train, validate or run inference on models and don't need to make any modifications to the code, using YOLO command line interface is the easiest way to get started.
Syntax
The experiment arguments can be overridden directly by pass arg=val
covered in the next section. You can run any supported task by setting task
and mode
in cli.
task |
snippet | |
---|---|---|
Detection | detect |
|
Instance Segment | segment |
|
Classification | classify |
|
task |
snippet | |
---|---|---|
Detection | detect |
|
Instance Segment | segment |
|
Classification | classify |
|
task |
snippet | |
---|---|---|
Detection | detect |
|
Instance Segment | segment |
|
Classification | classify |
|
Note: The arguments don't require '--'
prefix. These are reserved for special commands covered later
Overriding default config arguments
All global default arguments can be overriden by simply passing them as arguments in the cli.
Overriding default config file
You can override config file entirely by passing a new file. You can create a copy of default config file in your current working dir as follows:
You can then use special--cfg name.yaml
command to pass the new config file