Deepstream5.1 运行python test1时报错

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

环境是ubuntu20.04,2080ti,460.32.03,5.1,tensorrt7.2.3.4
cuda11.1.1运行deepstream-python-test2时遇到同样的错误,错误如下:
deepstream_test_2.py:178: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: Projects/PyGObject/Threading - GNOME Wiki!
GObject.threads_init()
Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Creating EGLSink

Playing file sample_720p.h264
Adding elements to Pipeline

Linking elements in the Pipeline

deepstream_test_2.py:382: PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
loop = GObject.MainLoop()
Starting pipeline

ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1523 Deserialize engine failed because file path: /home/jovyan/work/Secondary_VehicleTypes/resnet18.caffemodel_b16_int8.engine open error
0:00:13.684326455 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 4]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1691> [UID = 4]: deserialize engine from file :/home/jovyan/work/Secondary_VehicleTypes/resnet18.caffemodel_b16_int8.engine failed
0:00:13.685409876 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 4]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1798> [UID = 4]: deserialize backend context from engine from file :/home/jovyan/work/Secondary_VehicleTypes/resnet18.caffemodel_b16_int8.engine failed, try rebuild
0:00:13.685423586 251 0x55fbaef59270 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 4]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1716> [UID = 4]: Trying to create engine from model files
Warning: Flatten layer ignored. TensorRT implicitly flattens input to FullyConnected layers, but in other circumstances this will result in undefined behavior.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Reading Calibration Cache for calibrator: EntropyCalibration2
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Generated calibration scales using calibration cache. Make sure thatcalibration cache has latest scales.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: To regenerate calibration cache, please delete the existing one. TensorRT will generate a new calibration cache.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Detected 1 inputs and 1 output network tensors.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1495 Serialize engine failed because of file path: /home/jovyan/work/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine opened error
0:00:30.470172456 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 4]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1744> [UID = 4]: failed to serialize cude engine to file: /home/jovyan/work/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:685 [Implicit Engine Info]: layers num: 2
0 INPUT kFLOAT input_1 3x224x224
1 OUTPUT kFLOAT predictions/Softmax 6x1x1

0:00:30.477248401 251 0x55fbaef59270 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 4]: Load new model:dstest2_sgie3_config.txt sucessfully
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1523 Deserialize engine failed because file path: /home/jovyan/work/Secondary_CarMake/resnet18.caffemodel_b16_int8.engine open error
0:00:30.477641585 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 3]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1691> [UID = 3]: deserialize engine from file :/home/jovyan/work/Secondary_CarMake/resnet18.caffemodel_b16_int8.engine failed
0:00:30.477653839 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 3]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1798> [UID = 3]: deserialize backend context from engine from file :/home/jovyan/work/Secondary_CarMake/resnet18.caffemodel_b16_int8.engine failed, try rebuild
0:00:30.477660373 251 0x55fbaef59270 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 3]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1716> [UID = 3]: Trying to create engine from model files
Warning: Flatten layer ignored. TensorRT implicitly flattens input to FullyConnected layers, but in other circumstances this will result in undefined behavior.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Reading Calibration Cache for calibrator: EntropyCalibration2
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Generated calibration scales using calibration cache. Make sure thatcalibration cache has latest scales.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: To regenerate calibration cache, please delete the existing one. TensorRT will generate a new calibration cache.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Detected 1 inputs and 1 output network tensors.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1495 Serialize engine failed because of file path: /home/jovyan/work/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine opened error
0:00:40.871404510 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 3]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1744> [UID = 3]: failed to serialize cude engine to file: /home/jovyan/work/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:685 [Implicit Engine Info]: layers num: 2
0 INPUT kFLOAT input_1 3x224x224
1 OUTPUT kFLOAT predictions/Softmax 20x1x1

0:00:40.877730263 251 0x55fbaef59270 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 3]: Load new model:dstest2_sgie2_config.txt sucessfully
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1523 Deserialize engine failed because file path: /home/jovyan/work/Secondary_CarColor/resnet18.caffemodel_b16_int8.engine open error
0:00:40.878035419 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 2]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1691> [UID = 2]: deserialize engine from file :/home/jovyan/work/Secondary_CarColor/resnet18.caffemodel_b16_int8.engine failed
0:00:40.878057800 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 2]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1798> [UID = 2]: deserialize backend context from engine from file :/home/jovyan/work/Secondary_CarColor/resnet18.caffemodel_b16_int8.engine failed, try rebuild
0:00:40.878063976 251 0x55fbaef59270 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1716> [UID = 2]: Trying to create engine from model files
Warning: Flatten layer ignored. TensorRT implicitly flattens input to FullyConnected layers, but in other circumstances this will result in undefined behavior.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Reading Calibration Cache for calibrator: EntropyCalibration2
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Generated calibration scales using calibration cache. Make sure thatcalibration cache has latest scales.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: To regenerate calibration cache, please delete the existing one. TensorRT will generate a new calibration cache.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Detected 1 inputs and 1 output network tensors.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1495 Serialize engine failed because of file path: /home/jovyan/work/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine opened error
0:00:51.857319121 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 2]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1744> [UID = 2]: failed to serialize cude engine to file: /home/jovyan/work/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:685 [Implicit Engine Info]: layers num: 2
0 INPUT kFLOAT input_1 3x224x224
1 OUTPUT kFLOAT predictions/Softmax 12x1x1

0:00:51.864405386 251 0x55fbaef59270 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 2]: Load new model:dstest2_sgie1_config.txt sucessfully
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_mot_klt.so
gstnvtracker: Optional NvMOT_RemoveStreams not implemented
gstnvtracker: Batch processing is OFF
gstnvtracker: Past frame output is OFF
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1523 Deserialize engine failed because file path: /home/jovyan/work/Primary_Detector/resnet10.caffemodel_b1_int8.engine open error
0:00:51.880422076 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1691> [UID = 1]: deserialize engine from file :/home/jovyan/work/Primary_Detector/resnet10.caffemodel_b1_int8.engine failed
0:00:51.880477486 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1798> [UID = 1]: deserialize backend context from engine from file :/home/jovyan/work/Primary_Detector/resnet10.caffemodel_b1_int8.engine failed, try rebuild
0:00:51.880510294 251 0x55fbaef59270 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1716> [UID = 1]: Trying to create engine from model files
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Reading Calibration Cache for calibrator: EntropyCalibration2
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Generated calibration scales using calibration cache. Make sure thatcalibration cache has latest scales.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: To regenerate calibration cache, please delete the existing one. TensorRT will generate a new calibration cache.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: …/nvdsinfer/nvdsinfer_func_utils.cpp:39 [TRT]: Detected 1 inputs and 2 output network tensors.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1495 Serialize engine failed because of file path: /home/jovyan/work/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine opened error
0:00:59.259545606 251 0x55fbaef59270 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1744> [UID = 1]: failed to serialize cude engine to file: /home/jovyan/work/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:685 [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:59.264065233 251 0x55fbaef59270 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:dstest2_pgie_config.txt sucessfully
Error: gst-resource-error-quark: Device ‘/dev/nvidia0’ failed during initialization (1): gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2-decoder:
Call to S_FMT failed for H264 @ 1280x720: Unknown error -1

Error: gst-resource-error-quark: Device ‘/dev/nvidia0’ failed during initialization (1): gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2-decoder:
Call to S_FMT failed for H264 @ 1280x720: Unknown error -1

Can you run this pipeline?
gst-launch-1.0 filesrc location= samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! fakesink

(base) jovyan@action-6c8bbdc4dc-hkj7m:/opt/nvidia/deepstream/deepstream-5.1$ gst-launch-1.0 filesrc location= samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! fakesink
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
ERROR: from element /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0: Device ‘/dev/nvidia0’ failed during initialization
Additional debug info:
gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0:
Call to S_FMT failed for H264 @ 1280x720: Unknown error -1
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
Freeing pipeline …
运行这个pipeline也不行,环境ok的呐。
这个demo是自己改了改一点东西,讲sink还成filesink,其他的没有改动

这是在服务器的环境下进行的,这也许是个重要的条件。

Your environments seems something wrong. you can not run with nvv4l2decoder.
which deepstream version you are using? can you run with docker with same deepstream version? you can get docker from Docker Containers — DeepStream 5.1 Release documentation

ok👌🏻