Process always crash while running HOG detection on high resolution image

Author: lfcnassifCreated Oct 5, 2022Updated May 20, 2026
  • face_recognition version: 1.3.0
  • Python version: 3.9.12
  • Operating System: Windows 10 x64

Description

The HOG detection always crash the python process abruptly without printing any kind of error while running it over a (2472, 3296) resolution personal photo, even if the photo is resized to 1024 max dimension before. Maybe this is caused by some specific characteristic of the image, not sure. I can send you the triggering image privately since it is a personal photo of a colleague of mine. What email should I send the photo to?

What I Did

To reproduce, download this script: https://github.com/sepinf-inc/IPED/blob/master/iped-app/resources/scripts/tasks/FaceRecognitionProcess.py

Run it passing these parameters (they mean max_resolution, detection_model, upsampling): python.exe FaceRecognitionProcess.py 1024 hog 1

The script will wait some input from stdin. First is the full path to the image + newline. Then the image orientation/rotation + newline, in the case of the triggering image it is 8. Then the script should print the number of detected faces, their locations, then face encodings. Debugging, it crashes at line 107 - face_locations(...) method call.

Thank you for this library and thank you in advance for your help!

Source: ageitgey/face_recognition