From c2ae1cc9a727bed3c76a76f37de45530195f805b Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 17 Sep 2024 13:59:08 -0700 Subject: [PATCH] Adding loss prevention documentation Signed-off-by: Antonio Martinez --- .../use-cases/loss-prevention/advanced.md | 35 ++++ .../loss-prevention/getting_started.md | 158 ++++++++++++++++++ .../loss-prevention/loss-prevention.md | 13 ++ mkdocs.yml | 4 + 4 files changed, 210 insertions(+) create mode 100644 docs_src/use-cases/loss-prevention/advanced.md create mode 100644 docs_src/use-cases/loss-prevention/getting_started.md create mode 100644 docs_src/use-cases/loss-prevention/loss-prevention.md diff --git a/docs_src/use-cases/loss-prevention/advanced.md b/docs_src/use-cases/loss-prevention/advanced.md new file mode 100644 index 0000000..8fcafbc --- /dev/null +++ b/docs_src/use-cases/loss-prevention/advanced.md @@ -0,0 +1,35 @@ +# Advanced Settings + +To further customize a loss prevention pipeline, let's add more variables to the execution: + +!!! Example + + ```bash + make PIPELINE_SCRIPT=yolov8s_roi.sh RESULTS_DIR="../render_results" run-render-mode + ``` + +The above command will execute a DLStreamer pipeline using YOLOv8s model for object detection on a region of interest (ROI) with object tracking mechanism. + +## Modify ROI coordinates + +To modify the ROI coordinates, locate the file `roi.json` under src/pipelines/roi.json. Since the "objects" attribute is an array, it is possible to add multiple ROIs. + +```json +[ + { + "objects": [ + { + "detection": { + "label": "ROI1" + }, + "x": 0, + "y": 0, + "w": 620, + "h": 1080 + } + ] + } +] +``` + + diff --git a/docs_src/use-cases/loss-prevention/getting_started.md b/docs_src/use-cases/loss-prevention/getting_started.md new file mode 100644 index 0000000..5464e70 --- /dev/null +++ b/docs_src/use-cases/loss-prevention/getting_started.md @@ -0,0 +1,158 @@ +# Getting Started + +## Step by step instructions: + +1. Download the models using download_models/downloadModels.sh + + ```bash + make download-models + ``` + +2. Update github submodules + + ```bash + make update-submodules + ``` + +3. Download sample videos used by the performance tools + + ```bash + make download-sample-videos + ``` + +4. Build the demo Docker image + + ```bash + make build + ``` + +5. Start Loss prevention using the Docker Compose file. The Docker Compose also includes an RTSP camera simulator that will infinitely loop through the sample videos downloaded in step 3. + + ```bash + make run-render-mode + ``` + +6. Verify Docker containers + + ```bash + docker ps --format 'table{{.Names}}\t{{.Status}}\t{{.Image}}' + ``` + Result: + ```bash + NAMES STATUS IMAGE + camera-simulator0 Up 17 seconds jrottenberg/ffmpeg:4.1-alpine + src-OvmsClientGst-1 Up 17 seconds dlstreamer:dev + camera-simulator Up 17 seconds aler9/rtsp-simple-server + ``` + +7. Verify Results + + After starting Automated Self Checkout you will begin to see result files being written into the results/ directory. Here are example outputs from the 3 log files. + + gst-launch_