Marking up images for use with Darknet.

Overview

What is DarkMark?

DarkMark and DarkHelp demo

DarkMark is a C++ GUI tool used to annotate images for use in neural networks. It was written specifically to be used with the Darknet neural network framework, and has several features tailored for use with Darknet and YOLO.

DarkMark editor window with annotated image of a dog

When you first launch DarkMark, you can specify a Darknet-style neural network to load with the selected project. DarkMark uses that neural network to assist you in marking up more images.

DarkMark launcher

Several different review capabilities exist to quickly review all the annotations and highlight some common errors.

DarkMark review window

Once ready, DarkMark can also be used to generate all of the Darknet and YOLO (or other) configuration files to train a new neural network. This includes the modifications needed to the .cfg file, as well as the .data, training and validation .txt files. DarkMark will also create some shell scripts to start the training and copy the necessary files between computers.

Darknet configuration

License

DarkMark is open source and published using the GNU GPL v3 license. See license.txt for details.

How to Build DarkMark

DarkMark requires DarkHelp to build. (And DarkHelp requires Darknet.) So before you start building DarkMark, make sure you follow the build instructions for DarkHelp.

Once Darknet and DarkHelp have been built and installed, run the following commands to build DarkMark on Ubuntu:

sudo apt-get install build-essential cmake libopencv-dev libx11-dev libfreetype6-dev libxrandr-dev libxinerama-dev libxcursor-dev libmagic-dev
cd ~/src
git clone https://github.com/stephanecharette/DarkMark.git
cd DarkMark
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make package
sudo dpkg -i darkmark*.deb

Doxygen Output

The official DarkMark documentation and web site is at https://www.ccoderun.ca/darkmark/.

Some links to specific useful pages:

Issues
  • Create project from CLI in remote desktop

    Create project from CLI in remote desktop

    Hello Stephane, Congratulations for the great package you created. I wanted to ask if it will be possible to create a project and perform data augmentation from the CLI? As I am trying to run DarkMark in a remote machine, but as you mentioned earlier the GUI will not work in a remote desktop.

    Thanks!

    opened by ElHouas 17
  • make failed

    make failed

    After following these steps: sudo apt-get install build-essential cmake libopencv-dev libx11-dev libfreetype6-dev libxrandr-dev libxinerama-dev libxcursor-dev libmagic-dev cd ~/src git clone https://github.com/stephanecharette/DarkMark.git cd DarkMark mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make

    I get the following error: src-launcher/CMakeFiles/dm_launcher.dir/build.make:107: recipe for target 'src-launcher/CMakeFiles/dm_launcher.dir/VideoImportWindow.cpp.o' failed make[2]: *** [src-launcher/CMakeFiles/dm_launcher.dir/VideoImportWindow.cpp.o] Error 1 CMakeFiles/Makefile2:388: recipe for target 'src-launcher/CMakeFiles/dm_launcher.dir/all' failed make[1]: *** [src-launcher/CMakeFiles/dm_launcher.dir/all] Error 2 Makefile:170: recipe for target 'all' failed make: *** [all] Error 2 [email protected]:~/DarkMark/build$

    Any ideas what's goign on here?

    opened by robotwhispering 16
  • "Segmentation fault" when DMContentImportTxt::run() called

    Hi,

    I tried the last version of DarkMark, and i ran into "Segmentation Fault" when I tried to create json files from txt file for my data. I quickfixed it with disabling the calls to resized() and rebuild_image_and_repaint() functions inside content.load_image(idx) when called from DMContentImportTxt::run(), but I think there might be a better solution.

    Regards, Vincent

    opened by vledoze 13
  • NMS not working

    NMS not working

    I am using a network to generate more marks. NMS, hierarchy thresh are at 0.5. As the image shows its not working. It works fine if I generate the marks with darknet directly. I am on DarkMark 1.4.7 image

    opened by ohlr 10
  • Error reading video file

    Error reading video file

    Good day! I'm starting DarkMark by terminal. DarkMark 2021-05-29 21:08:10 starting DarkMark v1.5.11-1 2021-05-29 21:08:10 configuration file used: /home/archi/.DarkMark/DarkMark.cfg 2021-05-29 21:08:10 project key 1330964892, timestamp=1622300548 2021-05-29 21:08:10 finding all images and markup files in /home/archi/Videos/darkmark 2021-05-29 21:08:10 /home/archi/Videos/darkmark: number of .weights files to skip: 0 2021-05-29 21:08:18 video import mime type: video/mp4 /home/archi/Videos/video.mp4 <- This step i try to import video 2021-05-29 21:08:27 shutting down DarkMark v1.5.11-1

    image

    I installed DarkMar by video https://www.youtube.com/watch?v=pJ2iyf_E9PM&t=731s&ab_channel=StephaneCharette Without errors

    opened by lobart 6
  • Error in build

    Error in build

    I'm installing darkmark and this appears: I'm on Ubuntu 21.10 VM

    [ 14%] Building CXX object src-juce/CMakeFiles/dm_juce.dir/__/JuceLibraryCode/include_juce_gui_extra.cpp.o [ 17%] Linking CXX static library libdm_juce.a [ 17%] Built target dm_juce Scanning dependencies of target dm_tools [ 19%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/AboutWnd.cpp.o [ 21%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/Bitmaps.cpp.o [ 23%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/Cfg.cpp.o [ 25%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/CrosshairComponent.cpp.o [ 27%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/Log.cpp.o [ 29%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/Mark.cpp.o /home/user/src/DarkMark/src-tools/Mark.cpp: In member function ‘dm::Mark& dm::Mark::rebalance()’: /home/user/src/DarkMark/src-tools/Mark.cpp:296:25: error: loop variable ‘iter’ creates a copy from type ‘const std::pair<const dm::ECorner, cv::Point_ >’ [-Werror=range-loop-construct] 296 | for (const auto iter : bounding_rect_points) /home/user/src/DarkMark/src-tools/Mark.cpp:296:25: note: use reference type to prevent copying 296 | for (const auto iter : bounding_rect_points) cc1plus: all warnings being treated as errors make[2]: *** [src-tools/CMakeFiles/dm_tools.dir/build.make:147: src-tools/CMakeFiles/dm_tools.dir/Mark.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:308: src-tools/CMakeFiles/dm_tools.dir/all] Error 2 make: *** [Makefile:171: all] Error 2

    opened by Fackym 4
  • Automatically accept all darknet predictions?

    Automatically accept all darknet predictions?

    I see there is a keyboard shortcut to accept all predictions within an image, however I do not see a way to accept all predictions for a project? I have trained an initial model off of a couple hundred images, and would then like to apply that to several thousand images. Afterwards I would then go through and verify the tags are correct, but automatically tagging each frame seems like it would save quite a bit of time. Considered this feature?

    This is amazing software by the way! Works well over ssh -X, too

    opened by bcherb2 4
  • Set Darknet directory

    Set Darknet directory

    Hi @stephanecharette , I am noob in this. I am using Darkmark to increase my dataset through trained darknet model. error: The specified darknet directory is not valid. I am getting this error while exporting the annotation. Although you explained in video that the path needs to be changed. What exactly needs to be changed?

    I am using debian machine ubuntu 18.04 lts as host. Path to Ubuntu subdirectory: Host /data/Ubuntu 20.04.vdi ; VM /home/user/darknet

    Thank you in advance.

    opened by shikhab25 3
  • Warning from Scrollfield

    Warning from Scrollfield

    Hi,

    I got this kind of warning when running DarkMark on my data:

    ScrollField: error detected at idx #202 (.../IMG_20200708_0938010.jpg): vector::_M_range_check: __n (which is 39) >= this->size() (which is 25)
    

    I found a quickfix for this in src-wnd/ScrollField.cpp, line 169.
    I replaced

    cv::line(field, p1, p2, content.annotation_colours.at(class_idx), 1, cv::LINE_4);
    

    with

    cv::line(field, p1, p2, content.annotation_colours.at(class_idx%25), 1, cv::LINE_4);
    

    but there might be a better solution.

    Regards, Vincent

    opened by vledoze 3
  • Install Problem

    Install Problem

    [email protected]:~/src/DarkMark/build$ cmake -DCMAKE_BUILD_TYPE=Release .. -- The C compiler identification is GNU 11.2.0 -- The CXX compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done Building ver: 1.6.28-1 -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE
    -- Found OpenCV: /usr (found version "4.5.4") -- Found X11: /usr/include
    -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.11.1") -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: POPPLERCPP linked by target "DarkMark" in directory /home/kaushik/src/DarkMark/src-main

    -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.


    Looks like the POPPLERCPP file is missing in the src-main folder, or may be I am doing something wrong.

    I am also using a VM like in your video with Ubuntu 22.04

    Thank you.

    opened by kaushikray1 2
  • Keyboard Shortcut Question

    Keyboard Shortcut Question

    Hello,

    I didn't see this in any of the documentation, but I thought I would ask, is there a keyboard shortcut to adjust the corners of an annotation? Or is click and drag the only way to adjust them? I want to use 'z' to quickly go through my annotations and adjust them as necessary with a keyboard shortcut instead of the mouse.

    Thank you, Nick

    opened by nikoliano 2
  • Filter option

    Filter option

    It would be amazing to have a filter function. I.e. to be able to filter for images which contain specific classes in the overview. Also right clicking on an image and getting an option to open the containing folder would be great.

    opened by ohlr 0
  • Darkmark - Error-

    Darkmark - Error-

    I'm installing darkmark I'm on Ubuntu 18.04 I do not understand what the problem is I tried installing darkmark into two different computers it gave me the same Error

    [ 43%] Building CXX object src-launcher/CMakeFiles/dm_launcher.dir/PdfImportWindow.cpp.o [ 45%] Building CXX object src-darkmark/CMakeFiles/dm_darkmark.dir/DMContentImageFilenameSort.cpp.o [ 47%] Building CXX object src-juce/CMakeFiles/dm_juce.dir/__/JuceLibraryCode/include_juce_graphics.cpp.o /home/torres/src/DarkMark/src-launcher/PdfImportWindow.cpp: In member function ‘virtual void dm::PdfImportWindow::run()’: /home/torres/src/DarkMark/src-launcher/PdfImportWindow.cpp:367:14: error: ‘class poppler::page_renderer’ has no member named ‘set_image_format’ renderer.set_image_format(poppler::image::format_enum::format_bgr24); ^~~~~~~~~~~~~~~~ /home/torres/src/DarkMark/src-launcher/PdfImportWindow.cpp:367:60: error: ‘format_bgr24’ is not a member of ‘poppler::image::format_enum’ renderer.set_image_format(poppler::image::format_enum::format_bgr24); ^~~~~~~~~~~~ /home/torres/src/DarkMark/src-launcher/PdfImportWindow.cpp:368:14: error: ‘class poppler::page_renderer’ has no member named ‘set_line_mode’ renderer.set_line_mode(poppler::page_renderer::line_mode_enum::line_default); // is the default the same as "none"? ^~~~~~~~~~~~~ /home/torres/src/DarkMark/src-launcher/PdfImportWindow.cpp:368:52: error: ‘poppler::page_renderer::line_mode_enum’ has not been declared renderer.set_line_mode(poppler::page_renderer::line_mode_enum::line_default); // is the default the same as "none"? ^~~~~~~~~~~~~~ [ 50%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/ProjectInfo.cpp.o src-launcher/CMakeFiles/dm_launcher.dir/build.make:62: recipe for target 'src-launcher/CMakeFiles/dm_launcher.dir/PdfImportWindow.cpp.o' failed make[2]: *** [src-launcher/CMakeFiles/dm_launcher.dir/PdfImportWindow.cpp.o] Error 1 CMakeFiles/Makefile2:305: recipe for target 'src-launcher/CMakeFiles/dm_launcher.dir/all' failed make[1]: *** [src-launcher/CMakeFiles/dm_launcher.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 52%] Building CXX object src-tools/CMakeFiles/dm_tools.dir/Text.cpp.o

    opened by githubTorres 3
  • Deleting a class

    Deleting a class

    Is there a preferred way to delete a class from a dataset?

    I wrote a quick python script to change all the *.txt file class numbers, as well as obj.name, but this seems to often cause conflicts with the JSON's that Darkmark uses. I've tried deleting all the JSON's and regenerating, but that caused even more mislabeling than before. There has to be an easier way, what is your workflow like to achieve this?

    opened by bcherb2 1
  • segmentation fault when using

    segmentation fault when using "flip" or "rotate"

    In release builds, when using the "flip" or "rotate" functionality on a dataset that contains very large images, DarkMark may segfault. Stack trace looks like this:

    2021-10-21 09:10:35 aborting due to signal: "Segmentation fault" [signal #11]
    2021-10-21 09:10:35 aborting due to signal: "Segmentation fault" [signal #11]
    2021-10-21 09:10:35 backtrace #0: ./DarkMark: get_backtrace[abi:cxx11]() +0x57 [0x55ec0d199ec7]
    2021-10-21 09:10:35 backtrace #1: ./DarkMark: dm::DarkMarkApplication::signal_handler(int) +0x18b [0x55ec0d19afdb]
    2021-10-21 09:10:35 backtrace #2: /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f504be5e210]
    2021-10-21 09:10:35 backtrace #3: /lib/x86_64-linux-gnu/libopencv_imgproc.so.4.2(+0x27113c) [0x7f504c97913c]
    2021-10-21 09:10:35 backtrace #4: /lib/x86_64-linux-gnu/libopencv_core.so.4.2(+0x2110e8) [0x7f504c5690e8]
    2021-10-21 09:10:35 backtrace #5: /lib/x86_64-linux-gnu/libtbb.so.2(+0x2c545) [0x7f504809c545]
    2021-10-21 09:10:35 backtrace #6: /lib/x86_64-linux-gnu/libtbb.so.2(+0x2c80f) [0x7f504809c80f]
    2021-10-21 09:10:35 backtrace #7: /lib/x86_64-linux-gnu/libtbb.so.2(+0x25bd7) [0x7f5048095bd7]
    2021-10-21 09:10:35 backtrace #8: /lib/x86_64-linux-gnu/libtbb.so.2(+0x24498) [0x7f5048094498]
    2021-10-21 09:10:35 backtrace #9: /lib/x86_64-linux-gnu/libtbb.so.2(+0x20880) [0x7f5048090880]
    2021-10-21 09:10:35 backtrace #10: /lib/x86_64-linux-gnu/libtbb.so.2(+0x20a8d) [0x7f5048090a8d]
    2021-10-21 09:10:35 backtrace #11: /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7f504d0bb609]
    2021-10-21 09:10:35 backtrace #12: /lib/x86_64-linux-gnu/libc.so.6: clone +0x43 [0x7f504bf3a293]
    fish: “./DarkMark” terminated by signal SIGABRT (Abort)
    

    Note that this does not happen when you set the build type to "Debug". It only seems to happen with "Release" and "RelWithDebInfo".

    opened by stephanecharette 0
  • Auto show darknet predictions slow

    Auto show darknet predictions slow

    I think the feature auto show darknet predictions only should evoke darknet if there are no marks already.

    Going through already marked up images with auto show on is significantly slower then having never show enabled.

    Thus I assume darknet gets invoked in the background for no reason.

    opened by ohlr 1
Owner
Stéphane Charette
C/C++ developer. Mostly linux-based. IoT, desktop, and embedded device. Computer vision, neural networks, Ubuntu geek.
Stéphane Charette
License plate parsing using Darknet and YOLO

DarkPlate Note that DarkPlate by itself is not a complete software project. The intended purpose was to create a simple project showing how to use Dar

Stéphane Charette 27 Apr 11, 2022
DarkHelp - C++ wrapper library for Darknet

What is the DarkHelp C++ API? The DarkHelp C++ API is a wrapper to make it easier to use the Darknet neural network framework within a C++ application

Stéphane Charette 73 Jul 22, 2022
UAV images dataset for moving object detection

PESMOD PESMOD (PExels Small Moving Object Detection) dataset consists of high resolution aerial images in which moving objects are labelled manually.

İbrahim Delibaşoğlu 32 Jul 23, 2022
A lightweight version of OrcVIO that uses monocular images, inertial data, as well as bounding box measurements

OrcVIO-Lite About Object residual constrained Visual-Inertial Odometry (OrcVIO) is a visual-inertial odometry pipeline, which is tightly coupled with

Sean 22 Jun 30, 2022
Android example to get the rgb and disparity images from the OAK-D device connected to a phone.

depthai-android-jni-example (WIP) Android example to get the rgb and disparity images from the OAK-D device connected to a phone. DepthaiAndroidFast.m

Ibai Gorordo 27 Jun 3, 2022
High dynamic range (HDR) image comparison tool for graphics people. With an emphasis on OpenEXR images.

tev — The EXR Viewer A high dynamic range (HDR) image comparison tool for graphics people. tev allows viewing images through various tonemapping opera

Thomas Müller 664 Aug 4, 2022
Dense Depth Estimation from Multiple 360-degree Images Using Virtual Depth

Dense Depth Estimation from Multiple 360-degree Images Using Virtual Depth [Project] [Paper] [arXiv] This is the official code of our APIN 2022 paper

null 6 Jun 11, 2022
cudnn_frontend provides a c++ wrapper for the cudnn backend API and samples on how to use it

cuDNN Frontend API Introduction The cuDNN Frontend API is a C++ header-only library that demonstrates how to use the cuDNN C backend API. The cuDNN C

NVIDIA Corporation 105 Jul 25, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Aug 1, 2022
In this tutorial, we will use machine learning to build a gesture recognition system that runs on a tiny microcontroller, the RP2040.

Pico-Motion-Recognition This Repository has the code used on the 2 parts tutorial TinyML - Motion Recognition Using Raspberry Pi Pico The first part i

Marcelo Rovai 16 Jun 18, 2022
deploy yolox algorithm use deepstream

YOLOX(Megvii-BaseDetection) Deploy DeepStream ?? ?? This project base on https://github.com/Megvii-BaseDetection/YOLOX and https://zhuanlan.zhihu.com/

null 75 Jul 14, 2022
A easy-to-use image processing library accelerated with CUDA on GPU.

gpucv Have you used OpenCV on your CPU, and wanted to run it on GPU. Did you try installing OpenCV and get frustrated with its installation. Fret not

shrikumaran pb 4 Aug 14, 2021
Gstreamer plugin that allows use of NVIDIA Maxine SDK in a generic pipeline.

GST-NVMAXINE Gstreamer plugin that allows use of NVIDIA MaxineTM sdk in a generic pipeline. This plugin is intended for use with NVIDIA hardware. Visi

Alex Pitrolo 14 May 11, 2022
A project demonstration on how to use the GigE camera to do the DeepStream Yolo3 object detection

A project demonstration on how to use the GigE camera to do the DeepStream Yolo3 object detection, how to set up the GigE camera, and deployment for the DeepStream apps.

NVIDIA AI IOT 7 May 27, 2022
International Business Machines 9 Jul 21, 2022
A library for creating Artificial Neural Networks, for use in Machine Learning and Deep Learning algorithms.

iNeural A library for creating Artificial Neural Networks, for use in Machine Learning and Deep Learning algorithms. What is a Neural Network? Work on

Fatih Küçükkarakurt 5 Apr 5, 2022
copc-lib provides an easy-to-use interface for reading and creating Cloud Optimized Point Clouds

copc-lib copc-lib is a library which provides an easy-to-use reader and writer interface for COPC point clouds. This project provides a complete inter

Rock Robotic 18 Jun 15, 2022
Blend between two non-concentric non-circular cones for use in a Pose Space system

BlurRelax Why does maya not have a smooth or relax deformer? They've got brushes, sure, but no deformers. This one is pretty fast. I've got it working

Tyler Fox 2 Dec 27, 2021