dlib-19.10


强大的人脸识别工具包,能够实现人脸检测,人脸特征点检测等诸多功能
资源截图
代码片段和文件信息
“““setup for the dlib project
 Copyright (C) 2015  Ehsan Azar (dashesy@linux.com)
 License: Boost Software License   See LICENSE.txt for the full license.

This file basically just uses CMake to compile the dlib python bindings project
located in the tools/python folder and then puts the outputs into standard
python packages.

To build the dlib:
    python setup.py build
To build and install:
    python setup.py install
To package the wheel (after pip installing twine and wheel):
    python setup.py bdist_wheel
To upload the binary wheel to PyPi
    twine upload dist/*.whl
To upload the source distribution to PyPi
    python setup.py sdist upload
To exclude/include certain options in the cmake config use --yes and --no:
    for example:
    --yes USE_AVX_INSTRUCTIONS: will set -DUSE_AVX_INSTRUCTIONS=yes
    --no USE_AVX_INSTRUCTIONS: will set -DUSE_AVX_INSTRUCTIONS=no
Additional options:
    --compiler-flags: pass flags onto the compiler e.g. --compiler-flags “-Os -Wall“ passes -Os -Wall onto GCC.
    -G: Set the CMake generator.  E.g. -G “Visual Studio 14 2015“
    --clean: delete any previous build folders and rebuild.  You should do this if you change any build options
             by setting --compiler-flags or --yes or --no since last time you ran a build to make sure the changes
             take effect.
    --set: set arbitrary options e.g. --set CUDA_HOST_COMPILER=/usr/bin/gcc-6.4.0
“““
import os
import re
import sys
import shutil
import platform
import subprocess
import multiprocessing
from distutils import log
from math import ceilfloor

from setuptools import setup Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion


def get_extra_cmake_options():
    “““read --clean --yes --no --set --compiler-flags and -G options from the command line and add them as cmake switches.
    “““
    _cmake_extra_options = []
    _clean_build_folder = False

    opt_key = None

    argv = [arg for arg in sys.argv]  # take a copy
    # parse command line options and consume those we care about
    for arg in argv:
        if opt_key == ‘compiler-flags‘:
            _cmake_extra_options.append(‘-DCMAKE_CXX_FLAGS={arg}‘.format(arg=arg.strip()))
        elif opt_key == ‘G‘:
            _cmake_extra_options += [‘-G‘ arg.strip()]
        elif opt_key == ‘yes‘:
            _cmake_extra_options.append(‘-D{arg}=yes‘.format(arg=arg.strip()))
        elif opt_key == ‘no‘:
            _cmake_extra_options.append(‘-D{arg}=no‘.format(arg=arg.strip()))
        elif opt_key == ‘set‘:
            _cmake_extra_options.append(‘-D{arg}‘.format(arg=arg.strip()))

        if opt_key:
            sys.argv.remove(arg)
            opt_key = None
            continue

        if arg == ‘--clean‘:
            _clean_build_folder = True
            sys.argv.remove(arg)
            continue

        if arg in [‘--yes‘ ‘--no‘ ‘--set‘ ‘--compiler-

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-19 11:29  dlib-19.10
     目录           0  2018-03-19 11:29  dlib-19.10 ools
     目录           0  2018-03-19 11:29  dlib-19.10 oolspython
     目录           0  2018-03-19 11:29  dlib-19.10 oolspythonsrc
     文件       10089  2018-03-19 11:29  dlib-19.10 oolspythonsrcface_recognition.cpp
     文件        7101  2018-03-19 11:29  dlib-19.10 oolspythonsrccorrelation_tracker.cpp
     文件        1215  2018-03-19 11:29  dlib-19.10 oolspythonsrc esting_results.h
     文件        1664  2018-03-19 11:29  dlib-19.10 oolspythonsrcconversion.h
     文件        4918  2018-03-19 11:29  dlib-19.10 oolspythonsrcvector.cpp
     文件       13845  2018-03-19 11:29  dlib-19.10 oolspythonsrcsimple_object_detector.h
     文件       11837  2018-03-19 11:29  dlib-19.10 oolspythonsrcother.cpp
     文件         343  2018-03-19 11:29  dlib-19.10 oolspythonsrcindexing.h
     文件       11011  2018-03-19 11:29  dlib-19.10 oolspythonsrcsimple_object_detector_py.h
     文件        5638  2018-03-19 11:29  dlib-19.10 oolspythonsrcsvm_struct.cpp
     文件        2085  2018-03-19 11:29  dlib-19.10 oolspythonsrcopaque_types.h
     文件        5662  2018-03-19 11:29  dlib-19.10 oolspythonsrc
umpy_returns.cpp
     文件       33132  2018-03-19 11:29  dlib-19.10 oolspythonsrcsequence_segmenter.cpp
     文件        4955  2018-03-19 11:29  dlib-19.10 oolspythonsrcgui.cpp
     文件       19507  2018-03-19 11:29  dlib-19.10 oolspythonsrcglobal_optimization.cpp
     文件        1998  2018-03-19 11:29  dlib-19.10 oolspythonsrcserialize_object_detector.h
     文件       12615  2018-03-19 11:29  dlib-19.10 oolspythonsrcsvm_c_trainer.cpp
     文件        5944  2018-03-19 11:29  dlib-19.10 oolspythonsrcsvm_rank_trainer.cpp
     文件        2415  2018-03-19 11:29  dlib-19.10 oolspythonsrc
umpy_returns_stub.cpp
     文件        9576  2018-03-19 11:29  dlib-19.10 oolspythonsrcasic.cpp
     文件        5807  2018-03-19 11:29  dlib-19.10 oolspythonsrcmatrix.cpp
     文件        6286  2018-03-19 11:29  dlib-19.10 oolspythonsrccca.cpp
     文件        3385  2018-03-19 11:29  dlib-19.10 oolspythonsrcdlib.cpp
     文件       20499  2018-03-19 11:29  dlib-19.10 oolspythonsrcobject_detection.cpp
     文件        1264  2018-03-19 11:29  dlib-19.10 oolspythonsrcimage.cpp
     文件       15573  2018-03-19 11:29  dlib-19.10 oolspythonsrcshape_predictor.cpp
     文件       12463  2018-03-19 11:29  dlib-19.10 oolspythonsrcimage_dataset_metadata.cpp
............此处省略3911个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)