YonghaoHe / LFFD-A-Light-and-Fast-Face-Detector-for-Edge-Devices

A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......
MIT License
1.31k stars 330 forks source link

代码该更新啦!!! #87

Closed CallmeZhangChenchen closed 4 years ago

CallmeZhangChenchen commented 4 years ago

在NX上,只有最新的jetpack ,由于TensorRT的版本为7.0.0.11, ,

face_detection中的predict_tensorrt.py跑不通啦。

Error: INFO:root:Init engine from ONNX file. INFO:root:Create TensorRT builder. INFO:root:Create TensorRT network. INFO:root:Create TensorRT ONNX parser. ERROR:root:Errors occur while parsing the ONNX file! Assertion failed: !_importer_ctx.network()->hasImplicitBatchDimension() && "This version of the ONNX parser only supports TensorRT INetworkDefinitions with an explicit batch dimension. Please ensure the network was created using the EXPLICIT_BATCH NetworkDefinitionCreationFlag."

CallmeZhangChenchen commented 4 years ago

TensorRT6上就可以跑

CallmeZhangChenchen commented 4 years ago

恩,我也试了,TensorRT5跟TensorRT6都可以跑,但是TensorRT7上改了onnx模型的使用方式

CallmeZhangChenchen commented 4 years ago

先关了。我慢慢解决吧!

ashuezy commented 3 years ago

Solution is :

 old code->
  network = builder.create_network()  

new code->
  explicit_batch = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
  network = builder.create_network(explicit_batch)