Run an Instant Model

आप Python SDK और Serverless Hosted API V2 का उपयोग करके Roboflow Instant मॉडल चला सकते हैं।

एक Instant मॉडल चलाने के लिए, निम्नलिखित कोड का उपयोग करें:

from inference_sdk import InferenceHTTPClient, InferenceConfiguration

CLIENT = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key="<Your API Key>",
    
)

configuration = InferenceConfiguration(
    confidence_threshold=0.95
)

CLIENT.configure(configuration)

result = client.infer("image.jpeg", model_id="model-id/1")

print(result)

ऊपर, अपना निर्दिष्ट करें model ID और API key.

यह कोड आपका मॉडल चलाएगा और परिणाम लौटाएगा।

Instant मॉडल्स के लिए confidence threshold संवेदनशील हो सकता है। अनुकूल confidence इस बात पर निर्भर करेगा कि मॉडल को कितनी छवियों पर प्रशिक्षित किया गया है। आम तौर पर अनुकूल confidence thresholds 0.85 से 0.99 तक होते हैं।

Last updated

Was this helpful?