From 8fdb3af9bf2a9574bfea6464749c002b543f4f66 Mon Sep 17 00:00:00 2001 From: Davis King Date: Wed, 27 Jun 2018 07:57:03 -0400 Subject: [PATCH] Fixed docstrings not showing the right types. --- tools/python/src/face_recognition.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/python/src/face_recognition.cpp b/tools/python/src/face_recognition.cpp index a3a003825..977915a41 100644 --- a/tools/python/src/face_recognition.cpp +++ b/tools/python/src/face_recognition.cpp @@ -249,6 +249,15 @@ void save_face_chip ( void bind_face_recognition(py::module &m) { + { + typedef std::vector type; + py::bind_vector(m, "full_object_detections", "An array of full_object_detection objects.") + .def("clear", &type::clear) + .def("resize", resize) + .def("extend", extend_vector_with_python_list) + .def(py::pickle(&getstate, &setstate)); + } + { py::class_(m, "face_recognition_model_v1", "This object maps human faces into 128D vectors where pictures of the same person are mapped near to each other and pictures of different people are mapped far apart. The constructor loads the face recognition model from a file. The model file is available here: http://dlib.net/files/dlib_face_recognition_resnet_model_v1.dat.bz2") .def(py::init()) @@ -278,13 +287,5 @@ void bind_face_recognition(py::module &m) m.def("chinese_whispers_clustering", &chinese_whispers_clustering, py::arg("descriptors"), py::arg("threshold"), "Takes a list of descriptors and returns a list that contains a label for each descriptor. Clustering is done using dlib::chinese_whispers." ); - { - typedef std::vector type; - py::bind_vector(m, "full_object_detections", "An array of full_object_detection objects.") - .def("clear", &type::clear) - .def("resize", resize) - .def("extend", extend_vector_with_python_list) - .def(py::pickle(&getstate, &setstate)); - } }