Update README.md

This commit is contained in:
Piotr Skalski 2024-01-04 13:30:17 +01:00 committed by GitHub
parent 8a32a9ccb1
commit f86cd5114d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 16 deletions

View File

@ -60,24 +60,26 @@ Supervision was designed to be model agnostic. Just plug in any classification,
```
<details>
<summary>👉 more models</summary>
<summary>👉 more model connectors</summary>
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=<ROBOFLOW API KEY>)
>>> result = model.infer(image)[0]
>>> detections = sv.Detections.from_inference(result)
>>> len(detections)
>>> 5
```
</details>