diff --git a/python_examples/compile_dlib_python_module.bat b/python_examples/compile_dlib_python_module.bat deleted file mode 100755 index 1ef81e9e1..000000000 --- a/python_examples/compile_dlib_python_module.bat +++ /dev/null @@ -1,5 +0,0 @@ -mkdir build -cd build -cmake ../../tools/python -cmake --build . --config Release --target install -cd .. diff --git a/python_examples/correlation_tracker.py b/python_examples/correlation_tracker.py index db2e599bd..93115d4ad 100755 --- a/python_examples/correlation_tracker.py +++ b/python_examples/correlation_tracker.py @@ -14,13 +14,22 @@ # and someone is waving the camera around. The task is to track the position of # the juice box as the camera moves around. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake # # Also note that this example requires scikit-image which can be installed diff --git a/python_examples/face_detector.py b/python_examples/face_detector.py index 2401bdf85..53e1a7461 100755 --- a/python_examples/face_detector.py +++ b/python_examples/face_detector.py @@ -20,13 +20,21 @@ # program. # # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake # # Also note that this example requires scikit-image which can be installed diff --git a/python_examples/face_landmark_detection.py b/python_examples/face_landmark_detection.py index 33728b4a8..2588c0401 100755 --- a/python_examples/face_landmark_detection.py +++ b/python_examples/face_landmark_detection.py @@ -20,13 +20,21 @@ # You can get the shape_predictor_68_face_landmarks.dat file from: # http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2 # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake # # Also note that this example requires scikit-image which can be installed diff --git a/python_examples/find_candidate_object_locations.py b/python_examples/find_candidate_object_locations.py index 72038dcd9..568a00b5d 100755 --- a/python_examples/find_candidate_object_locations.py +++ b/python_examples/find_candidate_object_locations.py @@ -13,6 +13,24 @@ # a few thousand rectangles it is much faster than scanning all possible # rectangles inside an image. # +# +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: +# sudo apt-get install libboost-python-dev cmake +# # Also note that this example requires scikit-image which can be installed # via the command: # pip install -U scikit-image diff --git a/python_examples/max_cost_assignment.py b/python_examples/max_cost_assignment.py index d5bd04a21..5e4ac1509 100755 --- a/python_examples/max_cost_assignment.py +++ b/python_examples/max_cost_assignment.py @@ -5,14 +5,24 @@ # problem solver. It is an implementation of the famous Hungarian algorithm # and is quite fast, operating in O(N^3) time. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake +# + import dlib # Let's imagine you need to assign N people to N jobs. Additionally, each diff --git a/python_examples/sequence_segmenter.py b/python_examples/sequence_segmenter.py index 2d5bebe7f..531edbe4c 100755 --- a/python_examples/sequence_segmenter.py +++ b/python_examples/sequence_segmenter.py @@ -10,14 +10,23 @@ # will be to learn to identify person names. Once we have our segmentation # model we can use it to find names in new sentences, as we will show. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake +# import sys import dlib diff --git a/python_examples/svm_rank.py b/python_examples/svm_rank.py index a3a754cf4..1ec443dd3 100755 --- a/python_examples/svm_rank.py +++ b/python_examples/svm_rank.py @@ -13,14 +13,25 @@ # that you use this score to order the objects so that the most relevant objects # come to the top of the ranked list. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake +# + import dlib diff --git a/python_examples/svm_struct.py b/python_examples/svm_struct.py index f7ecef88a..394baa1e8 100755 --- a/python_examples/svm_struct.py +++ b/python_examples/svm_struct.py @@ -13,14 +13,25 @@ # interface. So consider using the C++ interface instead if you find that # running it in python is slow. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake +# + import dlib diff --git a/python_examples/train_object_detector.py b/python_examples/train_object_detector.py index 77d06a0ac..0c75b75a6 100755 --- a/python_examples/train_object_detector.py +++ b/python_examples/train_object_detector.py @@ -7,13 +7,22 @@ # window object detector first published by Dalal and Triggs in 2005 in the # paper Histograms of Oriented Gradients for Human Detection. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake # # Also note that this example requires scikit-image which can be installed diff --git a/python_examples/train_shape_predictor.py b/python_examples/train_shape_predictor.py index 6478c9991..9a3bee0fb 100755 --- a/python_examples/train_shape_predictor.py +++ b/python_examples/train_shape_predictor.py @@ -16,13 +16,21 @@ # prediction tasks. But here we demonstrate it only on a simple face # landmarking task. # -# COMPILING THE DLIB PYTHON INTERFACE -# Dlib comes with a compiled python interface for python 2.7 on MS Windows. If -# you are using another python version or operating system then you need to -# compile the dlib python interface before you can use this file. To do this, -# run compile_dlib_python_module.bat. This should work on any operating -# system so long as you have CMake and boost-python installed. -# On Ubuntu, this can be done easily by running the command: +# COMPILING/INSTALLING THE DLIB PYTHON INTERFACE +# You can install dlib using the command: +# pip install dlib +# +# Alternatively, if you want to compile dlib yourself then go into the dlib +# root folder and run: +# python setup.py install +# or +# python setup.py install --yes USE_AVX_INSTRUCTIONS +# if you have a CPU that supports AVX instructions, since this makes some +# things run faster. +# +# Compiling dlib should work on any operating system so long as you have +# CMake and boost-python installed. On Ubuntu, this can be done easily by +# running the command: # sudo apt-get install libboost-python-dev cmake # # Also note that this example requires scikit-image which can be installed