From f86cd5114d9e42e2b965dd72b8fafd0e8130dee4 Mon Sep 17 00:00:00 2001 From: Piotr Skalski Date: Thu, 4 Jan 2024 13:30:17 +0100 Subject: [PATCH] Update README.md --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 10fa69a3..07e793e9 100644 --- a/README.md +++ b/README.md @@ -60,24 +60,26 @@ Supervision was designed to be model agnostic. Just plug in any classification, ```
-👉 more models +👉 more model connectors -Running with [Inference](https://github.com/roboflow/inference) requires a [Roboflow API KEY](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key). +- inference -```python ->>> import cv2 ->>> import supervision as sv ->>> from inference.models.utils import get_roboflow_model - ->>> image = cv2.imread(...) ->>> model = get_roboflow_model(model_id="yolov8s-640", api_key="YOUR_API_KEY") ->>> result = model.infer(image)[0] ->>> detections = sv.Detections.from_inference(result) - ->>> len(detections) ->>> 5 - -``` + Running with [Inference](https://github.com/roboflow/inference) requires a [Roboflow API KEY](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key). + + ```python + >>> import cv2 + >>> import supervision as sv + >>> from inference.models.utils import get_roboflow_model + + >>> image = cv2.imread(...) + >>> model = get_roboflow_model(model_id="yolov8s-640", api_key=) + >>> result = model.infer(image)[0] + >>> detections = sv.Detections.from_inference(result) + + >>> len(detections) + >>> 5 + + ```