What is wrong with my training process

Hi.

I am trying to train a yolo11n.pt model (pose), to recognize archery objects. Here is my yaml file:

———————————————————————————————————————————————————————-

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]

path: C:path/to/my/dataset

train: images\train

val: images\val

# Classes

names:

0: target

1: arrow

# Keypoint names per class

kpt_names:

0:

- target_center

- target_edge

- target_tl

- target_tr

- target_br

- target_bl

1:

- arrow_tip

———————————————————————————————————————————————————————-
As you can see, I have 6 keypoints for the target class, and 1 keypoint for the arrow class. However, I am unable to train the model because I keep running into a Runtime Error when running Ultralytic’s model.train function:
———————————————————————————————————————————————————————-
Load a model

model = YOLO(“yolo11n.pt”) # load a pretrained model (recommended for training)

results = model.train(data=r"C:\Users\eusro\OneDrive\Documents\IIT 25-26\IPRO\dataset\archery.yaml", epochs=20, imgsz=640)
———————————————————————————————————————————————————————-

And then i run into this error:
———————————————————————————————————————————————————————-
”RuntimeError: No valid images found in C:\Users\eusro\OneDrive\Documents\IIT 25-26\IPRO\dataset\labels\train.cache. Images with incorrectly formatted labels are ignored. See Datasets Overview - Ultralytics YOLO Docs for dataset formatting guidance.”
———————————————————————————————————————————————————————-
Specifically:

———————————————————————————————————————————————————————-
”train: C:\path\to\images: ignoring corrupt image/label: non-normalized or out of bounds coordinates [1.053512 1.0485466 1.892976 1.902907 2. 2. 2.
2. 2. ]”
———————————————————————————————————————————————————————-
This is confusing to me since all of my text files all have normalized coordinates. I’m not sure how the model is getting those coordinates. Here is the sample yolo label text file that corresponds to the error above:
———————————————————————————————————————————————————————-
0 0.362630 0.525484 0.529948 0.911458 0.370027 0.544883 2 0.587498 0.527979 2 0.107532 0.097093 2 0.617953 0.107024 2 0.597141 0.940561 2 0.128101 0.967067 2
1 0.340124 0.778608 0.090543 0.442784 0.305588 0.569652 2 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0
1 0.363084 0.747076 0.091397 0.417638 0.325334 0.550051 2 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0
1 0.407764 0.755879 0.099487 0.480326 0.367684 0.530702 2 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0
1 0.415974 0.797873 0.113680 0.404254 0.368660 0.614166 2 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0
1 0.447964 0.849701 0.112273 0.300599 0.404608 0.707333 2 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0 0.000000 0.000000 0
———————————————————————————————————————————————————————-
Notice, how I’ve zero-padded the arrow objects since most sources say that the model expects all objects to have the same number of keypoints.

I’ve followed the format for the yolo labels that ultralytics has on the official website,

Any help is much appreciated

Your YAML file is missing kpt_shape

Hi, thanks for the reply,

I added the kpt_shape, [6,3], since the max number of keypoints per object is 6.
But i’m still encountering the Runtime Error where the model is still recognizing out of bounds coordinates?

Did try deleting *.cache files in the labels folder?

You’re using the wrong model

model = YOLO(“yolo11n.pt”)

yolo11n.pt is for object detection. You should be using yolo11n-pose.pt