AlexeyAB/darknet

★ 22,146⑂ 0

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )

About AlexeyAB/darknet

AlexeyAB/darknet is an open-source project on GitHub, mainly written in C. YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet ) It currently holds 22,146 stars and 0 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the AI Image Projects board and on the AI AI Image Projects list.

GitHub Repository Details

Repository AlexeyAB/darknet · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

Yolo v4, v3 and v2 for Windows and Linux

(neural networks for object detection)

---- ---- ----

YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

YOLOv7 is more accurate and faster than YOLOv5 by 120% FPS, than YOLOX by 180% FPS, than Dual-Swin-T by 1200% FPS, than ConvNext by 550% FPS, than SWIN-L by 500% FPS, than PPYOLOE-X by 150% FPS.

YOLOv7 surpasses all known object detectors in both speed and accuracy in the range from 5 FPS to 160 FPS and has the highest accuracy 56.8% AP among all known real-time object detectors with 30 FPS or higher on GPU V100, batch=1.

----

more5

----

image

----

More details in articles on medium:

Manual: https://github.com/AlexeyAB/darknet/wiki

Discussion:

About Darknet framework: http://pjreddie.com/darknet/

Darknet Continuous Integration CircleCI Contributors License: Unlicense DOI arxiv.org arxiv.org colab colab

Darknet Logo

scaled_yolov4 AP50:95 - FPS (Tesla V100) Paper: https://arxiv.org/abs/2011.08036

----

modern_gpus AP50:95 / AP50 - FPS (Tesla V100) Paper: https://arxiv.org/abs/2004.10934

tkDNN-TensorRT accelerates YOLOv4 ~2x times for batch=1 and 3x-4x times for batch=4.

GeForce RTX 2080 Ti

| Network Size | Darknet, FPS (avg) | tkDNN TensorRT FP32, FPS | tkDNN TensorRT FP16, FPS | OpenCV FP16, FPS | tkDNN TensorRT FP16 batch=4, FPS | OpenCV FP16 batch=4, FPS | tkDNN Speedup | |:--------------------------:|:------------------:|-------------------------:|-------------------------:|-----------------:|---------------------------------:|-------------------------:|--------------:| |320 | 100 | 116 | 202 | 183 | 423 | 430 | 4.3x | |416 | 82 | 103 | 162 | 159 | 284 | 294 | 3.6x | |512 | 69 | 91 | 134 | 138 | 206 | 216 | 3.1x | |608 | 53 | 62 | 103 | 115 | 150 | 150 | 2.8x | |Tiny 416 | 443 | 609 | 790 | 773 | 1774 | 1353 | 3.5x | |Tiny 416 CPU Core i7 7700HQ | 3.4 | - | - | 42 | - | 39 | 12x |

Youtube video of results

| [Yolo v4](https://youtu.be/1_SiUOYUoOI "Yolo v4") | [Scaled Yolo v4](https://youtu.be/YDFf-TqJOFE "Scaled Yolo v4") | |---|---|

Others: https://www.youtube.com/user/pjreddie/videos

How to evaluate AP of YOLOv4 on the MS COCO evaluation server

1. Download and unzip test-dev2017 dataset from MS COCO server: http://images.cocodataset.org/zips/test2017.zip 2. Download list of images for Detection tasks and replace the paths with yours: https://raw.githubusercontent.com/AlexeyAB/darknet/master/scripts/testdev2017.txt 3. Download yolov4.weights file 245 MB: yolov4.weights (Google-drive mirror yolov4.weights ) 4. Content of the file cfg/coco.data should be

classes= 80
train  = /trainvalno5k.txt
valid = /testdev2017.txt
names = data/coco.names
backup = backup
eval=coco

5. Create /results/ folder near with ./darknet executable file 6. Run validation: ./darknet detector valid cfg/coco.data cfg/yolov4.cfg yolov4.weights 7. Rename the file /results/coco_results.json to detections_test-dev2017_yolov4_results.json and compress it to detections_test-dev2017_yolov4_results.zip 8. Submit file detections_test-dev2017_yolov4_results.zip to the MS COCO evaluation server for the test-dev2019 (bbox)

How to evaluate FPS of YOLOv4 on GPU

1. Compile Darknet with GPU=1 CUDNN=1 CUDNN_HALF=1 OPENCV=1 in the Makefile 2. Download yolov4.weights file 245 MB: yolov4.weights (Google-drive mirror yolov4.weights ) 3. Get any .avi/.mp4 video file (preferably not more than 1920x1080 to avoid bottlenecks in CPU performance) 4. Run one of two commands and look at the AVG FPS:

./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -ext_output ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -benchmark

Pre-trained models

There are weights-file for different cfg-files (trained for MS COCO dataset):

FPS on RTX 2070 (R) and Tesla V100 (V):

just change width= and height= parameters in yolov4-csp.cfg file and use the same yolov4-csp.weights file for all cases: just change width= and height= parameters in yolov4.cfg file and use the same yolov4.weights file for all cases:
CLICK ME - Yolo v3 models

CLICK ME - Yolo v2 models
  • yolov2.cfg (194 MB COCO Yolo v2) - requires 4 GB GPU-RAM: https://pjreddie.com/media/files/yolov2.weights
  • yolo-voc.cfg (194 MB VOC Yolo v2) - requires 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo-voc.weights
  • yolov2-tiny.cfg (43 MB COCO Yolo v2) - requires 1 GB GPU-RAM: https://pjreddie.com/media/files/yolov2-tiny.weights
  • yolov2-tiny-voc.cfg (60 MB VOC Yolo v2) - requires 1 GB GPU-RAM: http://pjreddie.com/media/files/yolov2-tiny-voc.weights
  • yolo9000.cfg (186 MB Yolo9000-model) - requires 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo9000.weights

Put it near compiled: darknet.exe

You can get cfg-files by path: darknet/cfg/

Requirements for Windows, Linux and macOS

Yolo v4 in other frameworks

Official TF models: https://github.com/tensorflow/models/tree/master/official/vision/beta/projects/yolo For YOLOv4 - convert yolov4.weights/cfg files to yolov4.pb by using TNTWEN project, and to yolov4.tflite TensorFlow-lite

GitHub Stars & Activity

22,146Stars
0Forks
0Open issues
CLanguage

GitHub Popularity

GitHub stars22,146
Forks0
Open issues0
Primary languageC
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related AI Projects

1

opencv / opencv

C++★ 90,853⑂ 0
2
3

d2l-ai / d2l-zh

Python★ 80,716⑂ 0
4

microsoft / AI-For-Beginners

Jupyter Notebook★ 68,541⑂ 0
5

ultralytics / ultralytics

Python★ 61,651⑂ 0
6

ultralytics / yolov5

Python★ 58,015⑂ 0
7
8

roboflow / supervision

Python★ 50,364⑂ 0

More AI Rankings