Rock It 《Armbian》八

Block or report user

 

不知何許人也?

願把『完整精確』文件和『高品質驗證』可攜碼,當作主要特色者實不多見呦!

Major Features

  • Documentation
    • Unlike a lot of open source projects, this one provides complete and precise documentation for every class and function. There are also debugging modes that check the documented preconditions for functions. When this is enabled it will catch the vast majority of bugs caused by calling functions incorrectly or using objects in an incorrect manner.
    • Lots of example programs are provided
    • I consider the documentation to be the most important part of the library. So if you find anything that isn’t documented, isn’t clear, or has out of date documentation, tell me and I will fix it.
  • High Quality Portable Code
    • Good unit test coverage. The ratio of unit test lines of code to library lines of code is about 1 to 4.
    • The library is tested regularly on MS Windows, Linux, and Mac OS X systems. However, it should work on any POSIX system and has been used on Solaris, HPUX, and the BSDs.
    • No other packages are required to use the library. Only APIs that are provided by an out of the box OS are needed.
    • There is no installation or configure step needed before you can use the library. See the How to compile page for details.
    • All operating system specific code is isolated inside the OS abstraction layers which are kept as small as possible. The rest of the library is either layered on top of the OS abstraction layers or is pure ISO standard C++.

 

如今一十六年已過︰

Overview

Dlib is a general purpose cross-platform open source software library written in the C++ programming language. Its design is heavily influenced by ideas from design by contract and component-based software engineering. This means it is, first and foremost, a collection of independent software components, each accompanied by extensive documentation and thorough debugging modes.

Davis King 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 andwelcomes contributions of high quality software components useful in any domain.

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 specific code is confined inside the API wrappers. Everything else is either layered on top of those wrappers or is written in pure ISO standard C++. Currently the library is known to work on OS X, MS Windows, Linux, Solaris, the BSDs, and HP-UX. It should work on any POSIX platform but I haven’t had the opportunity to test it on any others (if you have access to other platforms and would like to help increase this list then let me know).

The rest of this page explains everything you need to know to get started using the library. It explains where to find the documentation for each object/function and how to interpret what you find there. For help compiling with dlib check out the how to compile page. Or if you are having trouble finding where a particular object’s documentation is located you may be able to find it by consulting the index.

The library is also covered by the very liberal Boost Software License so feel free to use it any way you like. However, if you use dlib in your research then please cite its Journal of Machine Learning Research paper when publishing.

Finally, I must give some credit to the Reusable Software Research Group at Ohio State since they taught me much of the software engineering techniques used in the creation of this library.

 

想必寶劍鋒利矣☆

/dlib

A toolkit for making real world machine learning and data analysis applications in C++ http://dlib.net

dlib C++ library

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.

因此樂得捨近求遠

rock64@rock64:~sudo pip3 install dlib [sudo] password for rock64:  Collecting dlib   Downloading https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz (3.3MB)     100% |████████████████████████████████| 3.3MB 100kB/s  Building wheels for collected packages: dlib   Running setup.py bdist_wheel for dlib ... done   Stored in directory: /root/.cache/pip/wheels/ce/f9/bc/1c51cd0b40a2b5dfd46ab79a73832b41e7c3aa918a508154f0 Successfully built dlib Installing collected packages: dlib Successfully installed dlib-19.16.0 </pre> <pre class="lang:default decode:true">rock64@rock64:~ python3
Python 3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
>>> dlib.__version__
'19.16.0'
>>>

 

享受自己編譯樂趣哩☺

sudo pip3 install scikit-build

git clone https://github.com/davisking/dlib
cd dlib/
mkdir build
cd build
cmake ..
cmake --build .
cd ..
sudo python3 setup.py install

sudo pip3 install imutils
rock64@rock64:~python3 Python 3.5.3 (default, Sep 27 2018, 17:25:39)  [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import dlib >>> dlib.__version__ '19.16.99' >>></pre>    <span style="color: #666699;">淺嚐一口,如何能相信</span>  <span style="color: #666699;"><a style="color: #666699;" href="http://dlib.net/face_detector.py.html">face_detector.py</a></span> <pre class="lang:default decode:true ">#!/usr/bin/python # The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt # #   This example program shows how to find frontal human faces in an image.  In #   particular, it shows how you can take a list of images from the command #   line and display each on the screen with red boxes overlaid on each human #   face. # #   The examples/faces folder contains some jpg images of people.  You can run #   this program on them and see the detections by executing the #   following command: #       ./face_detector.py ../examples/faces/*.jpg # #   This face detector is made using the now classic Histogram of Oriented #   Gradients (HOG) feature combined with a linear classifier, an image #   pyramid, and sliding window detection scheme.  This type of object detector #   is fairly general and capable of detecting many types of semi-rigid objects #   in addition to human faces.  Therefore, if you are interested in making #   your own object detectors then read the train_object_detector.py example #   program.   # # # COMPILING/INSTALLING THE DLIB PYTHON INTERFACE #   You can install dlib using the command: #       pip install dlib # #   Alternatively, if you want to compile dlib yourself then go into the dlib #   root folder and run: #       python setup.py install # #   Compiling dlib should work on any operating system so long as you have #   CMake installed.  On Ubuntu, this can be done easily by running the #   command: #       sudo apt-get install cmake # #   Also note that this example requires Numpy which can be installed #   via the command: #       pip install numpy</pre>    <span style="color: #666699;">短短幾行程式,就可框出『<a style="color: #666699;" href="https://zh.wikipedia.org/zh-tw/%E9%84%A7%E9%BA%97%E5%90%9B">鄧麗君</a>』之臉龐呀☀</span> <pre class="lang:default decode:true ">rock64@rock64:~/test python3 face_detector.py 260px-鄧麗君Teresa_Teng.jpg 
Processing file: 260px-鄧麗君(Teresa_Teng).jpg
Number of faces detected: 1
Detection 0: Left: 125 Top: 22 Right: 161 Bottom: 58
Hit enter to continue