Add examples showing how to use result for all tasks (#19282)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
This commit is contained in:
parent
384ace4617
commit
aa1c6c9a24
4 changed files with 28 additions and 0 deletions
|
|
@ -142,6 +142,13 @@ Use a trained YOLO11n-obb model to run predictions on images.
|
|||
|
||||
# Predict with the model
|
||||
results = model("https://ultralytics.com/images/boats.jpg") # predict on an image
|
||||
|
||||
# Access the results
|
||||
for result in results:
|
||||
xywhr = result.keypoints.xy # center-x, center-y, width, height, angle (radians)
|
||||
xyxyxyxy = result.obb.xyxyxyxy # polygon format with 4-points
|
||||
names = [result.names[cls.item()] for cls in result.obb.cls.int()] # class name of each box
|
||||
confs = result.obb.conf # confidence score of each box
|
||||
```
|
||||
|
||||
=== "CLI"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue