Skip to content

Latest commit

 

History

History
104 lines (63 loc) · 4.13 KB

File metadata and controls

104 lines (63 loc) · 4.13 KB

Multi-Stream RTSP Object Detection and Pose Estimation Pipeline

Overview

This GStreamer pipeline demonstrates object detection on 8 camera streams over RTSP protocol. This pipeline also demonstrates using two hailo8 devices in parallel.

All the streams are processed in parallel through the decode and scale phases, and enter the Hailo devices frame by frame. Each hailo device is in charge of one inference task (one for yolov5 and the other for centerpose)

Afterwards the post-process and drawing phases add the classified object and bounding boxes to each frame. The last step is to match each frame back to its respective stream and output all of them to the display.

Read more about RTSP: RTSP

Prerequisites

Preparations

  1. Before running, configuration of the RTSP camera sources is required. open the rtsp_detection_and_pose_estimation.sh in edit mode with your preffered editor. Configure the eight sources to match your own cameras.
readonly SRC_0="rtsp://<ip address>/?h264x=4 user-id=<username> user-pw=<password>"
readonly SRC_1="rtsp://<ip address>/?h264x=4 user-id=<username> user-pw=<password>"
etc..

Run the Pipeline

./rtsp_detection_and_pose_estimation.sh
  1. --show-fps prints the fps to the output.

  2. --num-of-sources sets the number of rtsp sources to use by given input. the default and recommended value in this pipeline is 8 sources

  3. --print-gst-launch prints the ready gst-launch command without running it

  4. --print-devices-stats prints the power and temperature measured

  5. --debug uses gst-top to print time and memory consuming elements, saves the results as text and graph

    NOTE : When the debug flag is used and the app is running inside of a docker, exit the app by tying Ctrl+C in order to save the results. (Due to docker X11 display communication issues)

Models

Configuration

The yolo post process parameters can be configured by a json file located in $TAPPAS_WORKSPACE/apps/h8/gstreamer/general/multistream_multidevice/resources/configs/yolov5.json

Overview of the Pipeline

These apps are based on our multi stream pipeline template

Using Retraining to replace models

Note

It is recommended to first read the Retraining TAPPAS Models page.

Retraining Dockers (available on Hailo Model Zoo), can be used to replace the following models with ones that are trained on your own dataset:

  • yolov5m
    • Retraining docker
      • For optimum compatibility and performance with TAPPAS, use for compilation the corresponding YAML file from above.
    • TAPPAS changes to replace model:
      • Update HEF_PATH on the .sh file
      • Update resources/configs/yolov5.json with the new post-processing parameters (NMS)
  • centerpose
    • Retraining docker
    • TAPPAS changes to replace model:
      • Update HEF_PATH on the .sh file
      • Update centerpose.cpp
        with the new parameters, then recompile to create libcenterpose_post.so