Face_recognition: error: image not found

Created on 4 Aug 2017  Â·  8Comments  Â·  Source: ageitgey/face_recognition

First thank you for this great project.

I really like to play around with you Code but I have issues setting it up. If I try to run a example I get this error:

Traceback (most recent call last):
  File "app.py", line 1, in <module>
    import dlib
  File "/usr/local/lib/python3.6/site-packages/dlib/__init__.py", line 1, in <module>
    from .dlib import *
ImportError: dlopen(/usr/local/lib/python3.6/site-packages/dlib/dlib.so, 2): Library not loaded: @rpath/libmkl_rt.dylib
  Referenced from: /usr/local/lib/python3.6/site-packages/dlib/dlib.so
  Reason: image not found

Would it be possible to explain how I can solve this issue?

All the best
Daniel

Most helpful comment

This means dlib was compiled with support for Intel MKL (Intel Math Kernel Library) but dlib can't find the MKL library at runtime.

You either need to recompile dlib with MKL support disabled or you need to make sure dlib can find the libmkl_rt.dylib file on your system.

All 8 comments

This means dlib was compiled with support for Intel MKL (Intel Math Kernel Library) but dlib can't find the MKL library at runtime.

You either need to recompile dlib with MKL support disabled or you need to make sure dlib can find the libmkl_rt.dylib file on your system.

  • face_recognition : latest version
  • python version: 2.7
  • OS : Ubuntu 16.04

Thank you for face_recognition project.
I installed and I am able to detect faces in an image. But I am facing a problem, I am able to detect only few faces in the group photos. I need to increase the number of face detections in the image. How can I do that?
https://drive.google.com/open?id=0BwTo_QCzOuviZUJrcDRGYzRGbEk
Is there any tolerance control parameter to increase the face detection in an image. Really will be helpful for my project.

Regards
Satya

@satya415 Please file a new issue if you have a problem instead of posting on an unrelated issue.

But the problem is that the faces in your image are small. The answer is use the number_of_times_to_upsample parameter. That tells it to look for smaller faces in a small image by scaling the image larger. For example:

face_recognition.face_locations(img, number_of_times_to_upsample=2)

Here are the results I get with your image:

>>> len(face_recognition.face_locations(img, number_of_times_to_upsample=1))
11

>>> len(face_recognition.face_locations(img, number_of_times_to_upsample=2))
30

>>> len(face_recognition.face_locations(img, number_of_times_to_upsample=3))
31

Thank you very much

On 8 August 2017 at 22:20, Adam Geitgey notifications@github.com wrote:

@satya415 https://github.com/satya415 Please file a new issue if you
have a problem instead of posting on an unrelated issue.

But the problem is that the faces in your image are small. The answer is
use the number_of_times_to_upsample parameter. That tells it to look for
smaller faces in a small image by scaling the image larger. For example:

face_recognition.face_locations(img, number_of_times_to_upsample=2)

Here are the results I get with your image:

len(face_recognition.face_locations(img, number_of_times_to_upsample=1))11
len(face_recognition.face_locations(img, number_of_times_to_upsample=2))30
len(face_recognition.face_locations(img, number_of_times_to_upsample=3))31

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ageitgey/face_recognition/issues/140#issuecomment-321015156,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARCxydP3gEXqy2IuEPn2D917-BZzHZNRks5sWJHFgaJpZM4OtczQ
.

Hi @ageitgey, thank you very much for the face_recognition project.

I've played it for a while, and when I try to use the module, it keeps raising error like
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.

The following is my working environment:

face_recognition version:1.0.0
Python version:Python 3.6.1
Operating System: Mac OS 10.12.6

I believe the error is related to its dependency dlib module. While I could use dlib, I can't find a way to gid rid of the face_recognition error, which is wired.

You mentioned that
"You either need to recompile dlib with MKL support disabled or you need to make sure dlib can find the libmkl_rt.dylib file on your system."

I tried to set lib path using DYLD_xxx, but it seems not work at all ...
would you please let me know how to compile dlib without MKL support?

Thank you in advance :)

@ageitgey Agreed - looks great. How does one compile dlib without MKL support?

Actually - fixed: For Anaconda 2,

https://github.com/ContinuumIO/anaconda-issues/issues/6423

or

export LD_LIBRARY_PATH="/anaconda2/lib:$LD_LIBRARY_PATH"

This means dlib was compiled with support for Intel MKL (Intel Math Kernel Library) but dlib can't find the MKL library at runtime.

You either need to recompile dlib with MKL support disabled or you need to make sure dlib can find the libmkl_rt.dylib file on your system.

How to recompile dlib with MKL?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

damey2011 picture damey2011  Â·  3Comments

InnovativeInventor picture InnovativeInventor  Â·  6Comments

Nijinsha picture Nijinsha  Â·  5Comments

Sparviero-Sughero picture Sparviero-Sughero  Â·  4Comments

dharam1890 picture dharam1890  Â·  3Comments