Key Point Estimation is a task that involves identifying the location of specific points in an image, usually referred
to as keypoints. The keypoints can represent various parts of the object such as joints, landmarks, or other distinctive
features. The locations of the keypoints are usually represented as a set of 2D
[x, y] or 3D
[x, y, visible]
The output of a keypoint detector is a set of points that represent the keypoints on the object in the image, usually along with the confidence scores for each point. Keypoint estimation is a good choice when you need to identify specific parts of an object in a scene, and their location in relation to each other.
YOLOv8 keypoints models use the
-kpts suffix, i.e.
yolov8n-kpts.pt. These models are trained on the COCO dataset and are suitable for a variety of keypoint estimation tasks.
Train an OpenPose model on a custom dataset of keypoints using the OpenPose framework. For more information on how to train an OpenPose model on a custom dataset, see the OpenPose Training page.
from ultralytics import YOLO # Load a model model = YOLO('yolov8n.yaml') # build a new model from YAML model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training) model = YOLO('yolov8n.yaml').load('yolov8n.pt') # build from YAML and transfer weights # Train the model model.train(data='coco128.yaml', epochs=100, imgsz=640)
# Build a new model from YAML and start training from scratch yolo detect train data=coco128.yaml model=yolov8n.yaml epochs=100 imgsz=640 # Start training from a pretrained *.pt model yolo detect train data=coco128.yaml model=yolov8n.pt epochs=100 imgsz=640 # Build a new model from YAML, transfer pretrained weights to it and start training yolo detect train data=coco128.yaml model=yolov8n.yaml pretrained=yolov8n.pt epochs=100 imgsz=640
Validate trained YOLOv8n model accuracy on the COCO128 dataset. No argument need to passed as the
model retains it's
data and arguments as model attributes.
from ultralytics import YOLO # Load a model model = YOLO('yolov8n.pt') # load an official model model = YOLO('path/to/best.pt') # load a custom model # Validate the model metrics = model.val() # no arguments needed, dataset and settings remembered metrics.box.map # map50-95 metrics.box.map50 # map50 metrics.box.map75 # map75 metrics.box.maps # a list contains map50-95 of each category
Use a trained YOLOv8n model to run predictions on images.
Read more details of
predict in our Predict page.
Export a YOLOv8n model to a different format like ONNX, CoreML, etc.
Available YOLOv8-pose export formats are in the table below. You can predict or validate directly on exported models,
yolo predict model=yolov8n-pose.onnx.
|TF Edge TPU||