Python執行tensorrt-engine
載入Region_TRT plugin
必須要載入libnvinfer_plugin,可以用python的trt.init_libnvinfer_plugins載入,
1 | TRT_LOGGER = trt.Logger(trt.Logger.ERROR) |
印出目前已經載入的plugin
PLUGIN_CREATORS = trt.get_plugin_registry().plugin_creator_list
for plugin_creator in PLUGIN_CREATORS:
print(plugin_creator.name)
參考並修改:https://developer.nvidia.com/zh-cn/blog/tensorrt-custom-layer-cn/
tensorrt Region layer 說明書
inference範例參考:
https://leimao.github.io/blog/TensorRT-Python-Inference/
Python執行tensorrt-engine