mauricesvay / php-facedetection

Detect face in images in pure PHP
GNU General Public License v2.0
754 stars 254 forks source link

Added a max_duration parameter to __construct() and some code at do_d… #29

Open nepomuc opened 6 years ago

nepomuc commented 6 years ago

…etect_greedy_big_to_small() in order to abort the face detection after x seconds and to prevent the process from an endless loop.

Signed-off-by: NEPOMUC.com info@nepomuc.com

mauricesvay commented 6 years ago

I'm not sure adding a timeout is a good strategy. It would be better to fix the infinite loop.

nepomuc commented 6 years ago

@mauricesvay Thanks for you feedback! My "solution" with the timeout is already six years old. I only created the pull request a few days ago, because I thought it might be helpful. I totally understand your concerns and you're right: It's not a real fix. For me it worked out fine as a quick workaround and ensure control over execution time.