AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.68k stars 7.96k forks source link

Different Speed on Test and Demo for object detection same weight in Pjreddie and AlexeyAB #4231

Open barzan-hayati opened 4 years ago

barzan-hayati commented 4 years ago

Thanks @AlexeyAB

Ubuntu:18.04
CUDA: 10.1
CUDNN:7.5.0
Model: [YOLO-Lite](https://github.com/reu2018DL/YOLO-LITE) :

I cloned your repository and Pjreddie repository. I changed Makefile for bot of them:

For AlexeyAB repos:


GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
AVX=0
OPENMP=1
LIBSO=1
ZED_CAMERA=0
DEBUG=1

For Pjreddie repos:

GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
OPENMP=1
DEBUG=1
LIBSO=1

I use pretrained weights of YOLO-Lite and I want to test these trained weights (20 classes pascal VOC).

  1. Test By running ./darknet detector test ./cfg/coco.data YOLO_Lite_Test/tiny-yolov2-trial3-noBatch.cfg YOLO_Lite_Test/tiny-yolov2-trial3-noBatch.weights AllImageCars/0396.jpg on AlexeyAB's darknet prediction time is 2.478000 milli-seconds while by running same command on Pjreddie it takes 0.000742 seconds.
  2. Demo Now I want to run darknet on videos. By running ./darknet detector demo ./cfg/coco.data YOLO_Lite_Test/tiny-yolov2-trial3-noBatch.cfg YOLO_Lite_Test/tiny-yolov2-trial3-noBatch.weights Films/Li165CDN.mp4. For Pjreddie FPS: 23 and for AlexeyAB FPS:168.0 and for AlexeyAB is running too fast.

It's possible to justify these differences in time consuming ? thanks beforehand.

AlexeyAB commented 4 years ago

Try to compare with DEBUG=0 in both cases. (DEBUG=1 only for debuggin, not for using in production).