Skip to content

Fix Issue #345: KeypointDetectionModel returns correct prediction type#428

Open
kadhirash wants to merge 1 commit into
roboflow:mainfrom
kadhirash:fix-issue-345
Open

Fix Issue #345: KeypointDetectionModel returns correct prediction type#428
kadhirash wants to merge 1 commit into
roboflow:mainfrom
kadhirash:fix-issue-345

Conversation

@kadhirash

Copy link
Copy Markdown

Description

Fixes #345 where KeypointDetectionModel.predict was incorrectly returning a CLASSIFICATION_MODEL prediction type. This caused the
PredictionGroup to wrap the entire response as a single prediction instead of parsing the list of predictions, breaking integration with tools like supervision.

Adds mypy ignores for optional image dependencies (pi_heif, pillow_avif) to fix make check_code_quality failures in environments where these libraries are missing.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

I created a reproduction script that mocks the Roboflow API response for a keypoint detection model

Before fix: The script failed because the result type was ClassificationModel and supervision could not parse it.

After fix: The result type is correctly identified as KeypointDetectionModel and supervision successfully parses the keypoints.

I also ran make style and make check_code_quality to ensure all checks pass.

Any specific deployment considerations

None

Docs

  • Docs updated? What were the changes: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant