Cli support (#50)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Ayush Chaurasia 2022-11-23 16:07:27 +05:30 committed by GitHub
parent 4291b9c31c
commit 512a225ce8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 70 additions and 17 deletions

View file

@ -3,18 +3,32 @@
### Install
```bash
pip install ultralytics
```
Development
```
git clone https://github.com/ultralytics/ultralytics
cd ultralytics
python -m pip install --upgrade pip wheel
pip install . # (dev)
# pip install ultralytics (production)
pip install -e .
```
### Usage
## Usage
### 1. CLI
To simply use the latest Ultralytics YOLO models
```bash
yolo task=detect mode=train model=s.yaml ...
classify infer s-cls.yaml
segment val s-seg.yaml
```
### 2. Python SDK
To use pythonic interface of Ultralytics YOLO model
```python
import ultralytics
from ultralytics import HUB, YOLO
from ultralytics import YOLO
ultralytics.checks()
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, ...)
```
If you're looking to modify YOLO for R&D or to build on top of it, refer to [Using Trainer]() Guide on our docs.