Couldn't create backend context from arcface engine file

99 views Asked by At

I am implementing this face recognition repo https://github.com/zhouyuchong/face-recognition-deepstream/tree/main I have generated the trt engine file for both arcface and retinaface. Configured all the config files as written in the README of repo. But when I am running the face_test_demo file, it is giving me this error which says, could not create backend context from these engine files. My engine files are created with no error.

0:00:07.058984920  4423      0x34decc0 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<secondary-nvinference-engine> NvDsInferContext[UID 2]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 2]: deserialize backend context from engine from file :/home/gurv/tensorrtx/arcface/build/arcface-r100.engine failed, try rebuild
0:00:07.059514324  4423      0x34decc0 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary-nvinference-engine> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 2]: Trying to create engine from model files
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:865 failed to build network since there is no model file matched.
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:804 failed to build network.
0:00:08.885117106  4423      0x34decc0 ERROR                nvinfer gstnvinfer.cpp:674:gst_nvinfer_logger:<secondary-nvinference-engine> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1943> [UID = 2]: build engine file failed
0:00:08.912535616  4423      0x34decc0 ERROR                nvinfer gstnvinfer.cpp:674:gst_nvinfer_logger:<secondary-nvinference-engine> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2029> [UID = 2]: build backend context failed
0:00:08.912839561  4423      0x34decc0 ERROR                nvinfer gstnvinfer.cpp:674:gst_nvinfer_logger:<secondary-nvinference-engine> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1266> [UID = 2]: generate backend failed, check config file settings
0:00:08.912857395  4423      0x34decc0 WARN                 nvinfer gstnvinfer.cpp:888:gst_nvinfer_start:<secondary-nvinference-engine> error: Failed to create NvDsInferContext instance
0:00:08.912864531  4423      0x34decc0 WARN                 nvinfer gstnvinfer.cpp:888:gst_nvinfer_start:<secondary-nvinference-engine> error: Config file path: /home/gurv/face-recognition-deepstream/src/kbds/configs/face/config_arcface.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
(True, 'success')
delete finished

I have tried it multiple times but the problem sustains. It is expected that it will create the backend context and the network will be built successfully for both arcface and retinaface.

0

There are 0 answers