YOLOv10
हमारे सर्वरलेस क्लाउड API के माध्यम से YOLOv10 ऑब्जेक्ट डिटेक्शन मॉडल का उपयोग करें
पूर्व-प्रशिक्षित उपनाम
मॉडल
इनपुट आकार
कार्य
मॉडल ID
परीक्षण
कोड नमूना
3
मॉडल चलाएँ
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/inference/people-walking.jpg")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="yolov10n-640")
detections = sv.Detections.from_inference(results)
labels = [
f"{name} {conf:.2f}"
for name, conf in zip(detections.data["class_name"], detections.confidence)
]
annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections, labels=labels)
cv2.imwrite("annotated.png", annotated)अंतिम अपडेट
क्या यह उपयोगी था?