Comments (30)
The issue is most likely that dlib was compiled with support for AVX and/or SSE4 instructions, but your cpu is too old to support them (pre-2011, I think).
The easiest solution is to download dlib and compile it yourself. But when you do that, you need to make one change.
Before compiling dlib, edit dlib's tools/python/CMakeLists.txt file from:
set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
to:
set(USE_SSE2_INSTRUCTIONS ON CACHE BOOL "Use SSE2 instructions")
And then compile and install dlib and the dlib python extensions. Hopefully that should fix it.
from face_recognition.
The issue is most likely that dlib was compiled with support for AVX and/or SSE4 instructions, but your cpu is too old to support them (pre-2011, I think).
The easiest solution is to download dlib and compile it yourself. But when you do that, you need to make one change.
Before compiling dlib, edit dlib's tools/python/CMakeLists.txt file from:set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
to:
set(USE_SSE2_INSTRUCTIONS ON CACHE BOOL "Use SSE2 instructions")
And then compile and install dlib and the dlib python extensions. Hopefully that should fix it.
Hello, I didn't find this line in the specified location and also my macbook(macbook pro 2010 mid) supports SSE4 but doesn't support AVX. How do I build dlib taking into consideration this issue. I tried reinstalling dlib a lot of times but each time I get Illegal Instruction: 4.
I find this line in " ./dlib/dlib/cmake_utils/set_compiler_specific_options.cmake" ,so change and recomplie , it work!
from face_recognition.
Correct. My Laptop is from 2008. The solution you suggested has fixed my issue. The script is able to recognize faces. Thank you.
from face_recognition.
@Forsskieken The Intel Xeon W3680 (released 2010) doesn't support AVX instructions (released 2011). So that's why it's failing. Sorry! Your only option is to compile dlib without AVX enabled.
from face_recognition.
I am getting error like this..
import face_recognition
File "C:\Python27\lib\site-packages\face_recognition_init_.py", line 7, in
from .api import load_image_file, face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "C:\Python27\lib\site-packages\face_recognition\api.py", line 22, in
face_encoder =dlib.face_recognition_model_v1(face_recognition_model)
AttributeError: 'module' object has no attribute 'face_recognition_model_v1'
from face_recognition.
@PreethiRe Please don't post on closed issues with new unrelated problems. In any case, the answer to your question is here in the README. You need to upgrade to a newer version of dlib.
from face_recognition.
how to fix this..?
face_distances = face_recognition.face_distance(known_encodings, image_to_test_encoding)
AttributeError: module 'face_recognition' has no attribute 'face_distance'
from face_recognition.
@PreethiRe Again, please don't post on closed issues with new unrelated problems. But I'm guessing you accidentally called your own file "face_recognition.py". You can't name your own file that or Python will find that file instead of the library you are trying to import.
from face_recognition.
@Soulzerz Try installing dlib by downloading the source code and running this command inside the source folder:
python3 setup.py install --no USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA
from face_recognition.
face_recognition version:0.1.0
Python version:2.7.6
Operating System:ubantu 14.04
I encountered the same problem,When i run the code,
I get an error "Illegal Instruction" at the following line
gnss523@gnss523:~/Desktop/face_recognition-master/examples$ python find_faces_in_picture.py
Illegal instruction (core dumped)
from face_recognition.
Did you follow the instructions above?
from face_recognition.
I try this method
from face_recognition.
i have got this error ...how to solve it??
` >>>import face_recognition
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/face_recognition/init.py", line 7, in
from .api import load_image_file, face_locations, face_landmarks, face_encodings, compare_faces
File "/usr/local/lib/python2.7/dist-packages/face_recognition/api.py", line 21, in
face_encoder = dlib.face_recognition_model_v1(face_recognition_model)
AttributeError: 'module' object has no attribute 'face_recognition_model_v1`
from face_recognition.
AttributeError: 'module' object has no attribute 'face_recognition_model_v1
means that the version of dlib you are using is too old. You need to use dlib 19.4 or newer.
from face_recognition.
Hi ageitgeym
Thanks for putting this togheter.
I've got error Process finished with exit code 132 (interrupted by signal 4: SIGILL)
when I run the examples, I also cheked if my processor was SSE4 capable (Intel® Xeon® Processor W3680) so before downloading dlib and compiling I wanted to know if there's something else I should do.
thanks for reading and your vmmachine
from face_recognition.
Hi There the compilation succeeded but when I want to install it I get following error:
deeplearning@deep-learning-virtual-machine:~/Downloads/dlib-19.4$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 36, in <module>
from setuptools.command.bdist_egg import bdist_egg as _bdist_egg
ImportError: No module named setuptools.command.bdist_egg
python3-setuptools is already the newest version (20.7.0-1).
I then did:
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo python3 setup.py install
But how do I make sure pycharms uses this newly compiled version
Ok it seems "sudo python3 setup install" instead of "sudo python setup.." did the trick
Thanks and kind Regards
from face_recognition.
@Forsskieken The problem was python setup.py
runs Python 2, which is totally separate and doesn't have access to any libraries you installed for Python 3. So running python3 setup.py
instead is the key.
You can choose when version of Python you are using in Pycharm by going to your project settings and changing the interpreter it's using. Just make sure you choose Python 3 for any new projects you create.
from face_recognition.
from face_recognition.
I have an acer aspire es1-512, I'm facing this error and have already tried the easy solution proposed. And don't know what else to do.
"Dlib was compiled to use AVX instructions, but these aren't available on your machine.
Illegal instruction (core dumped)"
from face_recognition.
@ageitgey Thanks, that made it work! 😄
from face_recognition.
Great! :)
from face_recognition.
Hi, I have been getting this error and I'm unable to understand why this keeps on happening.
Any help would be appreciated !
import face_recognition_models
image = face_recognition_models.load_image_file("abc.jpg")
face_locations = face_recognition_models.face_locations(image)
Traceback (most recent call last):
File "", line 3, in
image = face_recognition_models.load_image_file("abc.jpg")
AttributeError: module 'face_recognition_models' has no attribute 'load_image_file'
from face_recognition.
Hi, I am new to PyCharm. I needed a library face_recognition for my project so I installed it using pip install face_recognition
. Now i am able to import it in ipython but not in PyCharm. I get
ImportError: No module named 'face_recognition'
Thanks for your help.
from face_recognition.
The issue is most likely that dlib was compiled with support for AVX and/or SSE4 instructions, but your cpu is too old to support them (pre-2011, I think).
The easiest solution is to download dlib and compile it yourself. But when you do that, you need to make one change.
Before compiling dlib, edit dlib's tools/python/CMakeLists.txt file from:
set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
to:
set(USE_SSE2_INSTRUCTIONS ON CACHE BOOL "Use SSE2 instructions")
And then compile and install dlib and the dlib python extensions. Hopefully that should fix it.
Hello, I didn't find this line in the specified location and also my macbook(macbook pro 2010 mid) supports SSE4 but doesn't support AVX. How do I build dlib taking into consideration this issue. I tried reinstalling dlib a lot of times but each time I get Illegal Instruction: 4.
from face_recognition.
The issue is most likely that dlib was compiled with support for AVX and/or SSE4 instructions, but your cpu is too old to support them (pre-2011, I think).
The easiest solution is to download dlib and compile it yourself. But when you do that, you need to make one change.
Before compiling dlib, edit dlib's tools/python/CMakeLists.txt file from:set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
to:
set(USE_SSE2_INSTRUCTIONS ON CACHE BOOL "Use SSE2 instructions")
And then compile and install dlib and the dlib python extensions. Hopefully that should fix it.
Hello, I didn't find this line in the specified location and also my macbook(macbook pro 2010 mid) supports SSE4 but doesn't support AVX. How do I build dlib taking into consideration this issue. I tried reinstalling dlib a lot of times but each time I get Illegal Instruction: 4.
I find this line in " ./dlib/dlib/cmake_utils/set_compiler_specific_options.cmake" ,so change and recomplie , it work!
works
from face_recognition.
Buenos dias , la libreria face_recognition , confunde personas al identifcar , lo llame falso positivo , para cuando van a resolver este problema . Estoy haciendo un sistema de reconocimiento facial y me gustaria saber para cuando tienen la solucion.
from face_recognition.
Buenos dias , la libreria face_recognition , confunde personas al identifcar , lo llame falso positivo , para cuando van a resolver este problema . Estoy haciendo un sistema de reconocimiento facial y me gustaria saber para cuando tienen la solucion.
Hi!, could you give more details? It always happens? when it happens it's only for a moment or for a long time? is it just one face or many?
Hola!, puedes dar mas detalles? Pasa siempre? cuando pasa es solo por un momento u ocurre por largo rato?, pasa solo con una cara o con muchas?
from face_recognition.
from face_recognition.
from face_recognition.
I have the issue in MacOS 12.0.1 (M1 chip). Error:
zsh: illegal hardware instruction
installation:
using python 3.7
conda install -c conda-forge dlib
pip install face_recognition
from face_recognition.
Related Issues (20)
- Not accurate HOT 1
- Problem "ValueError: operands could not be broadcast together with shapes ( , ) (128, )" Solution
- fcaial recognition wrong person
- I want to detect whether the faces in the pictures are complete HOT 1
- Face similiarity for multiple images
- Fr
- test HOT 1
- Windows installation HOT 5
- Windows face_recognition run time error HOT 1
- Facial
- Shared My Dockerfile
- Face recognition in the Voynich manuscript
- face_recognition only works with obama. HOT 3
- kindly integrate face alignment step
- Import gets stuck while using it inside a myfunctions module
- Attribute error HOT 1
- dlib HOT 2
- image de-duplication by comparing faces images.
- Will your face_recognition application allow me to store pictures with names tide to them and just later down the line submit a new photo of someone who i dont remember i actually stored, and then the application when i send the photo identifies the person in the photo because its the exact person i stored of their name in a different photo i have saved?
- Face recorgon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from face_recognition.