Reference for ultralytics/models/yolo/pose/predict.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/predict.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.yolo.pose.predict.PosePredictor
Bases: DetectionPredictor
A class extending the DetectionPredictor class for prediction based on a pose model.
Example
Source code in ultralytics/models/yolo/pose/predict.py
construct_result
Constructs the result object from the prediction.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pred
|
Tensor
|
The predicted bounding boxes, scores, and keypoints. |
required |
img
|
Tensor
|
The image after preprocessing. |
required |
orig_img
|
ndarray
|
The original image before preprocessing. |
required |
img_path
|
str
|
The path to the original image. |
required |
Returns:
Type | Description |
---|---|
Results
|
The result object containing the original image, image path, class names, bounding boxes, and keypoints. |
Source code in ultralytics/models/yolo/pose/predict.py
📅 Created 1 year ago
✏️ Updated 4 months ago