3
$\begingroup$

I want to implement YOLO V3. I want to know which framework will give me a faster result.

What are the advantages of implementing YOLO V3 on the darknet framework vs Keras framework?

$\endgroup$
4
$\begingroup$

Darknet is "native" framework, so basically, you don't need to implement anything, all code for yolov3 is available at their github repo, you just need to figure it out, play with it. Keras, in my opinion, is not flexible enough to easily implement yolo. If you want to implement yolo from scratch I would probably go with PyTorch it has a dynamic graph + more integration with python. Regarding speed, it's hard to say objectively which framework is faster, especially comparing with darknet, since probably nobody did a comparative analysis. The easiest solution to speed up yolo3 is obviously buying more powerful GPU :D.

Also, in my understanding what they did in yolov3 is that they intentionally sacrificed speed in order to be able to detect smaller objects, so if you don't care too much about small grouped up objects go with yolov2 it is very fast and has a pretty decent mAP.

$\endgroup$
5
  • $\begingroup$ If I go through the "native" framework which is darknet can I implement it for custom data? do you know any tutorial that I can learn who to train YOLO V3 on custom data based on the darknet framework? I am new to this stuff. $\endgroup$ – nikki2 Dec 11 '18 at 23:03
  • $\begingroup$ timebutt.github.io/static/… - how to prepare custom data. pjreddie.com/darknet/yolo - how to install and launch yolo on darknet. $\endgroup$ – Andrew Dec 11 '18 at 23:16
  • $\begingroup$ If I follow this I can implement YOLO v3? since it is YOLO V2. I need to work on yolo v3. $\endgroup$ – nikki2 Dec 11 '18 at 23:19
  • $\begingroup$ Can't guaranty you this, didn't try. But I think they didn't change the representation of the data between models. Btw, did some googling and apparently somebody has implemented yolov2 in keras, so if you will decide to implement v3 from scratch in keras here is github repo for the inspiration: github.com/experiencor/keras-yolo2 $\endgroup$ – Andrew Dec 11 '18 at 23:34
  • $\begingroup$ They are all good. But I need YOLO V3 on darknet. $\endgroup$ – nikki2 Dec 11 '18 at 23:36
1
$\begingroup$

You can find a working implementation of Yolo3 in Keras/Tensorflow here: https://github.com/qqwweee/keras-yolo3

We have been using it extensively lately and it works correctly. Evaluation speed is mostly the same as that of Darknet, probably because both implementations use libcudnn under the hood.

$\endgroup$
2
  • $\begingroup$ I heard somewhere, darknet will give you a higher speed. Is not it correct? $\endgroup$ – nikki2 Dec 12 '18 at 14:00
  • $\begingroup$ @nikki2: in our case, for evaluation, they are similar. They both evaluate our validation set in roughly the same time. Though, I suppose that there may be other variables affecting performance, as the hardware, the keras/tf/cuda versions used, etc. $\endgroup$ – salva Dec 12 '18 at 14:57
1
$\begingroup$

All answers above explain Yolo and Keras relation very well, I just want to add minor information. Yolo V3 comes in several different models. The faster the model, it has lower accuracy and the slower the model, it has better accuracy.

You can simply choose which model is the most suitable for you (trade off between accuracy and speed)

enter image description here

You can download the cfg file and the weights for each model on official website : https://pjreddie.com/darknet/yolo/ .
Or you can use AlexeyAb's repo which the most popular forked darknet version with several improvements : https://github.com/AlexeyAB/darknet

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.