intel-retail / loss-prevention

Apache License 2.0
0 stars 4 forks source link

Benchmark multiple different pipelines running in parallel #18

Closed jim-wang-intel closed 1 week ago

jim-wang-intel commented 3 weeks ago

PR Checklist

What are you changing?

This PR demonstrate the possibility to do the benchmarks for two (or multiple) different purposes of CV pipelines running in parallel. For more details, check this quick documentation.

Issue this PR will close

close: #issue_number

Anything the reviewer should know when reviewing this PR?

Test Instructions if applicable

here are some sample outputs you will expect to see:

......
/home/jimwang/go/src/github.com/loss-prevention/results/r20241113210117421731269_gst2.jsonl
['20241113210117421731269', '2']
/home/jimwang/go/src/github.com/loss-prevention/results/r20241113210117421731269_gst2.jsonl
1731531799.0876124
2024-11-13 14:03:19.087612
11/13/2024 14:03:087612
parsing last modified log time
/home/jimwang/go/src/github.com/loss-prevention/results/r20241113210117383850131_gst1.jsonl
['20241113210117383850131', '1']
/home/jimwang/go/src/github.com/loss-prevention/results/r20241113210117383850131_gst1.jsonl
1731531799.1356127
2024-11-13 14:03:19.135613
11/13/2024 14:03:135613
parsing last modified log time
/home/jimwang/go/src/github.com/loss-prevention/results/r20241112231434922008249_gst2.jsonl
['20241112231434922008249', '2']
/home/jimwang/go/src/github.com/loss-prevention/results/r20241112231434922008249_gst2.jsonl
1731453486.5691512
2024-11-12 16:18:06.569151
11/12/2024 16:18:569151
parsing last modified log time
/home/jimwang/go/src/github.com/loss-prevention/results/r20241112231434930583977_gst1.jsonl
['20241112231434930583977', '1']
/home/jimwang/go/src/github.com/loss-prevention/results/r20241112231434930583977_gst1.jsonl
1731453486.7991536
2024-11-12 16:18:06.799154
11/12/2024 16:18:799154
parsing CPU usages
parsing memory usage
parsing disk bandwidth
parsing memory bandwidth
parsing power usage
Loss Prevention benchmark results are saved in /home/jimwang/go/src/github.com/loss-prevention/results/summary.csv file
====== Loss prevention benchmark results summary: 
Camera_20241112231434930583977 FPS,17.06688654353562
Camera_20241113210117383850131 FPS,17.74093896713615
Camera_20241113210117421731269 FPS,1.4735915492957747
Camera_20241112231434922008249 FPS,1.4285915492957746
Camera_20241113210117421731269 Last log update,11/13/2024 14:03:087612
Camera_20241113210117383850131 Last log update,11/13/2024 14:03:135613
Camera_20241112231434922008249 Last log update,11/12/2024 16:18:569151
Camera_20241112231434930583977 Last log update,11/12/2024 16:18:799154
CPU Utilization %,96.40241666666667
Memory Utilization %,24.852492999069177
Disk Read MB/s,0.0
Disk Write MB/s,0.0029966115702479337
S0 Memory Bandwidth Usage MB/s,5459.89898989899
S0 Power Draw W,10.247979797979799

Example console output:

......
yolov8s already exists.
./download_models/downloadModels.sh 
yolov5s FP16-INT8 model already exists in object_detection/yolov5s/FP16-INT8/yolov5s.bin, skip downloading...
efficientnet FP32-INT8 model already exists, skip downloading...
horizontalText0002 FP16-INT8 model already exists, skip downloading...
textRec0012 FP16-INT8 model already exists, skip downloading...
object_detection/person-detection-0200/FP16-INT8/person-detection-0200.bin
personDetection0106 FP16-INT8 model already exists, skip downloading...
object_detection/face-detection-retail-0005/FP16-INT8/face-detection-retail-0005.bin
faceDetectionRetail0005 FP16-INT8 model already exists, skip downloading...
object_classification/age-gender-recognition-retail-0013/FP16-INT8/age-gender-recognition-retail-0013.bin
ageGenderRecognitionRetail0013 FP16-INT8 model already exists, skip downloading...
cd performance-tools/benchmark-scripts && python benchmark.py --compose_file ../../src/docker-compose-2-clients.yml \
--target_fps 10.95 2.95 --container_names gst1 gst2 \
--density_increment 1 --results_dir /home/jimwang/go/src/github.com/loss-prevention/results
Starting workload(s)
starting stream density for multiple running pipelines...
Completed stream density for target FPS: 10.95 in container: gst1. Max pipelines: 2, Met target FPS? True
Completed stream density for target FPS: 2.95 in container: gst2. Max pipelines: 1, Met target FPS? False
workloads finished...

If the there are associated PRs in other repositories, please link them here (i.e. intel-retail/loss-prevention )

jim-wang-intel commented 3 weeks ago

NOTE: This PR stays in draft mode until performance-tool PR for stream-density https://github.com/intel-retail/performance-tools/pull/72 is merged because of dependency on that- #72 has been merged so now it is ready for review.