jkjung-avt / tensorrt_demos

TensorRT MODNet, YOLOv4, YOLOv3, SSD, MTCNN, and GoogLeNet
https://jkjung-avt.github.io/
MIT License
1.74k stars 545 forks source link

a little question for plugin yolo_layer. #469

Closed xlb8 closed 3 years ago

xlb8 commented 3 years ago

hi, contributor. i cant find that where does the libyolo_layer.so been used. i checked the plugin.py and yolo_with_plugin.py , they just try to load the .so files and didnt assign to an object,how does this process (yolo_layer.so) going...

jkjung-avt commented 3 years ago

The YoloPluginCreator registers itself to TensorRT library with the name "YoloLayer_TRT".

https://github.com/jkjung-avt/tensorrt_demos/blob/1f8773b3f6091d2e3441c0d6ce5714e332421f8d/plugins/yolo_layer.h#L147

So when TensorRT library encounters a "YoloLayer_TRT" layer in the engine, it knows it should delegate the handling to YoloPluginCreator which creates the YoloLayerPlugin object. All those are implemented in "libyolo_layer.so".

https://github.com/jkjung-avt/tensorrt_demos/blob/1f8773b3f6091d2e3441c0d6ce5714e332421f8d/utils/yolo_with_plugins.py#L18

xlb8 commented 3 years ago

great THANKS to you !