Darknet: Test speed too slow when using CPU only

Created on 11 Jun 2018  Â·  3Comments  Â·  Source: pjreddie/darknet

@pjreddie @AlexeyAB @digitalbrain79 Hi, recently I am using YOLO3 to try detect cars in high resolution street view image. Everything's perfect when using in GPU, thanks for the work! But when I run it in CPU, it become very slow. I take 14 sec to process a 512*512 image (ususally 0.15s in GPU version). I haven't run any other code at that time so it really makes me confuse. I then found a issue claiming that the darnet_no_cpu is very slow since the code doesn't support multi-thread and then @digitalbrain79 https://github.com/digitalbrain79/darknet-nnpack is recommended to try. But it only have yolov2 version.

So do you guys have plan to do update about this? Or would you give me some suggestion on using nnpack in Yolov3 or other methods to improve it? Thank you!

Most helpful comment

Just try to use the OpenCV master-branch ( 16 Apr 2018 and later): https://github.com/opencv/opencv
and this example: https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp

For Yolo v3 detection on CPU (now it is supported): https://github.com/opencv/opencv/pull/11322

./bin/example_dnn_object_detection -c=yolov3_608.cfg -m=yolov3_608.weights --scale=0.00392 --rgb -i=example.jpg --width=608 --height=608

All 3 comments

Just try to use the OpenCV master-branch ( 16 Apr 2018 and later): https://github.com/opencv/opencv
and this example: https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp

For Yolo v3 detection on CPU (now it is supported): https://github.com/opencv/opencv/pull/11322

./bin/example_dnn_object_detection -c=yolov3_608.cfg -m=yolov3_608.weights --scale=0.00392 --rgb -i=example.jpg --width=608 --height=608

awesome! Thank you so much.

Sent from my iPhone

On Jun 12, 2018, at 09:06, Alexey <[email protected]notifications@github.com> wrote:

Just try to use the OpenCV master-branch ( 16 Apr 2018 and later): https://github.com/opencv/opencv
and this example: https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp

For Yolo v3 detection on CPU (now it is supported): opencv/opencv#11322https://github.com/opencv/opencv/pull/11322

./bin/example_dnn_object_detection -c=yolov3_608.cfg -m=yolov3_608.weights --scale=0.00392 --rgb -i=example.jpg --width=608 --height=608

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/pjreddie/darknet/issues/872#issuecomment-396433236, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AT2_6V1-jTUTJqBoGb0qCseJG4WOyg0Jks5t7xQDgaJpZM4UiBFp.

I am a bit surprised because mask_rcnn with resnet-101 takes 3 to 5 seconds on cpu on similar size images. Is it a bug in the implementation of darknet?

Was this page helpful?
0 / 5 - 0 ratings