Open ivder opened 5 years ago
@AlexeyAB Hi I've updated my post, if you have time kindly take a look at it. Thanks
@gameon67 Hi,
Bottleneck may be on the HDD or CPU.
Do you use yolov3.cfg or yolov3-tiny.cfg?
Do you use the latest version of Darknet from this repository? https://github.com/AlexeyAB/darknet
What did you change in the source code?
Since your output Time: 0.00476 sec
while output in my repo: https://github.com/AlexeyAB/darknet/blob/7a854302efb7adba80d5e8a747ad5e5ec384a226/src/detector.c#L1323
@AlexeyAB Thanks for the reply
Do you use yolov3.cfg or yolov3-tiny.cfg?
I use yolov3.cfg (I used yolov3-tiny.cfg as well but same symptom)
Do you use the latest version of Darknet from this repository?
I think yes, I forked your repo at the beginning of this month
What did you change in the source code?
Nothing, actually that's the output from yolo_console_dll.cpp
, I added the chrono
into else if (file_ext == "txt")
as well for list of images detection
auto end = std::chrono::steady_clock::now();
std::chrono::duration<double> spent = end - start;
std::cout << " Time: " << spent.count() << " sec \n";
Even with the code from detector.c
printf("%s: Predicted in %lf milli-seconds.\n", input, ((double)get_time_point() - time) / 1000);
I still get the same result, the inference speed keep getting faster
@gameon67 Hi,
Yes, I get the same results, the first ~10-20 detection time measurements are faster or slower, and then detection time measurements are stable.
I do not know why this is happening. May be due to GPU boost technology (change of clock frequency depending on heating) or due to additional time for some initialization at first detections.
@AlexeyAB Hi again I've edited my post, I'm very curious because the detection time is keep getting faster when test list of images (multiple images) with this command :
./darknet detector test data/obj.data cfg/obj.cfg backup/obj_last.weights -i 0 -thresh 0.25 -dont_show -ext_output < data/obj/test.txt > detected.txt
and C++ version :LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib data/obj.names cfg/obj.cfg backup/obj_last.weights data/obj/test.txt
The first image detection inference time is the same as inference time when I test on single image. But after several images the inference time is getting faster. Do you know the reason behind this? And I have to make inference time report, so it will be better if I can get constant and stable value.
Example detection in txt file (you will see the speed will increase from 17ms ~ 4ms) :