Skip to content

Commit

Permalink
Add perf script for rt-detr (#582)
Browse files Browse the repository at this point in the history
* added perf script for rt-detr

* Fix models path.

---------

Co-authored-by: Denis Medyantsev <[email protected]>
  • Loading branch information
bwsw and denisvmedyantsev authored Nov 30, 2023
1 parent 347c607 commit dad2831
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@
| [#352](https://github.com/insight-platform/Savant/issues/352) | 414.61 | 77.47? | 117.53 |
| [#550](https://github.com/insight-platform/Savant/issues/550) | 416.32 | | 117.34 |

### rtdetr

| Savant ver. | A4000 | Xavier NX | Orin Nano |
|---------------------------------------------------------------|--------|-----------|-----------|
| [#558](https://github.com/insight-platform/Savant/issues/558) | 137.41 | | |

### traffic_meter (yolov8m)

| Savant ver. | A4000 | Xavier NX | Orin Nano |
Expand Down
7 changes: 4 additions & 3 deletions samples/rtdetr/docker-compose.x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ services:
dockerfile: docker/Dockerfile.x86
volumes:
- zmq_sockets:/tmp/zmq-sockets
- ../../models/rtdetr:/models
- ../../downloads/rtdetr:/downloads
- .:/opt/savant/samples/rtdetr
- ../../cache:/cache
- ..:/opt/savant/samples
command: samples/rtdetr/module.yml
environment:
- MODEL_PATH=/cache/models/rtdetr
- DOWNLOAD_PATH=/cache/downloads/rtdetr
- ZMQ_SRC_ENDPOINT=router+bind:ipc:///tmp/zmq-sockets/input-video.ipc
- ZMQ_SINK_ENDPOINT=pub+bind:ipc:///tmp/zmq-sockets/output-video.ipc
deploy:
Expand Down
24 changes: 24 additions & 0 deletions samples/rtdetr/run_perf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# you are expected to be in Savant/ directory
# Usage: run_perf.sh [MULTISTREAM] [YQ_ARGS]...
# The MULTISTREAM argument is an integer, 0 means using uridecodebin source,
# >0 means using the the multistream source adapter with specified number of streams.
# The YQ_ARGS are module configuration updates in yq notation,
# e.g. ".parameters.batch_size=4".

MODULE_CONFIG=samples/rtdetr/module.yml
DATA_LOCATION=data/leeds_1080p.mp4

if [ "$(uname -m)" = "aarch64" ]; then
# docker compose -f samples/rtdetr/docker-compose.l4t.yml build module
echo "L4T benchmark is not implemented"
exit 1
else
docker compose -f samples/rtdetr/docker-compose.x86.yml build module
fi

source samples/assets/run_perf_helper.sh
set_source $DATA_LOCATION
PERF_CONFIG="${MODULE_CONFIG%.*}_perf.yml"
config_perf $MODULE_CONFIG $PERF_CONFIG "${YQ_ARGS[@]}"
./scripts/run_module.py -i rtdetr-module $PERF_CONFIG

0 comments on commit dad2831

Please sign in to comment.