Open ratkhohieu opened 5 years ago
And FPS_camera =25 but FPS_detect =11 video resolution (1280x720). Is that normal? because my GPU has CC=5.0.
Yes, this is normal. It is done for real-time detection from cameras (not video).
if I don't want to track objects, where are lines I must comment?
Just left this line commented: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L18
May be you want to comment these lines:
Also you can try to comment this line: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L410
There are 4 threads:
main-thread with this loop - it controls threads 2,3,4, it transfers data between them, and it draws and shows bounded boxes in the window: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L298
thread starts every time for video Capture (every time we wait for completion of this thread and start another one): https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L301-L306
thread starts every time for video Saving (every time we wait for completion of this thread and start another one): https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L419-L426
permanent thread with ~infinity loop for Detection (: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L363-L382
do detection using Yolo: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L369-L370
it locks mutex: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L372
save results with bounded boxes to the thread_result_vec: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L373
set flag that results are ready: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L374
notify conditional variable: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L375
get new image for detection using Yolo: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L379
If necessary, we wait for the tracking algorithm to catch up with the current frame (for example, if the camera receives 30 FPS, and the detector processes only 5 FPS, the detector results will be 6 frames behind, 6 frames will be saved to the buffer std::queue<cv::Mat> track_optflow_queue;
, and the tracking algorithm will track Moving objects to catch up with the current frame, at this time we do not run the Yolo detector, so as not to occupy the resources of the GPU) https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L377
mutex is unlocked automatically (RAII)
Hi @AlexeyAB. Can you explain yolo_console_dll like #304 issue or algorithm flowchart? If I don't want to track objects, where are lines I must comment? And FPS_camera =25 but FPS_detect =11 video resolution (1280x720). Is that normal? because my GPU has CC=5.0.