microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
nodeps

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/externals/dlib/README.md

77lines · modecode

1# dlib C++ library [![GitHub Actions C++ Status](https://github.com/davisking/dlib/actions/workflows/build_cpp.yml/badge.svg)](https://github.com/davisking/dlib/actions/workflows/build_cpp.yml) [![GitHub Actions Python Status](https://github.com/davisking/dlib/actions/workflows/build_python.yml/badge.svg)](https://github.com/davisking/dlib/actions/workflows/build_python.yml)
2
3Dlib 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](http://dlib.net) for the main project documentation and API reference.
4
5
6
7## Compiling dlib C++ example programs
8
9Go into the examples folder and type:
10
11```bash
12mkdir build; cd build; cmake .. ; cmake --build .
13```
14
15That will build all the examples.
16If you have a CPU that supports AVX instructions then turn them on like this:
17
18```bash
19mkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build .
20```
21
22Doing so will make some things run faster.
23
24Finally, Visual Studio users should usually do everything in 64bit mode. By default Visual Studio is 32bit, both in its outputs and its own execution, so you have to explicitly tell it to use 64bits. Since it's not the 1990s anymore you probably want to use 64bits. Do that with a cmake invocation like this:
25```bash
26cmake .. -G "Visual Studio 14 2015 Win64" -T host=x64
27```
28
29## Compiling your own C++ programs that use dlib
30
31The examples folder has a [CMake tutorial](https://github.com/davisking/dlib/blob/master/examples/CMakeLists.txt) that tells you what to do. There are also additional instructions on the [dlib web site](http://dlib.net/compile.html).
32
33Alternatively, if you are using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager you can download and install dlib with CMake integration in a single command:
34```bash
35vcpkg install dlib
36```
37
38## Compiling dlib Python API
39
40Before you can run the Python example programs you must install the build requirement.
41```bash
42python -m venv venv
43pip install build
44```
45
46Then you must compile dlib and install it in your environment. Type:
47```bash
48python -m build --wheel
49pip install dist/dlib-<version>.whl
50```
51
52Or download dlib using PyPi:
53```bash
54pip install dlib
55```
56
57## Running the unit test suite
58
59Type the following to compile and run the dlib unit test suite:
60
61```bash
62cd dlib/test
63mkdir build
64cd build
65cmake ..
66cmake --build . --config Release
67./dtest --runall
68```
69
70Note that on windows your compiler might put the test executable in a subfolder called `Release`. If that's the case then you have to go to that folder before running the test.
71
72This library is licensed under the Boost Software License, which can be found in [dlib/LICENSE.txt](https://github.com/davisking/dlib/blob/master/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.
73
74## dlib sponsors
75
76This research is based in part upon work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA) under contract number 2014-14071600010. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of ODNI, IARPA, or the U.S. Government.
77
78