Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
074d4b6e
Commit
074d4b6e
authored
Oct 31, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
a7192a0d
8fcf1a5f
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
130 additions
and
148 deletions
+130
-148
.hgtags
.hgtags
+1
-0
README.txt
README.txt
+27
-12
CMakeLists.txt
dlib/CMakeLists.txt
+2
-2
README.txt
dlib/README.txt
+0
-40
cca.cpp
dlib/test/cca.cpp
+4
-0
multithreaded_object.cpp
dlib/test/multithreaded_object.cpp
+1
-1
.logger_revnum
docs/.logger_revnum
+1
-1
index.xml
docs/docs/index.xml
+68
-68
intro.xml
docs/docs/intro.xml
+10
-7
main_menu.xml
docs/docs/main_menu.xml
+12
-12
makedocs
docs/makedocs
+0
-1
makerel
docs/makerel
+3
-3
setup.py
setup.py
+1
-1
No files found.
.hgtags
View file @
074d4b6e
...
...
@@ -27,3 +27,4 @@ cae7fcc9e6a9b28b44a703e4598f44286fec734d v18.14
feaff82884ded598bde93c635eb3ded9c0933a07 v18.15
42a25c606cf924a8d41d2fc96b9c85f839d21a04 v18.16
ce6f364987865b19bdb1b4730ac5403e2bb55dc4 v18.17
7ae1775f61a44b7f07866050b50ad3ade581f019 v18.18
README.txt
View file @
074d4b6e
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:
mkdir build; cd build; cmake .. ; cmake --build .
That will build all the examples. There is nothing to install when using
dlib. It's just a folder of source files.
mkdir build; cd build; cmake .. ; cmake --build .
That will build all the examples. If you have a CPU that supports AVX
instructions then turn them on like this:
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
Type the following to compile and run the dlib 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
folder before running the test.
DOCUMENTATION
The source control repository doesn't contain finished documentation. The
stuff in the docs folder is just a bunch of scripts and xml files used to
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
documentation, you should just download a copy from http://dlib.net.
This library is licensed under the Boost Software License, which can be found
in dlib/LICENSE.txt. The long and short of the license is that you can use
dlib 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
dlib/CMakeLists.txt
View file @
074d4b6e
...
...
@@ -13,8 +13,8 @@ include(use_cpp_11.cmake)
set
(
CPACK_PACKAGE_VERSION_MAJOR
"18"
)
set
(
CPACK_PACKAGE_VERSION_MINOR
"1
7
"
)
set
(
CPACK_PACKAGE_VERSION_PATCH
"
100
"
)
set
(
CPACK_PACKAGE_VERSION_MINOR
"1
8
"
)
set
(
CPACK_PACKAGE_VERSION_PATCH
"
99
"
)
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
...
...
dlib/README.txt
deleted
100644 → 0
View file @
a7192a0d
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
dlib/test/cca.cpp
View file @
074d4b6e
...
...
@@ -18,6 +18,7 @@ namespace
dlib
::
rand
rnd
;
// ----------------------------------------------------------------------------------------
/*
std::vector<std::map<unsigned long, double> > make_really_big_test_matrix (
)
{
...
...
@@ -29,6 +30,7 @@ namespace
}
return temp;
}
*/
template
<
typename
T
>
std
::
vector
<
std
::
map
<
unsigned
long
,
T
>
>
mat_to_sparse
(
...
...
@@ -60,6 +62,7 @@ namespace
// ----------------------------------------------------------------------------------------
/*
void check_correlation (
matrix<double> L,
matrix<double> R,
...
...
@@ -82,6 +85,7 @@ namespace
cout << "error: "<< A(i) - correlations(i);
}
}
*/
// ----------------------------------------------------------------------------------------
...
...
dlib/test/multithreaded_object.cpp
View file @
074d4b6e
...
...
@@ -183,7 +183,7 @@ namespace
DLIB_TEST
(
is_running
()
==
false
);
}
~
test4_c2
()
~
test4_c2
()
throw
(
std
::
exception
)
{
DLIB_TEST
(
number_of_threads_registered
()
==
2
);
DLIB_TEST
(
number_of_threads_alive
()
==
2
);
...
...
docs/.logger_revnum
View file @
074d4b6e
ce6f36498786
0e51b2aaee97
docs/docs/index.xml
View file @
074d4b6e
...
...
@@ -9,17 +9,17 @@
<p>
Dlib is a
general purpose cross-platform C++ library designed using contract programming
and modern C++ techniques.
Dlib is a
modern C++ toolkit containing machine learning algorithms and tools
for creating complex software in C++ to solve real world problems.
It is open source software and licensed
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
started using the library. However, if
you have any questions, comments, or complaints feel free to
<a
href=
'mailto:davis@dlib.net'
>
email me
</a><web>
or post in the
sourceforge
<a
href=
'http://sourceforge.net/p/dclib/discussion'
>
Forums
</a></web
>
.
started using the library. However, if
after consulting the documentation, you have any questions, comments,
or complaints feel free to post in the
<a
href=
'http://sourceforge.net/p/dclib/discussion'
>
forums
</a
>
.
</p>
...
...
@@ -63,41 +63,37 @@
abstraction layers or is pure ISO standard C++.
</li>
</ul>
</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>
<li><b>
Machine Learning Algorithms
</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>
<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>
Numerical Algorithms
</b>
<ul>
<li>
A fast
<a
href=
"linear_algebra.html#matrix"
>
matrix
</a>
object implemented using the expression
...
...
@@ -129,37 +125,6 @@
</ul>
</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>
<ul>
<li><a
href=
"bayes.html#bayesian_network_join_tree"
>
Join tree
</a>
algorithm for exact inference in
...
...
@@ -188,6 +153,41 @@
</ul>
</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>
<ul>
<li>
A
<a
href=
"algorithms.html#crc32"
>
CRC 32
</a>
object
</li>
...
...
docs/docs/intro.xml
View file @
074d4b6e
...
...
@@ -31,13 +31,16 @@
software components, each accompanied by extensive documentation and thorough debugging modes.
</p>
<p>
Since development began in 2002, dlib has grown to include a wide
variety of tools. In particular, it now contains software components
for dealing with networking, threads, graphical interfaces, complex
data structures, linear algebra, statistical machine learning, image
processing, data mining, XML and text parsing, numerical
optimization, Bayesian networks, and numerous other tasks. In
<a
href=
'mailto:davis@dlib.net'
>
Davis King
</a>
has been the primary
author of dlib since development began in 2002. In that time
dlib has grown to include a wide variety of tools. In particular,
it now contains software components for dealing with networking,
threads, graphical interfaces, complex data structures, linear
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
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
...
...
@@ -45,7 +48,7 @@
</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
to be as portable as possible and similarly to not require a user to
configure or install anything. To help achieve this, all platform
...
...
docs/docs/main_menu.xml
View file @
074d4b6e
...
...
@@ -91,19 +91,19 @@
<name>
Home
</name>
<link>
http://dlib.net
</link>
</item>
<item>
<name>
Dlib Blog
</name>
<link>
http://blog.dlib.net
</link>
</item>
<item>
<name>
Forums
</name>
<link>
https://sourceforge.net/p/dclib/discussion
</link>
</item>
<item>
<name>
Who uses dlib?
</name>
<link>
http://sourceforge.net/p/dclib/wiki/Known_users/
</link>
</item>
</web>
<item>
<name>
Dlib Blog
</name>
<link>
http://blog.dlib.net
</link>
</item>
<item>
<name>
Forums
</name>
<link>
https://sourceforge.net/p/dclib/discussion
</link>
</item>
<item>
<name>
Who uses dlib?
</name>
<link>
http://sourceforge.net/p/dclib/wiki/Known_users/
</link>
</item>
<item>
<name>
Introduction
</name>
...
...
docs/makedocs
View file @
074d4b6e
...
...
@@ -142,7 +142,6 @@ makedocs ()
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.
rm -rf docs/cache/docs
rm docs/cache/README.txt
echo "#ifndef DLIB_REVISION_H" > docs/cache/dlib/revision.h
echo "// Version: " $RELEASE >> docs/cache/dlib/revision.h
...
...
docs/makerel
View file @
074d4b6e
...
...
@@ -52,9 +52,9 @@ mkdir $RELDIR
cd
$RELDIR
||
report_failure
cp
-r
../../docs/cache/
*
.
||
report_failure
echo
Version:
$RELEASE
>>
dlib/
README.txt
echo
"Date:
`
date
`
"
>>
dlib/
README.txt
echo
Mercurial Revision ID:
$CHANGESET_ID
>>
dlib/
README.txt
echo
Version:
$RELEASE
>>
README.txt
echo
"Date:
`
date
`
"
>>
README.txt
echo
Mercurial Revision ID:
$CHANGESET_ID
>>
README.txt
...
...
setup.py
View file @
074d4b6e
...
...
@@ -556,7 +556,7 @@ setup(
version
=
read_version
(),
keywords
=
[
'dlib'
,
'Computer Vision'
,
'Machine Learning'
],
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_email
=
'davis@dlib.net'
,
url
=
'https://github.com/davisking/dlib'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment