• 大小: 6.69MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-25
  • 语言: 其他
  • 标签: DlibObject  detector  

资源简介

大名鼎鼎的Dlib(人脸特征点定位神器),官网下载的用VS2015运行报错,故而搬运了这个可以运行的版本。

资源截图

代码片段和文件信息

“““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:
    python setup.py bdist_wheel
To repackage the previously built package as wheel (bypassing build):
    python setup.py bdist_wheel --repackage
To install a develop version (egg with symbolic link):
    python setup.py develop
To exclude/include certain options in the cmake config use --yes and --no:
    for example:
    --yes DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=yes
    --no DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=no
Additional options:
    --debug: makes a debug build
    --cmake: path to specific cmake executable
    --G or -G: name of a build system generator (equivalent of passing -G “name“ to cmake)
“““

from __future__ import print_function
import shutil
import stat
import errno

from setuptools.command.bdist_egg import bdist_egg as _bdist_egg
from setuptools.command.develop import develop as _develop
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.build import build as _build
from distutils.errors import DistutilsSetupError
from distutils.spawn import find_executable
from distutils.sysconfig import get_python_inc get_python_version get_config_var
from distutils import log
import os
import sys
from setuptools import Extension setup
import platform
from subprocess import Popen PIPE STDOUT
import signal
from threading import Thread
import time
import re


# change directory to this module path
try:
    this_file = __file__
except NameError:
    this_file = sys.argv[0]
this_file = os.path.abspath(this_file)
if os.path.dirname(this_file):
    os.chdir(os.path.dirname(this_file))
script_dir = os.getcwd()


def _get_options():
    “““read arguments and creates options
    “““
    _cmake_path = find_executable(“cmake“)
    _cmake_extra = []
    _cmake_config = ‘Release‘

    _options = []
    opt_key = None
    _generator_set = False  # if a build generator is set

    argv = [arg for arg in sys.argv]  # take a copy
    # parse commandline options and consume those we care about
    for opt_idx arg in enumerate(argv):
        if opt_key == ‘cmake‘:
            _cmake_path = arg
        elif opt_key == ‘yes‘:
            _cmake_extra.append(‘-D{arg}=yes‘.format(arg=arg.strip()))
        elif opt_key == ‘no‘:
            _cmake_extra.append(‘-D{arg}=no‘.format(arg=arg.strip()))
        elif opt_key == ‘G‘:
            _cmake_extra += [‘-G‘ arg.strip()]
            _generator_set = True

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

        # Keep -G to resemble cmake‘s
        if ar

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-08-23 21:01  dlib-master\
     文件          51  2016-08-23 21:01  dlib-master\.gitignore
     文件         498  2016-08-23 21:01  dlib-master\.hgignore
     文件        1598  2016-08-23 21:01  dlib-master\.hgtags
     文件          61  2016-08-23 21:01  dlib-master\CMakeLists.txt
     文件         480  2016-08-23 21:01  dlib-master\MANIFEST.in
     文件        2073  2016-08-23 21:01  dlib-master\README.txt
     目录           0  2016-08-23 21:01  dlib-master\dlib\
     文件       27345  2016-08-23 21:01  dlib-master\dlib\CMakeLists.txt
     文件        1337  2016-08-23 21:01  dlib-master\dlib\LICENSE.txt
     文件       37819  2016-08-23 21:01  dlib-master\dlib\algs.h
     目录           0  2016-08-23 21:01  dlib-master\dlib\all\
     文件        3075  2016-08-23 21:01  dlib-master\dlib\all\source.cpp
     文件         310  2016-08-23 21:01  dlib-master\dlib\all_console.cpp
     文件         298  2016-08-23 21:01  dlib-master\dlib\all_gui.cpp
     文件         308  2016-08-23 21:01  dlib-master\dlib\any.h
     目录           0  2016-08-23 21:01  dlib-master\dlib\any\
     文件        3831  2016-08-23 21:01  dlib-master\dlib\any\any.h
     文件        6057  2016-08-23 21:01  dlib-master\dlib\any\any_abstract.h
     文件        5056  2016-08-23 21:01  dlib-master\dlib\any\any_decision_function.h
     文件        6641  2016-08-23 21:01  dlib-master\dlib\any\any_decision_function_abstract.h
     文件       26818  2016-08-23 21:01  dlib-master\dlib\any\any_function.h
     文件        9169  2016-08-23 21:01  dlib-master\dlib\any\any_function_abstract.h
     文件       17154  2016-08-23 21:01  dlib-master\dlib\any\any_function_impl.h
     文件        1751  2016-08-23 21:01  dlib-master\dlib\any\any_function_impl2.h
     文件        5262  2016-08-23 21:01  dlib-master\dlib\any\any_trainer.h
     文件        7049  2016-08-23 21:01  dlib-master\dlib\any\any_trainer_abstract.h
     文件         257  2016-08-23 21:01  dlib-master\dlib\array.h
     目录           0  2016-08-23 21:01  dlib-master\dlib\array\
     文件       19951  2016-08-23 21:01  dlib-master\dlib\array\array_kernel.h
     文件       10778  2016-08-23 21:01  dlib-master\dlib\array\array_kernel_abstract.h
............此处省略2016个文件信息

评论

共有 条评论