You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. To run loss prevention from pre-built images,follow the below steps:
37
50
38
51
```bash
52
+
#Download the models using download_models/downloadModels.sh
53
+
make download-models
54
+
#Update github submodules
55
+
make update-submodules
56
+
#Download sample videos used by the performance tools
57
+
make download-sample-videos
58
+
#Run the LP application
39
59
make run-render-mode
40
60
```
41
61
42
62
**NOTE:- User can directly run single make command that internally called all above command and run the Loss Prevention application.**
43
63
44
-
- Run Loss Prevention appliaction with single command.
64
+
- Run Loss Prevention appliaction with single command.
45
65
46
66
```bash
47
-
make run-lp
67
+
make run-lp RENDER_MODE=1
48
68
```
49
69
50
-
- Running Loss Prevention application with ENV variables:
51
-
```bash
52
-
CAMERA_STREAM=camera_to_workload_full.json WORKLOAD_DIST=workload_to_pipeline_cpu.json make run-lp
53
-
```
54
-
`CAMERA_STREAM=camera_to_workload_full.json`: runs all 6 workloads. <br>
55
-
`WORKLOAD_DIST=workload_to_pipeline_cpu.json`: all workloads run on CPU. <br>
70
+
By default, Loss Prevention 6 default workloads are executed. Refer to the [Pre-Configured Workloads](#pre-configured-workloads) section for more details.
56
71
57
-
5. To build the images locally step by step:
72
+
3. To build the images locally step by step:
58
73
- Follow the following steps:
59
74
```bash
60
75
make download-models REGISTRY=false
@@ -66,30 +81,9 @@ Example: make run-lp REGISTRY=false
66
81
- The above series of commands can be executed using only one command:
67
82
68
83
```bash
69
-
make run-lp REGISTRY=false
84
+
make run-lp REGISTRY=false RENDER_MODE=1
70
85
```
71
-
72
-
6. View the Dynamically Generated GStreamer Pipeline.
73
-
>*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.*
74
-
```sh
75
-
76
-
src/pipelines/pipeline.sh
77
-
78
-
```
79
-
80
-
7. Verify Docker containers
81
-
82
-
```bash
83
-
docker ps --all
84
-
```
85
-
Result:
86
-
```bash
87
-
NAMES STATUS IMAGE
88
-
src-pipeline-runner-1 Up 17 seconds (healthy) pipeline-runner:lp
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.
95
89
@@ -192,8 +186,10 @@ Example: make run-lp REGISTRY=false
192
186
}
193
187
194
188
```
189
+
> [!NOTE]
190
+
> If unable to see results folder or files, please refer to the [Troubleshooting](#troubleshooting) section for more details.
195
191
196
-
9. Stop the containers:
192
+
5. Stop the containers:
197
193
198
194
When pre-built images are pulled-
199
195
@@ -207,4 +203,152 @@ Example: make run-lp REGISTRY=false
207
203
make down-lp REGISTRY=false
208
204
```
209
205
206
+
## Pre-configured Workloads
207
+
The preconfigured workload supports multiple hardware configurations out of the box. Use the `CAMERA_STREAM` and `WORKLOAD_DIST` variables to customize which cameras and hardware (CPU, GPU, NPU) are used by your pipeline.
208
+
209
+
**How To Use:**
210
+
- Specify the appropriate files as environment variables when running or benchmarking:
211
+
```sh
212
+
CAMERA_STREAM=<camera_stream> WORKLOAD_DIST=<workload_dist> make run-lp
213
+
```
214
+
Or for benchmarking:
215
+
```sh
216
+
CAMERA_STREAM=<camera_stream> WORKLOAD_DIST=<workload_dist> make benchmark
3. Run validate configs command, to verify configuration files
310
+
```sh
311
+
make validate-all-configs
312
+
```
313
+
4. Re-run the pipeline as described above.
314
+
315
+
> [!NOTE]
316
+
> Since the GStreamer pipeline is generated dynamically based on the provided configuration(camera_to_workload and workload_to_pipeline json),
317
+
> 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.
318
+
```sh
319
+
src/pipelines/pipeline.sh
320
+
```
321
+
322
+
323
+
## Troubleshooting
324
+
325
+
+ If results folder is empty, check Docker logs for errors:
326
+
+ List the docker containers
327
+
```sh
328
+
docker ps -a
329
+
```
330
+
+ Verify Docker containers if it is running or no errors in container logs
331
+
332
+
```bash
333
+
docker ps --all
334
+
```
335
+
Result:
336
+
```bash
337
+
NAMES STATUS IMAGE
338
+
src-pipeline-runner-1 Up 17 seconds (healthy) pipeline-runner:lp
0 commit comments