Ultra-Light-Fast-Generic-Face-Detector-1MB icon indicating copy to clipboard operation
Ultra-Light-Fast-Generic-Face-Detector-1MB copied to clipboard

Running on 4 cores on Raspberry pi 4

Open Fpooyan opened this issue 5 years ago • 5 comments

Hi. Thanks for releasing such a great repo. I am working on a face detection project on Raspberry pi 4 and I tried to use all 4 cores processing power using python multiprocessing and multithreading but no speed up! could you please give me a clue on how to run such a network on all 4 cores?

Fpooyan avatar Mar 14 '20 09:03 Fpooyan

You can use the c++ version of MNN inference code provided in my repo, which runs on 4 cores by default.

Linzaer avatar Mar 15 '20 02:03 Linzaer

Thanks! Is it also possible with python version?

Fpooyan avatar Mar 15 '20 07:03 Fpooyan

Hi. Thanks for releasing such a great repo. I am working on a face detection project on Raspberry pi 4 and I tried to use all 4 cores processing power using python multiprocessing and multithreading but no speed up! could you please give me a clue on how to run such a network on all 4 cores?

Have you overcome this problems?

zaiyebuheniwanle avatar Mar 26 '20 08:03 zaiyebuheniwanle

Hi As linzai replied, maybe I can run on multicore using the c++ version of MNN code. But I need to use picamera so I have to work with python version. Is MNN python also capable of running on multicore like the c++ version? Thanks!

On Thu, Mar 26, 2020 at 1:21 PM xiaolong [email protected] wrote:

Hi. Thanks for releasing such a great repo. I am working on a face detection project on Raspberry pi 4 and I tried to use all 4 cores processing power using python multiprocessing and multithreading but no speed up! could you please give me a clue on how to run such a network on all 4 cores?

Have you overcome this problems?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/issues/166#issuecomment-604305754, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMRLSYKCVA56MVNU4AU3STRJMJSLANCNFSM4LIW6MVA .

Fpooyan avatar Mar 26 '20 10:03 Fpooyan

@Fpooyan This might be not so convenient, but you could use C/C++ binding tools to run c++ version from your python code and get results back. According to my experience, the easiest way is to use Cython: http://docs.cython.org/en/latest/src/tutorial/external.html

Example above is for simple usage, but it gives you the start point for investigation.

ghost avatar Apr 20 '20 10:04 ghost