インスタントモデルを実行

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)

上記で、あなたの モデルIDAPIキー.

このコードはあなたのモデルを実行し、結果を返します。

信頼度のしきい値はInstantモデルでは敏感になる場合があります。最適な信頼度は、モデルが学習した画像の数によって異なります。最適な信頼度のしきい値は通常0.85から0.99の範囲です。

Last updated

Was this helpful?