-
Notifications
You must be signed in to change notification settings - Fork 93
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
base: main
Are you sure you want to change the base?
Added Confidence Argument to keypoint detection model #354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make sure you are running the tests locally using python3 -m unittest
(or python
) from the root of repo?
You can see test failures here: https://github.com/roboflow/roboflow-python/actions/runs/16078304796/job/45497459911?pr=354
I left suggested fixes which are all going to be necessary.
load_dotenv(Path("../../.env")) | ||
|
||
|
||
with open(Path("../annotations/keypoint-detection-annotations/MM2A_46_R_T_predictions.json")) as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests get run from root -- can you update:
with open(Path("../annotations/keypoint-detection-annotations/MM2A_46_R_T_predictions.json")) as f: | |
with open(Path("tests/annotations/keypoint-detection-annotations/MM2A_46_R_T_predictions.json")) as f: |
|
||
|
||
class TestKeypointDetection(unittest.TestCase): | ||
api_key = os.getenv("ROBOFLOW_API_KEY") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api_key = os.getenv("ROBOFLOW_API_KEY") | |
api_key = os.getenv("ROBOFLOW_API_KEY", "test-api-key") |
|
||
responses.add(responses.POST, self.api_url, json=MOCK_RESPONSE, status=200) | ||
|
||
result = instance.predict("/roboflow-python/tests/images/MM2A_46_R_T.png") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = instance.predict("/roboflow-python/tests/images/MM2A_46_R_T.png") | |
result = instance.predict("tests/images/MM2A_46_R_T.png") |
and change the other .png references too
|
||
responses.add(responses.POST, self.api_url, json={"error": "Invalid API key"}, status=401) | ||
|
||
with self.assertRaises(HTTPError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with self.assertRaises(HTTPError): | |
with self.assertRaises(Exception): |
do this to avoid failing test
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.
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