Darknet: How to disable video displaying in Yolo

Created on 21 Apr 2018  ·  12Comments  ·  Source: pjreddie/darknet

I use Yolo to process video streams to identify person, car, etc in each frame.
My system is Linux with 2 K80 GPUs. It works, but very slow like 0.1 FPS.
How to make it run faster? Especially I want Yolo to process all the frames but
disable the video displaying part. So Yolo doesn't need to show me each frame
image by image and it doesn't need to draw the rectangles and doesn't need to
mark the rectangle as "person" or "car". I do not need to see those because those
just slow down the Yolo processing. All I want is back processing and write the
results into a file.

Most helpful comment

@janhuang6 you can use AlexeyAB's fork, he did a lot of performance optimisation. When training or detecting you should be able to give it -dont_show flag and then you can do it without an x server.
https://github.com/AlexeyAB/darknet/

Example on command
./darknet detector train data/obj.data yolo-obj.cfg darknet53.conv.74 -dont_show

All 12 comments

did you compile with cudnn and gpu in the Makefile ?

Here are the top 5 lines of my Makefile:

GPU=1
CUDNN=1
OPENCV=1
OPENMP=0
DEBUG=0

My Yolo runs on server Linux. But it has to display the video and draw the ROIs found and mark the names of those objects through the network on my PC (I installed cygwin and X window simulator on my PC so Yolo can display the video on my PC. Otherwise, Yolo will not process the video at all due to some "display issue").

Above display issue was fixed and Yolo can process my video. But the speed was like 0.1FPS.
Only one day and it happened only once, when the displaying pipeline from Linux to PC X-window simulator was partially broken, such that Yolo did not see "displaying issue" but actually the displaying went no where (I did not see the video on my PC X simulator), Yolo ran at about 10 FPS (that is 100 times faster).
I could not reproduce that "partially broken" displaying pipeline.

I do want to know is there anyway I can tell Yolo do not bother to display the video during the processing? That will help Yolo to run at full speed because waiting for displaying the video over network on remote computer is slow.

Thanks!
Jan

@janhuang6 you can use AlexeyAB's fork, he did a lot of performance optimisation. When training or detecting you should be able to give it -dont_show flag and then you can do it without an x server.
https://github.com/AlexeyAB/darknet/

Example on command
./darknet detector train data/obj.data yolo-obj.cfg darknet53.conv.74 -dont_show

MikeyR, thank you so much for the help. I downloaded my Yolo from https://pjreddie.com/darknet/yolo/
After I added "-dont_show" to my command line, my darknet complained:

Not an option: -dont_show

Is that "-dont_show" only for the AlexeyAB version of Yolo? Does that mean I have to remove my current Yolo and install AlexeyAB Yolo?

Thanks!
Jan

@janhuang6 It is only for AlexeyAB's version, you can have them next to each other e.g. /home/janhuang6/darknet and /home/janhuang6/alexeyab_darknet/ without any problems. You can ofc not use alexeyab's stuff inside the original darknet repo.

The -dont_show flag works with AlexeyAB Yolo. Thank Mike Røntved TheMikeyR. I am closing this issue.

I even put -dont_show , still get logs and this is problem for me ?
can you please explain how you solve the problem ?

I even put -dont_show , still get logs and this is problem for me ?
can you please explain how you solve the problem ?

Can you help about this topic please @ AlexeyAB

!./darknet detector train data/obj.data yolov3.cfg darknet53.conv.74 -map -dont_show

Is that wrong

Same here with -dont_show
I now get

Wrong annotation: x = 0, y = 0, < 0 or > 1

In Google Colab

I commented line 230 in demo.c
make_window("Demo", 1352, 1013, fullscreen);
and it works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cadip92 picture cadip92  ·  3Comments

ivomarvan picture ivomarvan  ·  3Comments

TheHidden1 picture TheHidden1  ·  3Comments

kthordarson picture kthordarson  ·  3Comments

gpsmit picture gpsmit  ·  3Comments