Commit Graph

149 Commits

Author SHA1 Message Date
Davis King
989e72e05a Added global properties that tell how dlib was compiled. 2018-01-22 07:36:53 -05:00
Davis King
2a2bc9cef1 Different versions of python disagree on what exception gets thrown. So just
check for any exception.
2018-01-16 21:26:56 -05:00
Davis King
99b0f687b4 Fixed test to really work if numpy isn't installed. 2018-01-16 21:00:54 -05:00
Davis King
a9ca83d228 Disable these tests if numpy isn't installed 2018-01-16 20:14:37 -05:00
Davis King
28f9111901 Fixed simd warning message not working. 2018-01-16 19:23:08 -05:00
Davis King
9e3b19c859 Added warning about simd instructions 2018-01-16 07:26:46 -05:00
Davis King
635747e654 Cleaned up setup.py and the python cmake script. 2018-01-16 07:24:47 -05:00
Davis King
1e051f1a60 Made test work in python3 2018-01-15 22:29:37 -05:00
Mischan Toosarani-Hausberger
077a3b60e7 Replace boost::python with pybind11 (#1040)
* Replace boost::python with pybind11

* Replace add_python_module with pybind11_add_module

* Fix clang error on type-dependent expression
2018-01-15 14:41:40 -05:00
Davis King
ced9f6f407 Make the global optimizer work in python3 2017-12-19 22:24:31 -05:00
Davis King
d5097f72db Added python bindings for count_steps_without_decrease() and count_steps_without_decrease_robust() 2017-12-12 21:57:04 -05:00
Davis King
be8269900c The previous commit broke for pyhton2 but fixed python3. This should deal with
numpy's import_array() in a more robust way.
2017-12-09 20:52:07 -05:00
Davis King
7b38ea6f2d Numpy's import_array() macro in python3 requires the calling function to return
void*.  But the previous code didn't so it wouldn't compile.  Fixed that
problem.
2017-12-09 19:51:20 -05:00
Davis King
4ff442324b cleaned up cmake 2017-12-08 10:09:30 -05:00
visionworkz
ac292309c1 Exposed jitter_image in Python and added an example (#980)
* Exposed jitter_image in Python and added an example

* Return Numpy array directly

* Require numpy during setup

* Added install of Numpy before builds

* Changed pip install for user only due to security issues.

* Removed malloc

* Made presence of Numpy during compile optional.

* Conflict

* Refactored get_face_chip/get_face_chips to use Numpy as well.
2017-12-08 09:59:27 -05:00
Davis King
95d16fd05e Added a missing assert. 2017-12-05 15:10:41 -05:00
Davis King
5e8e997bf7 Added python interface to find_min_global() 2017-12-02 08:55:02 -05:00
Davis King
c3f2c1dfcb Added a python interface to find_max_global() 2017-11-25 10:07:00 -05:00
Davis King
8b5c04d075 Updated code to work with new regression test output. 2017-11-10 17:42:40 -05:00
Davis King
1e877b1917 Changed graph construction for chinese_whispers() so that each face is always
included in the edge graph.  If it isn't then the output labels from
chinese_whispers would be missing faces in this degenerate case.  So basically this fixes a bug
where chinese_whispers(), when called from python, would sometimes return a labels array
that doesn't include labels for all the inputs.
2017-10-27 19:30:58 -04:00
Davis King
aa93c8f861 Updated python code to use the new dlib::jitter_image() instead of hacking it
out of the random_cropper.
2017-10-25 05:42:31 -04:00
Hung-Wei Chiu
ea9aae0f5f Fix warning (#851)
* remove unused variable

* modify variable type from int to size_t

* fix previous delete, we need to call chinese_whispers here but we don't need its result now
2017-09-29 11:20:11 -04:00
Varun Chatterji
5f26972551 Added code to get face_chip images.. 2017-09-19 13:08:51 +08:00
Varun Chatterji
9fe352d696 Added size and padding as optional parameters 2017-09-18 19:54:26 +08:00
Davis King
532552627a Cleaned up code and comments.
In particular, these new functions don't need to be inside the face
recognition class.  So I moved them out.  I also fixed many incorrect
copy/pasted comments and clarified parts of the example code.
2017-09-16 14:53:11 -04:00
Davis King
5cf80dda6a Merge branch 'master' of git://github.com/visionworkz/dlib into visionworkz-master 2017-09-16 14:18:44 -04:00
Davis King
f84194f643 Upgraded face recognition input validation checks to allow use of 5 point face
landmarking models.
2017-09-15 19:56:38 -04:00
Varun
93a1aba096 Added threshold to clustering call 2017-09-10 06:15:42 +08:00
Visionworkz
8b48c09c7b Added face clustering example to Python API 2017-09-06 02:05:42 +08:00
Guillaume Ramé
bbf3d987b2 improvements to cnn face detection python interface (#780)
* improvements to cnn face detection interface

* mmod rectangle object renaming. possibility to set batch size in multi image detection. Added check to make sure images are all the same size.
2017-08-27 18:40:31 -04:00
Davis King
30ca8b4228 Fully qualified boost::python::list to hopefully avoid compiler errors in some environments. 2017-08-24 18:41:07 -04:00
Davis King
ba430be591 Make DLIB_ASSERT statements not abort the python interpreter, but just trigger an exception. 2017-08-19 08:48:48 -04:00
Adam Geitgey
b6d2329c5e Add a python wrapper for using the mmod face detector (#753) 2017-08-18 16:30:33 -04:00
Davis King
ba72c2f95c Updated code to work with new random_cropper interface. 2017-06-18 08:11:54 -04:00
Davis King
cf66f6b1b0 clarified documentation 2017-03-01 05:26:22 -05:00
Alain Vaucher
b41455fd26 Change minimum CMake version that supports the introduced features 2017-02-27 18:23:28 +01:00
Davis King
c182adbf4b Added a python interface to the face recognition DNN model. 2017-02-12 20:37:18 -05:00
Davis King
bdbf7bb8da Fixed documentation 2017-01-25 06:59:08 -05:00
Avi Haiat
23785d5342 Expose python binding for running multiple detectors at once (#328)
* Expose python binding for running multiple detectors at once

* Remove unwanted typedef
2016-11-12 07:54:48 -05:00
Davis King
285bba7646 Fixed dlib.range's iterator interface to work in python 3. 2016-08-14 09:12:51 -04:00
Davis King
4de8678b57 Moved the auxiliary cmake into a common folder.
--HG--
rename : dlib/add_global_compiler_switch.cmake => dlib/cmake_utils/add_global_compiler_switch.cmake
rename : dlib/add_python_module => dlib/cmake_utils/add_python_module
rename : dlib/cmake_find_blas.txt => dlib/cmake_utils/cmake_find_blas.txt
rename : dlib/dlib.pc.in => dlib/cmake_utils/dlib.pc.in
rename : dlib/dlibConfig.cmake.in => dlib/cmake_utils/dlibConfig.cmake.in
rename : dlib/release_build_by_default => dlib/cmake_utils/release_build_by_default
rename : dlib/tell_visual_studio_to_use_static_runtime.cmake => dlib/cmake_utils/tell_visual_studio_to_use_static_runtime.cmake
rename : dlib/dnn/test_for_cpp11/CMakeLists.txt => dlib/cmake_utils/test_for_cpp11/CMakeLists.txt
rename : dlib/dnn/test_for_cpp11/cpp11_test.cpp => dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
rename : dlib/dnn/test_for_cuda/CMakeLists.txt => dlib/cmake_utils/test_for_cuda/CMakeLists.txt
rename : dlib/dnn/test_for_cuda/cuda_test.cu => dlib/cmake_utils/test_for_cuda/cuda_test.cu
rename : dlib/dnn/test_for_cudnn/CMakeLists.txt => dlib/cmake_utils/test_for_cudnn/CMakeLists.txt
rename : dlib/dnn/test_for_cudnn/find_cudnn.txt => dlib/cmake_utils/test_for_cudnn/find_cudnn.txt
rename : dlib/use_cpp_11.cmake => dlib/cmake_utils/use_cpp_11.cmake
2016-06-28 20:17:03 -04:00
nxwhite-str
b53e9cf010 Add detection threshold adjustment to object detection python interface (#140)
* Add cmake option to use external libjpeg on Mac OS

* Add adjust_threshold to python object detector

* Add cmake option to use external libjpeg on Mac OS

* Add adjust_threshold to python object detector

* Revert "Add cmake option to use external libjpeg on Mac OS"

This reverts commit 01f7fd13ea.

* Update detector example to set adjust_threshold
2016-06-22 21:17:16 -04:00
Evgeniy Fominov
2e002ac2da Python/Simple object detector trainer. Added upsample_limit option 2016-03-30 10:37:03 +03:00
Davis King
6b064d3584 Made the python __version__ field come from the DLIB_VERSION macro set by
CMake.
2016-02-03 08:32:59 -05:00
Davis King
fcf80e1dd0 merged 2016-02-03 08:24:37 -05:00
Davis King
96e9129105 Made the python build get a DLIB_VERSION macro defined. Also cleaned up cmake
a little bit.
2016-02-03 08:24:11 -05:00
Patrick Snape
86e93291a0 Add __version__ to dlib module
Only issue is that the strong is hardcoded - otherwise
this is actually technically required by PEP 396
2016-02-03 10:59:04 +00:00
Patrick Snape
d7cac78757 Allow serilization and printing of shape_predictor_training_options
Add a simple print and serialization scheme for
shape_predictor_training_options. This enables you to serialize
your training options.
2016-02-03 10:58:21 +00:00
Patrick Snape
ad882c4a31 Propagate equality operators through to Python
Easy change to allow comparisons on the Python side for
both rectangle and drectangle
2016-02-03 10:57:39 +00:00
Davis King
fbd1178047 Made the python modules use SSE4 instructions by default. 2015-09-28 21:47:44 -04:00