From c27d9eaf22cb90efd8f88c91d555e9c32935ece2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 21:16:18 +0000 Subject: [PATCH] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20form?= =?UTF-8?q?at=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/how_to/save_detections.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/how_to/save_detections.md b/docs/how_to/save_detections.md index 2c9250ea..94de6c61 100644 --- a/docs/how_to/save_detections.md +++ b/docs/how_to/save_detections.md @@ -5,12 +5,12 @@ status: new # Save Detections -Supervision enables an easy way to save detections in .CSV and .JSON files for offline -processing. This guide demonstrates how to perform video inference using the +Supervision enables an easy way to save detections in .CSV and .JSON files for offline +processing. This guide demonstrates how to perform video inference using the [Inference](https://github.com/roboflow/inference), [Ultralytics](https://github.com/ultralytics/ultralytics) or -[Transformers](https://github.com/huggingface/transformers) packages and save their results with -[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) and +[Transformers](https://github.com/huggingface/transformers) packages and save their results with +[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) and [`sv.JSONSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.JSONSink). ## Run Detection @@ -77,10 +77,10 @@ model. You can learn more on this topic in our ## Save Detections as CSV -To save detections to a `.CSV` file, open our -[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) -and then pass the -[`sv.Detections`](/latest/detection/core/#supervision.detection.core.Detections) +To save detections to a `.CSV` file, open our +[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) +and then pass the +[`sv.Detections`](/latest/detection/core/#supervision.detection.core.Detections) object resulting from the inference to it. Its fields are parsed and saved on disk. === "Inference" @@ -153,11 +153,11 @@ object resulting from the inference to it. Its fields are parsed and saved on di ## Custom Fields -Besides regular fields in -[`sv.Detections`](/latest/detection/core/#supervision.detection.core.Detections), -[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) -also allows you to add custom information to each row, which can be passed via the -`custom_data` dictionary. Let's utilize this feature to save information about the +Besides regular fields in +[`sv.Detections`](/latest/detection/core/#supervision.detection.core.Detections), +[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) +also allows you to add custom information to each row, which can be passed via the +`custom_data` dictionary. Let's utilize this feature to save information about the frame index from which the detections originate. === "Inference" @@ -230,10 +230,10 @@ frame index from which the detections originate. ## Save Detections as JSON -If you prefer to save the result in a `.JSON` file instead of a `.CSV` file, all you -need to do is replace -[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) -with +If you prefer to save the result in a `.JSON` file instead of a `.CSV` file, all you +need to do is replace +[`sv.CSVSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.CSVSink) +with [`sv.JSONSink`](/latest/detection/tools/save_detections/#supervision.detection.tools.csv_sink.JSONSink). === "Inference"