Skip to content

Commit

Permalink
v3.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HailoRT-Automation committed Jun 29, 2023
1 parent 3c2b49d commit 0c9492e
Show file tree
Hide file tree
Showing 173 changed files with 12,583 additions and 1,730 deletions.
2 changes: 1 addition & 1 deletion .config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hailort_version=4.13
hailort_version=4.14
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Hailo TAPPAS - Optimized Execution of Video-Processing Pipelines
:width: 150
:height: 20

.. |hailort| image:: https://img.shields.io/badge/HailoRT-4.13.0-green
.. |hailort| image:: https://img.shields.io/badge/HailoRT-4.14.0-green
:target: https://github.com/hailo-ai/hailort
:alt: HailoRT
:height: 20
Expand All @@ -22,7 +22,7 @@ Hailo TAPPAS - Optimized Execution of Video-Processing Pipelines
:width: 20
:align: middle

.. image:: ./resources/TAPPAS.png
.. image:: ./resources/github_TAPPAS.jpg
:height: 300
:width: 600
:align: center
Expand Down Expand Up @@ -51,7 +51,7 @@ Demonstrating Hailo's system integration scenario of specific use cases on prede
* Simplifying integration with Hailo’s runtime SW stack
* Providing a starting point for customers to fine-tune their applications

.. image:: ./resources/HAILO_TAPPAS_SW_STACK.jpg
.. image:: ./resources/HAILO_TAPPAS_SW_STACK.svg


----
Expand Down Expand Up @@ -420,18 +420,22 @@ Our VMS reference application demonstrates the use of 5 networks over multiple s
Changelog
----------

**v3.25.0 (July 2023)**

* Improved Yolov5seg post-process performance
* Updated Yolo networks to use the HailoRT native post-process (selected models)
* Added "non-blocking mode" and "wait-time" properties to hailoroundrobin element

**v3.24.0 (March 2023)**

* Added support for `Rockchip RK3588 <apps/h8/gstreamer/rockchip/README.rst>`_ (validated on Firefly ITX-3588J platform)
* `Video Management System <apps/h8/gstreamer/x86_hw_accelerated/video_management_system/README.rst>`_ now supports multi-device (Ubuntu 22.04 only)
* `Video Management System <apps/h8/gstreamer/x86_hw_accelerated/video_management_system/README.rst>`_ (single device) now works on Ubuntu 20.04
* Added a new model to `Instance Segmentation Pipeline <apps/h8/gstreamer/general/instance_segmentation/README.rst>`_ -- `yolov5seg`, which has improved
performance compared to `yolact`
* Added a new model to `Instance Segmentation Pipeline <apps/h8/gstreamer/general/instance_segmentation/README.rst>`_:
* `yolov5seg` - which has improved performance compared to `yolact`
* New applications for `i.MX8 <apps/h8/gstreamer/imx8/README.rst>`_:

* Object Detection and Pose Estimation (cascaded)
* Multi-Stream Detection

* Added a TAPPAS Graphic User Interface to easily run selected general example applications (preview) on the TAPPAS Docker - to activate it, run `tappas-gui`
* Added back `yolox_l_leaky` to the `Century general application <apps/h8/gstreamer/general/century/README.rst>`_
* Reduced docker size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ function init_variables() {
readonly DEFAULT_DETECTION_HEF_PATH="$RESOURCES_DIR/yolov5m_wo_spp_60p.hef"
readonly DEFAULT_POST_ESTIMATION_HEF_PATH="$RESOURCES_DIR/mspn_regnetx_800mf.hef"

readonly DEFAULT_DETECTION_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_post.so"
readonly DEFAULT_DETECTION_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_hailortpp_post.so"
readonly DEFAULT_LANDMARKS_POSTPROCESS_SO="$POSTPROCESS_DIR/libmspn_post.so"

readonly DEFAULT_CROP_SO="$CROPING_ALGORITHMS_DIR/libmspn.so"
readonly DEFAULT_JSON_CONFIG_PATH="$RESOURCES_DIR/configs/mspn.json"

readonly DEFAULT_VDEVICE_KEY="1"
readonly DEFAULT_NETWORK_NAME="yolov5"

video_sink_element=$([ "$XV_SUPPORTED" = "true" ] && echo "xvimagesink" || echo "ximagesink")
video_sink="fpsdisplaysink video-sink=$video_sink_element text-overlay=false"
Expand All @@ -34,6 +35,7 @@ function init_variables() {
input_source=$DEFAULT_DETECTION_VIDEO_SOURCE
crop_so=$DEFAULT_CROP_SO
json_config_path=$DEFAULT_JSON_CONFIG_PATH
network_name=$DEFAULT_NETWORK_NAME

internal_offset=false
print_gst_launch_only=false
Expand All @@ -51,7 +53,7 @@ function print_usage() {
echo " --show-fps Print fps"
echo " --max-camera-resolution WIDTHxHEIGHT The maximun input resolution from camera as an input (default ${DEFAULT_MAX_CAMERA_WIDTH}x${DEFAULT_MAX_CAMERA_HEGIHT})"
echo " --print-gst-launch Print the ready gst-launch command without running it"
echo " --tcp-address If specified, set the sink to a TCP client (expected format is 'host:port')"
echo " --tcp-address Used for TAPPAS GUI, switchs the sink to TCP client"
exit 0
}

Expand Down Expand Up @@ -84,8 +86,8 @@ function parse_args() {
tcp_host=$(echo $2 | awk -F':' '{print $1}')
tcp_port=$(echo $2 | awk -F':' '{print $2}')
video_sink="queue name=queue_before_sink leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
x264enc tune=zerolatency ! \
queue max-size-bytes=0 max-size-time=0 ! matroskamux ! tcpclientsink host=$tcp_host port=$tcp_port"
videoscale ! video/x-raw,width=836,height=546,format=RGB ! \
queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=$tcp_host port=$tcp_port"

shift
else
Expand Down Expand Up @@ -140,7 +142,7 @@ OBJECT_DETECTION_PIPELINE="videoscale qos=false ! \
hailonet hef-path=$detection_hef_path scheduling-algorithm=1 scheduler-threshold=5 \
scheduler-timeout-ms=100 vdevice-key=$DEFAULT_VDEVICE_KEY ! \
queue leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! \
hailofilter name=detection so-path=$detection_postprocess_so qos=false function-name=yolov5 ! \
hailofilter name=detection so-path=$detection_postprocess_so qos=false function-name=$network_name ! \
queue leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0"

LANDMARKS_PIPELINE="videoscale qos=false ! \
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion apps/h8/gstreamer/general/century/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Supported Networks
------------------

* 'yolov5m_wo_spp_60p' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml
* 'yolox_l_leaky' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml

Run
---
Expand Down Expand Up @@ -70,4 +71,14 @@ that are trained on your own dataset:
- TAPPAS changes to replace model:

- Update HEF_PATH on the .sh file
- Update ``resources/configs/yolov5.json`` with your new post-processing parameters (NMS)
- Update ``resources/configs/yolov5.json`` with your new post-processing parameters (NMS)

- ``yolox_l_leaky``

- `Retraining docker <https://github.com/hailo-ai/hailo_model_zoo/tree/master/training/yolovx>`_

- For best compatibility and performance with TAPPAS, use for compilation the corresponsing YAML file from above.
- TAPPAS changes to replace model:

- Update HEF_PATH on the .sh file
- Update ``resources/configs/yolox.json`` with your new post-processing parameters (NMS)
13 changes: 5 additions & 8 deletions apps/h8/gstreamer/general/century/century.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ function init_variables() {
readonly POSTPROCESS_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/libs/post_processes/"
readonly RESOURCES_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/general/century/resources"

readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_post.so"
readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_hailortpp_post.so"
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/detection_5m.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/yolov5m_wo_spp_60p.hef"
readonly DEVICE_COUNT=4
readonly DEVICE_PREFIX="[-]"
readonly DEFAULT_JSON_CONFIG_PATH="$RESOURCES_DIR/configs/yolov5m.json"
readonly DEFAULT_NETWORK_NAME="yolov5"

network_name=$DEFAULT_NETWORK_NAME
Expand All @@ -24,7 +23,6 @@ function init_variables() {
device_count=$DEVICE_COUNT
input_source=$DEFAULT_VIDEO_SOURCE
hef_path=$DEFAULT_HEF_PATH
json_config_path=$DEFAULT_JSON_CONFIG_PATH

print_gst_launch_only=false
additional_parameters=""
Expand Down Expand Up @@ -73,7 +71,6 @@ function parse_args() {
if [ $2 == "yolox" ]; then
network_name="yolox"
hef_path="$RESOURCES_DIR/yolovx_l_leaky.hef"
json_config_path="$RESOURCES_DIR/configs/yolox.json"
elif [ $2 != "yolov5m" ]; then
echo "Received invalid network: $2. See expected arguments below:"
print_usage
Expand Down Expand Up @@ -115,16 +112,16 @@ else
fi

PIPELINE="gst-launch-1.0 \
$source_element ! videoconvert ! \
videoscale ! video/x-raw, pixel-aspect-ratio=1/1 ! \
$source_element ! videoconvert qos=false ! \
videoscale qos=false ! video/x-raw, pixel-aspect-ratio=1/1 ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
hailonet hef-path=$hef_path device-count=$device_count scheduling-algorithm=0 is-active=true ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
hailofilter function-name=$network_name so-path=$postprocess_so config-path=$json_config_path qos=false ! \
hailofilter function-name=$network_name so-path=$postprocess_so qos=false ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
hailooverlay qos=false ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
videoconvert ! \
videoconvert qos=false n-threads=4 ! \
fpsdisplaysink video-sink=$video_sink_element name=hailo_display sync=$sync_pipeline text-overlay=false ${additional_parameters}"

echo "Running $network_name"
Expand Down
8 changes: 3 additions & 5 deletions apps/h8/gstreamer/general/classification/classification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ function init_variables() {
readonly RESOURCES_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/general/classification/resources"
readonly POSTPROCESS_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/libs/post_processes/"
readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libclassification.so"
readonly DEFAULT_DRAW_SO="$POSTPROCESS_DIR/libdetection_draw.so"
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/classification_movie.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/resnet_v1_50.hef"

hef_path=$DEFAULT_HEF_PATH
input_source=$DEFAULT_VIDEO_SOURCE
postprocess_so=$DEFAULT_POSTPROCESS_SO
draw_so=$DEFAULT_DRAW_SO

print_gst_launch_only=false
additional_parameters=""
Expand All @@ -32,7 +30,7 @@ function print_usage() {
echo " -i INPUT --input INPUT Set the video source (only videos allowed) (default $input_source)"
echo " --show-fps Print fps"
echo " --print-gst-launch Print the ready gst-launch command without running it"
echo " --tcp-address If specified, set the sink to a TCP client (expected format is 'host:port')"
echo " --tcp-address Used for TAPPAS GUI, switchs the sink to TCP client"
exit 0
}

Expand Down Expand Up @@ -60,8 +58,8 @@ function parse_args() {
tcp_host=$(echo $2 | awk -F':' '{print $1}')
tcp_port=$(echo $2 | awk -F':' '{print $2}')
video_sink="queue name=queue_before_sink leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
x264enc tune=zerolatency ! \
queue max-size-bytes=0 max-size-time=0 ! matroskamux ! tcpclientsink host=$tcp_host port=$tcp_port"
videoscale ! video/x-raw,width=836,height=546,format=RGB ! \
queue max-size-bytes=0 max-size-time=0 ! tcpclientsink host=$tcp_host port=$tcp_port"

shift
else
Expand Down
17 changes: 8 additions & 9 deletions apps/h8/gstreamer/general/detection/detection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ function init_variables() {
readonly POSTPROCESS_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/libs/post_processes/"
readonly RESOURCES_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/general/detection/resources"

readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_post.so"
readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_hailortpp_post.so"
readonly DEFAULT_NETWORK_NAME="yolov5"
readonly DEFAULT_BATCH_SIZE="1"
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/detection.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/yolov5m_wo_spp_60p.hef"
readonly DEFAULT_JSON_CONFIG_PATH="$RESOURCES_DIR/configs/yolov5.json"


video_sink_element=$([ "$XV_SUPPORTED" = "true" ] && echo "xvimagesink" || echo "ximagesink")
Expand All @@ -25,16 +24,15 @@ function init_variables() {
input_source=$DEFAULT_VIDEO_SOURCE
batch_size=$DEFAULT_BATCH_SIZE
hef_path=$DEFAULT_HEF_PATH
json_config_path=$DEFAULT_JSON_CONFIG_PATH
json_config_path="null"

print_gst_launch_only=false
additional_parameters=""
stats_element=""
debug_stats_export=""
sync_pipeline=false
device_id_prop=""
tcp_host=""
tcp_port=""
tappas_gui_mode=false
}

function print_help_if_needed() {
Expand All @@ -57,7 +55,7 @@ function print_usage() {
echo " --show-fps Print fps"
echo " --print-gst-launch Print the ready gst-launch command without running it"
echo " --print-device-stats Print the power and temperature measured"
echo " --tcp-address If specified, set the sink to a TCP client (expected format is 'host:port')"
echo " --tcp-address Used for TAPPAS GUI, switchs the sink to TCP client"
exit 0
}

Expand All @@ -66,10 +64,12 @@ function parse_args() {
if [ $1 == "--network" ]; then
if [ $2 == "yolov4" ]; then
network_name="yolov4"
postprocess_so="$POSTPROCESS_DIR/libyolo_post.so"
hef_path="$RESOURCES_DIR/yolov4_leaky.hef"
batch_size="4"
json_config_path="$RESOURCES_DIR/configs/yolov4.json"
elif [ $2 == "yolov3" ]; then
postprocess_so="$POSTPROCESS_DIR/libyolo_post.so"
network_name="yolov3"
hef_path="$RESOURCES_DIR/yolov3.hef"
batch_size="4"
Expand Down Expand Up @@ -108,9 +108,8 @@ function parse_args() {
tcp_host=$(echo $2 | awk -F':' '{print $1}')
tcp_port=$(echo $2 | awk -F':' '{print $2}')
video_sink="queue name=queue_before_sink leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
x264enc tune=zerolatency ! \
queue max-size-bytes=0 max-size-time=0 ! matroskamux ! tcpclientsink host=$tcp_host port=$tcp_port"

videoscale ! video/x-raw,width=836,height=546,format=RGB ! \
tcpclientsink host=$tcp_host port=$tcp_port"
shift
else
echo "Received invalid argument: $1. See expected arguments below:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ function init_variables() {
readonly RESOURCES_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/general/detection/resources"
readonly CROPPING_ALGORITHMS_DIR="$POSTPROCESS_DIR/cropping_algorithms"

readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_post.so"
readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libyolo_hailortpp_post.so"
readonly DEFAULT_NETWORK_NAME="yolov5"
readonly DEFAULT_BATCH_SIZE="1"
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/detection.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/yolov5m_wo_spp_60p.hef"
readonly DEFAULT_JSON_CONFIG_PATH="$RESOURCES_DIR/configs/yolov5.json"

# Cropping Algorithm Macros
readonly WHOLE_BUFFER_CROP_SO="$CROPPING_ALGORITHMS_DIR/libwhole_buffer.so"
Expand All @@ -28,7 +27,7 @@ function init_variables() {
batch_size=$DEFAULT_BATCH_SIZE
hef_path=$DEFAULT_HEF_PATH
crop_so=$WHOLE_BUFFER_CROP_SO
json_config_path=$DEFAULT_JSON_CONFIG_PATH
json_config_path="null"

print_gst_launch_only=false
additional_parameters=""
Expand Down Expand Up @@ -73,11 +72,13 @@ function parse_args() {
hef_path="$RESOURCES_DIR/yolov4_leaky.hef"
batch_size="4"
json_config_path="$RESOURCES_DIR/configs/yolov4.json"
postprocess_so="$POSTPROCESS_DIR/libyolo_post.so"
elif [ $2 == "yolov3" ]; then
network_name="yolov3"
hef_path="$RESOURCES_DIR/yolov3.hef"
batch_size="4"
json_config_path="$RESOURCES_DIR/configs/yolov3.json"
postprocess_so="$POSTPROCESS_DIR/libyolo_post.so"
elif [ $2 == "mobilenet_ssd" ]; then
network_name="mobilenet_ssd"
hef_path="$RESOURCES_DIR/ssd_mobilenet_v1.hef"
Expand Down
2 changes: 0 additions & 2 deletions apps/h8/gstreamer/general/face_detection/face_detection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function init_variables() {
readonly RESOURCES_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/general/face_detection/resources"
readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libface_detection_post.so"
readonly SCRFD_POSTPROCESS_SO="$POSTPROCESS_DIR/libscrfd_post.so"
readonly DEFAULT_DRAW_SO="$POSTPROCESS_DIR/libdetection_draw.so"
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/face_detection.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/lightface_slim.hef"
readonly DEFAULT_NETWORK_NAME="lightface"
Expand All @@ -21,7 +20,6 @@ function init_variables() {
input_source=$DEFAULT_VIDEO_SOURCE
hef_path=$DEFAULT_HEF_PATH
postprocess_so=$DEFAULT_POSTPROCESS_SO
draw_so=$DEFAULT_DRAW_SO
sync_pipeline=false
json_config_path=$DEFAULT_JSON_CONFIG_PATH

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ function init_variables() {
readonly POSTPROCESS_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/libs/post_processes/"
readonly RESOURCES_DIR="$TAPPAS_WORKSPACE/apps/h8/gstreamer/general/facial_landmarks/resources"
readonly DEFAULT_POSTPROCESS_SO="$POSTPROCESS_DIR/libfacial_landmarks_post.so"
readonly DEFAULT_DRAW_SO="$POSTPROCESS_DIR/libfacial_landmarks_draw.so"
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/faces_120_120.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/tddfa_mobilenet_v1.hef"

hef_path=$DEFAULT_HEF_PATH
input_source=$DEFAULT_VIDEO_SOURCE
postprocess_so=$DEFAULT_POSTPROCESS_SO
draw_so=$DEFAULT_DRAW_SO

print_gst_launch_only=false
additional_parameters=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function init_variables() {
readonly DEFAULT_VIDEO_SOURCE="$RESOURCES_DIR/instance_segmentation.mp4"
readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/yolov5n_seg.hef"
readonly DEFAULT_NETWORK_NAME="yolov5seg"
readonly json_config_path="$RESOURCES_DIR/configs/yolov5seg.json"

postprocess_so=$DEFAULT_POSTPROCESS_SO
network_name=$DEFAULT_NETWORK_NAME
Expand Down Expand Up @@ -107,7 +108,7 @@ PIPELINE="gst-launch-1.0 \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
hailonet hef-path=$hef_path ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
hailofilter function-name=$network_name so-path=$postprocess_so qos=false ! \
hailofilter function-name=$network_name so-path=$postprocess_so config-path=$json_config_path qos=false ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
hailooverlay qos=false ! \
queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! \
Expand Down
Loading

0 comments on commit 0c9492e

Please sign in to comment.