3.1K
Paper YOLO v4: https://arxiv.org/abs/2004.10934
Paper Scaled YOLO v4: https://arxiv.org/abs/2011.08036 use to reproduce results: ScaledYOLOv4
More details in articles on medium:
Manual: https://github.com/AlexeyAB/darknet/wiki
Discussion:
About Darknet framework: http://pjreddie.com/darknet/
Yolo v4 in other frameworks (TensorRT, TensorFlow, PyTorch, OpenVINO, OpenCV-dnn, TVM,...)
Yolo v4, v3 and v2 for Windows and Linux
CMake)make)CMake)vcpkg)
AP50:95 - FPS (Tesla V100) Paper: https://arxiv.org/abs/2011.08036
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.
| 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 |
Others: https://www.youtube.com/user/pjreddie/videos
yolov4.weights file 245 MB: yolov4.weights (Google-drive mirror yolov4.weights )cfg/coco.data should beclasses= 80
train = <replace with your path>/trainvalno5k.txt
valid = <replace with your path>/testdev2017.txt
names = data/coco.names
backup = backup
eval=coco
/results/ folder near with ./darknet executable file./darknet detector valid cfg/coco.data cfg/yolov4.cfg yolov4.weights/results/coco_results.json to detections_test-dev2017_yolov4_results.json and compress it to detections_test-dev2017_yolov4_results.zipdetections_test-dev2017_yolov4_results.zip to the MS COCO evaluation server for the test-dev2019 (bbox)GPU=1 CUDNN=1 CUDNN_HALF=1 OPENCV=1 in the Makefileyolov4.weights file 245 MB: yolov4.weights (Google-drive mirror yolov4.weights )./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 -benchmarkThere are weights-file for different cfg-files (trained for MS COCO dataset):
FPS on RTX 2070 (R) and Tesla V100 (V):
yolov4-p6.cfg - 1280x1280 - 72.1% [email protected] (54.0% [email protected]:0.95) - 32(V) FPS - xxx BFlops (xxx FMA) - 487 MB: yolov4-p6.weights
yolov4-p5.cfg - 896x896 - 70.0% [email protected] (51.6% [email protected]:0.95) - 43(V) FPS - xxx BFlops (xxx FMA) - 271 MB: yolov4-p5.weights
yolov4-csp-x-swish.cfg - 640x640 - 69.9% [email protected] (51.5% [email protected]:0.95) - 23(R) FPS / 50(V) FPS - 221 BFlops (110 FMA) - 381 MB: yolov4-csp-x-swish.weights
yolov4-csp-swish.cfg - 640x640 - 68.7% [email protected] (50.0% [email protected]:0.95) - 70(V) FPS - 120 (60 FMA) - 202 MB: yolov4-csp-swish.weights
yolov4x-mish.cfg - 640x640 - 68.5% [email protected] (50.1% [email protected]:0.95) - 23(R) FPS / 50(V) FPS - 221 BFlops (110 FMA) - 381 MB: yolov4x-mish.weights
yolov4-csp.cfg - 202 MB: yolov4-csp.weights paper Scaled Yolo v4
just change width= and height= parameters in yolov4-csp.cfg file and use the same yolov4-csp.weights file for all cases:
width=640 height=640 in cfg: 67.4% [email protected] (48.7% [email protected]:0.95) - 70(V) FPS - 120 (60 FMA) BFlopswidth=512 height=512 in cfg: 64.8% [email protected] (46.2% [email protected]:0.95) - 93(V) FPS - 77 (39 FMA) BFlopsyolov4.cfg - 245 MB: yolov4.weights (Google-drive mirror yolov4.weights ) paper Yolo v4
just change width= and height= parameters in yolov4.cfg file and use the same yolov4.weights file for all cases:
width=608 height=608 in cfg: 65.7% [email protected] (43.5% [email protected]:0.95) - 34(R) FPS / 62(V) FPS - 128.5 BFlopswidth=512 height=512 in cfg: 64.9% [email protected] (43.0% [email protected]:0.95) - 45(R) FPS / 83(V) FPS - 91.1 BFlopswidth=416 height=416 in cfg: 62.8% [email protected] (41.2% [email protected]:0.95) - 55(R) FPS / 96(V) FPS - 60.1 BFlopswidth=320 height=320 in cfg: 60% [email protected] ( 38% [email protected]:0.95) - 63(R) FPS / 123(V) FPS - 35.5 BFlopsyolov4-tiny.cfg - 40.2% [email protected] - 371(1080Ti) FPS / 330(RTX2070) FPS - 6.9 BFlops - 23.1 MB: yolov4-tiny.weights
enet-coco.cfg (EfficientNetB0-Yolov3) - 45.5% [email protected] - 55(R) FPS - 3.7 BFlops - 18.3 MB: enetb0-coco_final.weights
yolov3-openimages.cfg - 247 MB - 18(R) FPS - OpenImages dataset: yolov3-openimages.weights
csresnext50-panet-spp-original-optimal.cfg - 65.4% [email protected] (43.2% [email protected]:0.95) - 32(R) FPS - 100.5 BFlops - 217 MB: csresnext50-panet-spp-original-optimal_final.weights
yolov3-spp.cfg - 60.6% [email protected] - 38(R) FPS - 141.5 BFlops - 240 MB: yolov3-spp.weights
csresnext50-panet-spp.cfg - 60.0% [email protected] - 44 FPS - 71.3 BFlops - 217 MB: csresnext50-panet-spp_final.weights
yolov3.cfg - 55.3% [email protected] - 66(R) FPS - 65.9 BFlops - 236 MB: yolov3.weights
yolov3-tiny.cfg - 33.1% [email protected] - 345(R) FPS - 5.6 BFlops - 33.7 MB: yolov3-tiny.weights
yolov3-tiny-prn.cfg - 33.1% [email protected] - 370(R) FPS - 3.5 BFlops - 18.8 MB: yolov3-tiny-prn.weights
yolov2.cfg (194 MB COCO Yolo v2) - requires 4 GB GPU-RAM: https://pjreddie.com/media/files/yolov2.weightsyolo-voc.cfg (194 MB VOC Yolo v2) - requires 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo-voc.weightsyolov2-tiny.cfg (43 MB COCO Yolo v2) - requires 1 GB GPU-RAM: https://pjreddie.com/media/files/yolov2-tiny.weightsyolov2-tiny-voc.cfg (60 MB VOC Yolo v2) - requires 1 GB GPU-RAM: http://pjreddie.com/media/files/yolov2-tiny-voc.weightsyolo9000.cfg (186 MB Yolo9000-model) - requires 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo9000.weightsPut it near compiled: darknet.exe
You can get cfg-files by path: darknet/cfg/
OpenCV_DIR = C:\opencv\build - where are the include and x64 folders image)cudnn.h,libcudnn.so... as described here https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installlinux-tar , on Windows copy cudnn.h,cudnn64_7.dll, cudnn64_7.lib as described here https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installwindows )pip install yolov4 YOLOv4 on TensorFlow 2.0 / TFlite / Android: https://github.com/hunglc007/tensorflow-yolov4-tflite
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-liteyolov4.weights/cfg with: C++ example or Python example./scripts/get_coco_dataset.sh to get labeled MS COCO detection datasetpython ./scripts/get_openimages_dataset.py for labeling train detection datasetpython ./scripts/voc_label.py for labeling Train/Test/Val detection datasets./scripts/get_imagenet_train.sh (also imagenet_label.sh for labeling valid set)Content type
Image
Digest
Size
3.4 GB
Last updated
over 4 years ago
docker pull industryessentials/executor-det-yolov4-training