Commit Graph

4928 Commits

Author SHA1 Message Date
Davis King d8dc5965a2 updated docs 2014-12-19 21:37:45 -05:00
Davis King ce14edcb9e added skeleton unit test 2014-12-19 20:18:55 -05:00
Davis King 0f24b1ff02 updated docs 2014-12-19 18:03:04 -05:00
Davis King 8bf02e3b47 Slightly improved skeleton output 2014-12-19 17:58:42 -05:00
Davis King 7f5b85a0f7 Added skeleton() 2014-12-19 08:02:31 -05:00
Davis King f16022e2a5 updated docs 2014-12-15 16:18:40 -05:00
Davis King da48facb19 Changed extract_image_chips() slightly so that it can take non-resizable images
like cv_image as input.
2014-12-15 16:13:53 -05:00
Davis King 02c377e91e merged 2014-12-14 19:37:48 -05:00
Davis King 53c5dd35f2 minor cleanup 2014-12-14 12:01:08 -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 fbe597be03 Add facial landmark prediction examples for Python 2014-12-11 15:01:08 +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
Davis King e4bc15fa9d Made gaussian_blur return a rectangle that defines which part of the image
has valid outputs.
2014-12-11 08:00:00 -05: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
Davis King eeb3c06266 Fixed error in spec 2014-12-10 17:41:59 -05: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