Repository navigation
Add keypoint_confidence_threshold to Project.autolabel and the CLI - #571
Merged
Merged
Conversation
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>
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.
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 askeypointConfidenceThreshold(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.75rfapi.start_autolabel_job(..., keypoint_confidence_threshold=...), which sends it askeypointConfidenceThresholdand leaves it out when unset, so the server default still applies.confidence/confidence_thresholdsstill decide which instances are kept. The new value only applies to the points inside each instance. The server validates the range and returns400 INVALID_KEYPOINT_CONFIDENCE_THRESHOLDoutside 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_starttool 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