Update README.md
This commit is contained in:
parent
8a32a9ccb1
commit
f86cd5114d
34
README.md
34
README.md
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue