Skip to content
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

Added Confidence Argument to keypoint detection model #354

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added "confidence" as argument for keypoint detection model
- confidence added to KeypointDetectionModel constructor and api url string
Greenstan committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 583818fbcdb29bd5eeeb3902ce53158efe3a27b5
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
4 changes: 4 additions & 0 deletions roboflow/models/keypoint_detection.py
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ def __init__(
id: str,
name: Optional[str] = None,
version: Optional[str] = None,
confidence: Optional[int] = 40,
local: Optional[str] = None,
):
"""
@@ -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
@@ -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/"

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