dlib

cmake基础指令 cmakelist.txt编写

天涯浪子 提交于 2019-12-30 16:05:22
主体框架: 工程配置部分:工程名,编译调试模式,编译系统语言 依赖部分:工程包,头文件,依赖库等 其他辅助:参数打印,遍历目录等 判断控制部分:条件判断,函数定义,条件执行等 源文件(.h , .cpp等) ——> 预编译——>编译——>汇编——>链接——>可执行文件 静态库:链接阶段,库中目标文件所含的所有将被程序使用的函数的机器码,被copy到最终的可执行文件中。 特点 1.静态库对函数库的链接是放在编译时期完成的; 2.程序在运行时与函数库再无瓜葛, 移植方便; 3.运行效率相对快; 4.占用磁盘和内存空间,因为所有相关的目标文件与牵涉到的函数库被链接合成一个可执行文件。 静态库的局限性: 1.空间浪费是静态库的一个问题; 2.静态库对程序的更新、部署和发布页会带来麻烦; 3.如果静态库lib更新了,所以使用它的应用程序都需要重新编译、发布给用户; 4.对于玩家来说,可能是一个很小的改动,却导致整个程序重新下载,全量更新。 5.若静态库占用1M内存,有2000个这样的程序,将占用近2G的空间。 动态库:程序编译时并不会被连接到目标代码中,而是在程序运行是才被载入。 特点 1.可执行文件只包含它需要的函数的引用表,而不是所有的函数代码; 2.只有在程序执行时, 那些需要的函数代码才被拷贝到内存中。 3.动态库在程序运行是才被载入,也解决了静态库对程序的更新

Install dlib with cuda support ubuntu 18.04

我是研究僧i 提交于 2019-12-25 18:23:33
问题 I have CUDA 9.0 and CUDNN 7.1 installed on Ubuntu 18.04(Linux mint 19). Tensorflow-gpu works fine on GPU(GTX 1080ti). Now i am trying to build dlib with CUDA support: sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA --clean Got the error: user@user-pc:~/Downloads/dlib$ sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA --clean running install running bdist_egg running egg_info writing dlib.egg-info/PKG-INFO writing dependency_links to dlib

Include dlib in c++ project

眉间皱痕 提交于 2019-12-25 17:39:46
问题 I'm trying to get the dlib library working in my c++ project and don't know what to do with my Makefile and the #include<...> in the header file of my script. I have placed my header file and my script in the src directory. A symbolic link has been made to the dlib library, the link is in the include directory (see the folder structure below). On the dlib website it says: You should not add the dlib folder itself to your compiler's include path Instead you should add the folder that contains

Ubuntu Python: unable to pip install dlib - Failed building wheel for dlib and machine is almost stuck

心不动则不痛 提交于 2019-12-25 02:06:57
问题 I am trying to install dlib (machine learning library) for my django python environment. however, i cant get it installed. there is error and stuck. based on this instruction, this is what I did https://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/ $ sudo apt-get install build-essential cmake $ sudo apt-get install libgtk-3-dev $ sudo apt-get install libboost-all-dev $ source somedotcomenv/bin/activate <-- virtualenv $ pip install numpy $ pip install scipy $ pip install scikit-image $

How to use dlib's LDA

拟墨画扇 提交于 2019-12-24 19:41:46
问题 I want to fit dlib's LDA on my training set and apply the transformation to both the training and testing set. I wrote following minimal example to reproduce the problem. If you delete the sections that uses LDA, it should output a meaningful prediction. #include <iostream> #include <vector> #include <dlib/svm.h> int main() { typedef dlib::matrix<float, 2, 1> sample_type; typedef dlib::radial_basis_kernel<sample_type> kernel_type; dlib::svm_c_trainer<kernel_type> trainer; trainer.set_kernel

D-lib object detector training

喜夏-厌秋 提交于 2019-12-24 08:33:39
问题 I am trying to train an object detector using D-lib. I selected close to 100 images for training. I am using the Python environment. As per documentation, I used the Imglab tool to draw the bounding boxes across the images. Every image is almost 4000*3000 pixels in size. And then placed the generated XML file into my location and called the detector program. Here are my doubts and questions. What should I use as the testing XML file while running the program? I ran without assigning any

How to train or merge multiple .svm and detect multiple classes using dlib

大城市里の小女人 提交于 2019-12-24 06:07:40
问题 I would like to do a very simple example: train using dlib to detect "cat" and "dog" (two classes) and provide box coordinate. So far the example I found is to only train with one class and produce one .svm file: http://dlib.net/train_object_detector.cpp.html I am not good at C++ (but I can learn) and I prefer to do things in Python. After several days of research (I'm new in Deep Learning as well), I figured I have to change these lines: object_detector<image_scanner_type> detector = trainer

How to train or merge multiple .svm and detect multiple classes using dlib

余生颓废 提交于 2019-12-24 06:07:07
问题 I would like to do a very simple example: train using dlib to detect "cat" and "dog" (two classes) and provide box coordinate. So far the example I found is to only train with one class and produce one .svm file: http://dlib.net/train_object_detector.cpp.html I am not good at C++ (but I can learn) and I prefer to do things in Python. After several days of research (I'm new in Deep Learning as well), I figured I have to change these lines: object_detector<image_scanner_type> detector = trainer

安装Dlib

这一生的挚爱 提交于 2019-12-24 05:24:07
参考: 参考博客 我的安装配置为: Windows10 VS2019 python3.7 cmake-3.15.6-win64-x64.msi dlib-19.19.zip+boost_1_72_0.zip dlib安装依赖: cmake-3.15.6-win64-x64.msi+dlib-19.19.zip+boost_1_72_0.zip的下载链接(我下载的放入百度云,永久有效): https://pan.baidu.com/s/191I1sp4aOjYrKbkWxnKSZQ 具体过程: 1、安装VS2019,已有VS2019(至少要选择python环境和.net桌面c++开发环境) 将VS2019安装好后,将cl.exe的路径加入到环境变量中,我是在VS安装路径中搜索cl.exe出现四个文件,我全部加入到系统环境变量Path中: 在命令行输入cl,出现下述截图则cl配置成功 2、python3.7安装 之前已经安装过,无具体安装过程,自行上网搜索 3、安装cmake cmake的下载花费了很长很长时间,主要是由于之前几次下载都下载到一半就被禁止了,后面终于下载成功了 cmake下载官网: https://cmake.org/download/ ,下载不下来的,可以在我上面分享的百度网盘中下载 我下载的版本是: 安装的时候点击即可 把cmake的bin路径配置到环境变量

dlib not using CUDA

房东的猫 提交于 2019-12-24 00:23:36
问题 I installed dlib using pip. my graphic card supports CUDA, but while running dlib, it is not using GPU. Im working on ubuntu 18.04 Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0] on linux >>> import dlib >>> dlib.DLIB_USE_CUDA False I have also installed the NVidia Cuda Compile driver but still it is not working. nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Nov__3_21:07:56_CDT_2017 Cuda compilation tools, release 9.1, V9