isarsoft / yolov4-triton-tensorrt

This repository deploys YOLOv4 as an optimized TensorRT engine to Triton Inference Server
http://www.isarsoft.com
Other
277 stars 63 forks source link

Triton Serving for Yolov3-SPP #17

Closed Darshcg closed 3 years ago

Darshcg commented 3 years ago

Hi, Does your Yolov4-triton-tensorrt supports for Yolov3-spp Model? If no what modification needs to be done?

Thanks in advance

philipp-schmidt commented 3 years ago

Hi, no yolov3-spp is not supported. In this repo we build networks by declaring each single layer through the tensorrt network builder API individually. For example the first few layers of yolov4 are built the following way:

https://github.com/isarsoft/yolov4-triton-tensorrt/blob/4edbe849f111324d58eda5f14fe1e4e9b098d4cd/networks/yolov4.h#L97-L108

So if you want to build yolov3-spp you would have to do the same for all the layers of the network - which is quite possible. Furthermore you would need the weight file in the correct format. In this repo we get this by loading the original darknet weights into an equivalent pytorch model and use pytorchs default weight exporter to bring them into a nice and simple format.

I'm not sure about the spp part and whether tensorrt supports all necessary layers out of the box. You might have to implement a few of those layers as well as custom plugins in that case. But to my understanding the spp part is just a series of convolutions and downsampling? It should be supported then.

Overall there would be a bit of work involved to get yolov3-spp running.

philipp-schmidt commented 3 years ago

Closing this. If you want to discuss further details please open a new discussion in the new github discussion feature.

Darshcg commented 3 years ago

Thank you for your kind response @philipp-schmidt. I have created an Engine file of the Yolov3-SPP, but I wanted to serve the TRT Model using Triton Server.