dlib.cpp 1.52 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
24

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

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

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

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