Skip to content
Branko Kokanovic edited this page Nov 13, 2019 · 8 revisions

Frequently asked questions (FAQ)

Q: Do I need to have GPU?

A: GPU is absolutely not required, but it will dramatically speed up analysis (50x-100x!). We suggest you start first without it and see if you need it. Also, getting GPU to work is not straightforward, you will need to recompile DLib yourself (with CUDA libraries installed on your system) to take advantage of GPU processing. Head over to Installation (Hard way) to read more how to install all dependencies yourself. This SO question be good starting resource if you are struggling getting DLib with CUDA (ignore Python parts, you don't need that).


Q: How much memory do I need to run this app?

A: If you run with GPU (see previous question), doesn't really matter. In this case, 1-2GB should be enough.

If you are not leveraging GPU, 2GB is minimum, and 4GB is preferred. Note that the use of RAM memory for PHP application is limited to the PHP configuration. Make sure you change values for both CLI and FPM configurations!

Without 2GB, app will refuse to run, because face detection is requiring this memory. If you have above 4GB, only 4GB will be used (we noticed there is very little improvement going above this amount of memory). Anything between 2GB and 4GB is OK and you might get more faces detected the more memory you have (as we dynamically resize image based on available memory).

Check out Hardware requirements for more details.


Q: I have some folders in which are images that I don't want to be analyzed, I want them ignored and skipped.

A: If you have cases like this, put empty file named .nomedia in root folder that you want ignored. As soon as you put it and you run next analysis, FaceRecognition app will wipe any faces found in that folder and all subfolders of that folder and run clustering again. This will affect all images in this and all subfolders of it. If/when you remove file .nomedia from there - all images will be reprocessed again on next analysis. Unfortunately, you cannot skip/ignore individual images, we support only ignoring folders.


Q: The process stops with a message: Out of memory: Kill process 2059 (php) score 961 or sacrifice child

A: This message indicates that your system ran out of free RAM memory, and the kernel decided he should stop this process to continue functioning properly.

The memory is shared between this application, and any process that is running in the system. This may be a temporary problem if your system has a high load temporarily, and in which case, you can ignore it and the process will continue in the next execution. If it's a recurring problem, you may have to adjust your PHP settings, or expand your system's memory.

If you can not improve this, or release unnecessary processes from the system, you probably should not use this application

See Performance analysis of DLib’s CNN face detection to better understand the use of memory.


Q: Process stops with a message: Error PHP imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error

A: This is knows issue in libgd library. It can be solved by upgrading it to version >=2.2. If you are on Debian-based system, try:

sudo apt-get --only-upgrade install libgd3

For reference, here is our internal issue on this, and here is libgd fix.