|
|
|
@ -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
|
|
|
|
|