Davis King
2e2a14879b
Renamed the lambda variable since it clashes with a python keyword.
2015-03-25 17:45:12 -04:00
Davis King
e00f6f63ca
Replaced the raw_input() calls with a call into dlib since raw_input() isn't
...
available in python3.
2015-03-22 18:45:08 -04:00
Jack Culpepper
cf0d5a4cb0
simplify
2015-03-12 01:17:40 -07:00
Jack Culpepper
a12e1e71fa
repair old interface
2015-03-12 08:10:56 +00:00
Jack Culpepper
9b78932ab1
re-arrange, use vector<double> to facilitate pass back to python
2015-03-12 07:39:42 +00:00
Jack Culpepper
154f9e4931
add ability to return detection confidences and weight index to python
2015-03-11 23:23:19 -07:00
Davis King
4bbfe512ae
Made the PYTHON3 cmake switch a proper cmake option.
2015-03-07 13:29:23 -05:00
Davis King
c335bf6756
Fixed the python doc string so that it's correct relative to the python
...
API. Also made find_candidate_object_locations() correctly include any
input boxes in the call to the C++ version of the function.
2015-01-03 23:26:28 -05:00
Vinh Khuc
173bb97f33
Explained the difference between pykvals in the Python API and kvals in C++ code
2015-01-03 15:03:05 -05:00
Vinh Khuc
bf06ce7185
Added Python-binding for find_candidate_object_locations
2015-01-03 01:11:52 -05:00
Davis King
1ab3482597
Clarified a few comments and simplified the serialization code a bit.
...
Also just cleaned up a few minor details.
2014-12-27 15:30:56 -05:00
Patrick Snape
37af35b55e
Re-add the cached object detector
...
A little bit hacky, but should be fine. Supports both fhog
detectors and the "cached" simple_object_detector. Also, maintains
the upscale parameter for testing
2014-12-12 16:22:57 +00:00
Patrick Snape
30869fbe03
Change logic for upsampling printing
2014-12-11 15:00:39 +00:00
Patrick Snape
dd19ce846e
Update the interface to be more Pythonic
...
This is the biggest change so far. Now, there are two different
classes of interface. One where you pass ONLY file paths,
and one where you pass ONLY Python objects.
The file paths are maintained to keep a matching interface with
the C++ examples of dlib. So shape predicition and object
detection can be trained using the dlib XML file paths and then
serialize the detectors to disk.
Shape prediction and object detection can also be trained using
numpy arrays and in-memory objects. In this case, the predictor
and detector objects are returned from the training functions.
To facilitate serializing these objects, they now have a 'save'
method.
Tetsing follows a similar pattern, in that it can take either XML
files are or in-memory objects. I also added back the concept of
upsampling during testing to make amends for removing the
simple_object_detector_py struct.
2014-12-11 14:06:05 +00:00
Patrick Snape
8db3f4e572
Add a save method to detectors and predictors
...
Also, removed the saving of the upsample which I missed from
before (since I'm not using the struct now). I understand why
the upsample was being saved, but I don't necessarily agree it
is particularly useful as you should really be upsampling on
a case by case basis at test time.
2014-12-11 12:34:20 +00:00
Patrick Snape
5b485a628b
Properly handle turning the GUI off
2014-12-11 12:05:10 +00:00
Patrick Snape
e801bd6ab5
Refactor the GUI code out
...
I also cleaned up a bunch of code. I'm not sure why the
simple_object_detector was keeping track of the upsample amount,
since it can't even be passed as an argument to the constructor.
Therefore, I removed the simple_object_detector_py and the second
declaration of the hog object detector. I also changed the
view code to optionally take keyword args of color and added
a single view of a rectangle.
Finally, I added viewing of the shape parts.
2014-12-11 11:46:01 +00:00
Patrick Snape
697aecb420
Add rendering of faces (lines)
...
Can either be a list of full_object_detections or a single
full_object_detection. I couldn't get the vector type to work
for full_object_detection due to a template error.
2014-12-11 10:28:14 +00:00
Patrick Snape
32ad0ffaef
Make shape predictor pickleable
...
Fix typo as well
2014-12-10 18:07:38 +00:00
Patrick Snape
e3aee32f34
Add wrappers for the shape predictors
...
This includes the full_object_detection, a new struct in the same
vein as the simple_object_detector_training_options and of
course, the shape predictor classes themselves.
All of training, fitting and testing are wrapped.
2014-12-10 17:45:51 +00:00
Patrick Snape
315a2b1cb1
Add a new conversion header
...
This deals with converting python objects to dlib objects
2014-12-10 17:45:51 +00:00
Patrick Snape
68ae858f27
Refactor rgb_pixel out of object detection
...
Also, move the vectorize template into its own header to
stop having to declare it again in vector.
2014-12-10 17:45:51 +00:00
Patrick Snape
c0d0adba13
Add a list of points
...
Also, change point x and y to be properties
2014-12-10 17:45:51 +00:00
Patrick Snape
85f0c0ffdc
Wrap the dlib point for Python
2014-12-10 17:45:51 +00:00
Patrick Snape
70db61c5fb
First attempt at adding to the boost API
...
Exposes the test method, but takes in images and bounding boxes.
Seems fairly simply to extend the API
2014-12-10 17:45:51 +00:00
Davis King
cdbc1919d4
more cmake changes to avoid cmake warnings
2014-12-06 08:38:04 -05:00
Davis King
db3eaa728b
Changed python cmake scrips to have an option to compile Python 3 libraries.
2014-11-26 16:28:52 -05:00
Davis King
cc70a8e0fb
Merged in Patrick Snape's patch that allows the python bindings to
...
be built without GUI support.
2014-11-15 09:28:48 -05:00
Davis King
cd71dab3f2
Updated the Python API, train_simple_object_detector() so you can call it
...
directly on already loaded data rather than needing to use an XML file as
input.
2014-08-12 19:47:41 -04:00
Davis King
c423283c05
Added set_prior() to the python interfaces of the relevant trainer objects.
2014-05-24 10:18:31 -04:00
Davis King
312157ab18
Added epsilon to the python object detection training API.
2014-03-09 12:10:15 -04:00
Davis King
e79a764834
removed cruft
2014-03-08 12:14:24 -05:00
Davis King
2369ae1e57
Made the python object detection tools process color images
...
in color instead of always converting to grayscale.
2014-03-02 11:19:06 -05:00
Davis King
a612c0317d
Improved error message.
2014-03-02 11:08:20 -05:00
Davis King
75fbc56c92
Fixed name conflicts that prevented the python bindings from compiling in visual sudio 2013.
2014-03-01 21:42:01 -05:00
Davis King
4a9be7bba5
improved python docs
2014-02-23 16:18:04 -05:00
Davis King
2293c91e00
Cleaned up the new python object detection interface a little.
2014-02-23 16:02:52 -05:00
Davis King
8f6b76e7ca
Gave the image_window the ability to display fhog object detectors.
2014-02-23 15:24:22 -05:00
Davis King
ddc44067b4
Added a simple python interface for training fhog object detectors.
2014-02-23 14:39:59 -05:00
Davis King
a20f154483
Added a python interface to the fhog_object_detector and related tools.
2014-02-09 12:56:35 -05:00
Davis King
309902b81a
clarified specs
2013-09-21 15:18:29 -04:00
Davis King
6fc0d8f608
Moved python C++ utility headers into dlib/python and updated
...
#include statements to reflect this move.
--HG--
rename : tools/python/src/boost_python_utils.h => dlib/python/boost_python_utils.h
rename : tools/python/src/pyassert.h => dlib/python/pyassert.h
rename : tools/python/src/serialize_pickle.h => dlib/python/serialize_pickle.h
2013-09-01 13:15:04 -04:00
Davis King
0eb8296872
Added missing #include and inclusion guard
2013-09-01 13:05:29 -04:00
Davis King
8da213ccc2
Made len() work on dlib.range objects.
2013-09-01 13:03:33 -04:00
Davis King
a09a8f6a95
Added more python doc strings
2013-08-09 11:56:06 -04:00
Davis King
c9bdb9b2da
Added python bindings for the max_cost_assignment() and assignment_cost() routines.
2013-08-09 11:23:38 -04:00
Davis King
b68e5a37fb
Added functions for easily converting between python list objects and std::vector.
2013-08-09 11:23:05 -04:00
Davis King
a9fd939c82
Added another matrix constructor. Now we can construct from python lists.
2013-08-09 11:00:40 -04:00
Davis King
0660dc02e5
Made python svm struct interface work with sparse vectors
2013-08-08 11:38:12 -04:00
Davis King
8c111ee73a
Improved sparse vector python docs
2013-08-08 11:37:55 -04:00
Davis King
225e1c5ab0
Fixed typo in doc string
2013-07-07 23:24:14 -04:00
Davis King
b0a8831cb8
Added python docstring
2013-07-07 21:36:07 -04:00
Davis King
1c50321904
Improved svm struct interface a little more. Fixed a bug and added
...
non-negative weight learning support.
2013-07-07 13:16:23 -04:00
Davis King
cc9ff97a29
Cleaned up python svm struct code a little.
2013-07-07 12:28:31 -04:00
Davis King
2d034a58a0
Minor change to work with older versions of boost python.
2013-06-26 23:01:45 -04:00
Davis King
a0fe7efc8f
Added initial version of structural svm python bindings
2013-06-26 22:34:00 -04:00
Davis King
421e5bcd6f
Added a dot() and slicing support to dlib.vector()
2013-06-26 21:45:57 -04:00
Davis King
20ed7ebeb8
Added missing license statements to the tops of these files.
2013-06-26 18:37:42 -04:00
Davis King
4585c51637
Improved make_sparse_vector() documentation.
2013-06-08 00:48:32 -04:00
Davis King
4ef91280e4
Fixed a bug in the sparse decision functions. The input validation rejected
...
most vectors
2013-06-08 00:38:49 -04:00
Davis King
2f34594f47
Added cross validation functions for ranking tools and slightly improved documentation
...
for other cross validation functions.
2013-06-07 23:50:40 -04:00
Davis King
97f82b1e4f
Made decision functions and segmenter objects callable like normal functions.
2013-06-07 23:30:43 -04:00
Davis King
da40c3ba37
cleaned up python interface a bit
2013-06-01 15:10:41 -04:00
Davis King
5e761ca739
clarified spec
2013-06-01 14:30:45 -04:00
Davis King
4618269718
Made dlib.range() iterable
2013-05-30 22:21:04 -04:00
Davis King
d20b08a00c
Added comments
2013-05-29 22:41:01 -04:00
Davis King
1fd8afd579
Changed code to avoid compiler warning in visual studio.
2013-05-26 15:02:29 -04:00
Davis King
5597d9cb20
Starting to flesh out the python interface documentation a little more.
2013-05-26 14:21:02 -04:00
Davis King
76e620287d
Just renamed a class
2013-05-26 13:51:57 -04:00
Davis King
1c269270a1
Added testing and cross validation routines for the python sequence segmenter interface.
2013-05-26 13:50:47 -04:00
Davis King
a4590776b8
Minor printing improvement
2013-05-24 23:30:21 -04:00
Davis King
66d5a906bb
Fully setup the functional python interface to the sequence segmenter tool.
...
Need to add documentation next.
2013-05-22 23:47:33 -04:00
Davis King
cecc38f5b6
Added support for using the dense vector version of the sequence_segmenter from
...
python.
2013-05-20 23:18:14 -04:00
Davis King
09895ba8b7
added ranges
2013-05-20 21:31:24 -04:00
Davis King
b0a14513f0
Added range and ranges.
2013-05-20 21:29:19 -04:00
Davis King
5fb4ee6627
Added the vectorss and sparse_vectorss types and a little more documentation.
2013-05-20 21:19:08 -04:00
Davis King
52de3a0c9c
Improved cca() documentation.
2013-05-18 10:26:18 -04:00
Davis King
0c3952d549
Minor changes to avoid compiler warnings from visual studio.
2013-04-28 17:56:33 -04:00
Davis King
2c2f955647
Added cca() bindings
2013-04-28 15:46:55 -04:00
Davis King
5e10ae6eee
Added more sparse vector tools and fixed a bug.
2013-04-27 17:05:04 -04:00
Davis King
313bca15c9
Added linear SVM binding
2013-04-27 16:25:25 -04:00
Davis King
859ccf5e8b
Added some cross validation wrappers.
2013-04-27 15:44:26 -04:00
Davis King
b8f2b5225c
Added decision function testing wrappers.
2013-04-27 15:20:50 -04:00
Davis King
bca5cddf43
Added more refinements and also bindings for svm_rank_trainer.
2013-04-27 14:05:38 -04:00
Davis King
d7b8dfbc0c
Fixed spelling error in filename.
...
--HG--
rename : tools/python/src/decision_funcions.cpp => tools/python/src/decision_functions.cpp
2013-04-27 12:29:52 -04:00
Davis King
6c313b8949
Just moving code around.
2013-04-27 12:28:46 -04:00
Davis King
e0c9bb6586
Added more python bindings
2013-04-27 12:23:23 -04:00
Davis King
affd197e3c
Refined the python bindings more. Still lots to do though.
2013-04-27 09:57:24 -04:00
Davis King
1a64bcc39a
Added initial python bindings for dlib
2013-04-27 08:35:04 -04:00