DarkHelp  v1.4.31-1
C++ API for the neural network framework Darknet
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
Building DarkHelp


The Windows build uses vcpkg to install the necessary 3rd-party libraries such as OpenCV.

See the files readme_windows.txt and build_windows.cmd on GitHub for details.

The Darknet/OpenCV portion is like this:

cd c:\src
git clone https://github.com/microsoft/vcpkg
cd vcpkg
vcpkg.exe integrate install
vcpkg.exe integrate powershell
vcpkg.exe install opencv[contrib,core,dnn,ffmpeg,jpeg,png,quirc,tiff,webp]:x64-windows darknet[opencv-base]:x64-windows

Once that completes, the DarkHelp portion is like this:

cd c:\src\vcpkg
vcpkg.exe install tclap:x64-windows
cd c:\src
git clone https://github.com/stephanecharette/DarkHelp.git
cd darkhelp
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake ..
msbuild.exe /property:Platform=x64;Configuration=Release /target:Build -maxCpuCount -verbosity:normal -detailedSummary DarkHelp.sln
msbuild.exe /property:Platform=x64;Configuration=Release PACKAGE.vcxproj

Make sure you update the path to the toolchain file if you used a different directory.


Extremely simple tutorial on how to build Darknet, DarkHelp, and DarkMark:

Building both Darknet and DarkHelp should not take more than 5 minutes combined. If you have not already done so, you must first build Darknet with the flag LIBSO=1. This will ensure you build the "libdarknet.so" dynamic library.

Once Darknet has built, remember to copy the library and header file to a location where DarkHelp and other applications can find them. For example:

sudo apt-get install build-essential git libopencv-dev
cd ~/src/
git clone https://github.com/AlexeyAB/darknet.git
cd darknet
vi Makefile # to set LIBSO=1, and possibly other flags
sudo cp libdarknet.so /usr/local/lib/
sudo cp include/darknet.h /usr/local/include/
sudo ldconfig

For additional details on building Darknet, see this tutorial: https://www.ccoderun.ca/programming/2019-08-18_Installing_and_building_Darknet/.

Now that Darknet is built, download the source code to DarkHelp and build like this:

sudo apt-get install cmake build-essential libtclap-dev libmagic-dev libopencv-dev
cd ~/src/
git clone https://github.com/stephanecharette/DarkHelp.git
cd DarkHelp
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make package


If desired, the doxygen documentation can be created with "make doc".


To install DarkHelp so the API can be used within your own C++ application, run "sudo dpkg -i darkhelp-*.deb" after having run "make package".

Now from within your application, you must "#include <DarkHelp.hpp>" and link against the following:

  • libdarkhelp.so
  • libdarknet.so
  • OpenCV's libraries