Add Dockerfiles and update Docs README (#124)

Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2022-12-31 18:39:42 +01:00 committed by GitHub
parent df4fc14c10
commit a9b9fe7618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 608 additions and 167 deletions

View file

@ -5,7 +5,9 @@
```bash
pip install ultralytics
```
Development
```
git clone https://github.com/ultralytics/ultralytics
cd ultralytics
@ -13,25 +15,34 @@ pip install -e .
```
## Usage
### 1. CLI
To simply use the latest Ultralytics YOLO models
```bash
yolo task=detect mode=train model=yolov8n.yaml args=...
classify predict yolov8n-cls.yaml args=...
segment val yolov8n-seg.yaml args=...
export yolov8n.pt format=onnx
```
### 2. Python SDK
To use pythonic interface of Ultralytics YOLO model
```python
from ultralytics import YOLO
model = YOLO.new('yolov8n.yaml') # create a new model from scratch
model = YOLO.load('yolov8n.pt') # load a pretrained model (recommended for best training results)
model = YOLO.new("yolov8n.yaml") # create a new model from scratch
model = YOLO.load(
"yolov8n.pt"
) # load a pretrained model (recommended for best training results)
results = model.train(data='coco128.yaml', epochs=100, imgsz=640, ...)
results = model.train(data="coco128.yaml", epochs=100, imgsz=640, ...)
results = model.val()
results = model.predict(source='bus.jpg')
success = model.export(format='onnx')
results = model.predict(source="bus.jpg")
success = model.export(format="onnx")
```
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.
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.