Skip to content

docs(contributing): describe key point outputs without the reverted Detections.keypoints field - #2895

Merged
Borda merged 2 commits into
roboflow:developfrom
kari-pikkarainen:docs/contributing-keypoints-field
Nov 9, 2026
Merged

Borda merged 2 commits into
roboflow:developfrom
kari-pikkarainen:docs/contributing-keypoints-field

Conversation

@kari-pikkarainen

@kari-pikkarainen kari-pikkarainen commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

"API Design Principles", item 1, in .github/CONTRIBUTING.md (also rendered at docs/contributing.md) tells integrations to "Use Detections.keypoints when keypoints are always co-incident with boxes". That field was added in #2290 and reverted in #2291; sv.Detections has no keypoints attribute on develop. An integration following the guide would target an API that does not exist.

Motivation and Context

The principles were written (#2292) on the same day as the revert and still describe the reverted design. Agents are told to follow CONTRIBUTING.md over AGENTS.md, so the stale sentence is likely to be copied into new connectors.

Changes Made

  • Replace the Detections.keypoints sentence with: use sv.KeyPoints for keypoint and pose predictions; store an available per-instance confidence vector in KeyPoints.detection_confidence, and leave it None when the source does not provide one; sv.Detections has no keypoint field, and KeyPoints.as_detections() derives boxes when a Detections object is needed.
  • Nothing else in item 1 changes. No changelog entry (documentation-only).

Testing

  • Checked on develop: sv.Detections fields are xyxy, mask, confidence, class_id, tracker_id, data, metadata, with no keypoints.

  • KeyPoints.detection_confidence is set by the Ultralytics and Detectron2 connectors, and by Inference when every prediction carries a confidence (fix(key_points): keep the detection score in pose connectors #2633). YOLO-NAS and Transformers do not set it, so the new text gives a rule for integrations without claiming every connector already follows it.

  • mdformat (gfm plugins, repo settings) and codespell pass.

  • Added/updated tests, and the full suite passes locally (documentation-only)

  • Updated docs (docstrings / mkdocs entry) for new or changed public API

  • Added a changelog entry in docs/changelog.md under Unreleased (skipped: pure documentation change)

Additional Notes

  • If the intent is still to bring keypoints onto Detections later, the sentence could instead say "not yet supported". I wrote it for the current API; happy to reword.
  • Possible follow-up, not in this PR: from_yolo_nas receives per-instance scores but does not store them in detection_confidence.

Prepared with AI assistance (Claude Code); I reviewed the change and the verification results.

🤖 Generated with Claude Code

…etections.keypoints field

The API design principles still told integrations to use `Detections.keypoints`,
a field added in roboflow#2290 and reverted in roboflow#2291; `sv.Detections` has no such field.
Point integrations to `sv.KeyPoints` instead, with the instance score in
`KeyPoints.detection_confidence` when the source provides one. The Ultralytics
and Detectron2 connectors, and Inference when every prediction carries a
confidence, already keep the instance score there (roboflow#2633); `as_detections()`
derives boxes when a `Detections` object is needed.

Prepared with AI assistance (Claude Code); reviewed by the author.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95%. Comparing base (def42bd) to head (f943d94).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #2895   +/-   ##
=======================================
  Coverage       95%     95%           
=======================================
  Files           83      83           
  Lines        14234   14234           
=======================================
  Hits         13476   13476           
  Misses         758     758           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Borda
Borda requested a balanced review from Copilot November 6, 2026 16:40
@Borda Borda added the documentation Improvements or additions to documentation label Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for this documentation-only update aligning keypoint integration guidance with the current API.

No open issues 🎉

What changed in this PR

Corrects integration guidance left stale after the Detections.keypoints field was reverted, aligning the contributor documentation with the current keypoint API.

Changes:

  • Directs keypoint and pose integrations to sv.KeyPoints.
  • Clarifies how to populate detection_confidence and use as_detections() to derive boxes when needed.
  • Changes documentation only; no runtime behavior is modified.
File Description
.github/​CONTRIBUTING.md Replaces reverted-field guidance with current KeyPoints usage.

Review effort: Balanced

@Borda
Borda merged commit ef62222 into roboflow:develop Nov 9, 2026
37 checks passed
Borda added a commit that referenced this pull request Nov 10, 2026
…etections.keypoints field (#2895)

The API design principles still told integrations to use `Detections.keypoints`,
a field added in #2290 and reverted in #2291; `sv.Detections` has no such field.
Point integrations to `sv.KeyPoints` instead, with the instance score in
`KeyPoints.detection_confidence` when the source provides one. The Ultralytics
and Detectron2 connectors, and Inference when every prediction carries a
confidence, already keep the instance score there (#2633); `as_detections()`
derives boxes when a `Detections` object is needed.

Prepared with AI assistance (Claude Code); reviewed by the author.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants