YOLO-NAS
हमारे Serverless Cloud API के माध्यम से YOLO-NAS ऑब्जेक्ट डिटेक्शन मॉडल का उपयोग करें
पूर्व-प्रशिक्षित उपनाम
मॉडल
इनपुट आकार
कार्य
मॉडल 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="yolo-nas-s-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)from inference import get_model
model = get_model(model_id="yolo-nas-s-640")
results = model.infer("https://media.roboflow.com/inference/people-walking.jpg")अंतिम अपडेट
क्या यह उपयोगी था?