For the complete documentation index, see llms.txt. This page is also available as Markdown.

YOLO11

हमारे Serverless Hosted API के माध्यम से YOLO11 model family का उपयोग करें

YOLO11 ऑब्जेक्ट डिटेक्शन के माध्यम से चलता है Serverless Hosted API, COCO पर 640 इनपुट साइज पर pretrained. Self-hosted deployment के लिए, देखें Roboflow Inference.

कोड नमूना

यह sample Serverless Hosted API के माध्यम से inference चलाता है, response को decode करता है supervision, और एक annotated image को disk पर लिखता है।

1

अपनी API Key प्राप्त करें

एक Roboflow खाता बनाएं, अपनी key यहाँ पर ढूँढें Roboflow API settings page और इसे अपने shell में उपलब्ध कराएँ:

export ROBOFLOW_API_KEY="your-key-here"
2

निर्भरताएँ इंस्टॉल करें

ये दो packages model को call करते हैं और इसके परिणामों को draw करते हैं:

pip install inference-sdk supervision
3

मॉडल चलाएँ

चलाएँ yolov11n-640 एक sample image पर और boxes तथा labels annotate करें:

import os
import cv2
import numpy as np
import requests
import supervision as sv
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/quickstart/traffic.jpg"
content = requests.get(image_url).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="yolov11n-640")
detections = sv.Detections.from_inference(results)

annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections)

cv2.imwrite("traffic-annotated.png", annotated)

सेट करें api_url को अपने deployment target से मिलाएँ:

  • https://serverless.roboflow.com Serverless Hosted API के लिए।

  • http://localhost:9001 एक local Inference server.

  • आपका Dedicated Deployment एक private endpoint के लिए URL.

Pretrained models और benchmarks

इनमें से किसी भी alias को बतौर पास करें model_idinference-sdk प्रत्येक alias को एक pretrained Roboflow Universe model पर resolve करता है; yolo11* prefix variants वही models resolve करते हैं.

उपनाम
इनपुट आकार
mAP50-95
ONNX latency (ms)*
TensorRT FP16 (ms)*

yolov11n-640

640x640

39.5

3.4

2.2

yolov11s-640

640x640

47.0

4.5

2.5

yolov11m-640

640x640

51.5

8.3

3.5

yolov11l-640

640x640

53.4

10.7

4.3

yolov11x-640

640x640

54.7

18.8

7.1

# YOLO11 Instance Segmentation

YOLO11 instance segmentation के माध्यम से चलता है Serverless Hosted API, COCO पर 640 इनपुट साइज पर pretrained. Self-hosted deployment के लिए, देखें Roboflow Inference.

कोड नमूना

अपनी API key सेट करें और ऊपर दिखाए अनुसार dependencies इंस्टॉल करें, फिर चलाएँ yolov11n-seg-640 और masks तथा labels को annotate करें:

Pretrained models और benchmarks

इनमें से किसी भी alias को बतौर पास करें model_id; yolo11* prefix variants वही models resolve करते हैं.

उपनाम
इनपुट आकार
Box mAP50-95
Mask mAP50-95
ONNX latency (ms)*
TensorRT FP16 (ms)*

yolov11n-seg-640

640x640

38.9

32.0

7.3

5.7

yolov11s-seg-640

640x640

46.6

37.8

10.0

7.5

yolov11m-seg-640

640x640

51.5

41.5

14.5

9.1

yolov11l-seg-640

640x640

53.4

42.9

16.8

9.7

yolov11x-seg-640

640x640

54.7

43.8

27.5

13.1


* Latency मापी जाती है Roboflow Inference 1x NVIDIA L4 पर, batch size 1, 1,000 inferences का औसत (100 warmup)। डिफ़ॉल्ट inference-gpu install CUDA execution provider पर ONNX चलाता है; inference-models[trt10] extra स्वतः एक prebuilt TensorRT FP16 engine चुनता है। FP16, COCO पर FP32 accuracy से 0.1 mAP के भीतर मेल खाता है val2017. Accuracy प्रकाशित COCO val2017 spec (स्रोत).

अंतिम अपडेट

क्या यह उपयोगी था?