Skip to content

Added Confidence Argument to keypoint detection model #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Greenstan
Copy link

@Greenstan Greenstan commented Jan 20, 2025

Description

A new "Confidence" argument has been added to the keypoint detection model (based on the confidence argument found in the object detection model)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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

A Dedicated keypoint detection model test file has been made with multiple test cases including one where the confidence is changed

Any specific deployment considerations

Docs

@CLAassistant
Copy link

CLAassistant commented Feb 4, 2025

CLA assistant check
All committers have signed the CLA.

@Greenstan Greenstan requested a review from SolomonLake June 5, 2025 18:17
instance = KeypointDetectionModel(self.api_key, self.version_id, version=self.version)

self.assertEqual(instance.id, self.version_id)
self.assertEqual(instance.api_key, self.api_key)
Copy link
Contributor

Choose a reason for hiding this comment

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

KeypointDetectionModel doesn't have api_key on instance, and there are several other errors here -- can you run python -m unittest and make sure tests are passing?

@@ -26,6 +26,7 @@ def __init__(
id: str,
name: Optional[str] = None,
version: Optional[str] = None,
confidence: Optional[int] = 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

let's default to 40, that's the standard in this repo


responses.add(responses.POST, self.api_url, json=MOCK_RESPONSE, status=200)

result = instance.predict("tests/images/MM2A_46_R_T.jpg", confidence=30)
Copy link
Contributor

Choose a reason for hiding this comment

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

if you want to be able to pass confidence into .predict (which is a good idea), you will need to add it to predict arguments.

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.

3 participants