AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.65k stars 7.96k forks source link

how to increase FPS of custom model which i was trained on yolov4mish/csp ? #7690

Open akashAD98 opened 3 years ago

akashAD98 commented 3 years ago

i have a weight file that has a size of 379MB. I want to increase the FPS or inference of my model. apart from using GPU & half_preseion what are different ways in which I can increase model FPS without affecting its accuracy.

note: I got FPS of 4-5 on teslav100, I have total of 57 classes & the model is also big.

I thought to convert my model weight into TensorFlow/TF.lite /tensorRT /pytorch .pth model .& let's compare the model performance. Even there is no any source code for converting mish/CSP model into .pb & .pth format. I m really grateful if anyone can help me with this issue.

poornimajd commented 3 years ago

May be you can try tkdnn. Also try to decrease width and height in cfg file,it will affect the accuracy but increase in fps will not really be significant without much decrease in accuracy. I think model pruning may also be one way to explore. Also I was able to convert yolov4 model with mish activation.It would be helpful if you could upload your cfg file.

akashAD98 commented 3 years ago

@poornimajd thanks. I tried to convert yolo-mish,csp to TensorFlow-TF.lite & tensorRT ,its converting but the model is not predicting anything. I think there is a problem with the conversion.

poornimajd commented 3 years ago

Yeah possibly.Did you try with tkdnn? Or may be if you could try some other model like yolov4 without mish/csp and if this works well ,then the problem is something else.

bulatnv commented 3 years ago

@akashAD98
Convert model to TensorRT via Onnx. This definitely works.

akashAD98 commented 3 years ago

@bulatnv @poornimajd thank you. i will try TensorRT

matt-sharp commented 3 years ago

Or you can try using OpenCV DNN.