Closed ioir123ju closed 4 years ago
Do you use the latest version of Darknet?
Did you compile Darknet with GPU=1 CUDNN=1 CUDNN_HALF=1 ?
Do you run something else on this server?
GPU:V100 yolov4.cfg:608x608 command: ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output FPS:39
Show screenshot of AVG FPS.
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
Show such screenshot:
python darknet.py in darknet.py start = time.time() for i in range(100): ret = detect_image(net, meta, im, thresh, hier_thresh, nms, debug) end = time.time() print(end-start) fps:31 but your result is 62(V) FPS
Don't use python.py
For checking FPS you should use: https://github.com/AlexeyAB/darknet/wiki/How-to-evaluate-accuracy-and-speed-of-YOLOv4
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
or
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output -benchmark
- Do you use the latest version of Darknet?
- Did you compile Darknet with GPU=1 CUDNN=1 CUDNN_HALF=1 ?
- Do you run something else on this server?
GPU:V100 yolov4.cfg:608x608 command: ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output FPS:39
- Just now I get 33 FPS on RTX 2070 for yolov4.cfg/weights 608x608, while V100 is 2x faster
- Show screenshot of AVG FPS.
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
- Show such screenshot:
python darknet.py in darknet.py start = time.time() for i in range(100): ret = detect_image(net, meta, im, thresh, hier_thresh, nms, debug) end = time.time() print(end-start) fps:31 but your result is 62(V) FPS
Don't use python.py
For checking FPS you should use: https://github.com/AlexeyAB/darknet/wiki/How-to-evaluate-accuracy-and-speed-of-YOLOv4
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
or./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output -benchmark
yes, I use the latest version of Darknet. I use cmake to compiled code, COMMAND:./build.sh GPU=1 CUDNN=1 CUDNN_HALF=1 is ON. I use your command retest it and get the results: ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output FPS:42.5 AVG_FPS:42.7
Use latest version
What resolution of videofile do you use?
How many CPU-cores do you have?
Show such screenshot:
And only then show screenshot of AVG FPS.
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
show screenshot of AVG FPS.
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output -benchmark
I added 2 small fixes: https://github.com/AlexeyAB/darknet/commit/ccafff912bd42728aa873be7b4c7add2366858a8 and https://github.com/AlexeyAB/darknet/commit/da050367a8b174f751a2c9720195d51a369c4a4a
Try again with the latest repo:
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
and
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output -benchmark
I added 2 small fixes: ccafff9 and da05036
Try again with the latest repo:
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
and./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output -benchmark
I found a problem。 option(ENABLE_CUDNN_HALF "Enable CUDNN Half precision" ON) in the CMakeLists.txt BUT when I run ./darknet ..., result is 'CUDNN_HALF=0'. So I tried to compile with Makefile. It is working! Everything is all right. CUDNN_HALF=1. FPS:59. Maybe you should check the CMakelist.txt.
Thank you for your answer.
@ioir123ju It should work for any GPU with CC 7.0(V100), 7.2, 7.5(RTX) https://github.com/AlexeyAB/darknet/commit/f14054ec2b49440ad488c3e28612e7a76780bc5f#diff-af3b638bc2a3e6c650974192a53c7291R68
It will not work only if you use older commit.
with MSCOCO. I valided with ./darknet detector valid cfg/coco.data cfg/yolov4.cfg yolov4.weights. It took about 1200 seconds to process 20288 images.
and evaluated FPS of YOLOv4 on GPU by ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -ext_output. FPS is around 30.
Both of them were too slow . I sure that CUDNN_HALF=1. What's wrong with it?
@Li505358678
and evaluated FPS of YOLOv4 on GPU by ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -ext_output. FPS is around 30.
@Li505358678
- Show such screenshot:
and evaluated FPS of YOLOv4 on GPU by ./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -ext_output. FPS is around 30.
- Show screenshot
@AlexeyAB from this. is there any wrong?I've had a headache for a day because this
Compile OpenCV and Darknet in Release mode instead of Debug.
debug change to 0?
Yes, and recompile.
And show screenshot of FPS of these two commands:
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -ext_output
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -dont_show -ext_output -benchmark
thank you very much! the fps of video is 65 ok ,
but fps of the images is bad about 30 .Specifically, 20288 pictures of testdev2017.txt and test2017 took about 800 seconds(812s) commands:./darknet detector valid cfg/coco.data cfg/yolov4.cfg yolov4.weights
./darknet detector valid - isn't optimized for high speed, there is performance bottleneck in your CPU or HDD.
./darknet detector valid - isn't optimized for high speed, there is performance bottleneck in your CPU or HDD.
so is there any good way which valid images with high speed
int nthreads = 8;
there and recompile https://github.com/AlexeyAB/darknet/blob/0ef5052ee51e82b2862fab5e9135b7bae060354f/src/detector.c#L688
What speed do you get?I just do as https://github.com/AlexeyAB/darknet/wiki/How-to-evaluate-accuracy-and-speed-of-YOLOv4 . the images are test2017 which has more than 20288 images,but testdev2017.txt only have 20288. with debug=0 use 835s
So you got only 23 FPS for images, while 65 FPS for video. What about other questions?
As you said. what's mean of other question?
The bottleneck is in your HDD disk, buy SSD.
I see. Thank you very much for your help!
Hi! GPU:V100 yolov4.cfg:608x608 command:
./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights fall_down_test_2.avi -dont_show -ext_output
FPS:39 command:python darknet.py
in darknet.pystart = time.time() for i in range(100): ret = detect_image(net, meta, im, thresh, hier_thresh, nms, debug) end = time.time() print(end-start)
fps:31 but your result is 62(V) FPS