diff --git a/docs_src/use-cases/automated-self-checkout/advanced.md b/docs_src/use-cases/automated-self-checkout/advanced.md index 30a7840..fb52f3c 100644 --- a/docs_src/use-cases/automated-self-checkout/advanced.md +++ b/docs_src/use-cases/automated-self-checkout/advanced.md @@ -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 @@ -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 | diff --git a/docs_src/use-cases/automated-self-checkout/getting_started.md b/docs_src/use-cases/automated-self-checkout/getting_started.md index f1a8789..ae3f39b 100644 --- a/docs_src/use-cases/automated-self-checkout/getting_started.md +++ b/docs_src/use-cases/automated-self-checkout/getting_started.md @@ -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 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 @@ -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 @@ -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 diff --git a/docs_src/use-cases/automated-self-checkout/performance.md b/docs_src/use-cases/automated-self-checkout/performance.md index a4bdad6..5017eb1 100644 --- a/docs_src/use-cases/automated-self-checkout/performance.md +++ b/docs_src/use-cases/automated-self-checkout/performance.md @@ -15,6 +15,7 @@ make benchmark-quickstart ``` The above command would:
- Run headless (no display needed: `RENDER_MODE=0`)
+- Pull pre-built images (`REGISTRY=true`)
- Use full pipeline (`PIPELINE_SCRIPT=obj_detection_age_prediction.sh`)
- Target GPU by default (`DEVICE_ENV=res/all-gpu.env`)
- Generate benchmark metrics
@@ -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. @@ -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
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 ``` diff --git a/docs_src/use-cases/loss-prevention/advanced.md b/docs_src/use-cases/loss-prevention/advanced.md index 85551ca..6adf69c 100644 --- a/docs_src/use-cases/loss-prevention/advanced.md +++ b/docs_src/use-cases/loss-prevention/advanced.md @@ -9,6 +9,7 @@ make benchmark-quickstart ``` The above command would:
- Run headless (no display needed: `RENDER_MODE=0`)
+- Pull pre-built images (`REGISTRY=true`)
- Target GPU by default (`WORKLOAD_DIST=workload_to_pipeline_gpu.json`)
- Run 6 streams, each with different workload (`CAMERA_STREAM=camera_to_workload_full.json`)
- Generate benchmark metrics
@@ -32,7 +33,7 @@ Runs with:
- `CAMERA_STREAM=camera_to_workload.json`
- `WORKLOAD_DIST=workload_to_pipeline.json`
- `PIPELINE_COUNT=1`
-- `REGISTRY=false`
+- `REGISTRY=true`
You can override these values through the following Environment Variables. @@ -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. @@ -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:
- `RENDER_MODE=0`
+- `REGISTRY=false` (Builds images locally)
- `CAMERA_STREAM=camera_to_workload_full.json`
- `WORKLOAD_DIST=workload_to_pipeline_gpu-npu.json`
- `PIPELINE_COUNT=1`
@@ -112,7 +114,7 @@ Runs with:
### See the benchmarking results ```sh -make consolidate-metrics +make consolidate-metrics cat benchmark/metrics.csv ``` diff --git a/docs_src/use-cases/loss-prevention/getting_started.md b/docs_src/use-cases/loss-prevention/getting_started.md index e654490..a4ed027 100644 --- a/docs_src/use-cases/loss-prevention/getting_started.md +++ b/docs_src/use-cases/loss-prevention/getting_started.md @@ -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 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 @@ -28,7 +41,7 @@ **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 @@ -36,11 +49,25 @@ - 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.
`CAMERA_STREAM=camera_to_workload_full.json`: runs all 6 workloads.
`WORKLOAD_DIST=workload_to_pipeline_cpu.json`: all workloads run on CPU.
+ +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.* diff --git a/docs_src/use-cases/order-accuracy/advanced.md b/docs_src/use-cases/order-accuracy/advanced.md index 70f0718..559d651 100644 --- a/docs_src/use-cases/order-accuracy/advanced.md +++ b/docs_src/use-cases/order-accuracy/advanced.md @@ -9,6 +9,7 @@ make benchmark-quickstart ``` The above command would:
- Run headless (no display needed: `RENDER_MODE=0`)
+- Pull pre-built images (`REGISTRY=true`)
- Target GPU by default (`DEVICE_ENV=res/all-gpu.env`)
- Generate benchmark metrics
- Run `make consolidate-metrics` automatically
@@ -28,6 +29,7 @@ make benchmark ``` Runs with:
- `RENDER_MODE=0`
+- `REGISTRY=true`
- `DEVICE_ENV=res/all-cpu.env`
- `PIPELINE_COUNT=1`
@@ -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 | @@ -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 ``` diff --git a/docs_src/use-cases/order-accuracy/getting_started.md b/docs_src/use-cases/order-accuracy/getting_started.md index 8003674..dff1acc 100644 --- a/docs_src/use-cases/order-accuracy/getting_started.md +++ b/docs_src/use-cases/order-accuracy/getting_started.md @@ -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 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 @@ -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