From 8511bbb7621d630e19331ffad57d2318ec0119a0 Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Wed, 4 Oct 2023 16:15:38 +0200 Subject: [PATCH] Add Tracker ID warning and image to TraceAnnotator doc Added a warning about the requirement of `tracker_id` for TraceAnnotator in the `core.py`. Also, included an example image in the TraceAnnotator initialization for better understanding in both `core.py` and `annotators.md`. --- docs/annotators.md | 2 +- supervision/annotators/core.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/annotators.md b/docs/annotators.md index 59e44ebd..11bdfc17 100644 --- a/docs/annotators.md +++ b/docs/annotators.md @@ -141,7 +141,7 @@
- ![label-annotator-example](https://media.roboflow.com/supervision-annotator-examples/label-annotator-example-2.png){ align=center width="800" } + ![trace-annotator-example](https://media.roboflow.com/supervision-annotator-examples/trace-annotator-example.png){ align=center width="800" }
diff --git a/supervision/annotators/core.py b/supervision/annotators/core.py index 2b63717e..350ae06b 100644 --- a/supervision/annotators/core.py +++ b/supervision/annotators/core.py @@ -568,6 +568,12 @@ class LabelAnnotator: class TraceAnnotator: """ A class for drawing trace paths on an image based on detection coordinates. + + !!! warning + + This annotator utilizes the `tracker_id`. Read + [here](https://supervision.roboflow.com/trackers/) to learn how to plug + tracking into your inference pipeline. """ def __init__( @@ -617,6 +623,9 @@ class TraceAnnotator: ... detections=detections ... ) ``` + + ![trace-annotator-example](https://media.roboflow.com/ + supervision-annotator-examples/trace-annotator-example.png) """ self.trace.put(detections)