pub fn evaluate_keypoints(
gt: &CocoDataset,
dt: &CocoDetections,
params: EvaluateParams<'_>,
parity_mode: ParityMode,
sigmas: HashMap<i64, Vec<f64>>,
) -> Result<EvalGrid, EvalError>Expand description
Run the per-image OKS (iouType="keypoints") evaluation pass per
ADR-0012. Thin wrapper over evaluate_with with the
OksSimilarity kernel.
sigmas is the per-category sigma override map consumed by
OksSimilarity::new: an empty map means “use
crate::similarity::oks::COCO_PERSON_SIGMAS for every category” (quirk F1,
corrected). Sigma resolution rules — including the COCO-person
default and the 17-keypoint length contract — are documented on
OksSimilarity.
§Caller responsibilities
- Area ranges (quirk D5). The keypoints-canonical 3-entry grid
(
all,medium,large— pycocotools omitssmall) lives on the caller side; pass it throughparams.area_ranges. Reusing the detection-canonical 4-entry grid silently introduces an emptysmallbucket that diverges from the parity oracle. params.use_cats=trueis the standard configuration for keypoints; per-category sigmas resolve viaOksSimilarityregardless.
§Quirks honored here
- D2 (
strict): GT with zero visible keypoints is treated as an implicit ignore region, OR-ed with the dataset-level ignore (CocoAnnotation::effective_ignore) viaEvalKernel::extra_gt_ignore. - F1/F2/F3/F4/F5: inherited from
OksSimilarity::compute.
GTs and DTs must carry a keypoints field; absence raises
EvalError::InvalidAnnotation. There is no
parity-mode-conditional bbox synthesis fallback for keypoints (no
J2 analog).
§Errors
Propagates EvalError from the underlying kernel and matching
calls.