-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: YOLO segementation operator (#46)
- Loading branch information
1 parent
17b9d10
commit 1a3da78
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |