मॉडल API एंडपॉइंट का उपयोग करें
Roboflow के क्लाउड GPUs पर बिना किसी हार्डवेयर सेटअप के पाँच मिनट में एक मॉडल चलाएँ।
नाम देकर ऑब्जेक्ट्स ढूँढें
3
मॉडल चलाएँ
import os
import base64
import cv2
import requests
import supervision as sv
image = sv.load_image_from_url("https://media.roboflow.com/quickstart/traffic.jpg")
image_b64 = base64.b64encode(content).decode("utf-8")
h, w = image.shape[:2]
response = requests.post(
"https://serverless.roboflow.com/sam3/concept_segment",
params={"api_key": os.environ["ROBOFLOW_API_KEY"]},
json={
"image": {"type": "base64", "value": image_b64},
"prompts": [
{"type": "text", "text": "टैक्सी"},
{"type": "text", "text": "नीली बस"},
{"type": "text", "text": "झाड़ी"},
],
},
)
detections = sv.Detections.from_sam3(response.json(), (w, h))
annotated = sv.MaskAnnotator().annotate(image.copy(), detections)
cv2.imwrite("sam3.jpg", annotated)3
मॉडल चलाएँ
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/quickstart/traffic.jpg")
h, w = image.shape[:2]
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
data = client.sam3_concept_segment(
image,
prompts=[
{"type": "text", "text": "टैक्सी"},
{"type": "text", "text": "नीली बस"},
{"type": "text", "text": "झाड़ी"},
],
)
detections = sv.Detections.from_sam3(data, (w, h))
annotated = sv.MaskAnnotator().annotate(image.copy(), detections)
annotated = sv.BoxAnnotator().annotate(annotated, detections)
cv2.imwrite("sam3.jpg", annotated)
तैयार-मौजूद मॉडल से रोज़मर्रा की वस्तुओं का पता लगाएँ

अपना खुद का या कोई और मॉडल चलाएँ
आगे कहाँ जाएँ
अंतिम अपडेट
क्या यह उपयोगी था?