My project is keypoint detection for cats, and its target is YOLOv8. I exported my data in YOLOv8 format (1130 images), trained the model for 200 epochs, and it is unable to predict a single keypoint. Upon examining one of the image files (
) and its associated label, I found that some of the keypoints are outside the bounding box for the image. This can’t be correct. Here is an example, with the text line reformatted for slightly easier reading:
0 # One class
0.33046875. 0.715625 # The x-center and y-center of the bounding box
0.33203125 0.365625 # Width, height
0.7729089743589743 0.2127192307692308 2 # 2 => visible keypoint
0.36486538461538454 0.16201346153846155 2
0.6729679487179487 0.3529711538461539 2
0.3790602564102564 0.32252403846153843 2
0.512726923076923 0.4760394230769231 2
0.4950102564102563 0.5223086538461539 2
0.3149961538461538 0.7037836538461539 0
0.4352820512820513 0.7231221153846155 0
0.19383205128205125 0.7414942307692307 0
0.192075641025641 0.8033788461538462 0
0.5024294871794871 0.954883653846154 2
0.2842653846153846 0.7559990384615386 0
0.279875641025641 0.8072471153846154 0
0.3159115384615384 0.9471951923076924 2
0.36943205128205125 0.7559990384615386 0
0.367675641025641 0.8120817307692307 0
0.367675641025641 0.8662307692307692 0
0.46513461538461537 0.7618 0
0.46601282051282045 0.8140153846153847 0
0.46513461538461537 0.8817019230769232 0
There are 20 keypoints, 8 visible and 12 not visible. This is correct for the given image.
Given the x- and y-center values and the width and height values, the bounding box coordinates are:
UL = (0.164453125, 0.8984375). UR = (0.496484375, 0.8984375)
LL = (0.164453125, 0.5328125) LR = (0.496484375, 0.5328125)
So for all the keypoints (x,y), it must be that:
0.164453125 <= x <= 0.496484375 and
0.5328125 <= y <= 0.8984375
Notice that 3 of the visible keypoints have x-values larger than the maximum, 6 visible keypoints have y-values less than the minimum, and 2 visible keypoints have y-values larger than the mximum.
Am I misinterpreting the YOLOv8 file format, or is there something wring with the file contents?
- Project Type: Keypoint detection
- Operating System & Browser: MacOS/Chrome
- Project Universe Link or Workspace/Project ID: feral-cat-pose-detection-6 Keypoint Detection Dataset and Pre-Trained Model by feralcatposeestimation