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:
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:
-
Download the models using download_models/downloadModels.sh
make download-models -
Update github submodules
make update-submodules -
Download sample videos used by the performance tools
make download-sample-videos -
Run the LP application
make run-render-modeNOTE:- User can directly run single make command that internally called all above command and run the Loss Prevention application.
-
Run Loss Prevention appliaction with single command.
make run-lp- Running Loss Prevention application with ENV variables:
CAMERA_STREAM=camera_to_workload_full.json WORKLOAD_DIST=workload_to_pipeline_cpu.json make run-lpCAMERA_STREAM=camera_to_workload_full.json: runs all 6 workloads.
WORKLOAD_DIST=workload_to_pipeline_cpu.json: all workloads run on CPU.
- Running Loss Prevention application with ENV variables:
-
To build the images locally step by step:
-
Follow the following steps:
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:
make run-lp REGISTRY=false -
-
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.
src/pipelines/pipeline.sh -
Verify Docker containers
Result:docker ps --allNAMES STATUS IMAGE src-pipeline-runner-1 Up 17 seconds (healthy) pipeline-runner:lp model-downloader Exited(0) 17 seconds model-downloader:lp -
Verify Results
After starting Loss Prevention you will begin to see result files being written into the results/ directory. Here are example outputs from the 3 log files.
gst-launch_
pipeline
r
-
Stop the containers:
When pre-built images are pulled-
make down-lpWhen images are built locally-
make down-lp REGISTRY=false