Ashna Eldho
Ashna Eldho

Reputation: 482

Why is the output video too slow in darknet?

I trained my own dataset for yolov2 in darknet. I am using ubuntu 18.04 and has no GPU. When I play a video(which i have taken in my smart phone) for testing, it is too slow. Is it because i don't have a GPU? Or is it because of some other reasons?

Can someone reply me.

Upvotes: 0

Views: 4884

Answers (2)

iv67
iv67

Reputation: 4151

1 big reason is of course because you don't have GPU. The other reason is the model that you use. You use YoloV2 which is faster than YoloV3 but still slower compared to TinyYolo or TinyYoloV3.

So, this is the trade off between accuracy and speed, the faster your model the lower the accuracy. If you are going for speed, than there are 3 solutions that I can think of :

  • Use GPU (I know it's expensive but worth the price, nvidia gtx 1060++ would be great)
  • Change your model to TinyYolo or TinyYoloV3. I recommend using TinyYolov3 for higher fps
    • TinyYoloV3 : 220 fps
    • TinyYolo : 207 fps
    • YoloV2 : 67 fps
  • Use OpenVino as Andrew Pierno said

Download model from here : https://pjreddie.com/darknet/yolo/
Yolov2's link : https://pjreddie.com/darknet/yolov2/

enter image description here

Upvotes: 1

Andrew Pierno
Andrew Pierno

Reputation: 520

Without a gpu, yolov2 is going to be very slow and if you have a modern smart phone it's likely that video is high resolution with a high frame rate. I'm not sure of your implementation but it's likely you're processing every frame in the video instead of skipping every other frame or only processing every 10th frame.

If you don't have a gpu available (and aren't going to) another way to get gpu type performance is using Intel's Openvino if you have a recent I-series processor. You'd be able to convert your yolov2 model to open vino and run it on a cpu with really fast inference times (likely <100ms per frame). I will say I ran yolov3 off of Openvino though and it was really slow compared to other object detectors and especially compared to a mobilenet.

I also have some demo's set up to test between yolov3 on a cpu and open vino on a cpu, you can check those out on SugarKubes

Upvotes: 5

Related Questions