My code: # Load YOLOv8 model
model = YOLO(“yolov8n.pt”)
Train the model
model.train(
task=“pose”,
data=keypoint_dataset_yaml, # Use the specified YAML
epochs=25,
imgsz=1061,
batch=8,
name=‘-specific-key-point_new’
)
My yaml: train: …/train/images
val: …/valid/images
test: …/test/images
kpt_shape: [11, 2]
flip_idx: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
nc: 11
names: [‘Barrier_keypoint001’, ‘Barrier_keypoint003’, ‘Barrier_keypoint004’, ‘Field_keypoint001’, ‘Field_keypoint002’, ‘Field_keypoint004’, ‘Field_keypoint005’, ‘Field_keypoint006’, ‘Net_keypoint002’, ‘Net_keypoint003’, ‘Wall_keypoint007’]
roboflow:
workspace: plaimaker
project: padel-specific-key-point
version: 2
license: CC BY 4.0
url: padel, specific key point Keypoint Detection Dataset (v2, 2025-02-01 1:20am) by Plaimaker
My error: labels[‘keypoints’] = torch.from_numpy(instances.keypoints)
TypeError: expected np.ndarray (got NoneType)