Commit 074d4b6e authored by Davis King's avatar Davis King

merged

parents a7192a0d 8fcf1a5f
...@@ -27,3 +27,4 @@ cae7fcc9e6a9b28b44a703e4598f44286fec734d v18.14 ...@@ -27,3 +27,4 @@ cae7fcc9e6a9b28b44a703e4598f44286fec734d v18.14
feaff82884ded598bde93c635eb3ded9c0933a07 v18.15 feaff82884ded598bde93c635eb3ded9c0933a07 v18.15
42a25c606cf924a8d41d2fc96b9c85f839d21a04 v18.16 42a25c606cf924a8d41d2fc96b9c85f839d21a04 v18.16
ce6f364987865b19bdb1b4730ac5403e2bb55dc4 v18.17 ce6f364987865b19bdb1b4730ac5403e2bb55dc4 v18.17
7ae1775f61a44b7f07866050b50ad3ade581f019 v18.18
dlib C++ library
See http://dlib.net for the main project documentation. Dlib is a modern C++ toolkit containing machine learning algorithms and tools
for creating complex software in C++ to solve real world problems. See
http://dlib.net for the main project documentation and API reference.
COMPILING DLIB EXAMPLE PROGRAMS COMPILING DLIB C++ EXAMPLE PROGRAMS
Go into the examples folder and type: Go into the examples folder and type:
mkdir build; cd build; cmake .. ; cmake --build . mkdir build; cd build; cmake .. ; cmake --build .
That will build all the examples. If you have a CPU that supports AVX
That will build all the examples. There is nothing to install when using instructions then turn them on like this:
dlib. It's just a folder of source files. mkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build .
Doing so will make some things run faster.
COMPILING DLIB Python API
Before you can run the Python example programs you must compile dlib. Type:
python setup.py install
or type
python setup.py install --yes USE_AVX_INSTRUCTIONS
if you have a CPU that supports AVX instructions, since this makes some
things run faster.
RUNNING THE UNIT TEST SUITE RUNNING THE UNIT TEST SUITE
Type the following to compile and run the dlib unit test suite: Type the following to compile and run the dlib unit test suite:
...@@ -24,9 +36,12 @@ RUNNING THE UNIT TEST SUITE ...@@ -24,9 +36,12 @@ RUNNING THE UNIT TEST SUITE
subfolder called Release. If that's the case then you have to go to that subfolder called Release. If that's the case then you have to go to that
folder before running the test. folder before running the test.
DOCUMENTATION This library is licensed under the Boost Software License, which can be found
The source control repository doesn't contain finished documentation. The in dlib/LICENSE.txt. The long and short of the license is that you can use
stuff in the docs folder is just a bunch of scripts and xml files used to dlib however you like, even in closed source commercial software.
generate the documentation. There is a readme in docs/README.txt which
discusses how to do this. However, unless you are trying to modify the Dlib Sponsors:
documentation, you should just download a copy from http://dlib.net. This code development was funded by the Office of the Director of National
Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA),
via IARPA R&D Contract No. 2014-14071600010
...@@ -13,8 +13,8 @@ include(use_cpp_11.cmake) ...@@ -13,8 +13,8 @@ include(use_cpp_11.cmake)
set(CPACK_PACKAGE_VERSION_MAJOR "18") set(CPACK_PACKAGE_VERSION_MAJOR "18")
set(CPACK_PACKAGE_VERSION_MINOR "17") set(CPACK_PACKAGE_VERSION_MINOR "18")
set(CPACK_PACKAGE_VERSION_PATCH "100") set(CPACK_PACKAGE_VERSION_PATCH "99")
set(VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) set(VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
......
dlib C++ library
This project is a modern C++ library with a focus on portability and program
correctness. It strives to be easy to use right and hard to use wrong. Thus, it
comes with extensive documentation and thorough debugging modes. The library
provides a platform abstraction layer for common tasks such as interfacing with
network services, handling threads, or creating graphical user interfaces.
Additionally, the library implements many useful algorithms such as data
compression routines, linked lists, binary search trees, linear algebra and
matrix utilities, machine learning algorithms, XML and text parsing, and many
other general utilities.
Documentation:
There should be HTML documentation accompanying this library. But if there
isn't you can download it from http://dlib.net
Installation:
To use this library all you have to do is extract the library somewhere, make
sure the folder *containing* the dlib folder is in your include path, and
finally add dlib/all/source.cpp to your project.
An example makefile that uses this library can be found here:
dlib/test/makefile. It is the makefile used to build the regression test suite
for this library. There is also a CMake makefile that builds the regression
test suite at dlib/test/CMakeLists.txt and another CMake makefile that builds
all the example programs in the examples folder.
For further information see the accompanying HTML documentation or visit
http://dlib.net
The license for this library can be found in LICENSE.txt. But the long and
short of the license is that you can use this code however you like, even in
closed source commercial software.
Dlib Sponsors:
This code development was funded by the Office of the Director of National
Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA),
via IARPA R&D Contract No. 2014-14071600010
...@@ -18,6 +18,7 @@ namespace ...@@ -18,6 +18,7 @@ namespace
dlib::rand rnd; dlib::rand rnd;
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
/*
std::vector<std::map<unsigned long, double> > make_really_big_test_matrix ( std::vector<std::map<unsigned long, double> > make_really_big_test_matrix (
) )
{ {
...@@ -29,6 +30,7 @@ namespace ...@@ -29,6 +30,7 @@ namespace
} }
return temp; return temp;
} }
*/
template <typename T> template <typename T>
std::vector<std::map<unsigned long, T> > mat_to_sparse ( std::vector<std::map<unsigned long, T> > mat_to_sparse (
...@@ -60,6 +62,7 @@ namespace ...@@ -60,6 +62,7 @@ namespace
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
/*
void check_correlation ( void check_correlation (
matrix<double> L, matrix<double> L,
matrix<double> R, matrix<double> R,
...@@ -82,6 +85,7 @@ namespace ...@@ -82,6 +85,7 @@ namespace
cout << "error: "<< A(i) - correlations(i); cout << "error: "<< A(i) - correlations(i);
} }
} }
*/
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
...@@ -183,7 +183,7 @@ namespace ...@@ -183,7 +183,7 @@ namespace
DLIB_TEST(is_running() == false); DLIB_TEST(is_running() == false);
} }
~test4_c2() ~test4_c2() throw (std::exception)
{ {
DLIB_TEST(number_of_threads_registered() == 2); DLIB_TEST(number_of_threads_registered() == 2);
DLIB_TEST(number_of_threads_alive() == 2); DLIB_TEST(number_of_threads_alive() == 2);
......
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
<p> <p>
Dlib is a general purpose cross-platform C++ library designed using contract programming Dlib is a modern C++ toolkit containing machine learning algorithms and tools
and modern C++ techniques. for creating complex software in C++ to solve real world problems.
It is open source software and licensed It is open source software and licensed
under the <a href="license.html">Boost Software License</a>. under the <a href="license.html">Boost Software License</a>.
The <a href="intro.html">introduction</a> contains everything you need to know to get The <a href="intro.html">introduction</a> contains everything you need to know to get
started using the library. However, if you have any questions, comments, or complaints feel free to started using the library. However, if after consulting the documentation, you have any questions, comments,
<a href='mailto:davis@dlib.net'>email me</a><web> or post in the or complaints feel free to post in the
sourceforge <a href='http://sourceforge.net/p/dclib/discussion'>Forums</a></web>. <a href='http://sourceforge.net/p/dclib/discussion'>forums</a>.
</p> </p>
...@@ -63,41 +63,37 @@ ...@@ -63,41 +63,37 @@
abstraction layers or is pure ISO standard C++. </li> abstraction layers or is pure ISO standard C++. </li>
</ul> </ul>
</li> </li>
<li><b>Threading</b> <li><b>Machine Learning Algorithms</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#threads">threading API</a></li>
<li>A message passing <a href="other.html#pipe">pipe</a> for inter-thread and <a href="network.html#bridge">inter-process</a> communication</li>
<li>A <a href="other.html#timer">timer</a> object capable of generating events that are regularly spaced in time</li>
<li><a href="api.html#threaded_object">Threaded objects</a></li>
<li><a href="api.html#thread_function">Threaded functions</a></li>
<li><a href="api.html#parallel_for">Parallel for loops</a></li>
<li>A <a href="api.html#thread_pool">thread_pool</a> with support for futures</li>
</ul>
</li>
<li><b>Networking</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#sockets">TCP sockets API</a></li>
<li>An object to help you make TCP based <a href="network.html#server">servers</a></li>
<li><a href="network.html#iosockstream">iostream</a> and <a href="network.html#sockstreambuf">streambuf</a>
objects that enables TCP sockets to interoperate with the C++ iostreams library </li>
<li>A simple <a href="network.html#server_http">HTTP server</a> object you can use to embed a
web server into your applications</li>
<li>A message passing <a href="other.html#pipe">pipe</a> for inter-thread and <a href="network.html#bridge">inter-process</a> communication</li>
<li>A tool used to implement algorithms using the
<a href="network.html#bsp_context">Bulk Synchronous Parallel (BSP)</a> computing model</li>
</ul>
</li>
<li><b>Graphical User Interfaces</b>
<ul> <ul>
<li>The library provides a portable and simple core <a href="api.html#gui_core">GUI API</a></li> <li>Conventional SMO based Support Vector Machines for <a href="ml.html#svm_nu_trainer">classification</a>
<li>Implemented on top of the core GUI API are numerous <a href="api.html#gui_widgets">widgets</a></li> and <a href="ml.html#svr_trainer">regression</a> </li>
<li>Unlike many other GUI toolkits, the entire dlib GUI toolkit is threadsafe</li> <li>Reduced-rank methods for large-scale <a href="ml.html#svm_c_ekm_trainer">classification</a>
and <a href="ml.html#krr_trainer">regression</a></li>
<li>Relevance vector machines for <a href="ml.html#rvm_trainer">classification</a>
and <a href="ml.html#rvm_regression_trainer">regression</a> </li>
<li>General purpose <a href="ml.html#one_vs_one_trainer">multiclass classification</a> tools</li>
<li>A <a href="ml.html#svm_multiclass_linear_trainer">Multiclass SVM</a></li>
<li>A tool for solving the optimization problem associated with
<a href="ml.html#structural_svm_problem">structural support vector machines</a>. </li>
<li>Structural SVM tools for <a href="ml.html#structural_sequence_labeling_trainer">sequence labeling</a> </li>
<li>Structural SVM tools for solving <a href="ml.html#structural_assignment_trainer">assignment problems</a> </li>
<li>Structural SVM tools for <a href="ml.html#structural_object_detection_trainer">object detection</a> in images </li>
<li>Structural SVM tools for <a href="ml.html#structural_graph_labeling_trainer">labeling nodes</a> in graphs </li>
<li>A large-scale <a href="ml.html#svm_rank_trainer">SVM-Rank</a> implementation</li>
<li>An online <a href="ml.html#krls">kernel RLS regression</a> algorithm</li>
<li>An online <a href="ml.html#svm_pegasos">SVM classification</a> algorithm</li>
<li><a href="ml.html#vector_normalizer_frobmetric">Semidefinite Metric Learning</a></li>
<li>An online kernelized <a href="ml.html#kcentroid">centroid estimator</a>/novelty detector and
offline support vector <a href="ml.html#svm_one_class_trainer">one-class classification</a></li>
<li>Clustering algorithms: <a href="ml.html#find_clusters_using_kmeans">linear</a>
or <a href="ml.html#kkmeans">kernel k-means</a>,
<a href="ml.html#chinese_whispers">Chinese Whispers</a>, and
<a href="ml.html#newman_cluster">Newman clustering</a>. </li>
<li><a href="ml.html#rbf_network_trainer">Radial Basis Function Networks</a></li>
<li><a href="ml.html#mlp">Multi layer perceptrons</a> </li>
</ul> </ul>
</li> </li>
<li><b>Numerical Algorithms</b> <li><b>Numerical Algorithms</b>
<ul> <ul>
<li>A fast <a href="linear_algebra.html#matrix">matrix</a> object implemented using the expression <li>A fast <a href="linear_algebra.html#matrix">matrix</a> object implemented using the expression
...@@ -129,37 +125,6 @@ ...@@ -129,37 +125,6 @@
</ul> </ul>
</li> </li>
<li><b>Machine Learning Algorithms</b>
<ul>
<li>Conventional SMO based Support Vector Machines for <a href="ml.html#svm_nu_trainer">classification</a>
and <a href="ml.html#svr_trainer">regression</a> </li>
<li>Reduced-rank methods for large-scale <a href="ml.html#svm_c_ekm_trainer">classification</a>
and <a href="ml.html#krr_trainer">regression</a></li>
<li>Relevance vector machines for <a href="ml.html#rvm_trainer">classification</a>
and <a href="ml.html#rvm_regression_trainer">regression</a> </li>
<li>General purpose <a href="ml.html#one_vs_one_trainer">multiclass classification</a> tools</li>
<li>A <a href="ml.html#svm_multiclass_linear_trainer">Multiclass SVM</a></li>
<li>A tool for solving the optimization problem associated with
<a href="ml.html#structural_svm_problem">structural support vector machines</a>. </li>
<li>Structural SVM tools for <a href="ml.html#structural_sequence_labeling_trainer">sequence labeling</a> </li>
<li>Structural SVM tools for solving <a href="ml.html#structural_assignment_trainer">assignment problems</a> </li>
<li>Structural SVM tools for <a href="ml.html#structural_object_detection_trainer">object detection</a> in images </li>
<li>Structural SVM tools for <a href="ml.html#structural_graph_labeling_trainer">labeling nodes</a> in graphs </li>
<li>A large-scale <a href="ml.html#svm_rank_trainer">SVM-Rank</a> implementation</li>
<li>An online <a href="ml.html#krls">kernel RLS regression</a> algorithm</li>
<li>An online <a href="ml.html#svm_pegasos">SVM classification</a> algorithm</li>
<li><a href="ml.html#vector_normalizer_frobmetric">Semidefinite Metric Learning</a></li>
<li>An online kernelized <a href="ml.html#kcentroid">centroid estimator</a>/novelty detector and
offline support vector <a href="ml.html#svm_one_class_trainer">one-class classification</a></li>
<li>Clustering algorithms: <a href="ml.html#find_clusters_using_kmeans">linear</a>
or <a href="ml.html#kkmeans">kernel k-means</a>,
<a href="ml.html#chinese_whispers">Chinese Whispers</a>, and
<a href="ml.html#newman_cluster">Newman clustering</a>. </li>
<li><a href="ml.html#rbf_network_trainer">Radial Basis Function Networks</a></li>
<li><a href="ml.html#mlp">Multi layer perceptrons</a> </li>
</ul>
</li>
<li><b>Graphical Model Inference Algorithms</b> <li><b>Graphical Model Inference Algorithms</b>
<ul> <ul>
<li><a href="bayes.html#bayesian_network_join_tree">Join tree</a> algorithm for exact inference in <li><a href="bayes.html#bayesian_network_join_tree">Join tree</a> algorithm for exact inference in
...@@ -188,6 +153,41 @@ ...@@ -188,6 +153,41 @@
</ul> </ul>
</li> </li>
<li><b>Threading</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#threads">threading API</a></li>
<li>A message passing <a href="other.html#pipe">pipe</a> for inter-thread and <a href="network.html#bridge">inter-process</a> communication</li>
<li>A <a href="other.html#timer">timer</a> object capable of generating events that are regularly spaced in time</li>
<li><a href="api.html#threaded_object">Threaded objects</a></li>
<li><a href="api.html#thread_function">Threaded functions</a></li>
<li><a href="api.html#parallel_for">Parallel for loops</a></li>
<li>A <a href="api.html#thread_pool">thread_pool</a> with support for futures</li>
</ul>
</li>
<li><b>Networking</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#sockets">TCP sockets API</a></li>
<li>An object to help you make TCP based <a href="network.html#server">servers</a></li>
<li><a href="network.html#iosockstream">iostream</a> and <a href="network.html#sockstreambuf">streambuf</a>
objects that enables TCP sockets to interoperate with the C++ iostreams library </li>
<li>A simple <a href="network.html#server_http">HTTP server</a> object you can use to embed a
web server into your applications</li>
<li>A message passing <a href="other.html#pipe">pipe</a> for inter-thread and <a href="network.html#bridge">inter-process</a> communication</li>
<li>A tool used to implement algorithms using the
<a href="network.html#bsp_context">Bulk Synchronous Parallel (BSP)</a> computing model</li>
</ul>
</li>
<li><b>Graphical User Interfaces</b>
<ul>
<li>The library provides a portable and simple core <a href="api.html#gui_core">GUI API</a></li>
<li>Implemented on top of the core GUI API are numerous <a href="api.html#gui_widgets">widgets</a></li>
<li>Unlike many other GUI toolkits, the entire dlib GUI toolkit is threadsafe</li>
</ul>
</li>
<li><b>Data Compression and Integrity Algorithms</b> <li><b>Data Compression and Integrity Algorithms</b>
<ul> <ul>
<li>A <a href="algorithms.html#crc32">CRC 32</a> object</li> <li>A <a href="algorithms.html#crc32">CRC 32</a> object</li>
......
...@@ -31,13 +31,16 @@ ...@@ -31,13 +31,16 @@
software components, each accompanied by extensive documentation and thorough debugging modes. software components, each accompanied by extensive documentation and thorough debugging modes.
</p> </p>
<p> <p>
Since development began in 2002, dlib has grown to include a wide <a href='mailto:davis@dlib.net'>Davis King</a> has been the primary
variety of tools. In particular, it now contains software components author of dlib since development began in 2002. In that time
for dealing with networking, threads, graphical interfaces, complex dlib has grown to include a wide variety of tools. In particular,
data structures, linear algebra, statistical machine learning, image it now contains software components for dealing with networking,
processing, data mining, XML and text parsing, numerical threads, graphical interfaces, complex data structures, linear
optimization, Bayesian networks, and numerous other tasks. In algebra, statistical machine learning, image processing, data
mining, XML and text parsing, numerical optimization, Bayesian
networks, and numerous other tasks. In
recent years, much of the development has been focused on creating recent years, much of the development has been focused on creating
a broad set of statistical machine learning tools. However, dlib a broad set of statistical machine learning tools. However, dlib
remains a general purpose library and <a href="howto_contribute.html">welcomes contributions</a> of high remains a general purpose library and <a href="howto_contribute.html">welcomes contributions</a> of high
...@@ -45,7 +48,7 @@ ...@@ -45,7 +48,7 @@
</p> </p>
<p> <p>
Part of the development philosophy of dlib is a dedication to Core to the development philosophy of dlib is a dedication to
portability and ease of use. Therefore, all code in dlib is designed portability and ease of use. Therefore, all code in dlib is designed
to be as portable as possible and similarly to not require a user to to be as portable as possible and similarly to not require a user to
configure or install anything. To help achieve this, all platform configure or install anything. To help achieve this, all platform
......
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
<name>Home</name> <name>Home</name>
<link>http://dlib.net</link> <link>http://dlib.net</link>
</item> </item>
</web>
<item> <item>
<name>Dlib Blog</name> <name>Dlib Blog</name>
<link>http://blog.dlib.net</link> <link>http://blog.dlib.net</link>
...@@ -103,7 +104,6 @@ ...@@ -103,7 +104,6 @@
<name>Who uses dlib?</name> <name>Who uses dlib?</name>
<link>http://sourceforge.net/p/dclib/wiki/Known_users/</link> <link>http://sourceforge.net/p/dclib/wiki/Known_users/</link>
</item> </item>
</web>
<item> <item>
<name>Introduction</name> <name>Introduction</name>
......
...@@ -142,7 +142,6 @@ makedocs () ...@@ -142,7 +142,6 @@ makedocs ()
hg archive docs/cache || report_failure hg archive docs/cache || report_failure
# Don't need the docs folder in the cache, moreover, deleting it here avoids letting the makerel script include it in the dlib tar balls. # Don't need the docs folder in the cache, moreover, deleting it here avoids letting the makerel script include it in the dlib tar balls.
rm -rf docs/cache/docs rm -rf docs/cache/docs
rm docs/cache/README.txt
echo "#ifndef DLIB_REVISION_H" > docs/cache/dlib/revision.h echo "#ifndef DLIB_REVISION_H" > docs/cache/dlib/revision.h
echo "// Version: " $RELEASE >> docs/cache/dlib/revision.h echo "// Version: " $RELEASE >> docs/cache/dlib/revision.h
......
...@@ -52,9 +52,9 @@ mkdir $RELDIR ...@@ -52,9 +52,9 @@ mkdir $RELDIR
cd $RELDIR || report_failure cd $RELDIR || report_failure
cp -r ../../docs/cache/* . || report_failure cp -r ../../docs/cache/* . || report_failure
echo Version: $RELEASE >> dlib/README.txt echo Version: $RELEASE >> README.txt
echo "Date: `date`" >> dlib/README.txt echo "Date: `date`" >> README.txt
echo Mercurial Revision ID: $CHANGESET_ID >> dlib/README.txt echo Mercurial Revision ID: $CHANGESET_ID >> README.txt
......
...@@ -556,7 +556,7 @@ setup( ...@@ -556,7 +556,7 @@ setup(
version=read_version(), version=read_version(),
keywords=['dlib', 'Computer Vision', 'Machine Learning'], keywords=['dlib', 'Computer Vision', 'Machine Learning'],
description='A toolkit for making real world machine learning and data analysis applications', description='A toolkit for making real world machine learning and data analysis applications',
long_description=readme('dlib/README.txt'), long_description=readme('README.txt'),
author='Davis King', author='Davis King',
author_email='davis@dlib.net', author_email='davis@dlib.net',
url='https://github.com/davisking/dlib', url='https://github.com/davisking/dlib',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment