From 678156c1f1140ecdbe2906edd4830fb0feea1601 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 18 Dec 2023 07:06:45 -0700 Subject: [PATCH] Missed a couple README updates with last commit --- README.md | 10 +++++++++- examples/count_people_in_zone/inference_example.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88721d62..aba5a8f4 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,11 @@ Supervision was designed to be model agnostic. Just plug in any classification, 5 ``` +
+ +Example with Infernce + + 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 + ``` +
+ ### 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. diff --git a/examples/count_people_in_zone/inference_example.py b/examples/count_people_in_zone/inference_example.py index 3f0ac0e7..854008aa 100644 --- a/examples/count_people_in_zone/inference_example.py +++ b/examples/count_people_in_zone/inference_example.py @@ -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]