diff --git a/docs/en/tasks/detect.md b/docs/en/tasks/detect.md index 68c53f07..09efe67c 100644 --- a/docs/en/tasks/detect.md +++ b/docs/en/tasks/detect.md @@ -122,6 +122,15 @@ Use a trained YOLO11n model to run predictions on images. # Predict with the model results = model("https://ultralytics.com/images/bus.jpg") # predict on an image + + # Access the results + for result in results: + xywh = result.boxes.xywh # center-x, center-y, width, height + xywhn = result.boxes.xywhn # normalized + xyxy = result.boxes.xyxy # top-left-x, top-left-y, bottom-right-x, bottom-right-y + xyxyn = result.boxes.xyxyn # normalized + names = [result.names[cls.item()] for cls in result.boxes.cls.int()] # class name of each box + confs = result.boxes.conf # confidence score of each box ``` === "CLI" diff --git a/docs/en/tasks/obb.md b/docs/en/tasks/obb.md index 621ffc78..3d1dc571 100644 --- a/docs/en/tasks/obb.md +++ b/docs/en/tasks/obb.md @@ -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" diff --git a/docs/en/tasks/pose.md b/docs/en/tasks/pose.md index 7efe7414..4cabf4cf 100644 --- a/docs/en/tasks/pose.md +++ b/docs/en/tasks/pose.md @@ -143,6 +143,12 @@ Use a trained YOLO11n-pose model to run predictions on images. # Predict with the model results = model("https://ultralytics.com/images/bus.jpg") # predict on an image + + # Access the results + for result in results: + xy = result.keypoints.xy # x and y coordinates + xyn = result.keypoints.xyn # normalized + kpts = result.keypoints.data # x, y, visibility (if available) ``` === "CLI" diff --git a/docs/en/tasks/segment.md b/docs/en/tasks/segment.md index 33c19d9d..e4f024ae 100644 --- a/docs/en/tasks/segment.md +++ b/docs/en/tasks/segment.md @@ -127,6 +127,12 @@ Use a trained YOLO11n-seg model to run predictions on images. # Predict with the model results = model("https://ultralytics.com/images/bus.jpg") # predict on an image + + # Access the results + for result in results: + xy = result.masks.xy # mask in polygon format + xyn = result.masks.xyn # normalized + masks = result.masks.data # mask in matrix format (num_objects x H x W) ``` === "CLI"