Gatling
What is Gatling?
Gatling is a powerful open-source load testing tool designed for performance and reliability. It offers a comprehensive solution for simulating real user behavior and measuring the performance of your applications under stress.
Motivation
Gatling empowers you to:
1. Understand your application's limits: Identify bottlenecks and performance issues before they impact your users.
2. Improve user experience: Ensure your application can handle peak traffic and deliver smooth performance for all users.
3. Gain valuable insights: Analyze test results to optimize your application's performance, scalability, and reliability.
Questions, Help?
For help and support, you can:
1. Consult the official documentation: Explore detailed tutorials, guides, and API references.
2. Join the Gatling Community Forum: Connect with other users, share experiences, and seek advice.
3. Report issues: If you encounter a bug, raise an issue on the official Gatling GitHub repository.
Partners
Gatling collaborates with various partners to provide comprehensive load testing solutions. Explore the partner ecosystem for specialized integrations and support services.
Darknet Object Detection Framework and YOLO
Darknet is an open-source neural network framework written in C, C++, and CUDA, renowned for its speed and efficiency.
YOLO (You Only Look Once) is a state-of-the-art real-time object detection system that seamlessly integrates with the Darknet framework.
Explore the Darknet/YOLO Ecosystem:
1. Hank.ai's contribution: Discover how Hank.ai is actively contributing to the Darknet/YOLO community.
2. Official website: Access the latest information, resources, and news on the Darknet/YOLO website.
3. Comprehensive FAQ: Find answers to frequently asked questions about Darknet/YOLO.
4. Join the Discord server: Connect with other Darknet/YOLO enthusiasts, discuss ideas, and get support.
Papers
1. YOLOv7: Explore the latest advancements in YOLOv7.
2. Scaled-YOLOv4: Dive into the Scaled-YOLOv4 architecture and its performance enhancements.
3. YOLOv4: Understand the key features and innovations of YOLOv4.
4. YOLOv3: Learn about the origins of YOLO and the foundational principles of YOLOv3.
General Information
The Darknet/YOLO framework consistently outperforms other frameworks and YOLO versions in terms of both speed and accuracy.
It's entirely free and open-source, allowing you to integrate it into your projects and products without licensing restrictions.
Darknet V3 "Jazz," released in October 2024, achieves remarkable performance, processing LEGO dataset videos at up to 1000 FPS using an NVIDIA RTX 3090 GPU.
Darknet Version
1. Version 0.x: The original Darknet tool developed by Joseph Redmon from 2013-2017.
2. Version 1.x: The popular Darknet repository maintained by Alexey Bochkovskiy between 2017-2021.
3. Version 2.x "OAK": The Darknet repository sponsored by Hank.ai and maintained by Stéphane Charette starting in 2023. It introduced version numbering and brought significant enhancements, including:
- Unified build process using CMake for Windows and Linux.
- Codebase conversion to C++ compiler.
- Improved chart.png visualization during training.
- Bug fixes and performance optimizations.
4. Version 2.1: The last branch of version 2.x, available in the v2 branch.
5. Version 3.x "JAZZ": The latest version released in October 2024, featuring:
- Removed legacy and unmaintained commands.
- Extensive performance optimizations for both training and inference.
- Modified Legacy C API.
- New Darknet V3 C and C++ API.
- Expanded sample code and applications in src-examples.
MSCOCO Pre-trained Weights
Several popular YOLO versions are pre-trained on the MSCOCO dataset, providing 80 object classes listed in the cfg/coco.names file.
Other datasets and pre-trained weights are available for testing, including:
LEGO Gears
Rolodex
Download the MSCOCO pre-trained weights from various locations, including this repository:
| Version | Tiny | Full |
|---|---|---|
| YOLOv2 (November 2016) | yolov2-tiny.weights | yolov2-full.weights |
| YOLOv3 (May 2018) | yolov3-tiny.weights | yolov3-full.weights |
| YOLOv4 (May 2020) | yolov4-tiny.weights | yolov4-full.weights |
| YOLOv7 (August 2022) | yolov7-tiny.weights | yolov7-full.weights |
Examples using MSCOCO pre-trained weights:
wget --no-clobber https://github.com/hank-ai/darknet/releases/download/v2.0/yolov4-tiny.weights darknet02displayannotatedimages coco.names yolov4-tiny.cfg yolov4-tiny.weights image1.jpg
darknet03display_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
Remember that users are encouraged to train their own networks, and MSCOCO is primarily for testing.
Building
Darknet requires C++17 or newer, OpenCV, and uses CMake for build automation.
Important Note: These instructions are updated for building Darknet after August 2023. If you encounter issues following older tutorials, refer to this README for the latest build steps.
Google Colab
Follow the Linux instructions below. Explore Jupyter notebooks in the colab subdirectory for specific tasks like training.
Linux CMake Method
1. Install necessary dependencies:
- sudo apt-get install build-essential git libopencv-dev cmake
2. Clone the Darknet repository:
- mkdir ~/srccd ~/src git clone https://github.com/hank-ai/darknet
3. Create a build directory:
- cd darknet mkdir buildcd build
4. Configure and build Darknet:
- cmake -DCMAKEBUILDTYPE=Release ..
- make -j4 package
5. Install the .deb package:
- sudo dpkg -i darknet-VERSION.deb
6. Verify installation:
- darknet version
Optional: Install CUDA or CUDA+cuDNN for GPU acceleration:
1. Download and install CUDA:
- https://developer.nvidia.com/cuda-downloads
2. Download and install cuDNN:
- https://developer.nvidia.com/rdp/cudnn-download
- https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#cudnn-package-manager-installation-overview
3. Verify CUDA installation:
- nvcc
- nvidia-smi
4. Re-build Darknet:
- cmake -DCMAKEBUILDTYPE=Release ..
- make -j4 package
5. Install the updated .deb package:
- sudo dpkg -i darknet-VERSION.deb
Windows CMake Method
1. Install necessary dependencies:
- winget install Git.Git
- winget install Kitware.CMake
- winget install nsis.nsis
- winget install Microsoft.VisualStudio.2022.Community
2. Modify Visual Studio installation:
- Open "Visual Studio Installer."
- Select "Modify."
- Choose "Desktop Development With C++."
- Click "Modify" and "Yes."
3. Install Microsoft VCPKG:
- Open Developer Command Prompt for VS 2022 (not PowerShell).
- cd c:mkdir c:srccd c:src git clone https://github.com/microsoft/vcpkgcd vcpkg bootstrap-vcpkg.bat .vcpkg.exe integrate install .vcpkg.exe integrate powershell.vcpkg.exe install opencv[contrib,dnn,freetype,jpeg,openmp,png,webp,world]:x64-windows
4. Clone the Darknet repository:
- cd c:src git clone https://github.com/hank-ai/darknet.gitcd darknet
5. Create a build directory:
- mkdir buildcd build
6. Configure and build Darknet:
- cmake -DCMAKEBUILDTYPE=Release -DCMAKETOOLCHAINFILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake ..
- msbuild.exe /property:Platform=x64;Configuration=Release /target:Build -maxCpuCount -verbosity:normal -detailedSummary darknet.sln
- msbuild.exe /property:Platform=x64;Configuration=Release PACKAGE.vcxproj
7. Copy CUDA DLLs if needed:
- If you encounter missing CUDA DLL errors, copy them to the output directory:
- copy "C:Program FilesNVIDIA GPU Computing ToolkitCUDAv12.2bin*.dll" src-cliRelease
8. Re-run msbuild to generate the NSIS installation package:
- msbuild.exe /property:Platform=x64;Configuration=Release PACKAGE.vcxproj
9. Run the NSIS installation wizard:
- darknet-VERSION.exe
10. Verify installation:
- C:Program FilesDarknetbindarknet.exe version
Optional: Install CUDA or CUDA+cuDNN for GPU acceleration:
1. Download and install CUDA:
- https://developer.nvidia.com/cuda-downloads
2. Download and install cuDNN:
- https://developer.nvidia.com/rdp/cudnn-download
- https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#download-windows
3. Unzip cuDNN and copy directories:
- C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/[version]
4. Re-build Darknet:
- Repeat steps 6-8 after installing CUDA.
Using Darknet
CLI
Commands:
darknet help
darknet version
Image Prediction:
V2: darknet detector test cars.data cars.cfg cars_best.weights image1.jpg
V3: darknet02displayannotatedimages cars.cfg image1.jpg
DarkHelp: DarkHelp cars.cfg cars.cfg cars_best.weights image1.jpg
Output Coordinates:
V2: darknet detector test animals.data animals.cfg animalsbest.weights -extoutput dog.jpg
V3: darknet01inference_images animals dog.jpg
DarkHelp: DarkHelp --json animals.cfg animals.names animals_best.weights dog.jpg
Video Processing:
V2: darknet detector demo animals.data animals.cfg animalsbest.weights -extoutput test.mp4
V3: darknet03display_videos animals.cfg test.mp4
DarkHelp: DarkHelp animals.cfg animals.names animals_best.weights test.mp4
Webcam:
V2: darknet detector demo animals.data animals.cfg animals_best.weights -c 0
V3: darknet08display_webcam animals
Saving Results to Video:
V2: darknet detector demo animals.data animals.cfg animalsbest.weights test.mp4 -outfilename res.avi
V3: darknet05processvideosmultithreaded animals.cfg animals.names animals_best.weights test.mp4
DarkHelp: DarkHelp animals.cfg animals.names animals_best.weights test.mp4
JSON Output:
V2: darknet detector demo animals.data animals.cfg animalsbest.weights test50.mp4 -jsonport 8070 -mjpegport 8090 -extoutput
V3: darknet06imagestojson animals image1.jpg
DarkHelp: DarkHelp --json animals.names animals.cfg animals_best.weights image1.jpg
Specific GPU:
V2: darknet detector demo animals.data animals.cfg animals_best.weights -i 1 test.mp4
Accuracy:
darknet detector map driving.data driving.cfg driving_best.weights ...
darknet detector map animals.data animals.cfg animalsbest.weights -iouthresh 0.75
Anchors:
darknet detector calcanchors animals.data -numof_clusters 6 -width 320 -height 256
Training
DarkMark: Utilize DarkMark for annotation and training. It's the recommended approach for training new neural networks.
Manual Setup:
1. Create a project directory: For example, ~/nn/animals/.
2. Copy a configuration file: cfg/yolov4-tiny.cfg
3. Create a animals.names file: List classes (one per line) like:
- dog
- cat
- bird
- horse
4. Create a animals.data file:
- classes = 4
- train = /home/username/nn/animals/animals_train.txt
- valid = /home/username/nn/animals/animals_valid.txt
- names = /home/username/nn/animals/animals.names
- backup = /home/username/nn/animals
5. Create a dataset folder: Store images and corresponding annotation files (.txt) in YOLO format.
6. Create animalstrain.txt and animalsvalid.txt: List images for training and validation.
7. Modify animals.cfg:
- batch = 64
- subdivisions = 1
- max_batches = 8000 (4 classes * 2000)
- steps = 6400,7200
- width = ...
- height = ...
- classes = 4
- Update filters values (e.g., (4 + 5) * 3 = 27).
8. Start training: cd ~/nn/animals/ darknet detector -map -dont_show train animals.data animals.cfg
Training Parameters:
--verbose for detailed output
Other Tools and Links
DarkMark: Project management, image annotation, and file generation for Darknet.
DarkHelp: Alternative CLI, image tiling, object tracking, and robust C++ API.
Darknet/YOLO FAQ: Extensive resource for common questions.
Stéphane's YouTube channel: Tutorials and example videos.
Darknet/YOLO Discord server: Community support and discussions.
Roadmap
Completed:
std::sort() for qsort() during training
Removal of check_mistakes, getchar(), and system()
C++ compiler support (g++ on Linux, VisualStudio on Windows)
Windows build fix
Python support fix
Darknet library build
Labels on predictions ("alphabet" code)
CUDA/GPU code re-enable
CUDNN re-enable
CUDNN half re-enable
Non-hardcoded CUDA architecture
Improved CUDA version information
AVX re-enable
Removal of old solutions and Makefile
OpenCV as a non-optional dependency
Removal of old pthread library dependency
Removal of STB
CMakeLists.txt rewrite for new CUDA detection
Removal of "alphabet" code and data/labels images
Out-of-source build
Enhanced version number output
Performance optimizations for training and inference
Pass-by-reference where possible
Cleaned .hpp files
Rewritten darknet.h
cv::Mat usage instead of void* casting
Fixes to internal image structure usage
Build fix for ARM-based Jetson devices
Python API fix in V3
Short-term Goals:
std::cout for printf()
Zed camera support
Improved command line parsing
Mid-term Goals:
Removal of char* code in favor of std::string
Compiler warning cleanup
Improved use of cv::Mat
Replacement of old list functionality with std::vector or std::list
Support for 1-channel grayscale images
Support for N-channel images (N > 3)
Ongoing code cleanup
Long-term Goals:
CUDA/CUDNN fixes for all GPUs
CUDA+cuDNN code rewrite
Non-NVIDIA GPU support
Rotated bounding boxes and angle support
Keypoints and skeletons
Heatmaps
Segmentation