matiasdelellis / facerecognition

Nextcloud app that implement a basic facial recognition system.
GNU Affero General Public License v3.0
510 stars 46 forks source link

Face Recognition is really slow #612

Closed sirdrakeistda closed 1 year ago

sirdrakeistda commented 1 year ago

Expected behaviour

I read your limitations: https://github.com/matiasdelellis/facerecognition/wiki/Requirements-and-Limitations according to this an image should be processed in a few minutes. Changing the temporary file size should make the processing faster

Actual behaviour

Processing one image is really slow. I run a cron job every 30 minutes (described in the installation section). Per day only ~100 images are processed. This is much less then expected. Changing the temporary file size does not speed up the process. The model 1 is used. Also the server has no significant load.

Steps to reproduce

  1. Install App
  2. create cron job or process the images manually.
  3. really slow

Server configuration

Web server error log

no error

Nextcloud log (data/nextcloud.log)

no error

matiasdelellis commented 1 year ago

Hi @sirdrakeistda I'm surprised it's so slow. Maybe dlib was compiled in debug mode, however, after verifying that, for a raspberry pi, I would recommend using an external model.

I hope to be able to do a test soon at RPI 🤔

sirdrakeistda commented 1 year ago

I am unaware of compiling it in debug mode, I followed your instructions. The only thing I changed was the c version. I had to switch c version (c14 is needed without tweaking c11 is used and wont compile). It might be helpfull to add this info to the installation instructions.

SKB-CGN commented 1 year ago

An RP4 is also not the best choice for doing picture jobs with that small CPU. Even on my new server, the image scanning takes 60 sec per picture and the CPU is fired with 45%.

sirdrakeistda commented 1 year ago

One image per minute would be around 1680 images per day. That's faster then my Pi. I will check again the debug mode (expected after Christmas).

Am 16. Dezember 2022 09:43:29 MEZ schrieb SKB-CGN @.***>:

An RP4 is also not the best choice for doing picture jobs with that small CPU. Even on my new server, the image scanning takes 60 sec per picture and the CPU is fired with 45%.

-- Reply to this email directly or view it on GitHub: https://github.com/matiasdelellis/facerecognition/issues/612#issuecomment-1354397088 You are receiving this because you were mentioned.

Message ID: @.***>

sirdrakeistda commented 1 year ago

I recompiled it. It is a lot faster. I think it was my fault. Sorry for this issue. This is great app. Keep developing.