Skip to content

Add keypoint_confidence_threshold to Project.autolabel and the CLI - #571

Merged
iurisilvio merged 2 commits into
mainfrom
iuri/autolabel-keypoint-threshold
Oct 28, 2026
Merged

iurisilvio merged 2 commits into
mainfrom
iuri/autolabel-keypoint-threshold

Conversation

@iurisilvio

Copy link
Copy Markdown
Contributor

What

Keypoint-detection projects can be auto-labeled with a keypoint model trained in Roboflow (model_type="roboflow"). The hosted job keeps a predicted keypoint as visible only when its confidence reaches a threshold. Points below the threshold are saved as not visible. The REST API (POST /:workspace/:project/autolabel) takes that threshold as keypointConfidenceThreshold (0-1, server default 0.6). The SDK had no way to send it.

This PR adds:

  • Project.autolabel(..., keypoint_confidence_threshold=0.75)
  • roboflow autolabel start --keypoint-confidence 0.75
  • rfapi.start_autolabel_job(..., keypoint_confidence_threshold=...), which sends it as keypointConfidenceThreshold and leaves it out when unset, so the server default still applies.

confidence / confidence_thresholds still decide which instances are kept. The new value only applies to the points inside each instance. The server validates the range and returns 400 INVALID_KEYPOINT_CONFIDENCE_THRESHOLD outside 0-1.

Changed files

  • roboflow/adapters/rfapi.py, roboflow/core/project.py, roboflow/cli/handlers/autolabel.py: the new argument and flag.
  • tests/adapters/test_autolabel.py, tests/test_project_autolabel.py, tests/cli/test_autolabel_handler.py: payload, wrapper and CLI coverage.
  • CHANGELOG.md (Unreleased), CLI-COMMANDS.md: usage.

Testing

  • python -m unittest: 1270 tests OK.
  • mypy roboflow, ruff check, ruff format --check: clean.

The same parameter goes to the MCP autolabel_start tool in roboflow/roboflow-mcp. The docs.roboflow.com Auto Label page gets the matching SDK/CLI rows after this ships in a release.

🤖 Generated with Claude Code

iurisilvio and others added 2 commits October 28, 2026 16:33
Keypoint-detection projects can be auto-labeled with a trained keypoint
model, and the API accepts keypointConfidenceThreshold: the lowest
confidence a predicted keypoint needs to be saved as visible (server
default 0.6). Project.autolabel(keypoint_confidence_threshold=...) and
`roboflow autolabel start --keypoint-confidence` now send it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@joaomarcoscrs joaomarcoscrs 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.

LGTM

@iurisilvio
iurisilvio merged commit 5e2f4a9 into main Oct 28, 2026
15 checks passed
@iurisilvio
iurisilvio deleted the iuri/autolabel-keypoint-threshold branch October 28, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants