SkillAgentSearch skills...

Darknet

Darknet/YOLO object detection framework

Install / Use

/learn @hank-ai/Darknet
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Table of Contents

Darknet Object Detection Framework and YOLO

darknet and hank.ai logos

Darknet is an open source neural network framework written in C, C++, and CUDA.

YOLO (You Only Look Once) is a state-of-the-art, real-time, object detection system, which runs in the Darknet framework.

Papers

General Information

The Darknet/YOLO framework continues to be both faster and more accurate than other frameworks and versions of YOLO.

This framework is both completely free and open source. You can incorporate Darknet/YOLO into existing projects and products -- including commercial ones -- without a license or paying a fee.

Darknet V3 ("Jazz") released in October 2024 can accurately run the LEGO dataset videos at up to 1000 FPS when using a NVIDIA RTX 3090 GPU, meaning each video frame is read, resized, and processed by Darknet/YOLO in 1 millisecond or less. Additional performance improvements have been implemented in Darknet V4 and the upcoming Darknet V5, without compromising the quality of detections.

Please join the Darknet/YOLO Discord server if you need help or you want to discuss Darknet/YOLO and related tools: https://discord.gg/MQw32W9Cqr

The CPU version of Darknet/YOLO can run on simple devices such as Raspberry Pi, cloud & colab servers, desktops, laptops, and high-end training rigs. The GPU version of Darknet/YOLO requires either a CUDA-capable GPU from NVIDIA, or a ROCm-capable GPU from AMD.

Darknet/YOLO is known to work on Linux, Windows, and Mac. See the building instructions below.

Darknet Version

  • The original Darknet tool written by Joseph Redmon in 2013-2017 did not have a version number. We consider this version 0.x.
  • The next popular Darknet repo maintained by Alexey Bochkovskiy between 2017-2021 also did not have a version number. We consider this version 1.x.
  • The Darknet repo sponsored by Hank.ai and maintained by Stéphane Charette starting in 2023 was the first one with a version command. From 2023 until late 2024, it returned version 2.x "OAK".
    • The goal was to try and break as little of the existing functionality while getting familiar with the codebase.
    • Re-wrote the build steps so we have 1 unified way to build using CMake on Windows, Linux, and Mac.
    • Converted the codebase to use the C++ compiler.
    • Enhanced chart.png while training.
    • Bug fixes and performance-related optimizations, mostly related to cutting down the time it takes to train a network.
    • The last branch of this codebase is version 2.1 in the v2 branch.
  • The next phase of development started in mid-2024 and was released in October 2024. The version command now returns 3.x "JAZZ".
    • Removed many old and unmaintained commands.
      • You can always do a checkout of the previous v2 branch if you need to run one of these commands. Let us know so we can investigate adding back any missing commands.
    • Many performance optimizations, both when training and during inference.
    • Legacy C API was modified; applications that use the original Darknet API will need minor modifications: https://darknetcv.ai/api/api.html
    • New Darknet V3 C and C++ API to make it easier for developers to write applications that use Darknet/YOLO: https://darknetcv.ai/api/api.html
    • New apps and sample code in src-examples: https://darknetcv.ai/api/files.html
  • The next release was in early 2025. The version command now returns 4.x "SLATE".
    • Added support for AMD GPUs using ROCm.
      • Still need to add support for MIOpen.
    • All printf() and std::cout calls have all been replaced so Darknet/YOLO logging messages can easily be redirected.
  • The next release was in August 2025. The version command now returns 5.x "Moonlit".
    • Move source code repo from github to codeberg.
    • More performance optimizations.
    • Use of OpenBLAS when building CPU-only versions of Darknet.
    • Support for Profile-Guided Optimization.
    • ONNX export functionality. [experimental]
    • JAVA language bindings. [incomplete, in-progress]
  • The most recent release is v5.1, which continues the "Moonlit" name introduced in v5.0.
    • Released in December 2025.
    • The ONNX export tool now includes the necessary nodes to export both "confs" and "boxes".
    • The mAP function was re-written.
    • Small number of new performance optimizations.

Pre-trained Weights

People are generally expected to train their own network. But pre-trained weights are also popular. These are weights which someone else has trained and made available for free on the internet. This is sometimes convenient when first installing Darknet/YOLO, since the software can be quickly tested without having to train a new neural network.

  • People-R-People Pre-trained Weights (2 classes, person and head)
  • MSCOCO Pre-trained Weights (80 classes covering a large range of objects, such as person, backpack, chair, clock, ...)
  • There are several other simple datasets and pre-trained weights available for testing Darknet/YOLO, such as LEGO Gears and Rolodex. See <a target="_blank" href="https://www.ccoderun.ca/programming/yolo_faq/#datasets">the Darknet/YOLO FAQ</a> for details.

People-R-People Pre-trained Weights

The People-R-People pre-trained weights are used to find people. This dataset only has 2 classes: person and head.

people-r-people example output

You can download these pre-trained weights directly from C Code Run's web site.

MSCOCO Pre-trained Weights

Several popular versions of YOLO were pre-trained for convenience on the MSCOCO dataset. This dataset has 80 classes, which can be seen in the text file cfg/coco.names.

The MSCOCO pre-trained weights can be downloaded from several different locations, and are also available for download from this repo:

The MSCOCO pre-trained weights are provided for demo-purpose only. The corresponding .cfg and .names files for MSCOCO are in the cfg directory. Example commands:

wget --no-clobber https://github.com/hank-ai/darknet/releases/download/v2.0/yolov4-tiny.weights
darknet_02_display_annotated_images coco.names yolov4-tiny.cfg yolov4-tiny.weights image1.jpg
darknet_03_display_videos coco.names yolov4-tiny.cfg yolov4-tiny.weights video1.avi
DarkHelp coco.names yolov4-tiny.cfg yolov4-tiny.weights image1.jpg
DarkHelp coco.names yolov4-tiny.cfg yolov4-tiny.weights video1.avi

Building

The various build methods available in the past (pre-2023) have been merged together into a single unified solution. Darknet requires C++17 or newer, OpenCV, and uses CMake to generate the necessary project files.

[!NOTE] You do not need to know CMake, C++, C, Python, or any other programmaing language to build, install, nor run Darknet/YOLO. Some advanced topics -- such as using the Darknet/YOLO API -- does require programming experience.

Select one of the following build types:

[!CAUTION] Beware if you are following old tutorials with more complicated build steps, or buil

View on GitHub
GitHub Stars787
CategoryEducation
Updated15m ago
Forks103

Languages

C++

Security Score

100/100

Audited on Apr 9, 2026

No findings