Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: image not found #140

Closed
BeMoreDifferent opened this issue Aug 4, 2017 · 8 comments
Closed

error: image not found #140

BeMoreDifferent opened this issue Aug 4, 2017 · 8 comments

Comments

@BeMoreDifferent
Copy link

  • face_recognition version:0.2.1
  • Python version:Python 3.6.2
  • Operating System: Mac OS 10.11.2

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

@ageitgey
Copy link
Owner

ageitgey commented Aug 7, 2017

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.

@satya415
Copy link

satya415 commented Aug 8, 2017

  • 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

@ageitgey
Copy link
Owner

ageitgey commented Aug 8, 2017

@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

@satya415
Copy link

satya415 commented Aug 9, 2017 via email

@heeryerate
Copy link

heeryerate commented Sep 24, 2017

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 :)

@jtlz2
Copy link

jtlz2 commented Jan 15, 2018

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

@jtlz2
Copy link

jtlz2 commented Jan 15, 2018

Actually - fixed: For Anaconda 2,

ContinuumIO/anaconda-issues#6423

or

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

@jajkelle
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants