Universe에서 모델 찾기
컴퓨터 비전 프로젝트에서 사용할 사전 학습된 모델을 Universe에서 찾을 수 있습니다.
마지막 업데이트
도움이 되었나요?
도움이 되었나요?
pip install inference-sdk supervision opencv-pythonimport os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = cv2.imread("forklift.jpg")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="forkliftproject/2")
detections = sv.Detections.from_inference(results)
annotated = sv.BoxAnnotator().annotate(scene=image, detections=detections)
annotated = sv.LabelAnnotator().annotate(scene=annotated, detections=detections)
sv.plot_image(annotated)