14
$\begingroup$

what is darknet and why is it needed for YOLO object detection ? I read that its a neural network written in C , but why is it needed for YOLO object detection when we have lot of machine learning framework,api like tensorflow,keras,pytorch .

Im trying to train yolo from git code and i could see they are using tensorflow/keras as well but not sure why darkenet is used initially for traning yolo .

darknet/yolo algorithm

$\endgroup$

3 Answers 3

4
$\begingroup$

https://pjreddie.com/darknet/ is their website...

I cite :

"Darknet: Open Source Neural Networks in C

Darknet is an open source neural network framework written in C and CUDA. It is fast, easy to install, and supports CPU and GPU computation."

As to why they used that, well it's open source and in C, which are good points and seems to be performant (see the graphs in your link and associated paper). But the main point seems to be about history. The darknet project seems to have started in 2014. Were tensorflow / keras available and perfromant at this time in the first place ? Even if they were why should they use keras / tensorflow ?

$\endgroup$
2
  • $\begingroup$ Can I fine-tune YOLOv4 using the darknet framework or I have to do it using PyTorch/Tensorflow, please? $\endgroup$
    – Avv
    Commented Jan 11, 2023 at 15:01
  • $\begingroup$ I see Yolov3 and Yolov4 models use darknet directly. My question is how Yolo adds on top of darknet in these usages? $\endgroup$ Commented Feb 13, 2023 at 23:40
2
$\begingroup$

Darknet is mainly for Object Detection, and have different architecture, features than other deep learning frameworks. It is faster than many other NN architectures and approaches like FasterRCNN etc. You have to be in C if you need speed, and most of the deep nn frameworks are written in c. I would say Tensorflow has a broader scope, but Darknet architecture & YOLO is a specialized framework, and they are on top of their game in speed and accuracy. YOLO can run on CPU but you get 500 times more speed on GPU as it leverages CUDA and cuDNN.

$\endgroup$
1
$\begingroup$

This deep learning framework is written itself in C but once you train the network you do not need Darknet itself for the inference. OpenCV has built in support for Darknet formats so both model and trained weights are directly usable anywhere where OpenCV is in use, also from Python (see here).

The positive side of this network, there is somewhat normal documentation on how to train the own data set and how to run the inference on the own input. Other popular frameworks are sometimes so heavily "optimized" for training and validation against various existing data sets that it gets surprisingly difficult to break out of this golden cage and build a usable product.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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