AlexeyAB / darknet

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

Inference/detection using multi-gpu #8053

Open killerwife opened 3 years ago

killerwife commented 3 years ago

I have run into issues with trying to multithread the detection step using mutliple gpus. While on windows it runs properly, it seems like on linux its running into some sort of race conditions (I am guessing C static isnt thread safe). Has anyone had success running two detections using YOLO in two separate threads, or does it have to be singlethreaded due to YOLO functions not being thread safe in the detection step.

haviduck commented 3 years ago

yeah. are you by any chance doing multiprocessing?

killerwife commented 3 years ago

Sadly no, i have written a simple module in c++ using threads, however i am running into something that resembles race conditions.