Skip to content
2 changes: 1 addition & 1 deletion docs_src/use-cases/automated-self-checkout/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ The table below lists the environment variables (EVs) that can be used as inputs
|`DOCKER_COMPOSE` | The docker-compose.yml file to run | src/docker-compose.yml |
|`RETAIL_USE_CASE_ROOT` | The root directory for Automated Self Checkout in relation to the docker-compose.yml | .. |
|`RESULTS_DIR` | Directory to output results | ../results |
|`REGISTRY` | Option to pull the pre-built images rather than creating them locally | true |

=== "Docker Compose Parameters"
This list of parameters that can be set when running docker compose up
Expand All @@ -92,6 +91,7 @@ The table below lists the environment variables (EVs) that can be used as inputs
|`GST_DEBUG` | for running pipeline in gst debugging mode | 0, 1 |
|`LOG_LEVEL` | log level to be set when running gst pipeline | ERROR, INFO, WARNING, and [more](https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html?gi-language=c#the-debug-log) |
|`OCR_RECLASSIFY_INTERVAL` | time interval in seconds for OCR classification | Ex: 5 |
|`REGISTRY` | Option to pull the pre-built images rather than creating them locally (by default:true) | false, true |
|`RENDER_MODE` | for displaying pipeline and overlay CV metadata | 1, 0 |
|`PIPELINE_COUNT` | Number of Automated Self Checkout Docker container instances to launch | Ex: 1 |
|`PIPELINE_SCRIPT` | Pipeline script to run. | yolo11n.sh, yolo11n_effnetb0.sh, yolo11n_full.sh |
Expand Down
41 changes: 34 additions & 7 deletions docs_src/use-cases/automated-self-checkout/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Getting Started

### **NOTE:**

By default the application runs by pulling the pre-built images. If you want to build the images locally and then run the application, set the flag:

```bash
REGISTRY=false

usage: make <command> REGISTRY=false (applicable for all commands like benchmark, benchmark-stream-density..)
Example: make run-demo REGISTRY=false
```

(If this is the first time, it will take some time to download videos, models, docker images and build images)

## Step by step instructions:

1. Download the models using download_models/downloadModels.sh
Expand All @@ -20,13 +33,7 @@
make download-sample-videos
```

4. Build the demo Docker image

```bash
make build
```

5. Start Automated Self Checkout 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.
4. Start Automated Self Checkout using the Docker Compose file.

```bash
make run-render-mode
Expand All @@ -37,6 +44,26 @@
```bash
make run-demo
```
5. To build the images locally step by step:
- Follow the following steps:
```bash
make download-models REGISTRY=false
make update-submodules REGISTRY=false
make download-sample-videos
```
- Now build the pipeline-runner image locally:
```bash
make build REGISTRY=false
```
- Finally, start Automated self checkout using docker compose up.
```bash
make run-render-mode REGISTRY=false
```
- The above series of commands can be executed using only one command:

```bash
make run-demo REGISTRY=false
```

6. Verify Docker containers

Expand Down
10 changes: 7 additions & 3 deletions docs_src/use-cases/automated-self-checkout/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ make benchmark-quickstart
```
The above command would:<br>
- Run headless (no display needed: `RENDER_MODE=0`)<br>
- Pull pre-built images (`REGISTRY=true`)<br>
- Use full pipeline (`PIPELINE_SCRIPT=obj_detection_age_prediction.sh`)<br>
- Target GPU by default (`DEVICE_ENV=res/all-gpu.env`)<br>
- Generate benchmark metrics<br>
Expand Down Expand Up @@ -52,7 +53,7 @@ List of EVs:
|`PIPELINE_COUNT` | number of Automated Self Checkout Docker container instances to launch | Ex: 1 |
|`PIPELINE_SCRIPT` | pipeline script to run. | yolo11n_effnetb0.sh, obj_detection_age_prediction.sh, etc. |
|`DEVICE_ENV` | device to use for classification and detection | res/all-cpu.env, res/all-gpu.env, res/det-gpu_class-npu.env, etc. |
|`REGISTRY` | option to pull pre-built images from registry rather than building them locally | true |
|`REGISTRY` | option to pull pre-built images from registry rather than building them locally (by default:true) | false, true |

> **Note:**
> Higher the `PIPELINE_COUNT`, higher the stress on the system.
Expand Down Expand Up @@ -86,10 +87,13 @@ make PIPELINE_SCRIPT=obj_detection_age_prediction.sh DEVICE_ENV=res/all-gpu.env
Stream 1: Object detection + classification on retail video <br>
Stream 2: Face detection + age/gender prediction on age prediction video

### Benchmark command to pull pre-built images
### Benchmark command to build images locally

!!! Note
By default the images are pulled from public repository.

```bash
make REGISTRY=true PIPELINE_COUNT=1 benchmark
make REGISTRY=false PIPELINE_COUNT=1 benchmark
```


Expand Down
10 changes: 6 additions & 4 deletions docs_src/use-cases/loss-prevention/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ make benchmark-quickstart
```
The above command would:<br>
- Run headless (no display needed: `RENDER_MODE=0`)<br>
- Pull pre-built images (`REGISTRY=true`)<br>
- Target GPU by default (`WORKLOAD_DIST=workload_to_pipeline_gpu.json`)<br>
- Run 6 streams, each with different workload (`CAMERA_STREAM=camera_to_workload_full.json`)<br>
- Generate benchmark metrics<br>
Expand All @@ -32,7 +33,7 @@ Runs with:<br>
- `CAMERA_STREAM=camera_to_workload.json`<br>
- `WORKLOAD_DIST=workload_to_pipeline.json`<br>
- `PIPELINE_COUNT=1`<br>
- `REGISTRY=false`<br>
- `REGISTRY=true`<br>

You can override these values through the following Environment Variables.

Expand All @@ -42,7 +43,7 @@ You can override these values through the following Environment Variables.
|`PIPELINE_COUNT` | number of Loss Prevention Docker container instances to launch | Ex: 1 |
|`WORKLOAD_DIST` | to define how each workload is assigned to a specific processing unit (CPU, GPU, NPU) | workload_to_pipeline_cpu.json, workload_to_pipeline_gpu.json, workload_to_pipeline_gpu-npu.json, workload_to_pipeline_hetero.json, workload_to_pipeline.json |
|`CAMERA_STREAM` | to define camera settings and their associated workloads for the pipeline | camera_to_workload.json, camera_to_workload_full.json |
|`REGISTRY` | option to pull the pre-built images rather than creating them locally | true, false |
|`REGISTRY` | option to pull the pre-built images rather than creating them locally | false, true |

> **Note:**
> Higher the `PIPELINE_COUNT`, higher the stress on the system.
Expand Down Expand Up @@ -99,11 +100,12 @@ You can override these values through the following Environment Variables.
### Benchmark command with environment variable overrides

```bash
make benchmark WORKLOAD_DIST=workload_to_pipeline_gpu-npu.json CAMERA_STREAM=camera_to_workload_full.json
make benchmark WORKLOAD_DIST=workload_to_pipeline_gpu-npu.json CAMERA_STREAM=camera_to_workload_full.json REGISTRY=false
```

Runs with:<br>
- `RENDER_MODE=0`<br>
- `REGISTRY=false` (Builds images locally)<br>
- `CAMERA_STREAM=camera_to_workload_full.json`<br>
- `WORKLOAD_DIST=workload_to_pipeline_gpu-npu.json`<br>
- `PIPELINE_COUNT=1`<br>
Expand All @@ -112,7 +114,7 @@ Runs with:<br>
### See the benchmarking results

```sh
make consolidate-metrics
make consolidate-metrics

cat benchmark/metrics.csv
```
Expand Down
33 changes: 30 additions & 3 deletions docs_src/use-cases/loss-prevention/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Getting Started

### **NOTE:**

By default the application runs by pulling the pre-built images. If you want to build the images locally and then run the application, set the flag:

```bash
REGISTRY=false

usage: make <command> REGISTRY=false (applicable for all commands like benchmark, benchmark-stream-density..)
Example: make run-lp REGISTRY=false
```

(If this is the first time, it will take some time to download videos, models, docker images and build images)

## Step by step instructions:

1. Download the models using download_models/downloadModels.sh
Expand Down Expand Up @@ -28,19 +41,33 @@

**NOTE:- User can directly run single make command that internally called all above command and run the Loss Prevention application.**

5. Run Loss Prevention appliaction with single command.
- Run Loss Prevention appliaction with single command.

```bash
make run-lp
```

- Running Loss Prevention application with ENV variables:
```bash
REGISTRY=true CAMERA_STREAM=camera_to_workload_full.json WORKLOAD_DIST=workload_to_pipeline_cpu.json make run-lp
CAMERA_STREAM=camera_to_workload_full.json WORKLOAD_DIST=workload_to_pipeline_cpu.json make run-lp
```
`REGISTRY=true`: pre-built images are pulled. <br>
`CAMERA_STREAM=camera_to_workload_full.json`: runs all 6 workloads. <br>
`WORKLOAD_DIST=workload_to_pipeline_cpu.json`: all workloads run on CPU. <br>

5. To build the images locally step by step:
- Follow the following steps:
```bash
make download-models REGISTRY=false
make update-submodules REGISTRY=false
make download-sample-videos
make run-render-mode REGISTRY=false
```

- The above series of commands can be executed using only one command:

```bash
make run-lp REGISTRY=false
```

6. View the Dynamically Generated GStreamer Pipeline.
>*Since the GStreamer pipeline is generated dynamically based on the provided configuration(camera_to_workload and workload_to_pipeline json), the pipeline.sh file gets updated every time the user runs make run-lp or make benchmark. This ensures that the pipeline reflects the latest changes.*
Expand Down
11 changes: 10 additions & 1 deletion docs_src/use-cases/order-accuracy/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ make benchmark-quickstart
```
The above command would:<br>
- Run headless (no display needed: `RENDER_MODE=0`)<br>
- Pull pre-built images (`REGISTRY=true`)<br>
- Target GPU by default (`DEVICE_ENV=res/all-gpu.env`)<br>
- Generate benchmark metrics<br>
- Run `make consolidate-metrics` automatically<br>
Expand All @@ -28,6 +29,7 @@ make benchmark
```
Runs with:<br>
- `RENDER_MODE=0`<br>
- `REGISTRY=true`<br>
- `DEVICE_ENV=res/all-cpu.env`<br>
- `PIPELINE_COUNT=1`<br>

Expand All @@ -36,6 +38,7 @@ You can override these values through the following Environment Variables.
| Variable | Description | Values |
|:----|:----|:---|
|`RENDER_MODE` | for displaying pipeline and overlay CV metadata | 1, 0 |
|`REGISTRY` | to pull pre-built images from public registry | false, true |
|`PIPELINE_COUNT` | number of Loss Prevention Docker container instances to launch | Ex: 1 |
|`DEVICE_ENV` | path to device specific environment file that will be loaded into the pipeline container | res/all-cpu.env, res/all-gpu.env, res/all-npu.env, res/all-dgpu.env |

Expand All @@ -53,10 +56,16 @@ make DEVICE_ENV=res/all-gpu.env benchmark
make DEVICE_ENV=res/all-npu.env benchmark
```

### Benchmark command to build images locally

```bash
make REGISTRY=false benchmark
```

## See the benchmarking results.

```sh
make consolidate-metrics
make consolidate-metrics

cat benchmark/metrics.csv
```
Expand Down
34 changes: 29 additions & 5 deletions docs_src/use-cases/order-accuracy/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Getting Started

### **NOTE:**

By default the application runs by pulling the pre-built images. If you want to build the images locally and then run the application, set the flag:

```bash
REGISTRY=false

usage: make <command> REGISTRY=false (applicable for all commands like benchmark, benchmark-stream-density..)
Example: make run-demo REGISTRY=false
```

(If this is the first time, it will take some time to download videos, models, docker images and build images)

## Step by step instructions:

1. Download the models using download_models/downloadModels.sh
Expand All @@ -26,12 +39,23 @@
make run-render-mode
```

**NOTE:- User can directly run single make command that internally called all above command and run the Order Accuracy application.**

5. Run Order Accuracy appliaction with single command.

- The above series of commands can be executed using only one command:

```bash
make run-demo
```

5. To build the images locally step by step:
- Follow the following steps:
```bash
make download-models REGISTRY=false
make update-submodules REGISTRY=false
make download-sample-videos
make run-render-mode REGISTRY=false
```
- The above series of commands can be executed using only one command:
```bash
make run-demo
make run-demo REGISTRY=false
```

6. Verify Docker containers
Expand Down
Loading