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"