Linzaer / Ultra-Light-Fast-Generic-Face-Detector-1MB

💎1MB lightweight face detection model (1MB轻量级人脸检测模型)
MIT License
7.17k stars 1.54k forks source link

Running on 4 cores on Raspberry pi 4 #166

Open Fpooyan opened 4 years ago

Fpooyan commented 4 years ago

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?

Linzaer commented 4 years ago

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

Fpooyan commented 4 years ago

Thanks! Is it also possible with python version?

zaiyebuheniwanle commented 4 years ago

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?

Fpooyan commented 4 years ago

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 notifications@github.com 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 .

ghost commented 4 years ago

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