AlexeyAB / darknet

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

Run Multiple Instance of YOLO python #1607

Open OreneElmaleh opened 6 years ago

OreneElmaleh commented 6 years ago

Hi, I would like to run multiple instances of YOLO on my Quadro P5000 from a single python script.

A single instance leads to 16 FPS with the parameters I choose. If I run 4 instances in parallel of the same python script which uses the dll, I get 20 FPS which is a good performance for my purpose.

However, I would like to run one single script in order to allow efficient communication between my main and the YOLO instances so I tried to use threads but I get the same results than what I got with one single instance (I create 2 threads and together I got about 15 FPS).

Is it be possible to improve the FPS in one single script?

Thank you, Oren

KyloEntro commented 4 years ago

You can use multiprocessing instead of multithreading in Python