dlib.cpp 1.64 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
void* bind_numpy_returns();
25
26

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

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

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

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