Visibility flag on Keypoint Detector Object
41 views (last 30 days)
Show older comments
Hello everyone,
I was wondering if anyone could help me understanding how to set up the training data for KeyPoint Detector Object (trainHRNETObjectKeypointDetector).
The help says:
"Keypoint locations, defined in spatial coordinates as an N-by-2 or N-by-3 numeric matrix with rows of the form [x y] or [x y v], respectively, where:
- N is the number of keypoint classes.
- x and y specify the spatial coordinates of a keypoint.
- v specifies the visibility of a keypoint."
I was wondering how to setup the visibility flag v .
Is it 1 when the key point is visible and annotated and 0 when it is not. Or same as Yolo 0 = key point out of view and not labelled; 1 = key point present but not visible; 2 = key point visible ?
Thank you very much for your help
0 Comments
Answers (1)
Vivek Akkala
on 18 Sep 2025
As mentioned in the doc, A value of 1 (true) indicates a valid keypoint and 0 (false) indicates an invalid keypoint.
7 Comments
Vivek Akkala
on 28 Jan 2026 at 18:06
Thanks for the clarification, @Andreas. You can include images where not all keypoints are visible. In such cases, you can assign a very small value (e.g., 1e‑5 or 1e‑4) to the non‑visible keypoints. Ideally, setting them to 0 should work, but it appears that trainHRNetObjectKeypointDetector is not configured to accept zeros. Using a small non‑zero value for missing keypoints should help avoid error mentioned by Marc.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!