Missed a couple README updates with last commit

This commit is contained in:
Paul 2023-12-18 07:06:45 -07:00
parent 362e9f7b43
commit 678156c1f1
2 changed files with 10 additions and 2 deletions

View File

@ -59,6 +59,11 @@ Supervision was designed to be model agnostic. Just plug in any classification,
5
```
<details>
<summary>
Example with Infernce
</summary>
Running with [Inference](https://github.com/roboflow/inference) can improve speed but requires a [Roboflow API key](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key).
```python
@ -72,9 +77,12 @@ Running with [Inference](https://github.com/roboflow/inference) can improve spee
>>> detections = sv.Detections.from_inference(result)
>>> len(detections)
5
>>> 5
```
</details>
### annotators
Supervision offers a wide range of highly customizable [annotators](https://supervision.roboflow.com/annotators/), allowing you to compose the perfect visualization for your use case.

View File

@ -86,7 +86,7 @@ def detect(
for filtering.
"""
results = model.infer(frame)[0]
detections = sv.Detections.from_roboflow(results)
detections = sv.Detections.from_inference(results)
filter_by_class = detections.class_id == 0
filter_by_confidence = detections.confidence > confidence_threshold
return detections[filter_by_class & filter_by_confidence]