इंस्टेंट मॉडल चलाएँ

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

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.

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

Confidence threshold Instant मॉडल्स के लिए संवेदनशील हो सकता है। एक उपयुक्त confidence उस संख्या पर निर्भर करता है जितनी images पर मॉडल को प्रशिक्षित किया गया है। उपयुक्त confidence thresholds आमतौर पर 0.85 से 0.99 के बीच होते हैं।

Last updated

Was this helpful?