How to install dlib on Raspberry Pi 4 or Linux
HTML-код
- Опубликовано: 1 окт 2024
- This Video show how to install dlib on Raspberry pi4 or any Linux machine in great detail.
Terminal commands:
------------------------------------------------------------------------------
--------------------------------------------------------------------------
To update the System:
---------------------------------------------------------
sudo apt get update
-------------------------------------------------------
To Upgrade the System:
--------------------------------------------------------
sudo apt get upgrade
-------------------------------------------------------
to install dev packages:
---------------------------------------------------------
sudo apt-get install build-essential cmake pkg-config
-----------------------------------------------------------------------------------------
great video,
Just a comment, if when trying to build and install the python script, you get an error "No module named setuptools" try installing those first using:
First create and move into a folder to house the files new files that would be downloading and then issue the command:
wget bootstrap.pypa.io/ez_setup.py -O - | sudo python
Thanks for sharing! This method worked well with my rasp4!
Thanks man, for sharing your experience with us
do you have a follow on video or a link on what to do next ??
You can create any kind of project, like face AR, eyes tracking, yawn detection, eyes 👁️ blinking detection etc.
Actually after 91% it is not building..I have tried more than 5 times. Every time I face the same issue..Can someone suggest me how to install dlib for my project..
Install mediapipe instead of dlib.
Can I use the same method for raspberry pi 3 B+ too?
yeah, Hopefully it would work.
i tried this but getting following error can someone help?
running build
Detected Python architecture: 64bit
Detected platform: linux
Removing build directory /home/pi/Downloads/dlib-19.7/./tools/python/build
Configuring cmake ...
/usr/lib/python3.9/subprocess.py:941: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, 'rb', bufsize)
Traceback (most recent call last):
File "/home/pi/Downloads/dlib-19.7/setup.py", line 616, in
setup(
File "/usr/local/lib/python3.9/dist-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/pi/Downloads/dlib-19.7/setup.py", line 410, in run
self.build_dlib()
File "/home/pi/Downloads/dlib-19.7/setup.py", line 567, in build_dlib
if run_process(cmake_cmd):
File "/home/pi/Downloads/dlib-19.7/setup.py", line 303, in run_process
while t.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'
Use MediaPipe which is faster and easier.
Thank you . It went smooth :)
Thanks man for Appreciation and confirmation ♥️
THANK
You are welcome.
Hello, thanks for the video, everything worked ok during the installation, but after thar when i tried to import dlib y got this error
>>> import dlib
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/dist-packages/dlib/__init__.py", line 19, in
from _dlib_pybind11 import *
ImportError: libatlas.so.3: cannot open shared object file: No such file or directory
Can you please help me?
apologize, for late response have install required modules for Dlib before installation?
@@AiPhile which modules?