/** @page Summary Summary

@tableofcontents

@section Demo DarkMark (and DarkHelp) Demo

@htmlonly[block]
<iframe width="560" height="315" src="https://www.youtube.com/embed/w1lTCO2Kmsc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
@endhtmlonly

@li Click in the table of contents on the right or scroll down to the individual sections below for a brief explanation of each window in DarkMark.
@li For information on the open-source C++ class DarkHelp to access your Darknet neural network within a C++ application, see <a target="_blank" href="https://www.ccoderun.ca/darkhelp/api/">the DarkHelp web site</a>.

@section DarkMarkLauncher DarkMark Launcher

You first choose which project DarkMark needs to load.  This is the DarkMark Launcher window:

@image html darkmark_launcher.png

Projects are simple:  each neural network "project" is a directory.  These directories store the images, darknet configuration files, weight files, and the @p .txt files that darknet needs for labels.  Tabs at the top represent each unique project ("directory") that DarkMark knows about.

Once you select a tab and click on @p "Load...", the launcher window is hidden and the DarkMark editor window is shown instead.

@section DarkMarkImportPdfDocument DarkMark Import PDF Document

You can import PDF documents as images directly into your %DarkMark project for annotating and training.

@image html import_pdf.png

@section DarkMarkImportVideoFrames DarkMark Import Video Frames

If you have video files instead of images, you can use the import tool to extract individual video frames as images and import them into your %DarkMark project.

@image html import_video.png

The options allow you to limit the number of imported frames, resize each frame as it is extracted, and select the output image format.

@section DarkMarkEditor DarkMark Editor

The editor is the main window for the DarkMark application.  This is where you can browse through all the images located within that project and create, edit, or delete individual marks:

@image html darkmark_editor.png

You click-and-drag the mouse to create or modify marks.  Use the cursor keys, @p PGUP, @p PGDOWN, @p HOME, or @p END to change the image, the number keys to change the class of a mark, etc.  See @ref Keyboard for additional hints.  Right-mouse-click in the editor window will provide many other options.

When you quit from the DarkMark Editor window, it will bring you back to the DarkMark Launcher window.

@section DarkMarkDarknet Darknet Files

Right-mouse-click in the DarkMark Editor window to create all of the required Darknet files:

@image html darknet_options.png

This will create the following required text files which Darknet uses when training a new artificial neural network:

filename						| description
--------------------------------|------------
@p project_name.cfg				| YOLOv3 configuration file
@p project_name.data			| references the other files
@p project_name_train.txt		| list of images to use for training
@p project_name_valid.txt		| list of images to use for validation
@p project_name_train.sh		| bash script to start the darknet training
@p send_files_to_gpu_rig.sh		| use rsync to copy all of the source files to the GPU rig
@p get_results_from_gpu_rig.sh	| use rsync to copy the results back from the GPU rig

@section DarkMarkCfgTemplate Darknet Configuration Template

Choose which @p ".cfg" file DarkMark should use as a template to build the Darknet configuration.

@image html darknet_config_templates.png

@section DarkMarkSettings DarkMark Settings

Press @p "e" (see @ref Keyboard) to modify several settings:

@image html darkmark_settings.png

- Detection threshold is used to determine whether or not there is an object in the predicted bounding box.
- The hierarchical threshold is used to decide whether following the tree to a more specific class is the right action to take. When this threshold is 0, the tree will basically follow the highest probability branch all the way to a leaf node.
- Non-Maximal Suppression (NMS) suppresses overlapping bounding boxes and only retains the bounding box that has the maximum probability of object detection associated with it. It examines all bounding boxes and removes the least confident of the boxes that overlap with each other.
- The width of the @ref DarkMarkScrollField on the right side of the main window.  Set to @p 0 to hide the scrolling field.

@section DarkMarkReview DarkMark Review

Right-mouse-click in the DarkMark Editor window to easily review all the image markup:

@image html darkmark_review.png

This will help ensure your network is trained correctly.  Quickly scroll through all of the similar images from the same class to ensure a mark hasn't been labelled incorrectly.  Double-click on that row to immediately open that image in the DarkMark Editor window.

@section DarkMarkRotation DarkMark Image Rotation

Easily rotate both images and annotations 90°, 180°, and 270°.

@image html image_rotation.png

@section DarkMarkFlip DarkMark Image Flip

Easily flip images horizontally or vertically.

@image html image_flip.png

@section DarkMarkStatistics DarkMark Statistics

Right-mouse-click in the DarkMark Editor window to view statistics on all the marks:

@image html darkmark_statistics.png

This can help identify which classes need better representation, or if any marks have been incorrectly set on unusually small or unusually large images.  Double-click on the @p "min size" or @p "max size" cell to immediately open that image in the @ref DarkMarkEditor window.

@section DarkMarkScrollField DarkMark Scroll Field

The scroll field on the right side of the main window shows which images have been marked up.  You can click, drag, or use the mouse wheel to move to a different image.

@image html darkmark_scrollfield.png

Use @ref DarkMarkSettings to hide the scrollfield (set the width to 0px) or set an explicit width.

@section DarkMarkJump DarkMark Jump

The jump window is used to quickly switch between images.  When the images are sorted alphabetically and broken up into different sets (different subdirectories), the jump window will draw a vertical line between each set:

@image html darkmark_jump.png

In this example, there are 6 different image data sets in the project, represented by the 6 sections along the horizontal axis:

@image html darkmark_jump_annotated.png

The images from the first five data sets have all been marked and are shown with a green outline.  The last data set is incomplete, with approximately 50% of the images having been marked, which is why a horizontal line is shown partway through the set.

----

This video briefly shows how to use DarkMark:

@htmlonly[block]
<iframe width="560" height="315" src="https://www.youtube.com/embed/GK1QhOMI7O0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
@endhtmlonly


*/
