dlib.cpp 1.46 KB
Newer Older
1
// Copyright (C) 2015 Davis E. King (davis@dlib.net)
2
// License: Boost Software License   See LICENSE.txt for the full license.
3

Davis King's avatar
Davis King committed
4
#include <boost/python.hpp>
5
6
7
8

void bind_matrix();
void bind_vector();
void bind_svm_c_trainer();
9
void bind_decision_functions();
Davis King's avatar
Davis King committed
10
11
void bind_basic_types();
void bind_other();
12
void bind_svm_rank_trainer();
Davis King's avatar
Davis King committed
13
void bind_cca();
14
void bind_sequence_segmenter();
15
void bind_svm_struct();
16
void bind_image_classes();
17
void bind_rectangles();
18
void bind_object_detection();
19
void bind_shape_predictors();
20
void bind_correlation_tracker();
21
void bind_face_recognition();
22
23

#ifndef DLIB_NO_GUI_SUPPORT
Patrick Snape's avatar
Patrick Snape committed
24
void bind_gui();
25
#endif
26
27
28

BOOST_PYTHON_MODULE(dlib)
{
Davis King's avatar
Davis King committed
29
30
31
32
    // Disable printing of the C++ function signature in the python __doc__ string
    // since it is full of huge amounts of template clutter.
    boost::python::docstring_options options(true,true,false);

33
34
35
36
#define DLIB_QUOTE_STRING(x) DLIB_QUOTE_STRING2(x)
#define DLIB_QUOTE_STRING2(x) #x

    boost::python::scope().attr("__version__") = DLIB_QUOTE_STRING(DLIB_VERSION);
Patrick Snape's avatar
Patrick Snape committed
37

38
39
40
    bind_matrix();
    bind_vector();
    bind_svm_c_trainer();
41
    bind_decision_functions();
Davis King's avatar
Davis King committed
42
43
    bind_basic_types();
    bind_other();
44
    bind_svm_rank_trainer();
Davis King's avatar
Davis King committed
45
    bind_cca();
46
    bind_sequence_segmenter();
47
    bind_svm_struct();
48
    bind_image_classes();
49
    bind_rectangles();
50
    bind_object_detection();
51
    bind_shape_predictors();
52
    bind_correlation_tracker();
53
    bind_face_recognition();
54
#ifndef DLIB_NO_GUI_SUPPORT
Patrick Snape's avatar
Patrick Snape committed
55
    bind_gui();
56
#endif
57
}
Davis King's avatar
Davis King committed
58