Commit Graph

4715 Commits

Author SHA1 Message Date
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
af82bc402f Sort out PEP8 issues in the examples 2014-12-11 09:44:50 +00:00
Patrick Snape
32ad0ffaef Make shape predictor pickleable
Fix typo as well
2014-12-10 18:07:38 +00:00
Patrick Snape
60318cb308 Add example of testing detector using existing data 2014-12-10 17:45:51 +00:00
Patrick Snape
cc3bb4993c Python3 friendly printing in examples 2014-12-10 17:45:51 +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
76edd49803 Update the gitignore to ignore vim and idea 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
8cd11003d2 Changed code to avoid a warning 2014-12-09 19:53:20 -05:00
Davis King
2fb60b526e updated docs 2014-12-09 18:17:27 -05:00
Davis King
f3da116159 Added an example for svm_c_trainer. 2014-12-09 18:13:45 -05:00
Davis King
5589665bab updated docs 2014-12-09 17:43:09 -05:00
Davis King
ad99a6668e Added an example program for the new hough_transform object. 2014-12-09 17:40:19 -05:00
Davis King
bb673f4099 Added example of accessing individual pixels 2014-12-09 08:08:02 -05:00
Davis King
ca68fc8053 updated docs 2014-12-08 20:35:13 -05:00
Davis King
c0eaf1fdd9 Added hough transform unit tests 2014-12-08 20:07:11 -05:00
Davis King
81ddd13b10 Added hough_transform 2014-12-08 19:58:54 -05:00
Davis King
704017faff Added distance_to_line() and clip_line_to_rectangle() 2014-12-08 19:57:14 -05:00
Davis King
c8907ff5e6 Added a length_squared() member to vector. 2014-12-08 19:56:31 -05:00
Davis King
db78a4991d Fixed grammar 2014-12-08 17:42:57 -05:00
Davis King
be287864c1 Fixed spelling error in spec 2014-12-08 17:37:48 -05:00
Davis King
0e259c4009 Clarified the error message a user gets when they try to load a jpeg or png file
but didn't link to the approrpiate library.
2014-12-08 08:26:43 -05:00
Davis King
aba052ab0e clarified spec 2014-12-08 08:02:42 -05:00
Davis King
45c726c2c4 updated docs 2014-12-07 12:13:18 -05:00
Davis King
f00c7e0f42 Added max cost assignment example program 2014-12-07 12:11:13 -05:00
Davis King
ad19228c13 Merged and also clarified requires clauses. 2014-12-07 11:29:44 -05:00
Davis King
6720b7f511 updated docs 2014-12-07 11:16:35 -05:00
Davis King
aa0230ebfc Added some unit tests 2014-12-07 11:16:29 -05:00
Davis King
46072c8cea Added min_point() 2014-12-07 11:16:17 -05:00
Davis King
6ca45db06e Added max_point() 2014-12-07 11:00:11 -05:00
Davis King
4f2a07f5d3 Added pixel_traits definitions that allow you to copy images
into complex valued images using any dlib functions.
2014-12-07 10:57:12 -05:00
Davis King
cdbc1919d4 more cmake changes to avoid cmake warnings 2014-12-06 08:38:04 -05:00
Davis King
664ea355f4 Another minor cmake change to avoid warnings 2014-12-06 08:34:19 -05:00
Davis King
99dbd8c26e Minor changes to cmake scripts to avoid warnings in new version of cmake. 2014-12-06 08:30:36 -05:00
Davis King
aed1a3ee05 Fixed CSS to use class instead of id tags. 2014-12-06 08:29:11 -05:00
Davis King
4db5b0412a Made cmake better at finding OpenBLAS installs, in particular, it will
now find them if you install straight from the OpenBLAS source.
2014-12-06 08:27:12 -05:00
Davis King
a57935bea1 merged 2014-12-04 15:36:11 -05:00
nate.crosswhite@stresearch.com
89dac5890d Set correct include directory for fftw 2014-12-04 11:33:01 -05:00
Davis King
5206a61458 Made the compile time assert macros use static_assert if it's available. 2014-11-27 07:27:11 -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
56ccf786ca Changed python pickling code so it works with Python 3 2014-11-26 16:04:51 -05:00