dlib.cpp 1.58 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
void bind_cnn_face_detection();
23
void bind_global_optimization();
24
25

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

BOOST_PYTHON_MODULE(dlib)
{
Davis King's avatar
Davis King committed
31
32
33
34
    // 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);

35
36
37
38
#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
39

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