YOLOlite
YOLOlite モデルファミリーを Serverless Cloud API 経由で使用します
利用可能なバリエーション
ファミリー
バリエーション
コード例
3
モデルを実行する
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/docs/bolts.jpg")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="erik-pe6au/rf-bolts-4-yololite-s-t1")
detections = sv.Detections.from_inference(results)
annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
cv2.imwrite("annotated.png", annotated)
最終更新
役に立ちましたか?