calculating distance between 2 key points in pose estimation #5812
Replies: 1 comment
-
@NawoyaSarah hello! For labeling your data for keypoint detection with YOLOv8, you'll want to annotate your images with keypoints in a manner that's compatible with the model's expectations. This typically involves marking the keypoints of interest on each object in your images and ensuring that the annotations are saved in a format that YOLOv8 can understand. Once you have a trained model that can predict keypoints, calculating the Euclidean distance between two keypoints is a matter of obtaining their coordinates from the model's predictions. After you run your images through the model and get the keypoint predictions, you can simply apply the Euclidean distance formula between the two points of interest. The formula for Euclidean distance between two points (x1, y1) and (x2, y2) is:
You would extract the coordinates from the model's output and then apply this formula in your code to get the distance. For more detailed guidance on how to work with keypoints in YOLOv8, including training and prediction, please refer to the Pose/Keypoint Estimation section in our documentation. 😊 |
Beta Was this translation helpful? Give feedback.
-
Hello there,
First, how can i label my data for key point detection in Yolov8,
Second, How can i calculate the distance between 2 key points, i know its to do with Euclidean distance, but how do i capture this?
Beta Was this translation helpful? Give feedback.
All reactions