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
Open
4 changes: 4 additions & 0 deletions roboflow/models/keypoint_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

local: Optional[str] = None,
):
"""
Expand All @@ -37,6 +38,7 @@ def __init__(
name (str): is the name of the project
version (str): version number
local (str): localhost address and port if pointing towards local inference engine
confidence (int): A threshold for the returned predictions on a scale of 0-100.
colors (dict): colors to use for the image
preprocessing (dict): preprocessing to use for the image

Expand All @@ -48,6 +50,7 @@ def __init__(
self.__api_key = api_key
self.id = id
self.name = name
self.confidence = confidence
self.version = version
self.base_url = "https://detect.roboflow.com/"

Expand Down Expand Up @@ -150,6 +153,7 @@ def __generate_url(self):
self.base_url + without_workspace + "/" + str(version),
"?api_key=" + self.__api_key,
"&name=YOUR_IMAGE.jpg",
"&confidence=" + str(self.confidence),
]
)

Expand Down
Loading