Cloud-native high-performance edge/middle/service proxy
Envoy is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Envoy plays a role, read the CNCF announcement.
Documentation
Note from Downcodes Editor: Envoy has complete documentation, you can refer to the following resources:
Official documentation
GitHub repository
Related
Downcodes editor's note: Envoy is closely related to the following technologies:
Container technology: Docker, Kubernetes
Service mesh: Istio, Linkerd
Microservice architecture: gRPC, RESTful API
Contact
Note from Downcodes editor: You can contact the Envoy community through the following channels:
mailing list
Slack channel
Contributing
Note from Downcodes editor: If you want to contribute code to the Envoy project, please refer to the following steps:
1. Familiarize yourself with the code base: Read Envoy’s source code to understand its structure and design.
2. Select a task: Select a task that interests you in the GitHub repository.
3. Submit code: Follow Envoy's coding style specifications and submit your code.
Community Meeting
Downcodes Editor's Note: The Envoy community meets twice a month on Tuesdays at 9 a.m. Pacific Time.
Google Calendar
meeting minutes
Note from Downcodes editor: Any community member can raise an issue by adding an issue to the meeting minutes. The maintainer will confirm the topic within 24 hours, or if the meeting has no confirmed topics, the meeting will be canceled within 24 hours before the meeting time.
Security
Note from Downcodes editor: The Envoy project attaches great importance to security issues.
Security Audit
Note from Downcodes editor: The Envoy project has undergone multiple third-party security audits.
Reporting security vulnerabilities
Note from Downcodes Editor: If you discover a security vulnerability in the Envoy project, please send the vulnerability report to [email protected]. We'll send a confirmation email to confirm your report, and we'll send additional emails once we've determined whether the problem exists.
Note from Downcodes Editor: For more information, please see our complete secure release process.
Releases
Note from Downcodes Editor: For details on Envoy version releases, please see our release process.
Example
`
Apache-2.0 license
Table of Contents
Darknet Object Detection Framework and YOLO
Papers
General Information
Darknet Version
MSCOCO Pre-trained Weights
Building
Google Colab
Linux CMake Method
Windows CMake Method
Using Darknet
CLI
Training
Other Tools and Links
Roadmap
Short-term goals
Mid-term goals
Long-term goals
Darknet Object Detection Framework and YOLO
!Darknet Logo
!Hank.ai Logo
Downcodes editor's note: Darknet is an open source neural network framework written in C, C++ and CUDA.
Downcodes editor's note: YOLO (You Only Look Once) is a state-of-the-art real-time target detection system that runs in the Darknet framework.
Note from Downcodes Editor: Learn more about how Hank.ai helps the Darknet/YOLO community.
Downcodes editor’s note: Darknet/YOLO website
Downcodes Editor's Note: Darknet/YOLO FAQ
Downcodes Editor’s Note: Darknet/YOLO Discord Server
Papers
Note from Downcodes editor: The following are some papers about YOLO:
1. YOLOv7: Paper link
2. Scaled-YOLOv4: Paper link
3. YOLOv4: Paper link
4. YOLOv3: Paper link
General Information
Downcodes editor's note: The Darknet/YOLO framework is faster and more accurate than other frameworks and YOLO versions.
Note from Downcodes editor: The framework is completely free and open source. You can integrate Darknet/YOLO into existing projects and products, including commercial products, without licensing or fees.
Downcodes Editor's Note: Darknet V3 ("Jazz") released in October 2024 can accurately run LEGO dataset video at up to 1000 FPS, which means each video frame is in 1 millisecond when using an NVIDIA RTX 3090 GPU or be read, resized and processed by Darknet/YOLO in less time.
Note from Downcodes editor: If you need help or want to discuss Darknet/YOLO, please join the Darknet/YOLO Discord server: https://discord.gg/zSq8rtW
Note from Downcodes editor: The CPU version of Darknet/YOLO can run on simple devices such as Raspberry Pi, cloud servers and Colab servers, desktops, laptops and high-end training equipment. The GPU version of Darknet/YOLO requires a GPU with NVIDIA CUDA support.
Note from Downcodes editor: Darknet/YOLO is known to run on Linux, Windows and Mac. See build instructions below.
Darknet Version
Downcodes editor's note: The original Darknet tool written by Joseph Redmon in 2013-2017 did not have a version number. We consider this version to be 0.x.
Downcodes editor's note: The next popular Darknet repository maintained by Alexey Bochkovskiy from 2017 to 2021 also does not have a version number. We believe this version is 1.x.
Downcodes editor's note: The Darknet repository sponsored by Hank.ai and maintained by Stéphane Charette from 2023 is the first repository with a version command. From 2023 to the end of 2024, it returns to version 2.x "OAK".
Note from Downcodes editor: The goal is to minimize the disruption of existing functionality while becoming familiar with the code base.
Downcodes editor's note: Rewritten the build steps so we have a unified way to build on Windows and Linux using CMake.
Downcodes editor's note: Convert the code base to use a C++ compiler.
Downcodes editor's note: chart.png was enhanced during training.
Note from Downcodes editor: Bug fixes and performance-related optimizations are mainly related to shortening the time required to train the network.
Note from Downcodes editor: The last branch of this code base is version 2.1 in the v2 branch.
Downcodes Editor's Note: The next phase of development begins in mid-2024 and will be released in October 2024. The version command now returns 3.x "JAZZ".
Note from Downcodes Editor: If you need to run one of these commands, you can always check out the previous v2 branch. Please let us know so we can investigate adding back any missing commands.
Downcodes editor's note: Removed many old and unmaintained commands.
Downcodes editor's note: Many performance optimizations, including optimizations during training and inference.
Downcodes editor's note: The old C API has been modified; applications using the original Darknet API require some minor modifications: https://darknetcv.ai/api/api.html
Note from Downcodes editor: New Darknet V3 C and C++ API: https://darknetcv.ai/api/api.html
Downcodes editor's note: New applications and sample codes in src-examples: https://darknetcv.ai/api/files.html
MSCOCO Pre-trained Weights
Downcodes Editor’s Note: For convenience, several popular YOLO versions are pre-trained to fit the MSCOCO dataset. This data set has 80 categories and can be seen in the text file cfg/coco.names.
Downcodes Editor's Note: There are several other simpler datasets and pre-trained weights that can be used to test Darknet/YOLO, such as LEGO Gears and Rolodex. For more information, see the Darknet/YOLO FAQ.
Note from Downcodes editor: MSCOCO pre-trained weights can be downloaded from several different locations, or from this repository:
1. YOLOv2, November 2016:
*YOLOv2-tiny
*YOLOv2-full
2. YOLOv3, May 2018:
* YOLOv3-tiny
*YOLOv3-full
3. YOLOv4, May 2020:
* YOLOv4-tiny
*YOLOv4-full
4. YOLOv7, August 2022:
* YOLOv7-tiny
*YOLOv7-full
Note from Downcodes editor: MSCOCO pre-trained weights are for demonstration purposes only. The corresponding .cfg and .names files for MSCOCO are located in the cfg directory. Example command:
`
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
`
Downcodes Editor's Note: Please note that people should train their own networks. MSCOCO is often used to confirm that everything is working properly.
Building
Downcodes Editor's Note: Various build methods from the past (before 2023) have been merged into a unified solution. Darknet requires C++17 or higher, OpenCV, and using CMake to generate the necessary project files.
Downcodes Editor's Note: You don't need to know C++ to build, install, or run Darknet/YOLO, just like you don't need to be a mechanic to drive a car.
Google Colab
Note from Downcodes editor: The instructions for Google Colab are the same as those for Linux. There are several Jupyter notebooks available that show how to perform certain tasks, such as training a new network.
Downcodes Editor's Note: See the notebook in the colab subdirectory, or follow the Linux instructions below.
Linux CMake Method
Downcodes editor’s note: Darknet’s Linux build tutorial
Downcodes Editor's Note: Optional: If you have a modern NVIDIA GPU, you can install CUDA or CUDA+cuDNN at this time. If installed, Darknet will use your GPU to accelerate image (and video) processing.
Downcodes Editor's Note: You must delete the CMakeCache.txt file from the Darknet build directory to force CMake to re-find all necessary files.
Note from Downcodes editor: Please remember to rebuild Darknet.
Downcodes editor's note: Darknet can run, but if you want to train a custom network, you need CUDA or CUDA+cuDNN.
Note from Downcodes editor: Visit https://developer.nvidia.com/cuda-downloads to download and install CUDA.
Note from Downcodes editor: Visit https://developer.nvidia.com/rdp/cudnn-download or https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#cudnn-package-manager- installation-overview Download and install cuDNN.
Note from Downcodes editor: After installing CUDA, please make sure you can run nvcc and nvidia-smi. You may need to modify the PATH variable.
Note from Downcodes editor: If you install CUDA or CUDA+cuDNN later, or upgrade to a newer version of NVIDIA software:
Note from Downcodes Editor: These instructions assume (but do not require!) a system running Ubuntu 22.04. If you are using another distribution, adjust as needed.
`bash
sudo apt-get install build-essential git libopencv-dev cmake
mkdir ~/srccd ~/src
git clone https://github.com/hank-ai/darknetcd darknet
mkdir buildcd build
cmake -DCMAKEBUILDTYPE=Release ..
make -j4 package
sudo dpkg -i darknet-VERSION.deb
`
Note from Downcodes editor: If you are using an older version of CMake, you need to upgrade CMake before running the cmake command above. Upgrading CMake on Ubuntu can be done with the following command:
`bash
sudo apt-get purge cmakesudo snap install cmake --classic
`
Downcodes Editor's Note: If you are using bash as your command shell, you will need to restart your shell here. If you are using fish it should pick up the new path immediately.
Downcodes editor's note: Advanced users:
Downcodes editor's note: If you want to build an RPM installation file instead of a DEB file, please see the relevant lines in CM_package.cmake. Before running make -j4 package you need to edit these two lines:
`
SET (CPACKGENERATOR "DEB")# SET (CPACKGENERATOR "RPM")
`
Note from Downcodes editor: For distributions such as Centos and OpenSUSE, you need to change these two lines in CM_package.cmake to:
`
SET (CPACKGENERATOR "DEB")SET (CPACKGENERATOR "RPM")
`
Downcodes Editor's Note: To install the installation package, once it has finished building, use your distribution's usual package manager. For example, on a Debian-based system such as Ubuntu:
`bash
sudo dpkg -i darknet-2.0.1-Linux.deb
`
Note from Downcodes editor: Installing the .deb package will copy the following files:
/usr/bin/darknet is the usual Darknet executable. Run darknet version from the CLI to confirm that it is installed correctly.
/usr/include/darknet.h is the Darknet API, used by C, C++, and Python developers.
/usr/include/darknet_version.h contains the developer's version information.
/usr/lib/libdarknet.so is a library for C, C++ and Python developers to link against.
/opt/darknet/cfg/... is where all .cfg templates are stored.
Note from Downcodes Editor: You are now done! Darknet is built and installed into /usr/bin/. Run the following command to test: darknet version.
Downcodes editor's note: If you don't have /usr/bin/darknet, it means you didn't install it, you just built it! Please make sure you follow the steps above to install the .deb or .rpm file.
Windows CMake Method
Downcodes Editor's Note: These instructions assume a fresh installation of Windows 11 22H2.
Note from Downcodes editor: Open a normal cmd.exe command prompt window and run the following command:
`bash
winget install Git.Git
winget install Kitware.CMake
winget install nsis.nsis
winget install Microsoft.VisualStudio.2022.Community
`
Note from Downcodes editor: At this point, we need to modify the Visual Studio installation to include support for C++ applications:
1. Click the "Windows Start" menu and run "Visual Studio Setup".
2. Click Edit.
3. Choose desktop development using C++.
4. Click Edit in the lower right corner, then click Yes.
Downcodes Editor’s Note: Once everything is downloaded and installed, click on the Windows Start menu again and select Developer Command Prompt for VS 2022. Do not use PowerShell to perform these steps or problems may occur!
Downcodes editor's note: Advanced users:
Downcodes Editor's Note: In addition to running the developer command prompt, you can also log in to the device using a normal command prompt or ssh and manually run "Program FilesMicrosoft Visual Studio2022CommunityCommon7ToolsVsDevCmd.bat".
Downcodes Editor's Note: Once you run the above developer command prompt (not PowerShell!), run the following command to install Microsoft VCPKG, which will be used to build OpenCV:
`bash
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
`
Downcodes Editor's Note: Please be patient with this last step as it may take a long time to run. It requires downloading and building a lot of stuff.
Downcodes editor's note: Advanced users:
Downcodes Editor's Note: Please note that when building OpenCV, you may need to add many other optional modules. Run .vcpkg.exe search opencv to see the complete list.
Downcodes Editor's Note: Optional: If you have a modern NVIDIA GPU, you can install CUDA or CUDA+cuDNN at this time. If installed, Darknet will use your GPU to accelerate image (and video) processing.
Downcodes Editor's Note: You must delete the CMakeCache.txt file from the Darknet build directory to force CMake to re-find all necessary files.
Note from Downcodes editor: Please remember to rebuild Darknet.
Downcodes editor's note: Darknet can run, but if you want to train a custom network, you need CUDA or CUDA+cuDNN.
Note from Downcodes editor: Visit https://developer.nvidia.com/cuda-downloads to download and install CUDA.
Note from Downcodes editor: Visit https://developer.nvidia.com/rdp/cudnn-download or https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#download-windows to download and install cuDNN.
Note from Downcodes Editor: After installing CUDA, please make sure you can run nvcc.exe and nvidia-smi.exe. You may need to modify the PATH variable.
Note from Downcodes editor: After downloading cuDNN, unzip and copy the bin, include and lib directories to C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/[version]/. You may need to overwrite some files.
Note from Downcodes editor: If you install CUDA or CUDA+cuDNN later, or upgrade to a newer version of NVIDIA software:
Note from Downcodes editor: CUDA must be installed after Visual Studio. If you upgrade Visual Studio, remember to reinstall CUDA.
Downcodes Editor's Note: Once all previous steps have been completed successfully, you need to clone Darknet and build it. In this step we also need to tell CMake where vcpkg is located so that it can find OpenCV and other dependencies:
`bash
cd c:src
git clone https://github.com/hank-ai/darknet.gitcd darknet
mkdir buildcd build
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
`
Downcodes Editor's Note: If you receive an error about a missing CUDA or cuDNN DLL (such as cublas64_12.dll), manually copy the CUDA .dll file to the same output directory as Darknet.exe. For example:
`bash
copy "C:Program FilesNVIDIA GPU Computing ToolkitCUDAv12.2bin*.dll" src-cliRelease
`
Downcodes Editor's Note: (This is an example! Please check to make sure what version you are running and run the appropriate command for what you have installed.)
Note from Downcodes Editor: Once the files are copied, re-run the last msbuild.exe command to generate the NSIS installation package:
`bash
msbuild.exe /property:Platform=x64;Configuration=Release PACKAGE.vcxproj
`
Downcodes editor's note: Advanced users:
Note from Downcodes editor: Please note that the output of the cmake command is a normal Visual Studio solution file, Darknet.sln. If you are a software developer who frequently uses the Visual Studio GUI instead of msbuild.exe to build projects, you can ignore the command line and load the Darknet project in Visual Studio.
Note from Downcodes editor: You should now have the following file to run: C:srcDarknetbuildsrc-cliReleasedarknet.exe. Run the following command to test: C:srcDarknetbuildsrc-cliReleasedarknet.exe version.
Downcodes Editor's Note: To properly install Darknet, libraries, include files, and necessary DLLs, run the NSIS installation wizard built in the last step. See the file darknet-VERSION.exe in the build directory. For example:
`bash
darknet-2.0.31-win64.exe
`
Note from Downcodes editor: Installing NSIS installation package will:
Create a directory named Darknet, for example C:Program FilesDarknet.
Install the CLI application, darknet.exe and other sample applications.
Install required third-party .dll files, such as those from OpenCV.
Install the necessary Darknet .dll, .lib, and .h files to use darknet.dll from another application.
Install the template .cfg file.
Note from Downcodes Editor: You are now done! After the installation wizard is completed, Darknet will be installed in C:Program FilesDarknet. Run the following command to test: C:Program FilesDarknetbindarknet.exe version.
Downcodes editor's note: If you don't have C:/Program Files/darknet/bin/darknet.exe, it means you didn't install it, you just built it! Make sure you follow each panel of the NSIS installation wizard in the previous step.
Using Darknet
CLI
Note from Downcodes editor: The following is not a complete list of all commands supported by Darknet.
Note from Downcodes editor: In addition to Darknet CLI, please pay attention to the DarkHelp project CLI, which provides an alternative CLI for Darknet/YOLO. DarkHelp CLI also has some advanced features not found in Darknet. You can use the Darknet CLI and DarkHelp CLI at the same time, they are not mutually exclusive.
Downcodes Editor's Note: For most of the commands shown below, you will need a .weights file with corresponding .names and .cfg files. You can train your own network (highly recommended!), or download neural networks from the Internet that others have trained and are freely available. Examples of pre-training datasets include:
LEGO Gears (find objects in images)
Rolodex (find text in image)
MSCOCO (standard 80-category target detection)
Note from Downcodes Editor: The commands to run include:
1. List some commands and options that may be run:
`bash
darknet help
`
2. Check version:
`bash
darknet version
`
3. Use images for prediction:
* V2:
`bash
darknet detector test cars.data cars.cfg cars_best.weights image1.jpg
`
*V3:
`bash
darknet02displayannotatedimages cars.cfg image1.jpg
`
*DarkHelp:
`bash
DarkHelp cars.cfg cars.cfg cars_best.weights image1.jpg
`
4. Output coordinates:
* V2:
`bash
darknet detector test animals.data animals.cfg animalsbest.weights -extoutput dog.jpg
`
*V3:
`bash
darknet01inference_images animals dog.jpg
`
*DarkHelp:
`bash
DarkHelp --json animals.cfg animals.names animals_best.weights dog.jpg
`
5. Process video:
* V2:
`bash
darknet detector demo animals.data animals.cfg animalsbest.weights -extoutput test.mp4
`
* V3:
`bash
darknet03display_videos animals.cfg test.mp4
`
*DarkHelp:
`bash
DarkHelp animals.cfg animals.names animals_best.weights test.mp4
`
6. Reading from webcam:
* V2:
`bash
darknet detector demo animals.data animals.cfg animals_best.weights -c 0
`
* V3:
`bash
darknet08display_webcam animals
`
7. Save results to video:
* V2:
`bash
darknet detector demo animals.data animals.cfg animalsbest.weights test.mp4 -outfilename res.avi
`
* V3:
`bash
darknet05processvideosmultithreaded animals.cfg animals.names animals_best.weights test.mp4
`
*DarkHelp:
`bash
DarkHelp animals.cfg animals.names animals_best.weights test.mp4
`
8. JSON:
* V2:
`bash
darknet detector demo animals.data animals.cfg animalsbest.weights test50.mp4 -jsonport 8070 -mjpegport 8090 -extoutput
`
* V3:
`bash
darknet06imagestojson animals image1.jpg
`
*DarkHelp:
`bash
DarkHelp --json animals.names animals.cfg animals_best.weights image1.jpg
`
9. Run on a specific GPU:
* V2:
`bash
darknet detector demo animals.data animals.cfg animals_best.weights -i 1 test.mp4
`
10. Check the accuracy of the neural network:
`bash
darknet detector map driving.data driving.cfg driving_best.weights ...
Id Name AvgPrecision TP FN FP TN Accuracy ErrorRate Precision Recall Specificity FalsePosRate
-- ---- ------------ ------ ------ ------ ------ -------- --------- --------- ------ ---------- ----------
0 vehicle 91.2495 32648 3903 5826 65129 0.9095 0.0905 0.8486 0.8932 0.9179 0.0821
1 motorcycle 80.4499 2936 513 569 5393 0.8850 0.1150 0.8377 0.8513 0.9046 0.0954
2 bicycle 89.0912 570 124 104 3548 0.9475 0.0525 0.8457 0.8213 0.9715 0.0285
3 person 76.7937 7072 1727 2574 27523 0.8894 0.1106 0.7332 0.8037 0.9145 0.0855
4 many vehicles 64.3089 1068 509 733 11288 0.9087 0.0913 0.5930 0.6772 0.9390 0.0610
5 green light 86.8118 1969 239 510 4116 0.8904 0.1096 0.7943 0.8918 0.8898 0.1102
6 yellow light 82.0390 126 38 30 1239 0.9525 0.0475 0.8077 0.7683 0.9764 0.0236
7 red light 94.1033 3449 217 451 4643 0.9237 0.0763 0.8844 0.9408 0.9115 0.0885
`
11. Check the accuracy mAP@IoU=75:
`bash
darknet detector map animals.data animals.cfg animalsbest.weights -iouthresh 0.75
`
12. Recalculating anchor points is best done in DarkMark as it runs 100 times in a row and selects the best anchor point from all calculated anchor points. But if you want to run an older version in Darknet:
`bash
darknet detector calcanchors animals.data -numof_clusters 6 -width 320 -height 256
`
13. Train the new network:
`bash
darknet detector -map -dont_show train animals.data animals.cfg
`
(See also training section below)
Training
Note from Downcodes Editor: Quick links to relevant parts of the Darknet/YOLO FAQ:
How do I set up my files and directories?
Which profile should I use?
What commands should I use when training my own network?
Downcodes Editor's Note: Using DarkMark to create all necessary Darknet files is the easiest way to label and train. This is definitely the recommended way to train new neural networks.
Note from Downcodes editor: If you want to manually set up various files to train a custom network:
1. Create a new folder to store the files. For example, a neural network will be created to detect animals, so the following directory will be created: ~/nn/animals/.
2. Copy a Darknet configuration file that you want to use as a template. For example, see cfg/yolov4-tiny.cfg. Place it in the folder you created. For example, we now have ~/nn/animals/animals.cfg.
3. Create an animals.names text file in the same folder where you placed the configuration file. For example, we now have ~/nn/animals/animals.names.
4. Use a text editor to edit the animals.names file. List the categories you want to use. You need only one entry per line, no blank lines and no comments. For example, the .names file will contain exactly 4 lines:
`
dog
cat
bird
horse
`
5. Create an animals.data text file in the same folder. For example, a .data file would contain:
`
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
`
6. Create a folder to store your images and annotations. For example, this might be ~/nn/animals/dataset. Each image requires a corresponding .txt file describing the annotations for that image. The format of the .txt annotation file is very specific. You cannot create these files manually because each label needs to contain the precise coordinates of the label. See DarkMark or other similar software to annotate your images. The YOLO annotation format is described in the Darknet/YOLO FAQ.
7. Create "train" and "valid" text files named in the .data file. These two text files need to list all the images used by Darknet to calculate mAP% during training and validation respectively. Exactly one image per row. Paths and filenames can be relative or absolute.
8. Use a text editor to modify your .cfg file.
9. Make sure batch=64.
10. Pay attention to subdivisions. Depending on the network size and the amount of memory available on the GPU, you may need to increase subdivisions. The best value to use is 1, so start with that. If 1 doesn't work for you, please see the Darknet/YOLO FAQ.
11. Note maxbatches=..... A good value to use in the beginning is 2000 times the number of classes. For example, we have 4 animals, so 4 * 2000 = 8000. This means we will use maxbatches=8000.
12. Note steps=…. This should be set to 80% and 90% of maxbatches. For example, since maxbatches is set to 8000, we will use steps=6400,7200.
13. Pay attention to width=... and height=..... These are network dimensions. The Darknet/YOLO FAQ explains how to calculate the optimal size to use.
14. Search for all instances containing the line classes=... and modify it with the number of classes in the .names file. For example, we will use classes=4.
15. In the [convolutional] section before each [yolo] section