Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config_infer_primary_yoloV9.txt, NvDsInfer Error: NVDSINFER_CUSTOM_LIB_FAILED #609

Open
petertechnologiesplt opened this issue Jan 11, 2025 · 7 comments

Comments

@petertechnologiesplt
Copy link

Hi,
My board is Jetson Orin Nano, Jetpack 6.1 and Deepstream 7.1

I have followed your note on how to configure form YoloV9.
Following your note my, my

Building the TensorRT Engine
Building complete

but after that I'm receiving error as below :-

0:29:34.433267382 18902 0xaaaae040f0a0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:2138> [UID = 1]: serialize cuda engine to file: /Storage/DeepStream-Yolo/model_b1_gpu0_fp16.engine successfully
Implicit layer support has been deprecated
INFO: [Implicit Engine Info]: layers num: 0

0:29:34.943073530 18902 0xaaaae040f0a0 ERROR nvinfer gstnvinfer.cpp:678:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initResource() <nvdsinfer_context_impl.cpp:841> [UID = 1]: Detect-postprocessor failed to init resource because dlsym failed to get func NvDsInferParseYolo pointer
ERROR: Infer Context failed to initialize post-processing resource, nvinfer error:NVDSINFER_CUSTOM_LIB_FAILED
ERROR: Infer Context prepare postprocessing resource failed., nvinfer error:NVDSINFER_CUSTOM_LIB_FAILED
0:29:35.011187453 18902 0xaaaae040f0a0 WARN nvinfer gstnvinfer.cpp:914:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:29:35.011248248 18902 0xaaaae040f0a0 WARN nvinfer gstnvinfer.cpp:914:gst_nvinfer_start:<primary_gie> error: Config file path: /Storage/DeepStream-Yolo/config_infer_primary_yoloV9.txt, NvDsInfer Error: NVDSINFER_CUSTOM_LIB_FAILED

ERROR: main:713: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to create NvDsInferContext instance
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(914): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie:
Config file path: /Storage/DeepStream-Yolo/config_infer_primary_yoloV9.txt, NvDsInfer Error: NVDSINFER_CUSTOM_LIB_FAILED
App run failed

What did I do wrong?
I'm clueless here. Your guidance much appreciated

Best regards,
Sebastian

@marcoslucianops
Copy link
Owner

Did you compile the nvdsinfer_custom_impl_Yolo lib?

@petertechnologiesplt
Copy link
Author

petertechnologiesplt commented Jan 12, 2025

Did you compile the nvdsinfer_custom_impl_Yolo lib?

Hi @marcoslucianops,

Thanks for reply.
I followed your instruction in this link.
https://github.com/marcoslucianops/DeepStream-Yolo/blob/master/docs/YOLOv9.md

I don't see any instructions regarding compiling the nvdsinfer_custom_impl_Yolo lib.
Could you guide me how to compile this library?

I only found these instructions as below:-

NOTE: To compile the nvdsinfer_custom_impl_Yolo, you need to install the g++ inside the container

apt-get install build-essential

NOTE: With DeepStream 7.1, the docker containers do not package libraries necessary for certain multimedia operations like audio data parsing, CPU decode, and CPU encode. This change could affect processing certain video streams/files like mp4 that include audio track. Please run the below script inside the docker images to install additional packages that might be necessary to use all of the DeepStreamSDK features:

/opt/nvidia/deepstream/deepstream/user_additional_install.sh

I also make and compiled
export CUDA_VER=12.6
make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo

Best regards,
Sebastian

@petertechnologiesplt
Copy link
Author

https://github.com/marcoslucianops/DeepStream-Yolo/blob/master/docs/YOLOv9.md#compile-the-lib

Hi @marcoslucianops,
Yes i did compiled it as the instruction in the link you have provided the compilation was successful but when i run the below command:-
deepstream-app -c deepstream_app_config.txt
after editing my config_infer_primary_yoloV9 and deepstream_app_config files as mentioned in you link.
I'm receiving similar error.

I tried with Yolo8s on config_infer_primary_yoloV8.txt and it was successful.
Yet while using Yolo9e on config_infer_primary_yoloV9.txt I'm facing the error that i mentioned earlier.
My yolo8s size is 22mb whereas my Yolo9e is 126mb.
I'm running my program on Jetson Orin Nano.

Please advice on this

Best Regards,
Sebastian

@marcoslucianops
Copy link
Owner

Can you send the config_infer_primary_yoloV9.txt file?

@petertechnologiesplt
Copy link
Author

Can you send the config_infer_primary_yoloV9.txt file?

Hi @marcoslucianops,

Sure.

[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
model-color-format=0
onnx-file=yolo9e.pt.onnx
model-engine-file=model_b1_gpu0_fp16.engine
#int8-calib-file=calib.table
labelfile-path=labels.txt
batch-size=1
network-mode=2
num-detected-classes=80
interval=0
gie-unique-id=1
process-mode=1
network-type=0
cluster-mode=2
maintain-aspect-ratio=1
symmetric-padding=1
#workspace-size=2000
parse-bbox-func-name=NvDsInferParseYolo
#parse-bbox-func-name=NvDsInferParseYoloCuda
custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so
engine-create-func-name=NvDsInferYoloCudaEngineGet

[class-attrs-all]
nms-iou-threshold=0.45
pre-cluster-threshold=0.25
topk=300

Best regards,
Sebastian

@marcoslucianops
Copy link
Owner

Do you have the nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants