Repository navigation
docs(contributing): describe key point outputs without the reverted Detections.keypoints field - #2895
Merged
Borda merged 2 commits intoNov 9, 2026
Conversation
…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]>
1 of 3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. 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:
|
Contributor
There was a problem hiding this comment.
🟢 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_confidenceand useas_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
approved these changes
Nov 9, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
"API Design Principles", item 1, in
.github/CONTRIBUTING.md(also rendered atdocs/contributing.md) tells integrations to "UseDetections.keypointswhen keypoints are always co-incident with boxes". That field was added in #2290 and reverted in #2291;sv.Detectionshas nokeypointsattribute ondevelop. 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
Detections.keypointssentence with: usesv.KeyPointsfor keypoint and pose predictions; store an available per-instance confidence vector inKeyPoints.detection_confidence, and leave itNonewhen the source does not provide one;sv.Detectionshas no keypoint field, andKeyPoints.as_detections()derives boxes when aDetectionsobject is needed.Testing
Checked on
develop:sv.Detectionsfields arexyxy, mask, confidence, class_id, tracker_id, data, metadata, with nokeypoints.KeyPoints.detection_confidenceis 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) andcodespellpass.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.mdunderUnreleased(skipped: pure documentation change)Additional Notes
Detectionslater, the sentence could instead say "not yet supported". I wrote it for the current API; happy to reword.from_yolo_nasreceives per-instance scores but does not store them indetection_confidence.Prepared with AI assistance (Claude Code); I reviewed the change and the verification results.
🤖 Generated with Claude Code