YOLOLite
Serverless Hosted API를 통해 YOLOlite model family를 사용합니다.
사용 가능한 변형
제품군
변형
코드 샘플
3
모델을 실행하세요
import os
import cv2
import numpy as np
import requests
import supervision as sv
from inference_sdk import InferenceHTTPClient
content = requests.get("https://media.roboflow.com/docs/bolts.jpg").content
image = cv2.imdecode(np.frombuffer(content, np.uint8), cv2.IMREAD_COLOR)
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)
마지막 업데이트
도움이 되었나요?