Replacing Deepstream peoplenet model with Yolo model

Hi,
As I new to this metropolis deepstream, I want to replace peoplenet model with the yolo model but i have not found any method to do same. Please guide me to replace model in metropolis pipeline.
NOTE: I have already generated my deepstream Yolo model and it is working with deepstream-app -c config.

AI NVC wll use the configure file for deepstream PGIE: ai_nvr/config/deepstream/pn26/config_infer_primary_RN34_PN26_960x544_dla0_orin_unprune_agx.txt
You can modify this configure file to load the YOLO model.

HI @kesong ,
I don’t have below mentioned files:

uff-file=/pn26-files/peoplenet_V2.6_resnet34_hr_noreg_ph2_dla.uff
uff-input-dims=3;544;960;0
uff-input-blob-name=input_1
int8-calib-file=/pn26-files/peoplenet_V2.6_resnet34_hr_noReg_ph2_dla.cache

So in the case of Yolo, which files do I have to replace with the above-mentioned files?

You can put the YOLO model in ai_nvr/config/deepstream/pn26/. And the the right model path like:
labelfile-path=/ds-config-files/pn26/labels.txt

1 Like

Hi @kesong , we have tried the following changes in the config file and placed our model file and labels.txt file there also changed our engine as previuos was different engine.
Below are our container logs :

== CUDA ==

CUDA Version 12.2.12

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

** WARN: <parse_tracker:1633>: Unknown key ‘enable-batch-process’ for group [tracker]
** WARN: <parse_tracker:1633>: Unknown key ‘enable-past-frame’ for group [tracker]
CONFIG URI for i=0:

(deepstream-moj-app:37): GLib-GObject-WARNING **: 12:18:58.717: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8555/ds-test ***

CONFIG URI for i=1:

(deepstream-moj-app:37): GLib-GObject-WARNING **: 12:18:58.820: g_object_set_is_valid_property: object class ‘nvv4l2h264enc’ has no property named ‘gpu-id’

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8556/ds-test ***

Warning: ‘input-dims’ parameter has been deprecated. Use ‘infer-dims’ instead.
sink pad successful
adding tiler probe to enable gem overlayOpening in BLOCKING MODE
Civetweb version: v1.16
Server running at port: 9010
uri:/api/v1/stream/remove
method:POST
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Loading TRT Engine for tracker ReID…[NvMultiObjectTracker] Loading TRT Engine for tracker ReID…

[NvMultiObjectTracker] Loading TRT Engine for tracker ReID…
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
[NvMultiObjectTracker] Loading Complete!
ERROR: [TRT]: 3: [runtime.cpp::~Runtime::344] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::344, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
)
[NvMultiObjectTracker] Loading Complete!
[NvMultiObjectTracker] Loading Complete!
ERROR: [TRT]: 3: [runtime.cpp::~Runtime::344] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::344, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
)
ERROR: [TRT]: 3: [runtime.cpp::~Runtime::344] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::344, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
)
[NvMultiObjectTracker] Initialized
[NvMultiObjectTracker] Initialized
[NvMultiObjectTracker] Initialized
uri:/api/v1/stream/add
method:GET
uri:/api/v1/stream/add
method:POST

I am attaching my model file along with library file and config file what we have changed and used.
orin_agx_deepstream.zip (49.2 MB)

Please let me know, What I have done wrong here.

Here is the update configure files. I can run the Yolo model in my side. Please have a try.
pn26.tar.gz (49.2 MB)

1 Like

Thanks @kesong, It’s working fine now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.