├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── anomaly ├── .dsdirection_pipeline.png ├── .opticalflow.png ├── README.md ├── apps │ └── deepstream-anomaly-detection-test │ │ ├── Makefile │ │ ├── deepstream_anomaly_detection_test.c │ │ ├── dsanomaly_pgie_config.txt │ │ └── dsanomaly_pgie_nvinferserver_config.txt └── plugins │ └── gst-dsdirection │ ├── Makefile │ ├── dsdirection_lib │ ├── Makefile │ ├── dsdirection_lib.cpp │ └── dsdirection_lib.h │ ├── gstdsdirection.cpp │ └── gstdsdirection.h ├── deepstream-3d-sensor-fusion ├── README.md └── data │ └── nuscene.tar.gz ├── deepstream-bodypose-3d ├── LICENSE ├── README.md ├── configs │ ├── config_infer_primary_peoplenet.txt │ └── config_infer_secondary_bodypose3dnet.txt ├── download_models.sh ├── sources │ ├── .screenshot.png │ ├── Makefile │ ├── deepstream-sdk │ │ └── eventmsg_payload.cpp │ ├── deepstream_pose_estimation_app.cpp │ └── nvdsinfer_custom_impl_BodyPose3DNet │ │ ├── Makefile │ │ └── nvdsinitinputlayers_BodyPose3DNet.cpp └── streams │ └── bodypose.mp4 ├── deepstream-tracker-3d ├── README.md ├── configs │ ├── camInfo.yml │ ├── config_infer_primary.txt │ ├── config_tracker_NvDCF_accuracy_3D.yml │ └── deepstream_app_source1_3d_tracking.txt ├── figures │ ├── .retail_osd.png │ └── .retail_viz.png └── streams │ └── Retail02_short.mp4 ├── deepstream_parallel_inference_app ├── README.md ├── common.png ├── demo_pipe.png ├── demo_pipe_src2.png ├── files.PNG ├── new_pipe.jpg ├── pipeline_0.png ├── tritonclient │ └── sample │ │ ├── Makefile │ │ ├── apps │ │ └── deepstream-parallel-infer │ │ │ ├── CLA_LICENSE.md │ │ │ ├── LICENSE.md │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── deepstream_metamux_yaml.cpp │ │ │ ├── deepstream_parallel_infer.h │ │ │ ├── deepstream_parallel_infer_app.cpp │ │ │ ├── deepstream_parallel_infer_config_parser.cpp │ │ │ └── post_process │ │ │ └── body_pose │ │ │ ├── cover_table.hpp │ │ │ ├── munkres_algorithm.cpp │ │ │ ├── pair_graph.hpp │ │ │ └── post_process.cpp │ │ ├── build.sh │ │ ├── configs │ │ ├── US_LPD │ │ │ └── config_uslpd_inferserver.txt │ │ ├── apps │ │ │ ├── bodypose_yolo │ │ │ │ ├── analytics0.txt │ │ │ │ ├── analytics1.txt │ │ │ │ ├── analytics2.txt │ │ │ │ ├── config_nvdsanalytics.txt │ │ │ │ ├── dstest5_msgconv_sample_config.yml │ │ │ │ ├── secondary-gie0.yml │ │ │ │ ├── secondary-gie1.yml │ │ │ │ ├── secondary-gie2.yml │ │ │ │ ├── source4_1080p_dec_parallel_infer.yml │ │ │ │ ├── sources_4.csv │ │ │ │ ├── sources_4_different_source.csv │ │ │ │ ├── sources_4_rtsp.csv │ │ │ │ ├── tracker0.yml │ │ │ │ ├── tracker1.yml │ │ │ │ └── tracker2.yml │ │ │ ├── bodypose_yolo_lpr │ │ │ │ ├── analytics0.txt │ │ │ │ ├── analytics1.txt │ │ │ │ ├── analytics2.txt │ │ │ │ ├── config_nvdsanalytics.txt │ │ │ │ ├── dstest5_msgconv_sample_config.yml │ │ │ │ ├── secondary-gie0.yml │ │ │ │ ├── secondary-gie1.yml │ │ │ │ ├── secondary-gie2.yml │ │ │ │ ├── source4_1080p_dec_parallel_infer.yml │ │ │ │ ├── sources_4.csv │ │ │ │ ├── sources_4_different_source.csv │ │ │ │ ├── sources_4_rtsp.csv │ │ │ │ ├── tracker0.yml │ │ │ │ ├── tracker1.yml │ │ │ │ └── tracker2.yml │ │ │ ├── bodypose_yolo_win1 │ │ │ │ ├── analytics0.txt │ │ │ │ ├── analytics1.txt │ │ │ │ ├── analytics2.txt │ │ │ │ ├── config_nvdsanalytics.txt │ │ │ │ ├── dstest5_msgconv_sample_config.yml │ │ │ │ ├── secondary-gie0.yml │ │ │ │ ├── secondary-gie1.yml │ │ │ │ ├── secondary-gie2.yml │ │ │ │ ├── source4_1080p_dec_parallel_infer.yml │ │ │ │ ├── sources_4.csv │ │ │ │ ├── sources_4_different_source.csv │ │ │ │ ├── sources_4_rtsp.csv │ │ │ │ ├── tracker0.yml │ │ │ │ ├── tracker1.yml │ │ │ │ └── tracker2.yml │ │ │ ├── vehicle0_lpr_analytic │ │ │ │ ├── analytics0.txt │ │ │ │ ├── analytics1.txt │ │ │ │ ├── analytics2.txt │ │ │ │ ├── config_nvdsanalytics.txt │ │ │ │ ├── dstest5_msgconv_sample_config.yml │ │ │ │ ├── secondary-gie0.yml │ │ │ │ ├── secondary-gie1.yml │ │ │ │ ├── secondary-gie2.yml │ │ │ │ ├── source4_1080p_dec_parallel_infer.yml │ │ │ │ ├── sources_4.csv │ │ │ │ ├── sources_4_different_source.csv │ │ │ │ ├── sources_4_rtsp.csv │ │ │ │ ├── tracker0.yml │ │ │ │ ├── tracker1.yml │ │ │ │ └── tracker2.yml │ │ │ └── vehicle_lpr_analytic │ │ │ │ ├── analytics0.txt │ │ │ │ ├── analytics1.txt │ │ │ │ ├── analytics2.txt │ │ │ │ ├── config_nvdsanalytics.txt │ │ │ │ ├── dstest5_msgconv_sample_config.yml │ │ │ │ ├── secondary-gie0.yml │ │ │ │ ├── secondary-gie1.yml │ │ │ │ ├── secondary-gie2.yml │ │ │ │ ├── source4_1080p_dec_parallel_infer.yml │ │ │ │ ├── sources_4.csv │ │ │ │ ├── sources_4_different_source.csv │ │ │ │ ├── sources_4_rtsp.csv │ │ │ │ ├── tracker0.yml │ │ │ │ ├── tracker1.yml │ │ │ │ └── tracker2.yml │ │ ├── bodypose2d │ │ │ ├── config_body2_infer.txt │ │ │ └── config_body2_inferserver.txt │ │ ├── metamux │ │ │ ├── config_metamux0.txt │ │ │ └── config_metamux1.txt │ │ ├── peoplenet │ │ │ └── config_peoplenet_inferserver.txt │ │ ├── trafficcamnet │ │ │ └── config_trafficcamnet_inferserver.txt │ │ ├── us_lprnet │ │ │ └── config_uslpr_inferserver.txt │ │ ├── vehicle │ │ │ ├── config_infer_plan_engine_primary.txt │ │ │ ├── config_infer_secondary_plan_engine_carmake.txt │ │ │ └── config_infer_secondary_plan_engine_vehicletypes.txt │ │ └── yolov4 │ │ │ ├── coco.names │ │ │ ├── config_yolov4_infer.txt │ │ │ └── config_yolov4_inferserver.txt │ │ └── gst-plugins │ │ ├── gst-nvdsmetamux │ │ └── README │ │ └── gst-nvinferserver │ │ ├── nvdsinfer_custom_impl_Yolo │ │ ├── Makefile │ │ └── nvdsparsebbox_Yolo.cpp │ │ └── nvinfer_custom_lpr_parser │ │ ├── Makefile │ │ └── nvinfer_custom_lpr_parser.cpp └── tritonserver │ ├── build_engine.sh │ └── models │ ├── Secondary_CarMake │ └── config.pbtxt │ ├── Secondary_VehicleTypes │ └── config.pbtxt │ ├── US_LPD │ ├── config.pbtxt │ └── usa_lpd_label.txt │ ├── bodypose2d │ ├── 1 │ │ └── model.onnx │ └── config.pbtxt │ ├── peoplenet │ ├── config.pbtxt │ └── labels.txt │ ├── trafficcamnet │ ├── config.pbtxt │ └── labels.txt │ ├── us_lprnet │ └── config.pbtxt │ └── yolov4 │ ├── 1 │ └── yolov4_-1_3_416_416_dynamic.onnx.nms.onnx │ └── config.pbtxt ├── legacy_apps ├── .gitkeep ├── back-to-back-detectors │ ├── .backtobackdetectors.png │ ├── .backtobackdetectors_pipeline.png │ ├── Makefile │ ├── README.md │ ├── back_to_back_detectors.c │ ├── config_infer_primary_yoloV8_face.txt │ ├── inferserver │ │ ├── primary_detector_config.txt │ │ └── secondary_detector_config.txt │ ├── primary_detector_config.txt │ ├── secondary_detector_config.txt │ └── yolov8n-face.onnx ├── deepstream-occupancy-analytics │ ├── LICENSE.md │ ├── Makefile │ ├── README.md │ ├── config │ │ ├── dstest_occupancy_analytics.txt │ │ ├── model.sh │ │ ├── msgconv_sample_config.txt │ │ ├── nvdsanalytics_config.txt │ │ └── pgie_peoplenet_tao_config.txt │ ├── deepstream_nvdsanalytics_meta.cpp │ ├── deepstream_test5_app_main.c │ ├── images │ │ ├── kafka_messages.gif │ │ └── test.png │ └── includes │ │ ├── analytics.h │ │ └── nvdsmeta_schema.h └── deepstream-retail-analytics │ ├── LICENSE.md │ ├── Makefile │ ├── README.md │ ├── TAO │ ├── README.md │ ├── SPECS_classification_train.txt │ └── kitti_to_classification.py │ ├── THIRD_PARTY_LICENSE │ ├── configs │ ├── README.md │ ├── basket_classifier.txt │ ├── basket_classifier.yml │ ├── dstest4_config.yml │ ├── dstest4_msgconv_config.txt │ ├── dstest4_msgconv_config.yml │ ├── dstest4_msgconv_config_1.txt │ ├── dstest4_msgconv_config_1.yml │ ├── dstest4_tracker_config.txt │ ├── pgie_config_peoplenet.yml │ └── retail_iva.yml │ ├── confluent-platform │ ├── docker-compose.yml │ └── stream_creation.sql │ ├── docs │ └── install_nvidia_container_toolkit.md │ ├── download_models.sh │ ├── ds-retail-iva-frontend │ ├── README.md │ ├── analytics │ │ ├── admin.py │ │ ├── apps.py │ │ ├── influxdb_connecter.py │ │ ├── ksqldb_connecter.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ ├── dashboard.html │ │ │ ├── path_view.html │ │ │ ├── region_view.html │ │ │ └── time_view.html │ │ ├── tests.py │ │ └── views.py │ ├── background.png │ ├── config.py │ ├── environment.yml │ ├── manage.py │ ├── random_message_generator.py │ ├── requirements.txt │ ├── retail_iva │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ └── store_config.ini │ ├── files │ ├── README.md │ ├── basketClassifier.etlt │ ├── basket_classifier_labels.txt │ └── checksum.txt │ ├── media │ ├── arch.png │ ├── dashboard.png │ ├── deepstream_container.png │ ├── docker_container_ps.png │ ├── output.gif │ └── retail-iva-arch.png │ ├── nvdsmeta_schema.h │ ├── nvmsgconv │ ├── Makefile │ ├── README.md │ ├── deepstream_schema │ │ ├── deepstream_schema.cpp │ │ ├── deepstream_schema.h │ │ ├── dsmeta_payload.cpp │ │ ├── eventmsg_payload.cpp │ │ └── eventmsg_payload_peoplenet.cpp │ ├── nvmsgconv.cpp │ └── nvmsgconv.h │ └── retail_iva.c └── runtime_source_add_delete ├── Makefile ├── README.md ├── deepstream_test_rt_src_add_del.c ├── dstest_pgie_config.txt ├── dstest_sgie1_config.txt ├── dstest_sgie2_config.txt ├── dstest_tracker_config.txt └── tracker_config.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | deepstream_parallel_inference_app/tritonserver/models/bodypose2d/1/model.onnx filter=lfs diff=lfs merge=lfs -text 2 | deepstream_parallel_inference_app/tritonserver/models/yolov4/1/yolov4_-1_3_416_416_dynamic.onnx.nms.onnx filter=lfs diff=lfs merge=lfs -text 3 | legacy_apps/deepstream-retail-analytics/files/0001_compressed.h264 filter=lfs diff=lfs merge=lfs -text 4 | legacy_apps/deepstream-retail-analytics/files/basketClassifier.etlt filter=lfs diff=lfs merge=lfs -text 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2018 NVIDIA CORPORATION. All rights reserved. 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | .vscode/ 24 | tests/ 25 | 26 | **/*.mp4 27 | **/*.h264 28 | **/*.caffemodel 29 | **/*.binaryproto 30 | **/*.engine 31 | **/*.weights 32 | **/*.wts 33 | **/*.o 34 | **/*.a 35 | **/*.so 36 | 37 | CaffeMNIST/**/build/ 38 | 39 | yolo/apps/**/deepstream-yolo-app 40 | yolo/apps/**/deepstream-yolo-msgbroker-app 41 | yolo/apps/**/trt-yolo-app 42 | yolo/data/**/*.cfg 43 | yolo/data/**/*.jpeg 44 | yolo/data/**/*.png 45 | yolo/**/build/ 46 | senet/**/build/ 47 | anomaly/**/build/ 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache2.0 License 2 | 3 | Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reference Apps using DeepStream 7.1 2 | 3 | This repository contains the reference applications for video analytics tasks using TensorRT and DeepSTream SDK 7.1. 4 | 5 | ## Getting Started ## 6 | We currently provide three different reference applications: 7 | 8 | Preferably clone this project in 9 | `/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/` 10 | 11 | To clone the project in the above directory, sudo permission may be required. 12 | 13 | For further details, please see each project's README. 14 | 15 | ### Anomaly Detection : [README](anomaly/README.md) ### 16 | The project contains auxiliary dsdirection plugin to show the capability of DeepstreamSDK in anomaly detection. 17 | ![sample anomaly output](anomaly/.opticalflow.png) 18 | ### Runtime Source Addition Deletion: [README](runtime_source_add_delete/README.md) ### 19 | The project demonstrates addition and deletion of video sources in a live Deepstream pipeline. 20 | ### Single-View 3D Tracking: [README](deepstream-tracker-3d/README.md) ### 21 | The sample demostrates usage of single-view 3D tracking with DeepStream nvtracker. 22 | ![sample 3D tracking output](deepstream-tracker-3d/figures/.retail_viz.png) 23 | ### Parallel Multiple Models Inferencing: [README](deepstream_parallel_inference_app/README.md) ### 24 | The project demonstrate how to implement multiple models inferencing in parallel with DeepStream APIs. 25 | ### Bodypose 3D Model Inferencing: [README](deepstream-bodypose-3d/README.md) ### 26 | The sample demonstrate how to customize the multiple input layers model preprocessing and the customization of the bodypose 3D model postprocessing. 27 | ![Bodypose 3D sample output](deepstream-bodypose-3d/sources/.screenshot.png) 28 | 29 | ## Legacy DeepStream Reference Samples 30 | Some old samples are not supported any more for different reasons. The legacy samples are moved to the legacy folder /legacy_apps. 31 | -------------------------------------------------------------------------------- /anomaly/.dsdirection_pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/anomaly/.dsdirection_pipeline.png -------------------------------------------------------------------------------- /anomaly/.opticalflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/anomaly/.opticalflow.png -------------------------------------------------------------------------------- /anomaly/apps/deepstream-anomaly-detection-test/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | CUDA_VER?= 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | 23 | APP:= deepstream-anomaly-detection-app 24 | 25 | TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -) 26 | 27 | DS_SDK_ROOT:=/opt/nvidia/deepstream/deepstream 28 | 29 | LIB_INSTALL_DIR?=$(DS_SDK_ROOT)/lib/ 30 | 31 | SRCS:= $(wildcard *.c) 32 | 33 | INCS:= $(wildcard *.h) 34 | 35 | PKGS:= gstreamer-1.0 36 | 37 | OBJS:= $(SRCS:.c=.o) 38 | 39 | CFLAGS+= -I$(DS_SDK_ROOT)/sources/includes \ 40 | -I /usr/local/cuda-$(CUDA_VER)/include 41 | 42 | CFLAGS+= `pkg-config --cflags $(PKGS)` 43 | 44 | LIBS:= `pkg-config --libs $(PKGS)` 45 | 46 | LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta -lnvdsgst_helper -lm \ 47 | -L/usr/local/cuda-$(CUDA_VER)/lib64/ -lcudart \ 48 | -lcuda -Wl,-rpath,$(LIB_INSTALL_DIR) 49 | 50 | all: $(APP) 51 | 52 | %.o: %.c $(INCS) Makefile 53 | $(CC) -c -o $@ $(CFLAGS) $< 54 | 55 | $(APP): $(OBJS) Makefile 56 | $(CC) -o $(APP) $(OBJS) $(LIBS) 57 | 58 | clean: 59 | rm -rf $(OBJS) $(APP) 60 | 61 | 62 | -------------------------------------------------------------------------------- /anomaly/apps/deepstream-anomaly-detection-test/dsanomaly_pgie_nvinferserver_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | infer_config { 18 | unique_id: 1 19 | gpu_ids: [0] 20 | max_batch_size: 30 21 | backend { 22 | inputs: [ { 23 | name: "input_1:0" 24 | }] 25 | outputs: [ 26 | {name: "output_cov/Sigmoid:0"}, 27 | {name: "output_bbox/BiasAdd:0"} 28 | ] 29 | triton { 30 | model_name: "Primary_Detector" 31 | version: -1 32 | model_repo { 33 | root: "../../../../../../../samples/triton_model_repo" 34 | strict_model_config: true 35 | } 36 | } 37 | } 38 | preprocess { 39 | network_format: MEDIA_FORMAT_NONE 40 | tensor_order: TENSOR_ORDER_LINEAR 41 | tensor_name: "input_1:0" 42 | maintain_aspect_ratio: 0 43 | frame_scaling_hw: FRAME_SCALING_HW_GPU 44 | frame_scaling_filter: 1 45 | normalize { 46 | scale_factor: 0.00392156862745098 47 | channel_offsets: [0, 0, 0] 48 | } 49 | } 50 | postprocess { 51 | labelfile_path: "../../../../../../../samples/models/Primary_Detector/labels.txt" 52 | detection { 53 | num_detected_classes: 4 54 | per_class_params { 55 | key: 0 56 | value { pre_threshold: 0.4 } 57 | } 58 | nms { 59 | confidence_threshold:0.2 60 | topk:20 61 | iou_threshold:0.5 62 | } 63 | } 64 | } 65 | extra { 66 | copy_input_to_host_buffers: false 67 | output_buffer_pool_size: 2 68 | } 69 | } 70 | input_control { 71 | process_mode: PROCESS_MODE_FULL_FRAME 72 | operate_on_gie_id: -1 73 | interval: 0 74 | } 75 | -------------------------------------------------------------------------------- /anomaly/plugins/gst-dsdirection/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################# 17 | 18 | CXX:= g++ 19 | SRCS:= gstdsdirection.cpp 20 | INCS:= $(wildcard *.h) 21 | LIB:=libnvdsgst_dsdirection.so 22 | 23 | DS_SDK_ROOT:=/opt/nvidia/deepstream/deepstream 24 | 25 | DEP:=dsdirection_lib/libdsdirection.a 26 | DEP_FILES:=$(wildcard dsdirection_lib/dsdirection_lib.* ) 27 | DEP_FILES-=$(DEP) 28 | 29 | CFLAGS+= -fPIC -DDS_VERSION=\"6.0.0\" \ 30 | -I $(DS_SDK_ROOT)/sources/includes 31 | 32 | GST_INSTALL_DIR?=$(DS_SDK_ROOT)/lib/gst-plugins/ 33 | LIB_INSTALL_DIR?=$(DS_SDK_ROOT)/lib/ 34 | 35 | LIBS := -shared -Wl,-no-undefined \ 36 | -L dsdirection_lib -ldsdirection \ 37 | -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta \ 38 | -Wl,-rpath,$(LIB_INSTALL_DIR) 39 | 40 | OBJS:= $(SRCS:.cpp=.o) 41 | 42 | PKGS:= gstreamer-1.0 gstreamer-base-1.0 43 | CFLAGS+=$(shell pkg-config --cflags $(PKGS)) 44 | LIBS+=$(shell pkg-config --libs $(PKGS)) 45 | 46 | all: $(LIB) 47 | 48 | %.o: %.cpp $(INCS) Makefile 49 | @echo $(CFLAGS) 50 | $(CXX) -c -o $@ $(CFLAGS) $< 51 | 52 | $(LIB): $(OBJS) $(DEP) Makefile 53 | @echo $(CFLAGS) 54 | $(CXX) -o $@ $(OBJS) $(LIBS) $(DEP) 55 | 56 | $(DEP): $(DEP_FILES) 57 | $(MAKE) -C dsdirection_lib/ 58 | 59 | install: $(LIB) 60 | cp -rv $(LIB) $(GST_INSTALL_DIR) 61 | 62 | clean: 63 | rm -rf $(OBJS) $(LIB) 64 | -------------------------------------------------------------------------------- /anomaly/plugins/gst-dsdirection/dsdirection_lib/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################# 17 | 18 | PKGS:= gstreamer-1.0 gstreamer-base-1.0 19 | 20 | DS_SDK_ROOT:=/opt/nvidia/deepstream/deepstream 21 | CFLAGS+=-I $(DS_SDK_ROOT)/sources/includes 22 | CFLAGS+=$(shell pkg-config --cflags $(PKGS)) 23 | 24 | all: 25 | gcc -ggdb $(CFLAGS) -c -o dsdirection_lib.o -fPIC dsdirection_lib.cpp 26 | ar rcs libdsdirection.a dsdirection_lib.o 27 | -------------------------------------------------------------------------------- /anomaly/plugins/gst-dsdirection/dsdirection_lib/dsdirection_lib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef __DSDIRECTION_LIB__ 19 | #define __DSDIRECTION_LIB__ 20 | #include "nvll_osd_struct.h" 21 | #include "nvds_opticalflow_meta.h" 22 | 23 | #define MAX_LABEL_SIZE 128 24 | #ifdef __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | 29 | 30 | // Detected/Labelled object structure, stores bounding box info along with label 31 | typedef struct 32 | { 33 | float flowx; 34 | float flowy; 35 | char direction[MAX_LABEL_SIZE]; 36 | } DsDirectionObject; 37 | 38 | // Output data returned after processing 39 | typedef struct 40 | { 41 | DsDirectionObject object; 42 | } DsDirectionOutput; 43 | 44 | // Dequeue processed output 45 | DsDirectionOutput *DsDirectionProcess (NvOFFlowVector * in_flow, 46 | int flow_cols, int flow_rows, int flow_bsize, 47 | NvOSD_RectParams * rect_param); 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /deepstream-3d-sensor-fusion/data/nuscene.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream-3d-sensor-fusion/data/nuscene.tar.gz -------------------------------------------------------------------------------- /deepstream-bodypose-3d/LICENSE: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | SPDX-License-Identifier: Apache-2.0 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | 17 | -------------------------------------------------------------------------------- /deepstream-bodypose-3d/configs/config_infer_primary_peoplenet.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | [property] 19 | gpu-id=0 20 | net-scale-factor=0.0039215697906911373 21 | onnx-file=../models/peoplenet/resnet34_peoplenet_int8.onnx 22 | int8-calib-file=../models/peoplenet/resnet34_peoplenet_int8.txt 23 | labelfile-path=../models/peoplenet/labels.txt 24 | model-engine-file=../models/peoplenet/resnet34_peoplenet_int8.onnx_b1_gpu0_int8.engine 25 | infer-dims=3;544;960 26 | output-blob-names=output_bbox/BiasAdd:0;output_cov/Sigmoid:0 27 | batch-size=1 28 | process-mode=1 29 | model-color-format=0 30 | ## 0=FP32, 1=INT8, 2=FP16 mode 31 | network-mode=1 32 | num-detected-classes=3 33 | cluster-mode=2 34 | interval=0 35 | gie-unique-id=1 36 | maintain-aspect-ratio=0 37 | 38 | ## Use the config params below for NMS clustering mode 39 | [class-attrs-all] 40 | topk=8 41 | nms-iou-threshold=0.5 42 | pre-cluster-threshold=0.2 43 | 44 | ## Per class configurations 45 | [class-attrs-0] 46 | topk=20 47 | nms-iou-threshold=0.5 48 | pre-cluster-threshold=0.4 49 | -------------------------------------------------------------------------------- /deepstream-bodypose-3d/configs/config_infer_secondary_bodypose3dnet.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | [property] 19 | gpu-id=0 20 | net-scale-factor=0.00392156 21 | model-engine-file=../models/bodypose3dnet/bodypose3dnet_accuracy.onnx_b8_gpu0_fp16.engine 22 | onnx-file=../models/bodypose3dnet/bodypose3dnet_accuracy.onnx 23 | #model-engine-file=../models/bodypose3dnet/bodypose3dnet_performance.onnx_b8_gpu0_fp16.engine 24 | #onnx-file=../models/bodypose3dnet/bodypose3dnet_performance.onnx 25 | infer-dims=3;256;192 26 | batch-size=8 27 | ## 0=FP32, 1=INT8, 2=FP16 mode 28 | network-mode=2 29 | ## 0=Detection 1=Classifier 2=Segmentation 100=other 30 | network-type=100 31 | num-detected-classes=1 32 | interval=0 33 | gie-unique-id=2 34 | output-blob-names=pose2d;pose2d_org_img;pose25d;pose3d 35 | classifier-threshold=0.7 36 | operate-on-class-ids=0 37 | ## Integer 0:NCHW 1:NHWC 38 | network-input-order=0 39 | # Enable tensor metadata output 40 | output-tensor-meta=1 41 | ## 1-Primary 2-Secondary 42 | process-mode=2 43 | ## 0=RGB 1=BGR 2=GRAY 44 | model-color-format=1 45 | maintain-aspect-ratio=0 46 | symmetric-padding=0 47 | scaling-filter=1 48 | custom-lib-path=../sources/nvdsinfer_custom_impl_BodyPose3DNet/libnvdsinfer_custom_impl_BodyPose3DNet.so 49 | 50 | 51 | -------------------------------------------------------------------------------- /deepstream-bodypose-3d/download_models.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################################ 3 | # SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ################################################################################ 18 | 19 | echo "===================================================================" 20 | echo "begin downloading PeopleNet model " 21 | echo "===================================================================" 22 | mkdir -p ./models/peoplenet 23 | cd ./models/peoplenet 24 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/peoplenet/pruned_quantized_decrypted_v2.3.4/files?redirect=true&path=resnet34_peoplenet_int8.onnx' -O resnet34_peoplenet_int8.onnx 25 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/peoplenet/pruned_quantized_decrypted_v2.3.4/files?redirect=true&path=resnet34_peoplenet_int8.txt' -O resnet34_peoplenet_int8.txt 26 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/peoplenet/pruned_quantized_decrypted_v2.3.4/files?redirect=true&path=labels.txt' -O labels.txt 27 | 28 | echo "===================================================================" 29 | echo "begin downloading BodyPose3DNet model " 30 | echo "===================================================================" 31 | cd - 32 | mkdir -p ./models/bodypose3dnet 33 | cd ./models/bodypose3dnet 34 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/bodypose3dnet/deployable_accuracy_onnx_1.0/files?redirect=true&path=bodypose3dnet_accuracy.onnx' -O bodypose3dnet_accuracy.onnx 35 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/bodypose3dnet/deployable_performance_onnx_v1.0/files?redirect=true&path=bodypose3dnet_performance.onnx' -O bodypose3dnet_performance.onnx 36 | 37 | -------------------------------------------------------------------------------- /deepstream-bodypose-3d/sources/.screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream-bodypose-3d/sources/.screenshot.png -------------------------------------------------------------------------------- /deepstream-bodypose-3d/sources/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | CUDA_VER?= 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | 23 | CXX=g++ -std=c++14 24 | 25 | APP:= deepstream-pose-estimation-app 26 | 27 | TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -) 28 | 29 | CUDA_HOME:= /usr/local/cuda-$(CUDA_VER) 30 | DEEPSTREAM_HOME:= /opt/nvidia/deepstream/deepstream 31 | 32 | LIB_INSTALL_DIR?=$(DEEPSTREAM_HOME)/lib/ 33 | APP_INSTALL_DIR?=$(DEEPSTREAM_HOME)/bin/ 34 | 35 | ifeq ($(TARGET_DEVICE),aarch64) 36 | CFLAGS:= -DPLATFORM_TEGRA 37 | endif 38 | 39 | SRCS:= deepstream_pose_estimation_app.cpp 40 | 41 | INCS:= $(wildcard *.h) 42 | 43 | PKGS:= gstreamer-1.0 gstreamer-video-1.0 x11 json-glib-1.0 44 | 45 | OBJS:= $(patsubst %.c,%.o, $(patsubst %.cpp,%.o, $(SRCS))) 46 | 47 | CFLAGS+= \ 48 | -I$(CUDA_HOME)/include \ 49 | -I$(DEEPSTREAM_HOME)/sources/includes \ 50 | -I$(DEEPSTREAM_HOME)/sources/apps/apps-common/includes \ 51 | -I$(DEEPSTREAM_HOME)/sources/apps/sample_apps/deepstream-app \ 52 | -I../eigen \ 53 | -DDS_VERSION_MINOR=2 -DDS_VERSION_MAJOR=6 54 | 55 | LIBS+= \ 56 | -L$(CUDA_HOME)/lib64 -lcudart -lcuda \ 57 | -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta -lnvds_utils -lgstapp-1.0 \ 58 | -lpthread -lm -ldl -Wl,-rpath,$(LIB_INSTALL_DIR) 59 | 60 | CFLAGS+= $(shell pkg-config --cflags $(PKGS)) 61 | 62 | LIBS+= $(shell pkg-config --libs $(PKGS)) 63 | 64 | all: $(APP) 65 | 66 | debug: CXXFLAGS += -DDEBUG -ggdb 67 | debug: CCFLAGS += -DDEBUG -ggdb 68 | debug: CFLAGS += -DDEBUG -ggdb 69 | debug: $(APP) 70 | 71 | %.o: %.c $(INCS) Makefile 72 | $(CC) -c -o $@ $(CFLAGS) $< 73 | 74 | %.o: %.cpp $(INCS) Makefile 75 | $(CXX) -c -o $@ $(CFLAGS) $< 76 | 77 | $(APP): $(OBJS) Makefile 78 | $(CXX) -o $(APP) $(OBJS) $(LIBS) 79 | 80 | install: $(APP) 81 | cp -rv $(APP) $(APP_INSTALL_DIR) 82 | 83 | clean: 84 | rm -rf $(OBJS) $(APP) 85 | 86 | 87 | -------------------------------------------------------------------------------- /deepstream-bodypose-3d/sources/nvdsinfer_custom_impl_BodyPose3DNet/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | CUDA_VER?= 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | 23 | CC:= g++ 24 | 25 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 26 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-$(CUDA_VER)/include 27 | 28 | 29 | LIBS:= -lnvinfer -lnvinfer_plugin 30 | LFLAGS:= -Wl,--start-group $(LIBS) -Wl,--end-group 31 | 32 | SRCFILES:= nvdsinitinputlayers_BodyPose3DNet.cpp 33 | TARGET_LIB:= libnvdsinfer_custom_impl_BodyPose3DNet.so 34 | 35 | all: $(TARGET_LIB) 36 | 37 | $(TARGET_LIB) : $(SRCFILES) 38 | $(CC) -o $@ $^ $(CFLAGS) $(LFLAGS) 39 | 40 | clean: 41 | rm -rf $(TARGET_LIB) 42 | -------------------------------------------------------------------------------- /deepstream-bodypose-3d/streams/bodypose.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream-bodypose-3d/streams/bodypose.mp4 -------------------------------------------------------------------------------- /deepstream-tracker-3d/configs/camInfo.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # row-major, so the actual matrix is like 16 | # 2582.5691623002185 -485.10283397043617 650.27745033162591 89466.605755471101 17 | # -423.46809686390498 1044.6870098337931 2461.1283636622838 -214284.36100320917 18 | # -0.25563255317172684 -0.90495941862094287 0.34014768617197644 -1181.960782357068 19 | 20 | 21 | projectionMatrix_3x4: 22 | - 2582.5691623002185 23 | - -485.10283397043617 24 | - 650.27745033162591 25 | - -89466.605755471101 26 | - -423.46809686390498 27 | - 1044.6870098337931 28 | - 2461.1283636622838 29 | - -214284.36100320917 30 | - -0.25563255317172684 31 | - -0.90495941862094287 32 | - 0.34014768617197644 33 | - -1181.960782357068 34 | 35 | # the height and radius of the cylinder model 36 | modelInfo: 37 | height: 205 38 | radius: 33 39 | -------------------------------------------------------------------------------- /deepstream-tracker-3d/configs/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | [property] 16 | gpu-id=0 17 | net-scale-factor=0.0039215697906911373 18 | 19 | infer-dims=3;544;960 20 | int8-calib-file=../models/PeopleNet/resnet34_peoplenet_int8.txt 21 | model-engine-file=../models/PeopleNet/resnet34_peoplenet.onnx_b1_gpu0_int8.engine 22 | labelfile-path=../models/PeopleNet/labels.txt 23 | onnx-file=../models/PeopleNet/resnet34_peoplenet.onnx 24 | 25 | process-mode=1 26 | model-color-format=0 27 | ## 0=FP32, 1=INT8, 2=FP16 mode 28 | network-mode=1 29 | num-detected-classes=3 30 | interval=0 31 | gie-unique-id=1 32 | output-blob-names=output_cov/Sigmoid;output_bbox/BiasAdd 33 | ## 0=Group Rectangles, 1=DBSCAN, 2=NMS, 3= DBSCAN+NMS Hybrid, 4 = None(No clustering) 34 | cluster-mode=3 35 | #enable-dla=1 36 | #use-dla-core=0 37 | #scaling-filter=4 38 | 39 | filter-out-class-ids=1;2 40 | 41 | [class-attrs-all] 42 | pre-cluster-threshold=0.1429 43 | nms-iou-threshold=0.4688 44 | minBoxes=3 45 | dbscan-min-score=0.7726 46 | eps=0.2538 47 | detected-min-w=20 48 | detected-min-h=20 49 | -------------------------------------------------------------------------------- /deepstream-tracker-3d/configs/deepstream_app_source1_3d_tracking.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | [application] 16 | enable-perf-measurement=1 17 | perf-measurement-interval-sec=3 18 | kitti-track-output-dir=track_results 19 | 20 | [tiled-display] 21 | enable=1 22 | rows=1 23 | columns=1 24 | width=1280 25 | height=720 26 | gpu-id=0 27 | nvbuf-memory-type=0 28 | 29 | [source0] 30 | enable=1 31 | type=3 32 | uri=file://../streams/Retail02_short.mp4 33 | num-sources=1 34 | gpu-id=0 35 | cudadec-memtype=0 36 | 37 | [sink0] 38 | enable=1 39 | type=2 40 | sync=1 41 | source-id=0 42 | gpu-id=0 43 | nvbuf-memory-type=0 44 | qos=0 45 | 46 | [sink1] 47 | enable=1 48 | type=3 49 | container=1 50 | codec=1 51 | enc-type=0 52 | sync=0 53 | bitrate=2000000 54 | profile=0 55 | output-file=out.mp4 56 | source-id=0 57 | 58 | [osd] 59 | enable=1 60 | gpu-id=0 61 | border-width=2 62 | text-size=15 63 | text-color=1;1;1;1; 64 | text-bg-color=0.3;0.3;0.3;1 65 | font=Serif 66 | show-clock=0 67 | clock-x-offset=800 68 | clock-y-offset=820 69 | clock-text-size=12 70 | clock-color=1;0;0;0 71 | nvbuf-memory-type=0 72 | 73 | [streammux] 74 | gpu-id=0 75 | live-source=0 76 | batch-size=1 77 | batched-push-timeout=-1 78 | width=1920 79 | height=1080 80 | enable-padding=0 81 | nvbuf-memory-type=0 82 | 83 | [primary-gie] 84 | enable=1 85 | gpu-id=0 86 | batch-size=1 87 | bbox-border-color0=1;0;0;1 88 | bbox-border-color1=0;1;1;1 89 | bbox-border-color2=0;0;1;1 90 | bbox-border-color3=0;1;0;1 91 | gie-unique-id=1 92 | nvbuf-memory-type=0 93 | interval=0 94 | config-file=config_infer_primary.txt 95 | 96 | [tracker] 97 | enable=1 98 | tracker-width=1920 99 | tracker-height=1080 100 | ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 101 | ll-config-file=config_tracker_NvDCF_accuracy_3D.yml 102 | #ll-config-file=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 103 | gpu-id=0 104 | 105 | [tests] 106 | file-loop=0 107 | 108 | -------------------------------------------------------------------------------- /deepstream-tracker-3d/figures/.retail_osd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream-tracker-3d/figures/.retail_osd.png -------------------------------------------------------------------------------- /deepstream-tracker-3d/figures/.retail_viz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream-tracker-3d/figures/.retail_viz.png -------------------------------------------------------------------------------- /deepstream-tracker-3d/streams/Retail02_short.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream-tracker-3d/streams/Retail02_short.mp4 -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/common.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/common.png -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/demo_pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/demo_pipe.png -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/demo_pipe_src2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/demo_pipe_src2.png -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/files.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/files.PNG -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/new_pipe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/new_pipe.jpg -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/pipeline_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/pipeline_0.png -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | all: 17 | @make -C apps/deepstream-parallel-infer 18 | @make -C gst-plugins/gst-nvinferserver/nvdsinfer_custom_impl_Yolo 19 | @make -C gst-plugins/gst-nvinferserver/nvinfer_custom_lpr_parser 20 | clean: 21 | @make clean -C apps/deepstream-parallel-infer 22 | @make clean -C gst-plugins/gst-nvinferserver/nvdsinfer_custom_impl_Yolo 23 | @make clean -C gst-plugins/gst-nvinferserver/nvinfer_custom_lpr_parser 24 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer/LICENSE.md: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | SPDX-License-Identifier: Apache-2.0 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | APP:= deepstream-parallel-infer 19 | 20 | TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -) 21 | 22 | LIB_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream/lib/ 23 | APP_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream/bin/ 24 | 25 | ifeq ($(TARGET_DEVICE),aarch64) 26 | CFLAGS:= -DPLATFORM_TEGRA 27 | endif 28 | 29 | #SRCS:= $(wildcard *.c) $(wildcard *.cpp) 30 | SRCS:= deepstream_parallel_infer_app.cpp \ 31 | deepstream_parallel_infer_config_parser.cpp 32 | 33 | SRCS+= $(wildcard /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/*.c) 34 | SRCS+= $(wildcard /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream-yaml/*.cpp) 35 | 36 | INCS:= $(wildcard *.h) 37 | 38 | PKGS:= gstreamer-1.0 gstreamer-video-1.0 x11 json-glib-1.0 39 | 40 | OBJS:= $(SRCS:.c=.o) 41 | OBJS:= $(OBJS:.cpp=.o) 42 | 43 | CFLAGS+= -g -I./ -I/opt/nvidia/deepstream/deepstream/sources/apps/apps-common/includes \ 44 | -I/opt/nvidia/deepstream/deepstream/sources/includes \ 45 | -I /usr/local/cuda/include 46 | 47 | LIBS:= -L/usr/local/cuda/lib64/ -lcudart 48 | 49 | LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta -lnvdsgst_helper \ 50 | -lnvdsgst_smartrecord -lnvds_utils -lnvds_msgbroker -lm -lyaml-cpp \ 51 | -lcuda -lgstrtspserver-1.0 -ldl -Wl,-rpath,$(LIB_INSTALL_DIR) 52 | 53 | CFLAGS+= $(shell pkg-config --cflags $(PKGS)) 54 | 55 | LIBS+= $(shell pkg-config --libs $(PKGS)) 56 | 57 | all: $(APP) 58 | 59 | %.o: %.c $(INCS) Makefile 60 | $(CC) -c -o $@ $(CFLAGS) $< 61 | 62 | %.o: %.cpp $(INCS) Makefile 63 | $(CXX) -c -o $@ $(CFLAGS) $< 64 | 65 | $(APP): $(OBJS) Makefile 66 | $(CXX) -o $(APP) $(OBJS) $(LIBS) 67 | 68 | install: $(APP) 69 | cp -rv $(APP) $(APP_INSTALL_DIR) 70 | 71 | clean: 72 | rm -rf $(OBJS) $(APP) 73 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer/README.md: -------------------------------------------------------------------------------- 1 | # DeepStream Parallel Inference 2 | 3 | DeepStream Parallel Inference is one application which run inference in parallel. tee will send batched buffer to different models. nvdsmetamux will mux batch meta from different models which run in parallel. User can configure the pipeline in application configuration yaml file. User can select source ids which need inference in preprocess configuration file. User can select source ids which need mux in nvdsmetamux configuration file. 4 | 5 | ## Prerequisites 6 | DeepStream SDK 6.1.1 GA or above 7 | 8 | 9 | ## Getting Started: 10 | To get started, please follow these steps. 11 | 1. Install [DeepStream](https://developer.nvidia.com/deepstream-sdk) on your platform, verify it is working by running deepstream-app. 12 | 2. Install nvdsmetamux. 13 | 3. Install triton client video template libraries. 14 | 4. Clone the repository preferably in `$DEEPSTREAM_DIR/sources/apps/sample_apps`. 15 | 5. Compile and run the program 16 | 17 | ``` 18 | $ cd deepstream-parallel-infer/ 19 | $ sudo make 20 | $ sudo ./deepstream-parallel-infer -c 21 | ``` 22 | Run parallel inference app with default configure file: $ ./deepstream-parallel-infer -c source4_1080p_dec_parallel_infer.yml 23 | 24 | For any issues or questions, please feel free to make a new post on the [DeepStreamSDK forums](https://forums.developer.nvidia.com/c/accelerated-computing/intelligent-video-analytics/deepstream-sdk/). 25 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer/deepstream_metamux_yaml.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include "deepstream_common.h" 19 | #include "deepstream_config_yaml.h" 20 | #include 21 | #include 22 | #include 23 | 24 | using std::cout; 25 | using std::endl; 26 | 27 | gboolean 28 | parse_metamux_yaml (NvDsMetaMuxConfig *config, gchar* cfg_file_path) 29 | { 30 | gboolean ret = FALSE; 31 | 32 | YAML::Node configyml = YAML::LoadFile(cfg_file_path); 33 | for(YAML::const_iterator itr = configyml["meta-mux"].begin(); 34 | itr != configyml["meta-mux"].end(); ++itr) 35 | { 36 | std::string paramKey = itr->first.as(); 37 | if (paramKey == "enable") { 38 | config->enable = itr->second.as(); 39 | } else if (paramKey == "config-file") { 40 | std::string temp = itr->second.as(); 41 | char* str = (char*) malloc(sizeof(char) * 1024); 42 | std::strncpy (str, temp.c_str(), 1024); 43 | config->config_file_path = (char*) malloc(sizeof(char) * 1024); 44 | if (!get_absolute_file_path_yaml (cfg_file_path, str, 45 | config->config_file_path)) { 46 | g_printerr ("Error: Could not parse config-file-path in metamux.\n"); 47 | g_free (str); 48 | goto done; 49 | } 50 | g_free (str); 51 | } else { 52 | cout << "[WARNING] Unknown param found in metamux: " << paramKey << endl; 53 | } 54 | } 55 | 56 | ret = TRUE; 57 | done: 58 | if (!ret) { 59 | cout << __func__ << " failed" << endl; 60 | } 61 | return ret; 62 | } 63 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer/post_process/body_pose/cover_table.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | * SPDX-License-Identifier: Apache-2.0 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | class CoverTable 23 | { 24 | public: 25 | CoverTable(int nrows, int ncols) : nrows(nrows), ncols(ncols) 26 | { 27 | rows.resize(nrows); 28 | cols.resize(ncols); 29 | } 30 | 31 | inline void coverRow(int row) 32 | { 33 | rows[row] = 1; 34 | } 35 | 36 | inline void coverCol(int col) 37 | { 38 | cols[col] = 1; 39 | } 40 | 41 | inline void uncoverRow(int row) 42 | { 43 | rows[row] = 0; 44 | } 45 | 46 | inline void uncoverCol(int col) 47 | { 48 | cols[col] = 0; 49 | } 50 | 51 | inline bool isCovered(int row, int col) const 52 | { 53 | return rows[row] || cols[col]; 54 | } 55 | 56 | inline bool isRowCovered(int row) const 57 | { 58 | return rows[row]; 59 | } 60 | 61 | inline bool isColCovered(int col) const 62 | { 63 | return cols[col]; 64 | } 65 | 66 | inline void clear() 67 | { 68 | for (int i = 0; i < nrows; i++) 69 | { 70 | uncoverRow(i); 71 | } 72 | for (int j = 0; j < ncols; j++) 73 | { 74 | uncoverCol(j); 75 | } 76 | } 77 | 78 | const int nrows; 79 | const int ncols; 80 | 81 | private: 82 | std::vector rows; 83 | std::vector cols; 84 | }; 85 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/build.sh: -------------------------------------------------------------------------------- 1 | 2 | make 3 | 4 | ## enable NVSTREAMMUX_ADAPTIVE_BATCHING 5 | if [ x"$NVSTREAMMUX_ADAPTIVE_BATCHING" != x"yes" ]; then 6 | export NVSTREAMMUX_ADAPTIVE_BATCHING=yes 7 | rm -rf ~/.cache/gstreamer-1.0/ 8 | echo "export NVSTREAMMUX_ADAPTIVE_BATCHING=yes" 9 | fi 10 | 11 | ## dict.txt is label file for LPR model 12 | if [ ! -f dict.txt ]; then 13 | wget 'https://api.ngc.nvidia.com/v2/models/nvidia/tao/lprnet/versions/deployable_v1.0/files/us_lp_characters.txt' -O dict.txt 14 | fi 15 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/US_LPD/config_uslpd_inferserver.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 4 20 | gpu_ids: [0] 21 | max_batch_size: 16 22 | backend { 23 | triton { 24 | model_name: "US_LPD" 25 | version: -1 26 | model_repo { 27 | root: "../../../../tritonserver/models" 28 | strict_model_config: true 29 | } 30 | } 31 | } 32 | 33 | preprocess { 34 | network_format: IMAGE_FORMAT_RGB 35 | tensor_order: TENSOR_ORDER_LINEAR 36 | maintain_aspect_ratio: 0 37 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 38 | frame_scaling_filter: 1 39 | normalize { 40 | scale_factor: 0.0039215697906911373 41 | channel_offsets: [0.0,0.0,0.0] 42 | } 43 | } 44 | 45 | postprocess { 46 | labelfile_path: "../../../../tritonserver/models/US_LPD/usa_lpd_label.txt" 47 | detection { 48 | num_detected_classes: 1 49 | per_class_params { 50 | key: 0 51 | value { pre_threshold: 0.4 } 52 | } 53 | nms { 54 | confidence_threshold:0.2 55 | topk:20 56 | iou_threshold:0.5 57 | } 58 | } 59 | } 60 | 61 | extra { 62 | copy_input_to_host_buffers: false 63 | output_buffer_pool_size: 6 64 | } 65 | } 66 | input_control { 67 | operate_on_gie_id: 3 68 | process_mode: PROCESS_MODE_CLIP_OBJECTS 69 | secondary_reinfer_interval: 0 70 | object_control { 71 | bbox_filter { 72 | min_width: 40 73 | min_height: 30 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/analytics0.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | [property] 17 | enable=1 18 | #Width height used for configuration to which below configs are configured 19 | config-width=1920 20 | config-height=1080 21 | #osd-mode 0: Dont display any lines, rois and text 22 | # 1: Display only lines, rois and static text i.e. labels 23 | # 2: Display all info from 1 plus information about counts 24 | osd-mode=2 25 | #Set OSD font size that has to be displayed 26 | display-font-size=12 27 | 28 | ## Per stream configuration 29 | [roi-filtering-stream-0] 30 | #enable or disable following feature 31 | enable=0 32 | #ROI to filter select objects, and remove from meta data 33 | roi-RF=295;643;579;634;642;913;56;828 34 | #remove objects in the ROI 35 | inverse-roi=0 36 | class-id=-1 37 | 38 | ## Per stream configuration 39 | [roi-filtering-stream-2] 40 | #enable or disable following feature 41 | enable=0 42 | #ROI to filter select objects, and remove from meta data 43 | roi-RF=295;643;579;634;642;913;56;828 44 | #remove objects in the ROI 45 | inverse-roi=1 46 | class-id=0 47 | 48 | [overcrowding-stream-1] 49 | enable=0 50 | roi-OC=295;643;579;634;642;913;56;828 51 | #no of objects that will trigger OC 52 | object-threshold=3 53 | class-id=-1 54 | 55 | [line-crossing-stream-1] 56 | enable=1 57 | #Label;direction;lc 58 | #line-crossing-Entry=1072;911;1143;1058;944;1020;1297;1020; 59 | line-crossing-Exit=789;672;1084;900;851;773;1203;732 60 | class-id=-1 61 | #extended when 0- only counts crossing on the configured Line 62 | # 1- assumes extended Line crossing counts all the crossing 63 | extended=0 64 | #LC modes supported: 65 | #loose : counts all crossing without strong adherence to direction 66 | #balanced: Strict direction adherence expected compared to mode=loose 67 | #strict : Strict direction adherence expected compared to mode=balanced 68 | mode=loose 69 | 70 | [direction-detection-stream-0] 71 | enable=0 72 | #Label;direction; 73 | direction-South=284;840;360;662; 74 | direction-North=1106;622;1312;701; 75 | class-id=0 76 | 77 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/secondary-gie0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 11 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 12 36 | operate-on-gie-id: 1 37 | operate-on-class-ids: 0 38 | config-file: ../../vehicle/config_infer_secondary_plan_engine_carmake.txt 39 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/secondary-gie1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 0 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 20 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | 28 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/secondary-gie2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 30 24 | operate-on-gie-id: 3 25 | operate-on-class-ids: 0 26 | config-file: ../../US_LPD/config_uslpd_inferserver.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 31 36 | operate-on-gie-id: 30 37 | operate-on-class-ids: 0 38 | config-file: ../../us_lprnet/config_uslpr_inferserver.txt 39 | 40 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/sources_4.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,4,0,0 3 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/sources_4_different_source.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,1,0,0 4 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/sources_4_rtsp.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 4 | 1,4,rtsp://10.19.225.227/media/video1,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/tracker0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/tracker1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo/tracker2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/secondary-gie0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 11 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | 28 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/secondary-gie1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 0 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 20 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | 28 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/secondary-gie2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 30 24 | operate-on-gie-id: 3 25 | operate-on-class-ids: 0 26 | config-file: ../../US_LPD/config_uslpd_inferserver.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 31 36 | operate-on-gie-id: 30 37 | operate-on-class-ids: 0 38 | config-file: ../../us_lprnet/config_uslpr_inferserver.txt 39 | 40 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/sources_4.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,4,0,0 3 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/sources_4_different_source.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h265.mp4,2,0,0 4 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/sources_4_rtsp.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 4 | 1,4,rtsp://10.19.225.227/media/video1,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/tracker0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/tracker1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_lpr/tracker2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/secondary-gie0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 11 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 12 36 | operate-on-gie-id: 1 37 | operate-on-class-ids: 0 38 | config-file: ../../vehicle/config_infer_secondary_plan_engine_carmake.txt 39 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/secondary-gie1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 0 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 20 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/secondary-gie2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 30 24 | operate-on-gie-id: 3 25 | operate-on-class-ids: 0 26 | config-file: ../../US_LPD/config_uslpd_inferserver.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 31 36 | operate-on-gie-id: 30 37 | operate-on-class-ids: 0 38 | config-file: ../../us_lprnet/config_uslpr_inferserver.txt 39 | 40 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/sources_4.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,4,0,0 3 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/sources_4_different_source.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,1,0,0 4 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/sources_4_rtsp.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 4 | 1,4,rtsp://10.19.225.227/media/video1,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/tracker0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/tracker1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/bodypose_yolo_win1/tracker2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/secondary-gie0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 0 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 11 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_secondary_vehicletypes.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 0 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 12 36 | operate-on-gie-id: 1 37 | operate-on-class-ids: 0 38 | config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_secondary_vehiclemake.txt 39 | 40 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/secondary-gie1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 0 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 20 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/secondary-gie2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 30 24 | operate-on-gie-id: 3 25 | operate-on-class-ids: 0 26 | config-file: ../../US_LPD/config_uslpd_inferserver.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 31 36 | operate-on-gie-id: 30 37 | operate-on-class-ids: 0 38 | config-file: ../../us_lprnet/config_uslpr_inferserver.txt 39 | 40 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/sources_4.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,4,0,0 3 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/sources_4_different_source.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,1,0,0 4 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/sources_4_rtsp.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 4 | 1,4,rtsp://10.19.225.227/media/video1,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/tracker0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/tracker1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle0_lpr_analytic/tracker2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/secondary-gie0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 11 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 12 36 | operate-on-gie-id: 1 37 | operate-on-class-ids: 0 38 | config-file: ../../vehicle/config_infer_secondary_plan_engine_carmake.txt 39 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/secondary-gie1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 0 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 20 24 | operate-on-gie-id: 1 25 | operate-on-class-ids: 0 26 | config-file: ../../vehicle/config_infer_secondary_plan_engine_vehicletypes.txt 27 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/secondary-gie2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | secondary-gie0: 17 | enable: 1 18 | ##(0): nvinfer; (1): nvinferserver 19 | plugin-type: 1 20 | ## nvinferserserver's gpu-id can only set from its own config-file 21 | #gpu-id=0 22 | batch-size: 16 23 | gie-unique-id: 30 24 | operate-on-gie-id: 3 25 | operate-on-class-ids: 0 26 | config-file: ../../US_LPD/config_uslpd_inferserver.txt 27 | 28 | secondary-gie1: 29 | enable: 1 30 | ##(0): nvinfer; (1): nvinferserver 31 | plugin-type: 1 32 | ## nvinferserserver's gpu-id can only set from its own config-file 33 | #gpu-id=0 34 | batch-size: 16 35 | gie-unique-id: 31 36 | operate-on-gie-id: 30 37 | operate-on-class-ids: 0 38 | config-file: ../../us_lprnet/config_uslpr_inferserver.txt 39 | 40 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/sources_4.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,4,0,0 3 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/sources_4_different_source.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,1,0,0 4 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/sources_4_rtsp.csv: -------------------------------------------------------------------------------- 1 | enable,type,uri,num-sources,gpu-id,cudadec-memtype 2 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4,2,0,0 3 | 1,3,file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4,1,0,0 4 | 1,4,rtsp://10.19.225.227/media/video1,1,0,0 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/tracker0.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/tracker1.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/apps/vehicle_lpr_analytic/tracker2.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | tracker: 17 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 18 | tracker-width: 640 19 | tracker-height: 384 20 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 21 | # ll-config-file required to set different tracker types 22 | # ll-config-file=config_tracker_IOU.yml 23 | ll-config-file: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 24 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 25 | # ll-config-file=config_tracker_DeepSORT.yml 26 | gpu-id: 0 27 | enable-batch-process: 1 28 | enable-past-frame: 1 29 | display-tracking-id: 1 30 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/bodypose2d/config_body2_infer.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | [property] 17 | gpu-id=0 18 | model-engine-file=../../../../tritonserver/models/bodypose2d/1/model.onnx_b4_gpu0_fp16.engine 19 | onnx-file=../../../../tritonserver/models/bodypose2d/1/model.onnx 20 | batch-size=4 21 | ## 0=FP32, 1=INT8, 2=FP16 mode 22 | network-mode=2 23 | num-detected-classes=3 24 | gie-unique-id=2 25 | #output-blob-names=output_bbox/BiasAdd;output_cov/Sigmoid 26 | #0=Detection 1=Classifier 2=Segmentation 27 | network-type=100 28 | process-mode=1 29 | net-scale-factor=0.01743071291615827 30 | offsets=114.74;114.74;114.74 31 | #0=RGB 1=BGR 2=GRAY 32 | model-color-format=0 33 | output-tensor-meta=1 34 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/bodypose2d/config_body2_inferserver.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 2 20 | gpu_ids: [0] 21 | max_batch_size: 4 22 | backend { 23 | triton { 24 | model_name: "bodypose2d" 25 | version: -1 26 | model_repo { 27 | root: "../../../../tritonserver/models" 28 | strict_model_config: true 29 | } 30 | } 31 | } 32 | 33 | preprocess { 34 | network_format: IMAGE_FORMAT_RGB 35 | tensor_order: TENSOR_ORDER_LINEAR 36 | maintain_aspect_ratio: 0 37 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 38 | frame_scaling_filter: 1 39 | normalize { 40 | scale_factor: 0.01743071291615827 41 | channel_offsets: [114.74,114.74,114.74] 42 | } 43 | } 44 | 45 | postprocess { 46 | other {} 47 | } 48 | 49 | extra { 50 | copy_input_to_host_buffers: false 51 | output_buffer_pool_size: 2 52 | } 53 | } 54 | input_control { 55 | process_mode: PROCESS_MODE_FULL_FRAME 56 | interval: 0 57 | } 58 | 59 | output_control { 60 | output_tensor_meta: true 61 | } 62 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/metamux/config_metamux0.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | # The values in the config file are overridden by values set through GObject 19 | # properties. 20 | 21 | [property] 22 | enable=1 23 | # sink pad name which data will be pass to src pad. 24 | active-pad=sink_0 25 | # default pts-tolerance is 60 ms. 26 | pts-tolerance=60000 27 | 28 | [user-configs] 29 | 30 | [group-0] 31 | # src-ids-model-= 32 | # mux all source if don't set it. 33 | src-ids-model-1=0;1 34 | src-ids-model-2=1;2 35 | src-ids-model-3=1;2 -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/metamux/config_metamux1.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | # The values in the config file are overridden by values set through GObject 19 | # properties. 20 | 21 | [property] 22 | enable=1 23 | # sink pad name which data will be pass to src pad. 24 | active-pad=sink_0 25 | # default pts-tolerance is 60 ms. 26 | pts-tolerance=60000 27 | 28 | [user-configs] 29 | 30 | [group-0] 31 | # src-ids-model-= 32 | # mux all source if don't set it. 33 | src-ids-model-1=0;1 34 | src-ids-model-2=1;2 35 | src-ids-model-3=0;1 36 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/peoplenet/config_peoplenet_inferserver.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 3 20 | gpu_ids: [0] 21 | max_batch_size: 8 22 | backend { 23 | triton { 24 | model_name: "peoplenet" 25 | version: -1 26 | model_repo { 27 | root: "../../../../tritonserver/models" 28 | strict_model_config: true 29 | } 30 | } 31 | } 32 | 33 | preprocess { 34 | network_format: IMAGE_FORMAT_RGB 35 | tensor_order: TENSOR_ORDER_LINEAR 36 | maintain_aspect_ratio: 0 37 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 38 | frame_scaling_filter: 1 39 | normalize { 40 | scale_factor: 0.00392156862745098 41 | channel_offsets: [0.0,0.0,0.0] 42 | } 43 | } 44 | 45 | postprocess { 46 | labelfile_path: "../../../../tritonserver/models/peoplenet/labels.txt" 47 | detection { 48 | num_detected_classes: 4 49 | 50 | per_class_params { 51 | key: 0 52 | value { pre_threshold: 0.4 } 53 | } 54 | nms { 55 | confidence_threshold:0.2 56 | topk:20 57 | iou_threshold:0.5 58 | } 59 | } 60 | } 61 | 62 | extra { 63 | copy_input_to_host_buffers: false 64 | output_buffer_pool_size: 6 65 | } 66 | } 67 | input_control { 68 | process_mode: PROCESS_MODE_FULL_FRAME 69 | interval: 0 70 | } 71 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/trafficcamnet/config_trafficcamnet_inferserver.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 3 20 | gpu_ids: [0] 21 | max_batch_size: 8 22 | backend { 23 | triton { 24 | model_name: "trafficcamnet" 25 | version: -1 26 | model_repo { 27 | root: "../../../../tritonserver/models" 28 | strict_model_config: true 29 | } 30 | } 31 | } 32 | 33 | preprocess { 34 | network_format: IMAGE_FORMAT_RGB 35 | tensor_order: TENSOR_ORDER_LINEAR 36 | maintain_aspect_ratio: 0 37 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 38 | frame_scaling_filter: 1 39 | normalize { 40 | scale_factor: 0.00392156862745098 41 | channel_offsets: [0.0,0.0,0.0] 42 | } 43 | } 44 | 45 | postprocess { 46 | labelfile_path: "../../../../tritonserver/models/trafficcamnet/labels.txt" 47 | detection { 48 | num_detected_classes: 4 49 | 50 | per_class_params { 51 | key: 0 52 | value { pre_threshold: 0.4 } 53 | } 54 | nms { 55 | confidence_threshold:0.2 56 | topk:20 57 | iou_threshold:0.5 58 | } 59 | } 60 | } 61 | 62 | extra { 63 | copy_input_to_host_buffers: false 64 | output_buffer_pool_size: 6 65 | } 66 | } 67 | input_control { 68 | process_mode: PROCESS_MODE_FULL_FRAME 69 | interval: 0 70 | } 71 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/us_lprnet/config_uslpr_inferserver.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 5 20 | gpu_ids: [0] 21 | max_batch_size: 16 22 | backend { 23 | triton { 24 | model_name: "us_lprnet" 25 | version: -1 26 | model_repo { 27 | root: "../../../../tritonserver/models" 28 | strict_model_config: true 29 | } 30 | } 31 | } 32 | 33 | preprocess { 34 | network_format: IMAGE_FORMAT_RGB 35 | tensor_order: TENSOR_ORDER_LINEAR 36 | maintain_aspect_ratio: 0 37 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 38 | frame_scaling_filter: 1 39 | normalize { 40 | scale_factor: 0.00392156862745098 41 | channel_offsets: [0.0,0.0,0.0] 42 | } 43 | } 44 | 45 | postprocess { 46 | classification { 47 | custom_parse_classifier_func: "NvDsInferParseCustomNVPlate" 48 | threshold: 0.5 49 | } 50 | } 51 | 52 | extra { 53 | copy_input_to_host_buffers: false 54 | output_buffer_pool_size: 6 55 | } 56 | custom_lib { 57 | path: "../../gst-plugins/gst-nvinferserver/nvinfer_custom_lpr_parser/libnvdsinfer_custom_impl_lpr.so" 58 | } 59 | } 60 | input_control { 61 | operate_on_gie_id: 30 62 | process_mode: PROCESS_MODE_CLIP_OBJECTS 63 | interval: 0 64 | } 65 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/vehicle/config_infer_plan_engine_primary.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 1 20 | gpu_ids: [0] 21 | max_batch_size: 30 22 | backend { 23 | inputs: [ { 24 | name: "input_1" 25 | }] 26 | outputs: [ 27 | {name: "conv2d_bbox"}, 28 | {name: "conv2d_cov/Sigmoid"} 29 | ] 30 | triton { 31 | model_name: "Primary_Detector" 32 | version: -1 33 | model_repo { 34 | root: "../../../../tritonserver/models" 35 | strict_model_config: true 36 | } 37 | } 38 | } 39 | 40 | preprocess { 41 | network_format: MEDIA_FORMAT_NONE 42 | tensor_order: TENSOR_ORDER_LINEAR 43 | tensor_name: "input_1" 44 | maintain_aspect_ratio: 0 45 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 46 | frame_scaling_filter: 1 47 | normalize { 48 | scale_factor: 0.0039215697906911373 49 | channel_offsets: [0, 0, 0] 50 | } 51 | } 52 | 53 | postprocess { 54 | labelfile_path: "/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/labels.txt" 55 | detection { 56 | num_detected_classes: 4 57 | per_class_params { 58 | key: 0 59 | value { pre_threshold: 0.4 } 60 | } 61 | nms { 62 | confidence_threshold:0.2 63 | topk:20 64 | iou_threshold:0.5 65 | } 66 | } 67 | } 68 | 69 | extra { 70 | copy_input_to_host_buffers: false 71 | output_buffer_pool_size: 2 72 | } 73 | } 74 | input_control { 75 | process_mode: PROCESS_MODE_FULL_FRAME 76 | operate_on_gie_id: -1 77 | interval: 0 78 | } 79 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/vehicle/config_infer_secondary_plan_engine_carmake.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 6 20 | gpu_ids: [0] 21 | max_batch_size: 16 22 | backend { 23 | inputs: [ { 24 | name: "input_1:0" 25 | }] 26 | outputs: [ 27 | {name: "predictions/Softmax:0"} 28 | ] 29 | triton { 30 | model_name: "Secondary_CarMake" 31 | version: -1 32 | model_repo { 33 | root: "../../../../tritonserver/models" 34 | strict_model_config: true 35 | } 36 | } 37 | } 38 | 39 | preprocess { 40 | network_format: IMAGE_FORMAT_RGB 41 | tensor_order: TENSOR_ORDER_LINEAR 42 | tensor_name: "input_1:0" 43 | maintain_aspect_ratio: 0 44 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 45 | frame_scaling_filter: 1 46 | normalize { 47 | scale_factor: 1.0 48 | channel_offsets: [124, 117, 104] 49 | } 50 | } 51 | 52 | postprocess { 53 | labelfile_path: "../../../../tritonserver/models/Secondary_CarMake/labels.txt" 54 | classification { 55 | threshold: 0.51 56 | } 57 | } 58 | 59 | extra { 60 | copy_input_to_host_buffers: false 61 | output_buffer_pool_size: 2 62 | } 63 | } 64 | input_control { 65 | process_mode: PROCESS_MODE_CLIP_OBJECTS 66 | operate_on_gie_id: 1 67 | operate_on_class_ids: [0] 68 | interval: 0 69 | async_mode: true 70 | object_control { 71 | bbox_filter { 72 | min_width: 14 73 | min_height: 14 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/vehicle/config_infer_secondary_plan_engine_vehicletypes.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | infer_config { 19 | unique_id: 4 20 | gpu_ids: [0] 21 | max_batch_size: 16 22 | backend { 23 | triton { 24 | model_name: "Secondary_VehicleTypes" 25 | version: -1 26 | model_repo { 27 | root: "../../../../tritonserver/models" 28 | strict_model_config: true 29 | } 30 | } 31 | } 32 | 33 | preprocess { 34 | network_format: IMAGE_FORMAT_RGB 35 | tensor_order: TENSOR_ORDER_LINEAR 36 | tensor_name: "input_1:0" 37 | maintain_aspect_ratio: 0 38 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 39 | frame_scaling_filter: 1 40 | normalize { 41 | scale_factor: 1.0 42 | channel_offsets: [124, 117, 104] 43 | } 44 | } 45 | 46 | postprocess { 47 | labelfile_path: "../../../../tritonserver/models/Secondary_VehicleTypes/labels.txt" 48 | classification { 49 | threshold: 0.2 50 | } 51 | } 52 | 53 | } 54 | input_control { 55 | process_mode: PROCESS_MODE_CLIP_OBJECTS 56 | operate_on_gie_id: 1 57 | operate_on_class_ids: [0] 58 | interval: 0 59 | async_mode: true 60 | object_control { 61 | bbox_filter { 62 | min_width: 14 63 | min_height: 14 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/yolov4/coco.names: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | potted plant 60 | bed 61 | dining table 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/configs/yolov4/config_yolov4_inferserver.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | infer_config { 18 | unique_id: 1 19 | gpu_ids: [0] 20 | max_batch_size: 32 21 | backend { 22 | triton { 23 | model_name: "yolov4" 24 | version: -1 25 | model_repo { 26 | root: "../../../../tritonserver/models" 27 | strict_model_config: true 28 | } 29 | } 30 | } 31 | 32 | preprocess { 33 | network_format: IMAGE_FORMAT_RGB 34 | tensor_order: TENSOR_ORDER_LINEAR 35 | tensor_name: "input" 36 | maintain_aspect_ratio: 0 37 | frame_scaling_hw: FRAME_SCALING_HW_DEFAULT 38 | frame_scaling_filter: 1 39 | normalize { 40 | scale_factor: 0.0039215697906911373 41 | channel_offsets: [128, 128, 128] 42 | } 43 | } 44 | 45 | custom_lib { 46 | path : "../../gst-plugins/gst-nvinferserver/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so" 47 | } 48 | 49 | postprocess { 50 | labelfile_path: "./coco.names" 51 | detection { 52 | num_detected_classes: 80 53 | per_class_params { 54 | key: 0 55 | value { pre_threshold: 0.4 } 56 | } 57 | custom_parse_bbox_func:"NvDsInferParseCustomYoloV4" 58 | } 59 | } 60 | 61 | extra { 62 | copy_input_to_host_buffers: false 63 | output_buffer_pool_size: 2 64 | } 65 | } 66 | input_control { 67 | process_mode: PROCESS_MODE_FULL_FRAME 68 | operate_on_gie_id: -1 69 | interval: 0 70 | } 71 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/gst-plugins/gst-nvinferserver/nvdsinfer_custom_impl_Yolo/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | CC:= g++ 17 | NVCC:=/usr/local/cuda/bin/nvcc 18 | 19 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 20 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda/include 21 | 22 | LIBS:= -lnvinfer_plugin -lnvinfer -L/usr/local/cuda/lib64 -lcudart -lcublas -lstdc++fs 23 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group 24 | 25 | INCS:= $(wildcard *.h) 26 | SRCFILES:= nvdsparsebbox_Yolo.cpp 27 | 28 | TARGET_LIB:= libnvdsinfer_custom_impl_Yolo.so 29 | 30 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 31 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 32 | 33 | all: $(TARGET_LIB) 34 | 35 | %.o: %.cpp $(INCS) Makefile 36 | $(CC) -c -o $@ $(CFLAGS) $< 37 | 38 | %.o: %.cu $(INCS) Makefile 39 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 40 | 41 | $(TARGET_LIB) : $(TARGET_OBJS) 42 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 43 | 44 | clean: 45 | rm -rf $(TARGET_LIB) 46 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonclient/sample/gst-plugins/gst-nvinferserver/nvinfer_custom_lpr_parser/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | CC:= g++ 16 | 17 | CFLAGS:= -Wall -Werror -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 18 | 19 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes 20 | 21 | LIBS:= -lnvinfer 22 | LFLAGS:= -Wl,--start-group $(LIBS) -Wl,--end-group 23 | 24 | SRCFILES:= nvinfer_custom_lpr_parser.cpp 25 | TARGET_LIB:= libnvdsinfer_custom_impl_lpr.so 26 | 27 | all: $(TARGET_LIB) 28 | 29 | $(TARGET_LIB) : $(SRCFILES) 30 | $(CC) -o $@ $^ $(CFLAGS) $(LFLAGS) 31 | 32 | clean: 33 | rm -rf $(TARGET_LIB) 34 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/Secondary_CarMake/config.pbtxt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | name: "Secondary_CarMake" 19 | platform: "tensorrt_plan" 20 | max_batch_size: 16 21 | default_model_filename: "resnet18_pruned.onnx_b16_gpu0_fp16.engine" 22 | input [ 23 | { 24 | name: "input_1:0" 25 | data_type: TYPE_FP32 26 | format: FORMAT_NCHW 27 | dims: [3, 224, 224] 28 | } 29 | ] 30 | output [ 31 | { 32 | name: "predictions/Softmax:0" 33 | data_type: TYPE_FP32 34 | dims: [ 20 ] 35 | } 36 | ] 37 | instance_group [ 38 | { 39 | kind: KIND_GPU 40 | count: 1 41 | gpus: 0 42 | } 43 | ] 44 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/Secondary_VehicleTypes/config.pbtxt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | name: "Secondary_VehicleTypes" 19 | platform: "tensorrt_plan" 20 | max_batch_size: 16 21 | default_model_filename: "resnet18_pruned.onnx_b16_gpu0_fp16.engine" 22 | input [ 23 | { 24 | name: "input_1:0" 25 | data_type: TYPE_FP32 26 | format: FORMAT_NCHW 27 | dims: [3, 224, 224] 28 | } 29 | ] 30 | output [ 31 | { 32 | name: "predictions/Softmax:0" 33 | data_type: TYPE_FP32 34 | dims: [6] 35 | } 36 | ] 37 | instance_group [ 38 | { 39 | kind: KIND_GPU 40 | count: 1 41 | gpus: 0 42 | } 43 | ] 44 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/US_LPD/config.pbtxt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | name: "US_LPD" 19 | platform: "tensorrt_plan" 20 | max_batch_size: 16 21 | default_model_filename: "LPDNet_usa_pruned_tao5.onnx_b16_gpu0_int8.engine" 22 | input [ 23 | { 24 | name: "input_1:0" 25 | data_type: TYPE_FP32 26 | format: FORMAT_NCHW 27 | dims: [ 3, 480, 640] 28 | } 29 | ] 30 | output [ 31 | { 32 | name: "output_bbox/BiasAdd:0" 33 | data_type: TYPE_FP32 34 | dims: [4, 30, 40] 35 | }, 36 | 37 | { 38 | name: "output_cov/Sigmoid:0" 39 | data_type: TYPE_FP32 40 | dims: [1, 30, 40] 41 | } 42 | ] 43 | 44 | instance_group [ 45 | { 46 | kind: KIND_GPU 47 | count: 1 48 | gpus: 0 49 | } 50 | ] 51 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/US_LPD/usa_lpd_label.txt: -------------------------------------------------------------------------------- 1 | lpd 2 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/bodypose2d/1/model.onnx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:57f0a14a6c6dcf619c8702b5cb4368730626f7d824b603bf0ba595d1cd78627f 3 | size 83063809 4 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/bodypose2d/config.pbtxt: -------------------------------------------------------------------------------- 1 | name: "bodypose2d" 2 | platform: "onnxruntime_onnx" 3 | backend: "onnxruntime" 4 | max_batch_size: 4 5 | input [ 6 | { 7 | name: "input" 8 | data_type: TYPE_FP32 9 | dims: [ 10 | 3, 11 | 224, 12 | 224 13 | ] 14 | } 15 | ] 16 | output [ 17 | { 18 | name: "266" 19 | data_type: TYPE_FP32 20 | dims: [ 21 | 18, 22 | 56, 23 | 56 24 | ] 25 | }, 26 | { 27 | name: "268", 28 | data_type: TYPE_FP32 29 | dims: [ 30 | 42, 31 | 56, 32 | 56 33 | ] 34 | } 35 | ] 36 | 37 | instance_group { 38 | count: 1 39 | gpus: 0 40 | kind: KIND_GPU 41 | } 42 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/peoplenet/config.pbtxt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | name: "peoplenet" 19 | platform: "tensorrt_plan" 20 | max_batch_size: 8 21 | default_model_filename: "resnet34_peoplenet.onnx_b8_gpu0_int8.engine" 22 | input [ 23 | { 24 | name: "input_1:0" 25 | data_type: TYPE_FP32 26 | dims: [ 3, 544, 960 ] 27 | } 28 | ] 29 | output [ 30 | { 31 | name: "output_bbox/BiasAdd:0" 32 | data_type: TYPE_FP32 33 | dims: [ 12, 34, 60 ] 34 | }, 35 | { 36 | name: "output_cov/Sigmoid:0" 37 | data_type: TYPE_FP32 38 | dims: [ 3, 34, 60 ] 39 | } 40 | ] 41 | 42 | instance_group [ 43 | { 44 | kind: KIND_GPU 45 | count: 1 46 | gpus: 0 47 | } 48 | ] 49 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/peoplenet/labels.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/deepstream_parallel_inference_app/tritonserver/models/peoplenet/labels.txt -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/trafficcamnet/config.pbtxt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | name: "trafficcamnet" 19 | platform: "tensorrt_plan" 20 | max_batch_size: 8 21 | default_model_filename: "resnet18_trafficcamnet_pruned.onnx_b8_gpu0_int8.engine" 22 | input [ 23 | { 24 | name: "input_1:0" 25 | data_type: TYPE_FP32 26 | format: FORMAT_NCHW 27 | dims: [3, 544, 960] 28 | } 29 | ] 30 | output [ 31 | { 32 | name: "output_bbox/BiasAdd:0" 33 | data_type: TYPE_FP32 34 | dims: [16, 34, 60] 35 | }, 36 | 37 | { 38 | name: "output_cov/Sigmoid:0" 39 | data_type: TYPE_FP32 40 | dims: [4, 34, 60] 41 | } 42 | ] 43 | instance_group [ 44 | { 45 | kind: KIND_GPU 46 | count: 1 47 | gpus: 0 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/trafficcamnet/labels.txt: -------------------------------------------------------------------------------- 1 | car 2 | bicycle 3 | person 4 | road_sign 5 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/us_lprnet/config.pbtxt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | name: "us_lprnet" 19 | platform: "tensorrt_plan" 20 | max_batch_size: 16 21 | default_model_filename: "us_lprnet_baseline18_deployable.onnx_b16_gpu0_fp16.engine" 22 | input [ 23 | { 24 | name: "image_input" 25 | data_type: TYPE_FP32 26 | format: FORMAT_NCHW 27 | dims: [ 3, 48, 96] 28 | } 29 | ] 30 | output [ 31 | { 32 | name: "tf_op_layer_ArgMax" 33 | data_type: TYPE_INT32 34 | dims: [24] 35 | }, 36 | 37 | { 38 | name: "tf_op_layer_Max" 39 | data_type: TYPE_FP32 40 | dims: [ 24 ] 41 | } 42 | ] 43 | 44 | instance_group [ 45 | { 46 | kind: KIND_GPU 47 | count: 1 48 | gpus: 0 49 | } 50 | ] 51 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/yolov4/1/yolov4_-1_3_416_416_dynamic.onnx.nms.onnx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b63d119949293621a3b7a901f0cbfc07580ef11569dbe7b4aaa6a986ad0b7230 3 | size 257499192 4 | -------------------------------------------------------------------------------- /deepstream_parallel_inference_app/tritonserver/models/yolov4/config.pbtxt: -------------------------------------------------------------------------------- 1 | name: "yolov4" 2 | platform: "tensorrt_plan" 3 | max_batch_size: 32 4 | input [ 5 | { 6 | name: "input" 7 | data_type: TYPE_FP32 8 | dims: [ 9 | 3, 10 | 416, 11 | 416 12 | ] 13 | } 14 | ] 15 | output [ 16 | { 17 | name: "num_detections" 18 | data_type: TYPE_INT32 19 | dims: [ 20 | 1 21 | ] 22 | }, 23 | { 24 | name: "nmsed_boxes" 25 | data_type: TYPE_FP32 26 | dims: [ 27 | 1000, 28 | 4 29 | ] 30 | }, 31 | { 32 | name: "nmsed_scores" 33 | data_type: TYPE_FP32 34 | dims: [ 35 | 1000 36 | ] 37 | }, 38 | { 39 | name: "nmsed_classes" 40 | data_type: TYPE_FP32 41 | dims: [ 42 | 1000 43 | ] 44 | } 45 | ] 46 | instance_group [ 47 | { 48 | count: 1 49 | kind: KIND_GPU 50 | gpus: [ 0 ] 51 | } 52 | ] 53 | default_model_filename: "yolov4_-1_3_416_416_dynamic.onnx_b32_gpu0.engine" 54 | -------------------------------------------------------------------------------- /legacy_apps/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/.gitkeep -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/.backtobackdetectors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/back-to-back-detectors/.backtobackdetectors.png -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/.backtobackdetectors_pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/back-to-back-detectors/.backtobackdetectors_pipeline.png -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | CUDA_VER?= 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | 23 | APP:= back-to-back-detectors 24 | 25 | TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -) 26 | 27 | DS_SDK_ROOT:=/opt/nvidia/deepstream/deepstream 28 | 29 | LIB_INSTALL_DIR?=$(DS_SDK_ROOT)/lib/ 30 | 31 | SRCS:= $(wildcard *.c) 32 | 33 | INCS:= $(wildcard *.h) 34 | 35 | PKGS:= gstreamer-1.0 36 | 37 | OBJS:= $(SRCS:.c=.o) 38 | 39 | CFLAGS+= -I$(DS_SDK_ROOT)/sources/includes \ 40 | -I /usr/local/cuda-$(CUDA_VER)/include 41 | 42 | CFLAGS+= `pkg-config --cflags $(PKGS)` 43 | 44 | LIBS:= `pkg-config --libs $(PKGS)` 45 | 46 | LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta \ 47 | -L/usr/local/cuda-$(CUDA_VER)/lib64/ -lcudart \ 48 | -lcuda -Wl,-rpath,$(LIB_INSTALL_DIR) 49 | 50 | all: $(APP) 51 | 52 | %.o: %.c $(INCS) Makefile 53 | $(CC) -c -o $@ $(CFLAGS) $< 54 | 55 | $(APP): $(OBJS) Makefile 56 | $(CC) -o $(APP) $(OBJS) $(LIBS) 57 | 58 | clean: 59 | rm -rf $(OBJS) $(APP) 60 | 61 | 62 | -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/config_infer_primary_yoloV8_face.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | onnx-file=yolov8n-face.onnx 6 | model-engine-file=yolov8n-face.onnx_b1_gpu0_fp32.engine 7 | #int8-calib-file=calib.table 8 | labelfile-path=labels.txt 9 | batch-size=1 10 | network-mode=0 11 | num-detected-classes=1 12 | interval=0 13 | gie-unique-id=2 14 | process-mode=1 15 | network-type=3 16 | cluster-mode=4 17 | maintain-aspect-ratio=1 18 | symmetric-padding=1 19 | #workspace-size=2000 20 | parse-bbox-instance-mask-func-name=NvDsInferParseYoloFace 21 | custom-lib-path=nvdsinfer_custom_impl_Yolo_face/libnvdsinfer_custom_impl_Yolo_face.so 22 | output-instance-mask=1 23 | 24 | [class-attrs-all] 25 | pre-cluster-threshold=0.25 26 | topk=300 27 | -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/inferserver/primary_detector_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | infer_config { 18 | unique_id: 1 19 | gpu_ids: [0] 20 | max_batch_size: 30 21 | backend { 22 | inputs: [ { 23 | name: "input_1" 24 | }] 25 | outputs: [ 26 | {name: "output_cov/Sigmoid"}, 27 | {name: "output_bbox/BiasAdd"} 28 | ] 29 | triton { 30 | model_name: "Primary_Detector" 31 | version: -1 32 | model_repo { 33 | root: "../../../../../../samples/triton_tao_model_repo" 34 | strict_model_config: true 35 | } 36 | } 37 | } 38 | preprocess { 39 | network_format: MEDIA_FORMAT_NONE 40 | tensor_order: TENSOR_ORDER_LINEAR 41 | tensor_name: "input_1" 42 | maintain_aspect_ratio: 0 43 | frame_scaling_hw: FRAME_SCALING_HW_GPU 44 | frame_scaling_filter: 1 45 | normalize { 46 | scale_factor: 0.00392156862745098 47 | channel_offsets: [0, 0, 0] 48 | } 49 | } 50 | postprocess { 51 | labelfile_path: "../../../../../../samples/models/Primary_Detector/labels.txt" 52 | detection { 53 | num_detected_classes: 4 54 | per_class_params { 55 | key: 0 56 | value { pre_threshold: 0.4 } 57 | } 58 | nms { 59 | confidence_threshold:0.2 60 | topk:20 61 | iou_threshold:0.5 62 | } 63 | } 64 | } 65 | extra { 66 | copy_input_to_host_buffers: false 67 | output_buffer_pool_size: 2 68 | } 69 | } 70 | input_control { 71 | process_mode: PROCESS_MODE_FULL_FRAME 72 | operate_on_gie_id: -1 73 | interval: 0 74 | } 75 | -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/inferserver/secondary_detector_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | infer_config { 18 | unique_id: 2 19 | gpu_ids: [0] 20 | max_batch_size: 1 21 | backend { 22 | inputs: [ { 23 | name: "input_1" 24 | }] 25 | outputs: [ 26 | {name: "output_bbox/BiasAdd"}, 27 | {name: "output_cov/Sigmoid"} 28 | ] 29 | triton { 30 | model_name: "facenet" 31 | version: -1 32 | model_repo { 33 | root: "../../../../../../samples/triton_tao_model_repo" 34 | strict_model_config: true 35 | } 36 | } 37 | } 38 | preprocess { 39 | network_format: IMAGE_FORMAT_RGB 40 | tensor_order: TENSOR_ORDER_LINEAR 41 | tensor_name: "input_1" 42 | maintain_aspect_ratio: 1 43 | frame_scaling_hw: FRAME_SCALING_HW_GPU 44 | frame_scaling_filter: 1 45 | normalize { 46 | scale_factor: 0.00392156862745098 47 | channel_offsets: [0, 0, 0] 48 | } 49 | } 50 | postprocess { 51 | labelfile_path: "../../../../../../samples/configs/tao_pretrained_models/labels_facenet.txt" 52 | detection { 53 | num_detected_classes: 1 54 | per_class_params { 55 | key: 0 56 | value { pre_threshold: 0.4 } 57 | } 58 | nms { 59 | confidence_threshold:0.2 60 | topk:20 61 | iou_threshold:0.5 62 | } 63 | } 64 | } 65 | extra { 66 | copy_input_to_host_buffers: false 67 | output_buffer_pool_size: 2 68 | } 69 | } 70 | input_control { 71 | process_mode: PROCESS_MODE_CLIP_OBJECTS 72 | operate_on_class_ids: 2 73 | operate_on_gie_id: 1 74 | interval: 0 75 | } 76 | -------------------------------------------------------------------------------- /legacy_apps/back-to-back-detectors/yolov8n-face.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/back-to-back-detectors/yolov8n-face.onnx -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/config/model.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ ! -d peoplenet ];then 6 | mkdir peoplenet 7 | fi 8 | 9 | cd peoplenet 10 | if [ ! -e labels.txt ];then 11 | echo "Downloading peoplenet label.... " 12 | wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/peoplenet/versions/pruned_quantized_v2.3.2/files/labels.txt 13 | fi 14 | 15 | if [ ! -e resnet34_peoplenet_pruned_int8.etlt ];then 16 | echo "Downloading peoplenet etlt model.... " 17 | wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/peoplenet/versions/pruned_quantized_v2.3.2/files/resnet34_peoplenet_pruned_int8.etlt 18 | fi 19 | 20 | if [ ! -e resnet34_peoplenet_pruned_int8.txt ];then 21 | echo "Downloading peoplenet int8 .... " 22 | wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/peoplenet/versions/pruned_quantized_v2.3.2/files/resnet34_peoplenet_pruned_int8.txt 23 | fi 24 | cd - 25 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/config/pgie_peoplenet_tao_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | [property] 23 | gpu-id=0 24 | net-scale-factor=0.0039215697906911373 25 | tlt-model-key=tlt_encode 26 | tlt-encoded-model=peoplenet/resnet34_peoplenet_pruned_int8.etlt 27 | labelfile-path=peoplenet/labels.txt 28 | # model-engine-file=peoplenet/resnet34_peoplenet_pruned_int8.etlt_b1_gpu0_int8.engine 29 | int8-calib-file=peoplenet/resnet34_peoplenet_pruned_int8.txt 30 | input-dims=3;544;960;0 31 | uff-input-blob-name=input_1 32 | batch-size=1 33 | process-mode=1 34 | model-color-format=0 35 | ## 0=FP32, 1=INT8, 2=FP16 mode 36 | network-mode=1 37 | num-detected-classes=3 38 | cluster-mode=1 39 | interval=0 40 | gie-unique-id=1 41 | output-blob-names=output_bbox/BiasAdd;output_cov/Sigmoid 42 | 43 | [class-attrs-all] 44 | pre-cluster-threshold=0.4 45 | ## Set eps=0.7 and minBoxes for cluster-mode=1(DBSCAN) 46 | eps=0.7 47 | minBoxes=1 48 | 49 | [class-attrs-1] 50 | pre-cluster-threshold=1.4 51 | ## Set eps=0.7 and minBoxes for cluster-mode=1(DBSCAN) 52 | eps=0.7 53 | minBoxes=1 54 | [class-attrs-2] 55 | pre-cluster-threshold=1.4 56 | ## Set eps=0.7 and minBoxes for cluster-mode=1(DBSCAN) 57 | eps=0.7 58 | minBoxes=1 59 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/deepstream_nvdsanalytics_meta.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | * DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include "gstnvdsmeta.h" 30 | #include "nvds_analytics_meta.h" 31 | #include "analytics.h" 32 | 33 | /* custom_parse_nvdsanalytics_meta_data 34 | * and extract nvanalytics metadata */ 35 | extern "C" void 36 | analytics_custom_parse_nvdsanalytics_meta_data (NvDsMetaList *l_user, AnalyticsUserMeta *data) 37 | { 38 | std::stringstream out_string; 39 | NvDsUserMeta *user_meta = (NvDsUserMeta *) l_user->data; 40 | /* convert to metadata */ 41 | NvDsAnalyticsFrameMeta *meta = 42 | (NvDsAnalyticsFrameMeta *) user_meta->user_meta_data; 43 | /* Fill the data for entry, exit,occupancy */ 44 | data->lcc_cnt_entry = 0; 45 | data->lcc_cnt_exit = 0; 46 | data->lccum_cnt = 0; 47 | data->lcc_cnt_entry = meta->objLCCumCnt["Entry"]; 48 | data->lcc_cnt_exit = meta->objLCCumCnt["Exit"]; 49 | 50 | if (meta->objLCCumCnt["Entry"]> meta->objLCCumCnt["Exit"]) 51 | data->lccum_cnt = meta->objLCCumCnt["Entry"] - meta->objLCCumCnt["Exit"]; 52 | // g_print("Enter: %d, Exit: %d\n", data->lcc_cnt_entry,data->lcc_cnt_exit); 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/images/kafka_messages.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/deepstream-occupancy-analytics/images/kafka_messages.gif -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/images/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/deepstream-occupancy-analytics/images/test.png -------------------------------------------------------------------------------- /legacy_apps/deepstream-occupancy-analytics/includes/analytics.h: -------------------------------------------------------------------------------- 1 | #ifndef _ANALYTICS_H_ 2 | #define _ANALYTICS_H_ 3 | 4 | #include 5 | 6 | /* User defined */ 7 | typedef struct 8 | { 9 | 10 | guint32 lcc_cnt_exit; 11 | guint32 lccum_cnt; 12 | guint32 lcc_cnt_entry; 13 | guint32 source_id; 14 | 15 | } AnalyticsUserMeta; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/LICENSE.md: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | SPDX-License-Identifier: Apache-2.0 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | CUDA_VER?= 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | 23 | APP:= ds-retail-iva 24 | 25 | TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -) 26 | 27 | LIB_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream/lib/ 28 | APP_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream/bin/ 29 | 30 | ifeq ($(TARGET_DEVICE),aarch64) 31 | CFLAGS:= -DPLATFORM_TEGRA 32 | endif 33 | 34 | SRCS:= $(wildcard *.c) 35 | 36 | INCS:= $(wildcard *.h) 37 | 38 | PKGS:= gstreamer-1.0 39 | 40 | OBJS:= $(SRCS:.c=.o) 41 | 42 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes \ 43 | -I /usr/local/cuda-$(CUDA_VER)/include 44 | 45 | CFLAGS+= $(shell pkg-config --cflags $(PKGS)) -g 46 | 47 | LIBS:= $(shell pkg-config --libs $(PKGS)) 48 | 49 | LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta -lrt \ 50 | -L/usr/local/cuda-$(CUDA_VER)/lib64/ -lcudart -lnvds_yml_parser \ 51 | -lcuda -Wl,-rpath,$(LIB_INSTALL_DIR) 52 | 53 | all: $(APP) 54 | 55 | %.o: %.c $(INCS) Makefile 56 | $(CC) -c -o $@ $(CFLAGS) $< 57 | 58 | $(APP): $(OBJS) Makefile 59 | $(CC) -o $(APP) $(OBJS) $(LIBS) 60 | 61 | install: $(APP) 62 | cp -rv $(APP) $(APP_INSTALL_DIR) 63 | 64 | clean: 65 | rm -rf $(OBJS) $(APP) 66 | 67 | 68 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/TAO/SPECS_classification_train.txt: -------------------------------------------------------------------------------- 1 | model_config { 2 | # Model Architecture can be chosen from: 3 | # ['resnet', 'vgg', 'googlenet', 'alexnet'] 4 | arch: "resnet" 5 | # for resnet --> n_layers can be [10, 18, 50] 6 | # for vgg --> n_layers can be [16, 19] 7 | n_layers: 34 8 | use_batch_norm: True 9 | use_bias: False 10 | all_projections: False 11 | use_pooling: True 12 | retain_head: True 13 | resize_interpolation_method: BICUBIC 14 | # if you want to use the pretrained model, 15 | # image size should be "3,224,224" 16 | # otherwise, it can be "3, X, Y", where X,Y >= 16 17 | input_image_size: "3,224,224" 18 | } 19 | train_config { 20 | val_dataset_path: "/work/basketDetection/classification_data/" 21 | train_dataset_path: "/work/basketDetection/classification_data/" 22 | pretrained_model_path: "/work/basketDetection/resnet_34.hdf5" 23 | # Only ['sgd', 'adam'] are supported for optimizer 24 | optimizer { 25 | sgd { 26 | lr: 0.01 27 | decay: 0.0 28 | momentum: 0.9 29 | nesterov: False 30 | } 31 | } 32 | batch_size_per_gpu: 50 33 | n_epochs: 150 34 | # Number of CPU cores for loading data 35 | n_workers: 16 36 | # regularizer 37 | reg_config { 38 | # regularizer type can be "L1", "L2" or "None". 39 | type: "L2" 40 | # if the type is not "None", 41 | # scope can be either "Conv2D" or "Dense" or both. 42 | scope: "Conv2D,Dense" 43 | # 0 < weight decay < 1 44 | weight_decay: 0.000015 45 | } 46 | # learning_rate 47 | lr_config { 48 | cosine { 49 | learning_rate: 0.04 50 | soft_start: 0.0 51 | } 52 | } 53 | enable_random_crop: False 54 | enable_center_crop: False 55 | enable_color_augmentation: True 56 | mixup_alpha: 0.2 57 | label_smoothing: 0.1 58 | preprocess_mode: "caffe" 59 | image_mean { 60 | key: 'b' 61 | value: 103.9 62 | } 63 | image_mean { 64 | key: 'g' 65 | value: 116.8 66 | } 67 | image_mean { 68 | key: 'r' 69 | value: 123.7 70 | } 71 | } 72 | eval_config { 73 | eval_dataset_path: "/work/basketDetection/classification_data/" 74 | model_path: "/work/basketDetection/classification_model/weights/resnet_150.tlt" 75 | top_k: 3 76 | batch_size: 256 77 | n_workers: 8 78 | enable_center_crop: False 79 | } -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/TAO/kitti_to_classification.py: -------------------------------------------------------------------------------- 1 | import os 2 | from glob import glob 3 | import cv2 4 | from tqdm import tqdm 5 | 6 | 7 | def read_label_file(filepath): 8 | labels = [] 9 | coordinates = [] 10 | 11 | # Read the file 12 | with open(filepath, "r") as file: 13 | lines = file.readlines() 14 | 15 | for line in lines: 16 | line = line.split() 17 | lab, _, _, _, x1, y1, x2, y2, _, _, _, _, _, _, _ = line 18 | x1, y1, x2, y2 = map(float, [x1, y1, x2, y2]) 19 | x1, y1, x2, y2 = map(int, [x1, y1, x2, y2]) 20 | labels.append(lab) 21 | coordinates.append((x1, y1, x2, y2)) 22 | 23 | return labels, coordinates 24 | 25 | 26 | def crop_image(img, xmin, ymin, xmax, ymax): 27 | return img[ymin:ymax, xmin:xmax :] 28 | 29 | 30 | def draw_bbox(img, xmin, ymin, xmax, ymax): 31 | img = cv2.rectangle(img, (xmin, ymin), (xmax, ymax), (255, 0, 0), 3) 32 | return img 33 | 34 | 35 | if __name__ == "__main__": 36 | images = glob("default/image_2/*.PNG") 37 | 38 | for image in tqdm(images): 39 | label_file, _ = os.path.splitext(os.path.basename(image)) 40 | labels, coordinates = read_label_file(f"default/label_2/{label_file}.txt") 41 | img = cv2.imread(image) 42 | for i, label in enumerate(labels): 43 | img_cropped = crop_image(img, coordinates[i][0], coordinates[i][1], coordinates[i][2], coordinates[i][3]) 44 | # img_annotated = draw_bbox(img, coordinates[i][0], coordinates[i][1], coordinates[i][2], coordinates[i][3]) 45 | cv2.imwrite(f"classification_data/{label}/{label_file}_{i}.png", img_cropped) 46 | # cv2.imwrite(f"test_{i}.png", img_annotated) -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/THIRD_PARTY_LICENSE: -------------------------------------------------------------------------------- 1 | python-ceriti: https://github.com/certifi/python-certifi/blob/master/LICENSE 2 | 3 | This Source Code Form is subject to the terms of the Mozilla Public License, 4 | v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain 5 | one at http://mozilla.org/MPL/2.0/. 6 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/README.md: -------------------------------------------------------------------------------- 1 | # Config files for the Project 2 | 3 | README.md 4 | 5 | `retail_iva.yml`: Config file for this app. Holds information about input parameters for various plugins 6 | 7 | `pgie_config_peoplenet.yml`: Config file ofr Primary Inference Engine (PeopleNet) 8 | 9 | `basket_classifier.yml`, `basket_classifier.txt`: Config file for Secondary Inference Engine 10 | 11 | `dstest4_msgconv_config.txt`, `dstest4_msgconv_config.yml`: Default config file for message converter 12 | 13 | `dstest4_tracker_config.txt`: Config file for NvDCF tracker 14 | 15 | `dstest4_msgconv_config_1.txt`, `dstest4_msgconv_config_1.yml`: Config file we use in this application for message converter 16 | 17 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/basket_classifier.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | [property] 19 | gpu-id=0 20 | # preprocessing parameters=These are the same for all classification models generated by TAO Toolkit. 21 | net-scale-factor=1.0 22 | offsets=103.939;116.779;123.68 23 | model-color-format=1 24 | 25 | # Model specific paths. These need to be updated for every classification model. 26 | labelfile-path=/work/basketDetection/classification_model/labels.txt 27 | tlt-encoded-model=/work/basketDetection/basketClassifier.etlt 28 | model-engine-file=/work/basketDetection/basketClassifier.etlt_b1_gpu0_fp32.engine 29 | tlt-model-key=nvidia_tlt 30 | infer-dims=3;224;224 # where c = number of channels, h = height of the model input, w = width of model input 31 | uff-input-blob-name=input_1 32 | output-blob-names=predictions/Softmax 33 | operate-on-gie-id=1 34 | # operate-on-class-ids=1 35 | batch-size=1 36 | 37 | ## 0=FP32, 1=INT8, 2=FP16 mode 38 | network-mode=0 39 | # process-mode=2 - inferences on crops from primary detector, 1 - inferences on whole frame 40 | process-mode=2 41 | interval=0 42 | network-type=1 # defines that the model is a classifier. 43 | gie-unique-id=2 44 | classifier-threshold=0.2 45 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/basket_classifier.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | property: 19 | gpu-id: 0 20 | # preprocessing parameters: These are the same for all classification models generated by TAO Toolkit. 21 | net-scale-factor: 1.0 22 | offsets: 103.939;116.779;123.68 23 | model-color-format: 1 24 | 25 | # Model specific paths. These need to be updated for every classification model. 26 | labelfile-path: ../files/basket_classifier_labels.txt 27 | tlt-encoded-model: ../files/basketClassifier.etlt 28 | # model-engine-file: ../files/basketClassifier.etlt_b1_gpu0_fp32.engine 29 | tlt-model-key: nvidia_tlt 30 | infer-dims: 3;224;224 # where c = number of channels, h = height of the model input, w = width of model input 31 | uff-input-blob-name: input_1 32 | output-blob-names: predictions/Softmax 33 | # operate-on-gie-id: 1 34 | # operate-on-class-ids: 1 35 | batch-size: 1 36 | classifier-type: hasBasketClassifier 37 | 38 | ## 0=FP32, 1=INT8, 2=FP16 mode 39 | network-mode: 0 40 | # process-mode: 2 - inferences on crops from primary detector, 1 - inferences on whole frame 41 | process-mode: 2 42 | interval: 0 43 | network-type: 1 # defines that the model is a classifier. 44 | gie-unique-id: 2 45 | classifier-threshold: 0.5 46 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/dstest4_config.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | source: 19 | # location: ../../../../samples/streams/sample_720p.h264 20 | location: compressed.h264 21 | 22 | streammux: 23 | batch-size: 1 24 | batched-push-timeout: 40000 25 | width: 1280 26 | height: 720 27 | 28 | tracker: 29 | tracker-width: 640 30 | tracker-height: 384 31 | gpu-id: 0 32 | ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 33 | # ll-config-file required to set different tracker types 34 | # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_IOU.yml 35 | ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 36 | # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 37 | # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_DeepSORT.yml 38 | enable-batch-process: 1 39 | 40 | msgconv: 41 | msg2p-lib: /opt/nvidia/deepstream/deepstream-6.1/sources/libs/nvmsgconv/libnvds_msgconv.so 42 | payload-type: 0 43 | msg2p-newapi: 0 44 | frame-interval: 30 45 | 46 | msgbroker: 47 | proto-lib: /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so 48 | conn-str: localhost;9092 49 | topic: detections 50 | sync: 0 51 | 52 | sink: 53 | sync: 1 54 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/dstest4_msgconv_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | [sensor0] 19 | enable=1 20 | type=Camera 21 | id=CAMERA_ID 22 | location=45.293701447;-75.8303914499;48.1557479338 23 | description="Entrance of Garage Right Lane" 24 | coordinate=5.2;10.1;11.2 25 | 26 | [place0] 27 | enable=1 28 | id=1 29 | type=garage 30 | name=XYZ 31 | location=30.32;-40.55;100.0 32 | coordinate=1.0;2.0;3.0 33 | place-sub-field1=walsh 34 | place-sub-field2=lane1 35 | place-sub-field3=P2 36 | 37 | [place1] 38 | enable=1 39 | id=1 40 | type=garage 41 | name=XYZ 42 | location=28.47;47.46;1.53 43 | coordinate=1.0;2.0;3.0 44 | place-sub-field1="C-76-2" 45 | place-sub-field2="LEV/EV/CP/ADA" 46 | place-sub-field3=P2 47 | 48 | [analytics0] 49 | enable=1 50 | id=XYZ 51 | description="Vehicle Detection and License Plate Recognition" 52 | source=OpenALR 53 | version=1.0 -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/dstest4_msgconv_config.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | sensor0: 19 | enable: 1 20 | type: Camera 21 | id: CAMERA_ID 22 | location: 45.293701447;-75.8303914499;48.1557479338 23 | description: "Entrance of Garage Right Lane" 24 | coordinate: 5.2;10.1;11.2 25 | 26 | place0: 27 | enable: 1 28 | id: 1 29 | type: garage 30 | name: XYZ 31 | location: 30.32;-40.55;100.0 32 | coordinate: 1.0;2.0;3.0 33 | place-sub-field1: walsh 34 | place-sub-field2: lane1 35 | place-sub-field3: P2 36 | 37 | place1: 38 | enable: 1 39 | id: 1 40 | type: garage 41 | name: XYZ 42 | location: 28.47;47.46;1.53 43 | coordinate: 1.0;2.0;3.0 44 | place-sub-field1: "C-76-2" 45 | place-sub-field2: "LEV/EV/CP/ADA" 46 | place-sub-field3: P2 47 | 48 | analytics0: 49 | enable: 1 50 | id: XYZ 51 | description: "Vehicle Detection and License Plate Recognition" 52 | source: OpenALR 53 | version: 1.0 -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/dstest4_msgconv_config_1.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/dstest4_msgconv_config_1.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/dstest4_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | # Mandatory properties for the tracker: 19 | # tracker-width, tracker-height: needs to be multiple of 32 for NvDCF and DeepSORT 20 | # gpu-id 21 | # ll-lib-file: path to low-level tracker lib 22 | # ll-config-file: required to set different tracker types 23 | # 24 | [tracker] 25 | tracker-width=960 26 | tracker-height=544 27 | gpu-id=0 28 | ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 29 | # ll-config-file required to set different tracker types 30 | # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_IOU.yml 31 | # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 32 | ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 33 | # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_DeepSORT.yml 34 | enable-batch-process=1 35 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/configs/retail_iva.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | source: 19 | # location: ../../../../samples/streams/sample_720p.h264 20 | # location: /work/retail_cropped.264 21 | # location: /work/data/trimmed.h264 22 | location: ../deepstream-retail-analytics/files/0001_compressed.h264 23 | # location: rtsp:// 24 | 25 | streammux: 26 | batch-size: 1 27 | batched-push-timeout: 40000 28 | width: 1920 29 | height: 1080 30 | 31 | 32 | # tracker: 33 | # tracker-width: 640 34 | # tracker-height: 384 35 | # gpu-id: 0 36 | # ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 37 | # # ll-config-file required to set different tracker types 38 | # # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_IOU.yml 39 | # # ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 40 | # ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 41 | # # ll-config-file=../../../../samples/configs/deepstream-app/config_tracker_DeepSORT.yml 42 | # enable-batch-process: 1 43 | 44 | msgconv: 45 | msg2p-lib: ../nvmsgconv/libnvds_msgconv.so 46 | #msg2p-lib: /opt/nvidia/deepstream/deepstream/lib/libnvds_msgconv.so 47 | payload-type: 0 48 | msg2p-newapi: 0 49 | frame-interval: 30 50 | 51 | msgbroker: 52 | proto-lib: /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so 53 | conn-str: localhost;9092 54 | topic: detections 55 | sync: 0 56 | 57 | sink: 58 | sync: 1 59 | 60 | filesink: 61 | location: /opt/nvidia/deepstream/deepstream-6.1/sources/apps/sample_apps/deepstream-retail-analytics/retail_output.mp4 62 | sync: 0 63 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/confluent-platform/stream_creation.sql: -------------------------------------------------------------------------------- 1 | CREATE STREAM DETECTIONS_STREAM ( 2 | messageid varchar, 3 | mdsversion varchar, 4 | timestamp varchar, 5 | object struct< 6 | id varchar, 7 | speed int, 8 | direction int, 9 | orientation int, 10 | detection varchar, 11 | obj_prop struct< 12 | hasBasket varchar, 13 | confidence double>, 14 | bbox struct< 15 | topleftx int, 16 | toplefty int, 17 | bottomrightx int, 18 | bottomrighty int>>, 19 | event_des struct< 20 | id varchar, 21 | type varchar>, 22 | videopath varchar) WITH ( 23 | KAFKA_TOPIC='detections', 24 | VALUE_FORMAT='JSON', 25 | TIMESTAMP='timestamp', 26 | TIMESTAMP_FORMAT='yyyy-MM-dd''T''HH:mm:ss.SSS''Z'''); -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/docs/install_nvidia_container_toolkit.md: -------------------------------------------------------------------------------- 1 | 2 | # NVIDIA Container Toolkit 3 | 4 | * To install NVIDIA container toolkit follow these instructions: 5 | 6 | 1. Setup docker repository 7 | ```bash 8 | sudo apt-get update 9 | 10 | sudo apt-get install ca-certificates curl gnupg lsb-release 11 | 12 | sudo mkdir -p /etc/apt/keyrings 13 | 14 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 15 | 16 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 17 | ``` 18 | 19 | 2. Install [Docker](https://docs.docker.com/engine/install/) 20 | ```bash 21 | sudo apt-get update 22 | 23 | sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin 24 | ``` 25 | 26 | 3. Install [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker) 27 | ```bash 28 | distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ 29 | && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ 30 | && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \ 31 | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ 32 | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list 33 | ``` 34 | 35 | 4. **OPTIONAL:** Post-install instructions to run docker without sudo 36 | 37 | ```bash 38 | sudo groupadd docker 39 | sudo usermod -aG docker $USER 40 | ``` 41 | 42 | ```bash 43 | sudo apt-get update 44 | sudo apt-get install -y nvidia-docker2 45 | ``` 46 | 5. Restart docker 47 | 48 | ```bash 49 | sudo systemctl restart docker 50 | ``` -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/download_models.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################################ 3 | # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ################################################################################ 18 | 19 | mkdir -p ./models/peoplenet 20 | cd ./models/peoplenet 21 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/peoplenet/pruned_quantized_decrypted_v2.3.3/files?redirect=true&path=resnet34_peoplenet_int8.onnx' -O resnet34_peoplenet_int8.onnx 22 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/peoplenet/pruned_quantized_decrypted_v2.3.3/files?redirect=true&path=resnet34_peoplenet_int8.txt' -O resnet34_peoplenet_int8.txt 23 | wget --content-disposition 'https://api.ngc.nvidia.com/v2/models/org/nvidia/team/tao/peoplenet/pruned_quantized_decrypted_v2.3.3/files?redirect=true&path=labels.txt' -O labels.txt 24 | 25 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AnalyticsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'analytics' 7 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/influxdb_connecter.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import cv2 3 | import numpy as np 4 | from influxdb import InfluxDBClient as idb 5 | from PIL import Image 6 | 7 | def get_num_visitors_time_window(start_time, end_time, client): 8 | pass 9 | 10 | def get_num_visitors_in_region(topleftx, bottomrightx, toplefty, bottomrighty, client): 11 | client.switch_database("detections") 12 | result = client.query(f'SELECT * FROM detections where \ 13 | topleftx > {topleftx} and bottomrightx < {bottomrightx} and \ 14 | toplefty > {toplefty} and bottomrighty < {bottomrighty}') 15 | 16 | num_results = len(result.raw["series"][0]["values"]) 17 | 18 | return num_results, result 19 | 20 | def get_visitor_path(person_id, client): 21 | client.switch_database("detections") 22 | result = client.query(f'SELECT * FROM detections where id=\'{person_id}\'') 23 | 24 | path = [] 25 | 26 | for val in result.raw["series"][0]["values"]: 27 | bottomrightx = val[1] 28 | bottomrighty = val[2] 29 | topleftx = val[5] 30 | toplefty = val[6] 31 | path.append([(bottomrightx + topleftx)//2, (bottomrighty + toplefty)//2]) 32 | 33 | # img = cv2.imread("frame0.jpg") 34 | img = np.zeros([1080,1920,3],dtype=np.uint8) 35 | img.fill(0) 36 | path = np.array(path) 37 | cv2.drawContours(img, [path], 0, (255,255,255), 2) 38 | cv2.imwrite("testImg.png", img) 39 | 40 | return path, Image.fromarray(img) 41 | 42 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA-AI-IOT/deepstream_reference_apps/247de8a4d743910373f8120dff256189ab63ac8b/legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/migrations/__init__.py -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/templates/path_view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {%block content %} 4 |
5 | 6 |
7 | {%endblock content%} 8 | 9 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/templates/region_view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {%block content %} 4 |
5 |

Number of visitors: {{num_visitors}}

6 |
7 | 8 |
9 |

Visitor IDs: {{visitors}}

10 |
11 | 12 |
13 |

Region of Interest

14 | 15 |
16 | {%endblock content%} 17 | 18 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/templates/time_view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {%block content %} 4 |
5 |

{{num_visitors}}

6 |
7 | 8 |
9 |

Visitor IDs: {{visitors}}

10 |
11 | {%endblock content%} 12 | 13 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/analytics/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/background.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:008c19ae97a60f74d5cc54c1dee089d9fe8f928aa12d3ebb671b6b272038d799 3 | size 6841022 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/config.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 2 | # SPDX-License-Identifier: Apache-2.0 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Set TEST_MODE to false to show dashboard metrics from actual data 17 | TEST_MODE = True 18 | 19 | ksql_server = "http://localhost:8088" 20 | kafka_server = "localhost:9092" 21 | 22 | # test_stream is a dummy stream created to read/write generated data 23 | # test_topic is a dummy kafka topic created to read/write generated data 24 | # This is done to separate actual data from generated data 25 | 26 | if TEST_MODE: 27 | ksql_stream_name = "test_stream" 28 | kafka_topic = "test_topic" 29 | else: 30 | ksql_stream_name = "detections_stream" 31 | kafka_topic = "detections" 32 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/environment.yml: -------------------------------------------------------------------------------- 1 | name: web-dev 2 | channels: 3 | - defaults 4 | dependencies: 5 | - _libgcc_mutex=0.1=main 6 | - _openmp_mutex=5.1=1_gnu 7 | - ca-certificates=2022.07.19=h06a4308_0 8 | - certifi=2022.6.15=py38h06a4308_0 9 | - ld_impl_linux-64=2.38=h1181459_1 10 | - libffi=3.3=he6710b0_2 11 | - libgcc-ng=11.2.0=h1234567_1 12 | - libgomp=11.2.0=h1234567_1 13 | - libstdcxx-ng=11.2.0=h1234567_1 14 | - ncurses=6.3=h5eee18b_3 15 | - openssl=1.1.1q=h7f8727e_0 16 | - pip=22.1.2=py38h06a4308_0 17 | - python=3.8.13=h12debd9_0 18 | - readline=8.1.2=h7f8727e_1 19 | - setuptools=61.2.0=py38h06a4308_0 20 | - sqlite=3.39.2=h5082296_0 21 | - tk=8.6.12=h1ccaba5_0 22 | - wheel=0.37.1=pyhd3eb1b0_0 23 | - xz=5.2.5=h7f8727e_1 24 | - zlib=1.2.12=h7f8727e_2 25 | - pip: 26 | - anyio==3.6.1 27 | - asgiref==3.5.2 28 | - backports-zoneinfo==0.2.1 29 | - charset-normalizer==2.1.0 30 | - confluent-kafka==1.9.2 31 | - cycler==0.11.0 32 | - django==4.1 33 | - fonttools==4.34.4 34 | - h11==0.12.0 35 | - h2==4.1.0 36 | - hpack==4.0.0 37 | - httpcore==0.15.0 38 | - httpx==0.23.0 39 | - hyperframe==6.0.1 40 | - idna==3.3 41 | - kiwisolver==1.4.4 42 | - matplotlib==3.5.2 43 | - numpy==1.23.1 44 | - opencv-python==4.6.0.66 45 | - packaging==21.3 46 | - pandas==1.4.3 47 | - pillow==9.2.0 48 | - pyksql==0.11.0 49 | - pyparsing==3.0.9 50 | - python-dateutil==2.8.2 51 | - pytz==2022.1 52 | - requests==2.28.1 53 | - rfc3986==1.5.0 54 | - six==1.16.0 55 | - sniffio==1.2.0 56 | - sqlparse==0.4.2 57 | - tqdm==4.64.0 58 | - urllib3==1.26.11 59 | prefix: /work/anaconda3/envs/web-dev 60 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'retail_iva.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/requirements.txt: -------------------------------------------------------------------------------- 1 | anyio==3.6.1 2 | asgiref==3.5.2 3 | backports.zoneinfo==0.2.1 4 | charset-normalizer==2.1.0 5 | cycler==0.11.0 6 | distlib==0.3.4 7 | Django==4.1 8 | filelock==3.7.0 9 | fonttools==4.34.4 10 | h11==0.12.0 11 | h2==4.1.0 12 | hpack==4.0.0 13 | httpcore==0.15.0 14 | httpx==0.23.0 15 | hyperframe==6.0.1 16 | idna==3.3 17 | kiwisolver==1.4.4 18 | matplotlib==3.5.2 19 | numpy==1.23.1 20 | opencv-python==4.6.0.66 21 | packaging==21.3 22 | pandas==1.4.3 23 | Pillow==9.2.0 24 | platformdirs==2.5.2 25 | pykSQL==0.11.0 26 | pyparsing==3.0.9 27 | python-dateutil==2.8.2 28 | pytz==2022.1 29 | requests==2.28.1 30 | rfc3986==1.5.0 31 | six==1.16.0 32 | sniffio==1.2.0 33 | sqlparse==0.4.2 34 | tqdm==4.64.0 35 | urllib3==1.26.11 36 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/retail_iva/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for retail_iva project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'retail_iva.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/retail_iva/urls.py: -------------------------------------------------------------------------------- 1 | """retail_iva URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/4.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path 18 | from analytics import views 19 | 20 | urlpatterns = [ 21 | path('admin/', admin.site.urls), 22 | path('', views.home), 23 | path('num-visitors-region/', views.num_visitors_in_region_view), 24 | path('num-visitors-time/', views.num_visitors_in_time_window_view), 25 | path('visitor-path/', views.visitor_path_view), 26 | ] 27 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/retail_iva/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for retail_iva project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'retail_iva.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/ds-retail-iva-frontend/store_config.ini: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | topleftx = 0 3 | bottomrightx = 0 4 | toplefty = 0 5 | bottomrighty = 0 6 | 7 | [Aisle1] 8 | topleftx = 50 9 | bottomrightx = 1400 10 | toplefty = 0 11 | bottomrighty = 1440 12 | 13 | [Aisle2] 14 | topleftx = 1401 15 | bottomrightx = 2560 16 | toplefty = 0 17 | bottomrighty = 1440 -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/files/README.md: -------------------------------------------------------------------------------- 1 | # Description of files 2 | 3 | * [0001_compressed.h264](./0001_compressed.h264) - Input file for running the pipeline 4 | * [basketClassifier.etlt](./basketClassifier.etlt) - Model file for classifying people with and without baskets 5 | * [basket_classifier_labels.txt](./basket_classifier_labels.txt) - Label file for the above model 6 | 7 | # RECOMMENDED: Verify checksum after cloning files using git LFS 8 | 9 | LFS files are not cloned by default when you clone the repository 10 | 11 | Clone model and input files by running 12 | 13 | ```bash 14 | git lfs pull 15 | ``` 16 | 17 | Verify the checksum of files after cloning 18 | 19 | ```bash 20 | sha512sum -c checksum.txt 21 | ``` -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/files/basketClassifier.etlt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:737ccfda9fbe255a4e5127c80d027f0f2798182133972287ba144535cb1a6a70 3 | size 85344951 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/files/basket_classifier_labels.txt: -------------------------------------------------------------------------------- 1 | hasBasket;noBasket -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/files/checksum.txt: -------------------------------------------------------------------------------- 1 | 73563263b7b11b3c3355ea4af76733f783f75abcd2936d463829fee8ece33dece1c477ddcc437e0eb499f35ecd7bfbd87f8c96a3e41d0b6940f96eabe1b30984 0001_compressed.h264 2 | 1dc119bea04488b095eae0e2c7c963daed2504276ff489c215bb2cb60bb4e9e82a335e2f3b29c17ee3dd5a15403733fd5d5e67fd67f4e9025cc4c86c700fadea basketClassifier.etlt 3 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/media/arch.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e428455f05c1281a5f590bffac7ffd1571e17d46a56b929ff72dbdca841074d8 3 | size 148633 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/media/dashboard.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:dba2950e872e53429c2d5edca0db634d7e31ddb43ef39ac1100e14158129433b 3 | size 83422 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/media/deepstream_container.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:90fe03d2e1d427fc48b1ca080f91b8e5b4991fe614f71b7e9c816f6ac89aa6fc 3 | size 13580 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/media/docker_container_ps.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c5be7d9d72ad127003155a2ae7a0d5c90b44c1a6aa7aaba6414b32a1ba1e102f 3 | size 54740 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/media/output.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7f855cc35e5f60ea2b18356e75dcb464467b12dff67120b333ab255edd54f7a0 3 | size 10103813 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/media/retail-iva-arch.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:49d6446d06f0b04059d7808bb048a454b6e9df8ca4fc0b57d57422a0db1988c1 3 | size 149982 4 | -------------------------------------------------------------------------------- /legacy_apps/deepstream-retail-analytics/nvmsgconv/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ############################################################################### 17 | 18 | CC:= g++ 19 | 20 | PKGS:= glib-2.0 gobject-2.0 json-glib-1.0 uuid 21 | 22 | LIB_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream/lib/ 23 | 24 | CFLAGS:= -Wall -std=c++11 -shared -fPIC 25 | 26 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes -I./deepstream_schema 27 | 28 | CFLAGS+= $(shell pkg-config --cflags $(PKGS)) 29 | LIBS:= $(shell pkg-config --libs $(PKGS)) 30 | 31 | LIBS+= -lyaml-cpp 32 | 33 | SRCFILES:= nvmsgconv.cpp \ 34 | deepstream_schema/eventmsg_payload_peoplenet.cpp \ 35 | deepstream_schema/dsmeta_payload.cpp \ 36 | deepstream_schema/deepstream_schema.cpp 37 | TARGET_LIB:= libnvds_msgconv.so 38 | 39 | all: $(TARGET_LIB) 40 | 41 | $(TARGET_LIB) : $(SRCFILES) 42 | $(CC) -o $@ $^ $(CFLAGS) $(LIBS) 43 | 44 | install: $(TARGET_LIB) 45 | cp -rv $(TARGET_LIB) $(LIB_INSTALL_DIR) 46 | 47 | clean: 48 | rm -rf $(TARGET_LIB) 49 | -------------------------------------------------------------------------------- /runtime_source_add_delete/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################# 2 | # SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | CUDA_VER?= 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | 23 | APP:= deepstream-test-rt-src-add-del 24 | 25 | TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -) 26 | 27 | DS_SDK_ROOT:=/opt/nvidia/deepstream/deepstream 28 | 29 | LIB_INSTALL_DIR?=$(DS_SDK_ROOT)/lib/ 30 | 31 | SRCS:= $(wildcard *.c) 32 | 33 | INCS:= $(wildcard *.h) 34 | 35 | PKGS:= gstreamer-1.0 36 | 37 | OBJS:= $(SRCS:.c=.o) 38 | 39 | CFLAGS+= -I$(DS_SDK_ROOT)/sources/includes \ 40 | -I /usr/local/cuda-$(CUDA_VER)/include 41 | 42 | CFLAGS+= `pkg-config --cflags $(PKGS)` 43 | 44 | LIBS:= `pkg-config --libs $(PKGS)` 45 | 46 | LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_helper -lm -lnvdsgst_meta \ 47 | -L/usr/local/cuda-$(CUDA_VER)/lib64/ -lcudart \ 48 | -lcuda -Wl,-rpath,$(LIB_INSTALL_DIR) 49 | 50 | all: $(APP) 51 | 52 | .o: .c $(INCS) Makefile 53 | $(CC) -c $@ $(CFLAGS) $< 54 | 55 | $(APP): $(OBJS) Makefile 56 | $(CC) -o $(APP) $(OBJS) $(LIBS) 57 | 58 | clean: 59 | rm -rf $(OBJS) $(APP) 60 | 61 | 62 | -------------------------------------------------------------------------------- /runtime_source_add_delete/README.md: -------------------------------------------------------------------------------- 1 | # RUNTIME SOURCE ADDITION DELETION REFERENCE APP USING DEEPSTREAMSDK 2 | 3 | ## Introduction 4 | The project contains Runtime source addition/deletion application to show the 5 | capability of Deepstream SDK. 6 | 7 | ## Prerequisites: 8 | DeepStream SDK installed which is available at http://developer.nvidia.com/deepstream-sdk 9 | Please follow instructions in the apps/sample_apps/deepstream-app/README on how 10 | to install the prequisites for Deepstream SDK apps. 11 | 12 | ## Getting Started 13 | 14 | - Preferably clone the app in 15 | `/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/` 16 | 17 | - Edit all the inference models config files according to the location of the models to be used 18 | 19 | ## Compilation Steps and Execution: 20 | ``` 21 | $ Set CUDA_VER in the MakeFile as per platform. 22 | For both x86 & Jetson, CUDA_VER=12.6 23 | $ sudo make 24 | 25 | $ ./deepstream-test-rt-src-add-del 26 | $ ./deepstream-test-rt-src-add-del file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h265.mp4 0 nveglglessink 1 #dGPU - nveglglessink Jetson - nv3dsink 27 | $ ./deepstream-test-rt-src-add-del rtsp://127.0.0.1/video 0 nveglglessink 1 #dGPU 28 | ``` 29 | 30 | The application demonstrates following pipeline for single source 31 | 32 | uridecodebin -> nvstreammux -> nvinfer -> nvtracker -> nvtiler -> nvvideoconvert -> nvdsosd -> displaysink 33 | 34 | - At runtime after a timeout a source will be added periodically. All the components 35 | are reconfigured during addition/deletion 36 | - After reaching of `MAX_NUM_SOURCES`, each source is deleted periodically till single 37 | source is present in the pipeline 38 | - The app exits, when final source End of Stream is reached or if the last source is deleted. 39 | - filesink and nv3dsink (only Jetson) are also supported. 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /runtime_source_add_delete/dstest_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | # Mandatory properties for the tracker: 19 | # tracker-width 20 | # tracker-height: needs to be multiple of 32 for NvDCF 21 | # gpu-id 22 | # ll-lib-file: path to low-level tracker lib 23 | # ll-config-file: required for NvDCF, optional for KLT and IOU 24 | # 25 | [tracker] 26 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 27 | tracker-width=640 28 | tracker-height=384 29 | ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so 30 | # ll-config-file required to set different tracker types 31 | # ll-config-file=config_tracker_IOU.yml 32 | ll-config-file=config_tracker_NvDCF_perf.yml 33 | # ll-config-file=config_tracker_NvDCF_accuracy.yml 34 | # ll-config-file=config_tracker_DeepSORT.yml 35 | gpu-id=0 36 | enable-batch-process=1 37 | enable-past-frame=1 38 | display-tracking-id=1 39 | -------------------------------------------------------------------------------- /runtime_source_add_delete/tracker_config.yml: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | ################################################################################ 17 | 18 | %YAML:1.0 19 | 20 | NvDCF: 21 | maxTargetsPerStream: 30 # Max number of targets to track per stream. Recommended to set >10. Note: this value should account for the targets being tracked in shadow mode as well. Max value depends on the GPU memory capacity 22 | 23 | filterLr: 0.11 # learning rate for DCF filter in exponential moving average. Valid Range: [0.0, 1.0] 24 | gaussianSigma: 0.75 # Standard deviation for Gaussian for desired response when creating DCF filter 25 | 26 | minDetectorConfidence: 0.0 # If the confidence of a detector bbox is lower than this, then it won't be considered for tracking 27 | minTrackerConfidence: 0.6 # If the confidence of an object tracker is lower than this on the fly, then it will be tracked in shadow mode. Valid Range: [0.0, 1.0] 28 | 29 | featureImgSizeLevel: 1 # Size of a feature image. Valid range: {1, 2, 3, 4, 5}, from the smallest to the largest 30 | SearchRegionPaddingScale: 3 # Search region size. Determines how large the search region should be scaled from the target bbox. Valid range: {1, 2, 3}, from the smallest to the largest 31 | 32 | maxShadowTrackingAge: 9 # Max length of shadow tracking (the shadow tracking age is incremented when (1) there's detector input yet no match or (2) tracker confidence is lower than minTrackerConfidence). Once reached, the tracker will be terminated. 33 | probationAge: 0 # Once the tracker age (incremented at every frame) reaches this, the tracker is considered to be valid 34 | earlyTerminationAge: 0 # Early termination age (in terms of shadow tracking age) during the probation period 35 | 36 | minVisibiilty4Tracking: 0.5 # If the visibility of the bbox of a tracker gets lower, then it will be terminated 37 | --------------------------------------------------------------------------------