开源!适用于Win和Linux平台的YOLO4和YOLO3( 二 )

Yolo v4 in other frameworks

  • TensorFlow: YOLOv4 on TensorFlow 2.0 / TFlite / Andriod: https://github.com/hunglc007/tensorflow-yolov4-tflite For YOLOv3 - convert yolov3.weights/cfg files to yolov3.ckpt/pb/meta: by using mystic123 project, and TensorFlow-lite
  • OpenCV-dnn the fastest implementation of YOLOv4 for CPU (x86/ARM-Android), OpenCV can be compiled with OpenVINO-backend for running on (Myriad X / USB Neural Compute Stick / Arria FPGA), use yolov3.weights/cfg with: C++ example or Python example
  • Intel OpenVINO 2019 R1: (Myriad X / USB Neural Compute Stick / Arria FPGA): read this manual
  • Tencent/ncnn: the fastest inference of YOLOv4 on mobile phone CPU: https://github.com/Tencent/ncnn
  • PyTorch > ONNX > CoreML > IOS how to convert cfg/weights-files to pt-file: ultralytics/yolov3 and iOS App
  • TensorRT YOLOv4 on TensorRT+tkDNN: https://github.com/ceccocats/tkDNN For YOLOv3 (-70% faster inference): Yolo is natively supported in DeepStream 4.0 read PDF. wang-xinyu/tensorrtx implemented yolov3-spp, yolov4, etc.
  • TVM - compilation of deep learning models (Keras, MXNet, PyTorch, Tensorflow, CoreML, DarkNet) into minimum deployable modules on diverse hardware backends (CPUs, GPUs, FPGA, and specialized accelerators): https://tvm.ai/about
  • OpenDataCam - It detects, tracks and counts moving objects by using YOLOv4: https://github.com/opendatacam/opendatacam#-hardware-pre-requisite
  • Netron - Visualizer for neural networks: https://github.com/lutzroeder/netron
Datasets
  • MS COCO: use ./scripts/get_coco_dataset.sh to get labeled MS COCO detection dataset
  • OpenImages: use python ./scripts/get_openimages_dataset.py for labeling train detection dataset
  • Pascal VOC: use python ./scripts/voc_label.py for labeling Train/Test/Val detection datasets
  • ILSVRC2012 (ImageNet classification): use ./scripts/get_imagenet_train.sh (also imagenet_label.sh for labeling valid set)
  • German/Belgium/Russian/LISA/MASTIF Traffic Sign Datasets for Detection - use this parsers: https://github.com/angeligareta/Datasets2Darknet#detection-task
  • List of other datasets: https://github.com/AlexeyAB/darknet/tree/master/scripts#datasets
Improvements in this repository
  • developed State-of-the-Art object detector YOLOv4
  • added State-of-Art models: CSP, PRN, EfficientNet
  • added layers: [conv_lstm], [scale_channels] SE/ASFF/BiFPN, [local_avgpool], [sam], [Gaussian_yolo], [reorg3d] (fixed [reorg]), fixed [batchnorm]
  • added the ability for training recurrent models (with layers conv-lstm[conv_lstm]/conv-rnn[crnn]) for accurate detection on video
  • added data augmentation: [net] mixup=1 cutmix=1 mosaic=1 blur=1. Added activations: SWISH, MISH, NORM_CHAN, NORM_CHAN_SOFTMAX
  • added the ability for training with GPU-processing using CPU-RAM to increase the mini_batch_size and increase accuracy (instead of batch-norm sync)
  • improved binary neural network performance 2x-4x times for Detection on CPU and GPU if you trained your own weights by using this XNOR-net model (bit-1 inference) : https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov3-tiny_xnor.cfg
  • improved neural network performance ~7% by fusing 2 layers into 1: Convolutional + Batch-norm
  • improved performance: Detection 2x times, on GPU Volta/Turing (Tesla V100, GeForce RTX, ...) using Tensor Cores if CUDNN_HALF defined in the Makefile or darknet.sln
  • improved performance ~1.2x times on FullHD, ~2x times on 4K, for detection on the video (file/stream) using darknet detector demo...
  • improved performance 3.5 X times of data augmentation for training (using OpenCV SSE/AVX functions instead of hand-written functions) - removes bottleneck for training on multi-GPU or GPU Volta
  • improved performance of detection and training on Intel CPU with AVX (Yolo v3 ~85%)
  • optimized memory allocation during network resizing when random=1
  • optimized GPU initialization for detection - we use batch=1 initially instead of re-init with batch=1
  • added correct calculation of mAP, F1, IoU, Precision-Recall using command darknet detector map...
  • added drawing of chart of average-Loss and accuracy-mAP (-map flag) during training
  • run ./darknet detector demo ... -json_port 8070 -mjpeg_port 8090 as JSON and MJPEG server to get results online over the network by using your soft or Web-browser
  • added calculation of anchors for training
  • added example of Detection and Tracking objects: https://github.com/AlexeyAB/darknet/blob/master/src/yolo_console_dll.cpp
  • run-time tips and warnings if you use incorrect cfg-file or dataset
  • added support for Windows
  • many other fixes of code...
And added manual - How to train Yolo v4-v2 (to detect your custom objects)
Also, you might be interested in using a simplified repository where is implemented INT8-quantization (+30% speedup and -1% mAP reduced): https://github.com/AlexeyAB/yolo2_light


推荐阅读