DarkHelp  v1.9.7-1
C++ API for the neural network framework Darknet
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DarkHelp Camera

The DarkHelp Camera is a command-line tool that loads a neural network and applies it to every frame read from a webcam. The output is then shown on the screen and saved to disk as a video.

Similar functionality is available in the example applications. See the code in process_video_webcam.cpp and save_webcam_to_video.cpp. But the DarkHelp Cam tool contains many additional and advanced features, such as tiling, snapping, threshold, and font settings. It is meant to be a useful command-line tool, while the code in the src-apps directory is meant to be example source code.

To get a full list of parameters with a brief explanation of each one, run "DarkHelp_cam --help". Most of the parameters are very similar to the DarkHelp CLI.

Here is an example showing how the DarkHelp_cam tool can be used to load the MSCOCO pre-trained weights:

DarkHelp_cam \
--camera 2 \
--autohide off \
--duration off \
--redirection on \
--threshold 0.25 \
--size 800x600 \
--fps 30 \
--pixelate on \
mscoco.names \
mscoco-yolov4-tiny.cfg \
mscoco-yolov4-tiny.weights

This opens the /dev/video2 device, configures the webcam to use 800x600 @ 30 FPS, uses a Darknet threshold of 0.25, and pixelates all of the detected objects. With those example parameters, the .mp4 video that is generated as output might look similar to this frame:

To test the DarkHelp_cam command, you'll need some neural network files – the .cfg, .names, and .weights files.

Note
If you've not yet trained a custom network, you can download the MSCOCO pre-trained weights from the repo: https://github.com/hank-ai/darknet#mscoco-pre-trained-weights