I am using following code from hosted image inference. How to set/specify confidence and overlap threshold?
from inference_sdk import InferenceHTTPClient
CLIENT = InferenceHTTPClient(
api_url="https://detect.roboflow.com",
api_key="API_KEY"
)
# infer on a local image
result = CLIENT.infer("YOUR_IMAGE.jpg", model_id="hand-control-vyoij/1")
@linas since the above code giving error, I used following code following the tutorial on the page you shared. here’s my code.
from inference_sdk import InferenceHTTPClient, InferenceConfiguration
custom_configuration = InferenceConfiguration(confidence_threshold=0.5, iou_threshold=0.5)
with CLIENT.use_configuration(custom_configuration):
result = CLIENT.infer(image_path, model_id="hand-control-vyoij/1")