Dlib: AttributeError: module 'dlib' has no attribute 'load_rgb_image'

Created on 17 May 2018  ·  8Comments  ·  Source: davisking/dlib

ubuntu@ubuntu:~/face-recognition/dlib/python_examples$ python face_detector.py ../examples/faces/2007_007763.jpg
Processing file: ../examples/faces/2007_007763.jpg
Traceback (most recent call last):
File "face_detector.py", line 53, in
img = dlib.load_rgb_image(f)
AttributeError: module 'dlib' has no attribute 'load_rgb_image'

/home/ubuntu/anaconda3/bin/python /home/ubuntu/face-recognition/dlib/python_examples/face_recognition.py
Traceback (most recent call last):
Processing file: ../examples/faces/2007_007763.jpg
File "/home/ubuntu/face-recognition/dlib/python_examples/face_recognition.py", line 82, in
img = dlib.load_rgb_image(f)
AttributeError: module 'dlib' has no attribute 'load_rgb_image'

Dlib is installed ! When I use example_python,I meet the question. It is showing AttributeError: module 'dlib' has no attribute 'load_rgb_image' at pycharm. However, It is not this error by c++ in qt creator. I don't kown how to repair.

  • Version: 19.10
  • Where did you get dlib: github:https://github.com/davisking/dlib
  • Platform: ubuntu 16.04 x64
  • Compiler: pycharm-community-2017.3.3 Anaconda3 python3.6

All 8 comments

I have the same problem

If you get this error then it means you are using an old version of dlib. Get the new one from git. I see that you claimed you did get the new one from git, but considering that this function is missing you clearly are using an old version of dlib.

http://dlib.net/faq.html#WhyissomefunctionmissingfromthedlibPythonmodule

I don’t know what to tell you. There is only the master dlib branch. You just didn’t install it.

Is the problem solved? I am using a '19.16.0' version dlib but still cannot load some functions.

Are you sure? What is the output of

import dlib
print(dlib.__version__)

Oh it works now... I made a silly mistake. Sorry about it! And thank you very much for reply!

Oh it works now... I made a silly mistake. Sorry about it! And thank you very much for reply!

Can u tell me the mistake u did? Cus I have the same error.

Hi Iam getting the same error and for dlib.__version__ too . Any ideas on how to solve it ?

Was this page helpful?
0 / 5 - 0 ratings