报错1
我将roi更换为自己的roi参数(一个视频源,9个roi)
In cb_newpad
gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7fbc9e718400 (GstCapsFeatures at 0x7fbb78179820)>
In cb_newpadgstname= audio/x-raw
NvBufSurfTransform failed with error -3
Error: gst-stream-error-quark: Custom Transformation from library failed
(1): gstnvdspreprocess.cpp(1061): group_transformation (): /GstPipeline:pipeline0/GstNvDsPreProcess:preprocess-plugin
原因是虽然视频尺寸3840x2160,roi也按此设置,但python代码中处理的尺寸是需要调整的,我的python代码中尺寸是1920x1080,而roi的尺寸设置就超出了这个尺寸,所以报错。
解决方法:记得调整python代码中的尺寸就行了,roi的尺寸和它对应。
报错2
Loading pre-trained weights
python3.8: utils.cpp:104: std::vector<float> loadWeights(std::string, const string&): Assertion `count > 0 && "Invalid .wts file."' failed.
Aborted (core dumped)
解决方法:换一个老版本的权重生成代码,我用的太新了
报错3
Frame Number= 598 stream id= 0 Number of Objects= 0 Vehicle_count= 0 Person_count= 0
Warning: gst-stream-error-quark: nvinfer could not find input layer with name = input_1
(1): gstnvinfer.cpp(1903): gst_nvinfer_process_tensor_input (): /GstPipeline:pipeline0/GstNvInfer:primary-inference
0:00:45.384578312 2537 0x359b580 WARN nvinfer gstnvinfer.cpp:1903:gst_nvinfer_process_tensor_input:<primary-inference> warning: nvinfer could not find input layer with name = input_1
报错4
Error: gst-stream-error-quark: Failed to queue input batch for inferencing (1): gstnvinfer.cpp(1996): gst_nvinfer_process_tensor_input (): /GstPipeline:pipeline0/GstNvInfer:primary-inferenceframe output is OFF