triple-Mu / YOLOv8-TensorRT

YOLOv8 using TensorRT accelerate !
MIT License
1.23k stars 210 forks source link

Static Symbolic Method Operator #201

Closed fy-shen closed 1 month ago

fy-shen commented 4 months ago

你好,在 TRT_NMS 的 symbolic 函数中使用了 TRT::EfficientNMS_TRT,这看起来是使用了 efficientNMSPlugin,但这里使用的参数与官方文档中有所不同,添加了代表数据类型的后缀,这是为什么?另外我想知道 TensorRT 中的 Plugin 是如何支持直接在 g.op() 中使用的,我查看了 PyTorch 的官方文档,里面仅给出了 TorchScript operatorsONNX standard operator

out = g.op('TRT::EfficientNMS_TRT',
           boxes,
           scores,
           iou_threshold_f=iou_threshold,
           score_threshold_f=score_threshold,
           max_output_boxes_i=max_output_boxes,
           background_class_i=background_class,
           box_coding_i=box_coding,
           plugin_version_s=plugin_version,
           score_activation_i=score_activation,
           outputs=4)
triple-Mu commented 3 months ago

你好,在 TRT_NMS 的 symbolic 函数中使用了 TRT::EfficientNMS_TRT,这看起来是使用了 efficientNMSPlugin,但这里使用的参数与官方文档中有所不同,添加了代表数据类型的后缀,这是为什么?另外我想知道 TensorRT 中的 Plugin 是如何支持直接在 g.op() 中使用的,我查看了 PyTorch 的官方文档,里面仅给出了 TorchScript operatorsONNX standard operator

out = g.op('TRT::EfficientNMS_TRT',
           boxes,
           scores,
           iou_threshold_f=iou_threshold,
           score_threshold_f=score_threshold,
           max_output_boxes_i=max_output_boxes,
           background_class_i=background_class,
           box_coding_i=box_coding,
           plugin_version_s=plugin_version,
           score_activation_i=score_activation,
           outputs=4)

您好,可以参考 https://github.com/NVIDIA/TensorRT/tree/release/8.6/plugin/efficientNMSPlugin 所有属性输入输出排序按照这个来就可以