Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add classify and segment usage into readme #147

Merged
merged 1 commit into from
Sep 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ results.save(save_dir='results/')

```python
from yolov5 import train, val, detect, export
# from yolov5.classify import train, val, predict
# from yolov5.segment import train, val, predict

train.run(imgsz=640, data='coco128.yaml')
val.run(imgsz=640, data='coco128.yaml', weights='yolov5s.pt')
Expand Down Expand Up @@ -271,3 +273,33 @@ $ yolov5 export --weights yolov5s.pt --include torchscript,onnx,coreml,pb,tfjs
```

</details>

<details open>
<summary>Classify</summary>

Train/Val/Predict with YOLOv5 image classifier:

```bash
$ yolov5 classify train --img 640 --data mnist2560 --weights yolov5s-cls.pt --epochs 1
```

```bash
$ yolov5 classify predict --img 640 --weights yolov5s-cls.pt --source images/
```

</details>

<details open>
<summary>Segment</summary>

Train/Val/Predict with YOLOv5 instance segmentation model:

```bash
$ yolov5 segment train --img 640 --weights yolov5s-seg.pt --epochs 1
```

```bash
$ yolov5 segment predict --img 640 --weights yolov5s-seg.pt --source images/
```

</details>