docs setup (#61)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Ayush Chaurasia
2022-12-05 06:04:57 +05:30
committed by GitHub
parent 7ec7cf3aef
commit fe75a9ce67
16 changed files with 258 additions and 3 deletions

7
docs/README.md Normal file
View File

@ -0,0 +1,7 @@
## To serve docs
* Install ultralytics repo in Dev mode:
```
cd ultralytics
pip install -e '.[dev]'
```
* Run `mkdocs serve`

BIN
docs/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

72
docs/cli.md Normal file
View File

@ -0,0 +1,72 @@
## 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.
!!! tip "Syntax"
```bash
yolo task=detect mode=train model=s.yaml epochs=1 ...
... ... ...
segment infer s-cls.pt
classify val s-seg.pt
```
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.
=== "Training"
| | `task` | snippet |
| ----------- | ------------- | ----------------------------------------------------------- |
| Detection | `detect` | <pre><code>yolo task=detect mode=train </code></pre> |
| Instance Segment | `segment` | <pre><code>yolo task=segment mode=train </code></pre> |
| Classification | `classify` | <pre><code>yolo task=classify mode=train </code></pre> |
=== "Inference"
| | `task` | snippet |
| ----------- | ------------- | ------------------------------------------------------------ |
| Detection | `detect` | <pre><code>yolo task=detect mode=infer </code></pre> |
| Instance Segment | `segment` | <pre><code>yolo task=segment mode=infer </code></pre> |
| Classification | `classify` | <pre><code>yolo task=classify mode=infer </code></pre> |
=== "Validation"
| | `task` | snippet |
| ----------- | ------------- | ------------------------------------------------------------- |
| Detection | `detect` | <pre><code>yolo task=detect mode=val </code></pre> |
| Instance Segment | `segment` | <pre><code>yolo task=segment mode=val </code></pre> |
| Classification | `classify` | <pre><code>yolo task=classify mode=val </code></pre> |
!!! note ""
<b>Note:</b> 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.
!!! tip ""
=== "Syntax"
```yolo task= ... mode= ... {++ arg=val ++}```
=== "Example"
Perform detection training for `10 epochs` with `learning_rate` of `0.01`
```
yolo task=detect mode=train {++ epochs=10 lr0=0.01 ++}
```
---
## 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:
```bash
yolo task=init
```
You can then use special `--cfg name.yaml` command to pass the new config file
```bash
yolo task=detect mode=train {++ --cfg default.yaml ++}
```
??? example
=== "Command"
```
yolo task=init
yolo task=detect mode=train --cfg default.yaml
```
=== "Result"
TODO: add terminal output

0
docs/conf.md Normal file
View File

3
docs/index.md Normal file
View File

@ -0,0 +1,3 @@
# Welcome to Ultralytics YOLO
TODO

45
docs/quickstart.md Normal file
View File

@ -0,0 +1,45 @@
## Installation
!!! note "Latest Stable Release"
```
pip install ultralytics
```
??? tip "Development and Contributing"
```
git clone https://github.com/ultralytics/ultralytics
cd ultralytics
pip install -e '.[dev]'
```
See contributing section to know more about contributing to the project
## CLI
The command line YOLO interface let's you simply train, validate or infer models on various tasks and versions.
CLI requires no customization or code. You can simply run all tasks from the terminal
!!! tip
=== "Syntax"
```bash
yolo task=detect mode=train model=s.yaml epochs=1 ...
... ... ...
segment infer s-cls.pt
classify val s-seg.pt
```
=== "Example"
```bash
yolo task=detect mode=val model=s.yaml
```
TODO: add terminal screen/gif
[CLI Guide](#){ .md-button .md-button--primary}
## Python API
Ultralytics YOLO comes with pythonic Model and Trainer interface.
!!! tip
```python
import ultralytics
from ultralytics import YOLO
model = YOLO()
model.new("s-seg.yaml") # automatically detects task type
model.load("s-seg.pt") # load checkpoint
model.train(data="coco128-segments", epochs=1, lr0=0.01, ...)
```
[API Guide](#){ .md-button .md-button--primary}

0
docs/reference/ref.md Normal file
View File

11
docs/sdk.md Normal file
View File

@ -0,0 +1,11 @@
# Python SDK
We provide 2 pythonic interfaces for YOLO models:
<b> Model Interface </b> - To simply build, load, train or run inference on a model in a python application
<b> Trainer Interface </b> - To customize trainier elements depending on the task. Suitable for R&D ideas like architecutres.
______________________________________________________________________
### Model Interface

View File

0
docs/tasks/detection.md Normal file
View File

View File

0
docs/trainer.md Normal file
View File