Skip to content

Repository files navigation

Edge-Assisted Human Action Recognition DeepStream Pipeline

Development Quick Start

Subsections below describe alternative ways to realize the general development workflow:

  1. Start jaeger and module processes
  2. The client sends input image to the module and receives module results (image, metadata, logs)
  3. Uri Input script + Always On sink allow to send a video file to be processed by the module and receive a stream output
  4. Changes in pyfuncs, drawfunc, pre- and postprocessing code are loaded at runtime when module receives input from the client
  5. Changes in module configuration require module container restart
  6. Changes in module docker image, e.g. changes in requirements.txt, require module image rebuild

First time start

Note that starting module for the first time involves downloading the model files and building TRT engine which may take several minutes. Additionally, client's wait for module status has a timeout which may be exceeded if TRT engine build process takes long enough. Wait for TRT build finish and restart the client script if so.

Download sample video

URI-Input script demonstration requires a sample video.

curl -o assets/test_data/elon_musk_perf.mp4 https://eu-central-1.linodeobjects.com/savant-data/demo/elon_musk_perf.mp4

Docker Compose

  1. Start Jaeger container
docker compose -f docker-compose.x86.yml up jaeger -d

This is required by the sample module since it is configured to use Jaeger telemetry.

Visit http://127.0.0.1:16686 to access the Jaeger UI.

  1. Start module container
docker compose -f docker-compose.x86.yml up module -d
  1. Run and re-run the client script (result image written into src/output directory)
docker compose -f docker-compose.x86.yml up client
  1. Send a video to the module and receive stream output

Start Always On Sink container

docker compose -f docker-compose.x86.yml up always-on-sink -d

Start Uri Input container

docker compose -f docker-compose.x86.yml up uri-input

Open rtsp://127.0.0.1:554/stream in your player, or visit http://127.0.0.1:888/stream/ in a browser.

  1. Restart module container

E.g., in case module.yml was modified.

docker compose -f docker-compose.x86.yml restart module
  1. Rebuild module image (optionally, use --no-cache and --pull flags for docker build to force full rebuild)

E.g., in case Dockerfile.x86 or requirements.txt were modified.

docker compose -f docker-compose.x86.yml down module
docker compose -f docker-compose.x86.yml build module

VS Code dev container

  1. Open the module directory on host in IDE

File -> Open Folder -> enter path

  1. Start Jaeger container
docker compose -f docker-compose.x86.yml up jaeger -d

This is required by the sample module since it is configured to use Jaeger telemetry.

Visit http://127.0.0.1:16686 to access the Jaeger UI.

  1. Reopen the directory in dev container

Command Palette (F1) -> "Dev Containers: Reopen in container" -> Select devcontainer.json appropriate for the platform

  1. Start and restart module
python module/run.py
  1. Run and re-run the client script (result image written into /opt/savant/src/output directory)
python client/run.py
  1. Send a video to the module and receive stream output

Open the module directory on host, start Always On Sink container

docker compose -f docker-compose.x86.yml up always-on-sink -d

Run URI Input script inside the dev container

cd /opt/savant
python scripts/uri-input.py /test_data/elon_musk_perf.mp4 --socket pub+connect:ipc:///tmp/zmq-sockets/input-video.ipc --sync

Open rtsp://127.0.0.1:554/stream in your player, or visit http://127.0.0.1:888/stream/ in a browser.

  1. Rebuild module image

E.g., in case Dockerfile.x86 or requirements.txt were modified.

Command Palette (F1) -> "Dev Containers: Rebuild container"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages