AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.73k stars 7.96k forks source link

Yolo_console_dll #2018

Open ratkhohieu opened 5 years ago

ratkhohieu commented 5 years ago

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.

AlexeyAB commented 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

AlexeyAB commented 5 years ago

There are 4 threads:

  1. 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

  2. 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

  3. 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

  4. permanent thread with ~infinity loop for Detection (: https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/src/yolo_console_dll.cpp#L363-L382