Darknet: What's the different between Darknet here and the official one?

Created on 29 Mar 2018  ·  9Comments  ·  Source: AlexeyAB/darknet

Hi,everyone, I run the same yolov2-tiny.cfg and yolov2-tiny.weights in the same device(jetson tx2), but the darknet download here is faster than the official one. So what's the difference between them?
Thanks.

enhancement

Most helpful comment

Hi,

Did you use ./darknet detector demo... command?

There are many changes such as:

  • added support for Windows
  • 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 neural network performance Detection 3x times, Training 2 x times on GPU Volta (Tesla V100, Titan V, ...) 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%, Yolo v2 ~10%)
  • fixed usage of [reorg]-layer
  • optimized memory allocation during network resizing when random=1
  • optimized initialization GPU 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 during training
  • 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
  • fixed code for use Web-cam on OpenCV 3.x
  • run-time tips and warnings if you use incorrect cfg-file or dataset
  • many other fixes of code...

And added manual How to train yolo.

All 9 comments

Hi,

Did you use ./darknet detector demo... command?

There are many changes such as:

  • added support for Windows
  • 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 neural network performance Detection 3x times, Training 2 x times on GPU Volta (Tesla V100, Titan V, ...) 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%, Yolo v2 ~10%)
  • fixed usage of [reorg]-layer
  • optimized memory allocation during network resizing when random=1
  • optimized initialization GPU 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 during training
  • 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
  • fixed code for use Web-cam on OpenCV 3.x
  • run-time tips and warnings if you use incorrect cfg-file or dataset
  • many other fixes of code...

And added manual How to train yolo.

How much fps on tx2?

@AlexeyAB yes, i used ./darknet detector demo... command, and i want to know what make the demo faster here than the official one? Did you implement some optimization tricks?
thanks for your reply,you are so 牛逼!

@RushNuts 416*416 About 15fps, less than 20, without any optimizations. and what's more the speed depend on the quality of the video , i don't know why?

@XP-CHRC

15 fps on TX2 using this fork?
And how much fps on TX2 using original fork for yolov2-tiny.cfg?

There is optimization in resizing video frame to the network size, I just use OpenCV implementation cvResize() instead of hand-written implementation - it was a bottleneck - perfomance depends on initial resolution of video: https://github.com/AlexeyAB/darknet/blob/d0039f6dfd749feb8ef0be9137d6d19058093933/src/demo.c#L64-L65

https://github.com/AlexeyAB/darknet/blob/d0039f6dfd749feb8ef0be9137d6d19058093933/src/image.c#L874

this darknet is faster, it's true! Then i am confused, Why don't official projects adopt this project's advantages?
A Great Job, Thanks @AlexeyAB

@AlexeyAB Input size: 416*416, about 10fps on tx2 when use the original fork for yolov2-tiny.cfg.
thanks for your jobs and reply.

@XP-CHRC Oh, 15fps. Not bad. What's resolution your input video?

@RushNuts 416*416

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rezaabdullah picture rezaabdullah  ·  3Comments

Yumin-Sun-00 picture Yumin-Sun-00  ·  3Comments

hemp110 picture hemp110  ·  3Comments

Cipusha picture Cipusha  ·  3Comments

off99555 picture off99555  ·  3Comments