zhouyuchong / face-recognition-deepstream

Deepstream app use retinaface and arcface for face recognition.
MIT License
60 stars 13 forks source link

Can we retinaface in C app #5

Closed qustions closed 2 years ago

qustions commented 2 years ago

@zhouyuchong I have created another issue just wanted know how to add only retinaface on deepstream-test3.c I have added config_retinaface.txt in the folder and ran the app its giving this error I know we need to add the libRetinafaceDecoder.so but don't know how to add it in c any help would be grate.

ERROR: [TRT]: 3: getPluginCreator could not find plugin: Decode_TRT version: 1
ERROR: [TRT]: 1: [pluginV2Runner.cpp::load::291] Error Code 1: Serialization (Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)
ERROR: [TRT]: 4: [runtime.cpp::deserializeCudaEngine::75] Error Code 4: Internal Error (Engine deserialization failed.)
ERROR: Deserialize engine failed from file: /opt/nvidia/deepstream/deepstream-6.0/sources/apps/deepstream_python_apps/models/retinaface/retina_r50_copy1.engine
ERROR: failed to build network since there is no model file matched.
ERROR: failed to build network.
0:00:00.885165654 187037 0x56126e524470 ERROR                nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1934> [UID = 2]: build engine file failed
0:00:00.885186017 187037 0x56126e524470 ERROR                nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2020> [UID = 2]: build backend context failed
0:00:00.885193779 187037 0x56126e524470 ERROR                nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1257> [UID = 2]: generate backend failed, check config file settings
0:00:00.885475261 187037 0x56126e524470 WARN                 nvinfer gstnvinfer.cpp:841:gst_nvinfer_start:<primary-nvinference-engine> error: Failed to create NvDsInferContext instance
0:00:00.885486402 187037 0x56126e524470 WARN                 nvinfer gstnvinfer.cpp:841:gst_nvinfer_start:<primary-nvinference-engine> error: Config file path: config_retinaface.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
Running...
ERROR from element primary-nvinference-engine: Failed to create NvDsInferContext instance
Error details: gstnvinfer.cpp(841): gst_nvinfer_start (): /GstPipeline:dstest3-pipeline/GstNvInfer:primary-nvinference-engine:
Config file path: config_retinaface.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
Returned, stopping playback
Deleting pipeline
zhouyuchong commented 2 years ago

@qustions the shared library should be loaded before executing app. there are 2 ways: the 1st is to add command LD_PRELOAD={PATH TO LIB} before executing app. the 2nd is to add the path of lib in the Makefile of deepstream-app.