Skip to content

Commit

Permalink
docs: YOLO segementation operator (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
aatmanvaidya authored Jan 6, 2024
1 parent 17b9d10 commit 1a3da78
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/src/pages/operators/detect-objects.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Documentation for Object Detection using YOLO

You only look once (YOLO) is a state-of-the-art, real-time object detection system. It is trained on the COCO dataset.

I am using the segment model of YOLO -> YOLOv8 segment - https://docs.ultralytics.com/tasks/segment/#models

it's easy to setup and use YOLO

First, we have to install the `ultralytics` library
```
pip install ultralytics
```

then just setup YOLO object detection like this
```
from ultralytics import YOLO
model = YOLO('yolov8n-seg.pt')
result = model.predict('path/to/your/image', save=True, imgsz=1024, conf=0.5, project='sample_data', name='output')
```

the output image will be saved in `sample_data/output` folder, and the resulting image will be titled as `output.png`. This image will have bounding boxes with objects detected and will also show the segmented area.

0 comments on commit 1a3da78

Please sign in to comment.