enazoe / yolo-tensorrt

TensorRT8.Support Yolov5n,s,m,l,x .darknet -> tensorrt. Yolov4 Yolov3 use raw darknet *.weights and *.cfg fils. If the wrapper is useful to you,please Star it.
MIT License
1.18k stars 313 forks source link

engine #89

Closed alicera closed 3 years ago

alicera commented 3 years ago

请问为什么转int8要从头再用nvinfer1设计一次yolov5架构 理想上直接读取ONNX或weight直接进行转换不是更方便?

alicera commented 3 years ago

请问您有没有遇过yolov5 转成 FP16时物件侦测正常 但转成int8时什么结果都没出现

enazoe commented 3 years ago

@alicera 因为整个框架不是单独为v5设计的,api搭建网络更灵活,on nx不是万能的,便利的同时也会不灵活,遇到trt不支持的层,onnx就没法转engine,比如hardswish

alicera commented 3 years ago

1.可是我看到hardswish 被用成这些简单的OP 而且这些OP, ONNX 都有支援,况且我有用ONNX2trt 是没有报什么错误。 https://github.com/onnx/onnx/issues/2728#issuecomment-697795160

2.yolov5 转成 FP16时物件侦测正常 但转成int8时什么结果都没出现,这个也是遇到trt不支持的层? ? 那为什么FP16会成功?

请大大给个建议了 谢谢

enazoe commented 3 years ago

@alicera 1.能拆分自然好,不能拆封就只能有问题了。2.这个可能是trt bug