Commit Graph

175 Commits

Author SHA1 Message Date
Davis King
0b8e2a99af Added the --rotate option to imglab. 2015-07-04 09:37:02 -04:00
Davis King
aa4e230db0 Removed conditional compilation regarding jpeg and png support. It's just
always going to be required for imglab.
2015-07-04 09:15:02 -04:00
Davis King
7aed6b3a84 Added the --cluster option to imglab. 2015-07-03 11:58:59 -04:00
Davis King
ad9a9e6efa A minor optimization 2015-07-02 08:27:51 -04:00
Davis King
a8568a351b Added the --tile option to imglab. 2015-07-02 08:24:41 -04:00
Davis King
c9c3fa17b5 Made max_cost_assignment() give an error if you incorrectly give it a
non-square matrix.
2015-06-18 17:42:43 -04:00
Davis King
5cfff271a1 minor change to avoid compiler warning 2015-05-25 17:32:37 -07:00
Patrick Snape
23343f3de6 Add overlay overload for drectangle
This is useful for visualizing the tracking results.
2015-05-20 12:24:42 +01:00
Patrick Snape
60475dda9b Update docs on corr tracker, return side lobe
Added the missing documentation for the correlation tracker.
Didn't realise that the tracker returned the side lobe ratio,
so fixed the API to return it properly.
2015-05-20 11:52:29 +01:00
Patrick Snape
e3c3d39ab1 Add an API for the correlation tracker
This aids an API for the correlation based tracker that Davis
recently added to Dlib. I've made sure to allow overrides for
passing normal rectangles rather than drectangles (which isn't
currently supported in the Dlib C++ API). This is mostly
because I imagine people might initialize the tracking using
something like a bounding box from a detector (e.g.
load_frontal_face_detector).
2015-05-20 11:29:14 +01:00
Patrick Snape
c4cf31a746 Preparing for correlation tracker - add drectangle
The correlation tracker deals with the drectangle
(double rectangle) class which currently isn't wrapped. Therefore,
I add the drectangle class and refactor rectangles into their
own file. I also added a load of methods on rectangle that might
be useful such as intersection/contains/area etc.
2015-05-20 10:46:01 +01:00
Patrick Snape
8568c262e9 Incorrect IFDEF name for shape predictor
The word detector didn't make much sense!
2015-05-20 09:37:33 +01:00
Davis King
805aec8d00 updated README 2015-03-29 16:49:00 -04:00
Davis King
03b6fb0b7e updated version number and about docs 2015-03-29 16:44:31 -04:00
Davis King
0209f51a39 clarified documentation 2015-03-29 16:35:23 -04:00
Davis King
d1a5815cb9 Added default upsampling amount to detector.run(). Also moved the
new example code into face_detector.py and added some comments.
2015-03-28 23:16:54 -04:00
Davis King
216eb3f30f Merge branch 'py_det_conf_and_idx' of https://github.com/jackculpepper/dlib into jackculpepper-py_det_conf_and_idx 2015-03-28 22:48:19 -04:00
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
c9f24f3da4 upped the imglab version number 2014-08-21 21:27:51 -04: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
a6dc296219 Fixed a bug where the imglab tool would sometimes start out with an annoyingly
small window when the first image was bigger than the screen.
2014-07-20 14:47:05 -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