dlib

opencv之dlib库人脸识别

懵懂的女人 提交于 2019-11-28 07:50:03
基础知识 python知识:  import os,shutil  shutil.rmtree("C:\\Users\\yangwj\\Desktop\\test") #删除目录  os.remove("C:\\Users\\yangwj\\Desktop\\replay_pid28076.log") # 删除文件  os.path.isfile() # 判断是否为文件  os.listdir() # 列出路径下的目录 1、从摄像头获取人脸图片 import dlib # 人脸处理的库 Dlib import numpy as np # 数据处理的库 Numpy import cv2 # 图像处理的库 OpenCv import os # 读写文件 import shutil # 读写文件 # Dlib 正向人脸检测器 / frontal face detector detector = dlib.get_frontal_face_detector() # Dlib 68 点特征预测器 / 68 points features predictor predictor = dlib.shape_predictor('data/data_dlib/shape_predictor_68_face_landmarks.dat') # OpenCv 调用摄像头 use camera cap

How to get 3D coordinate Axes of head pose estimation in Dlib C++

喜欢而已 提交于 2019-11-27 20:53:19
Dlib C++ can detect landmark and estimate face pose very well. However, how can I get 3D coordinate Axes direction (x,y,z) of head pose? I was also facing the same issue, a while back ago, searched and found 1-2 useful blog posts, this link would get you an overview of the techniques involved, If you only need to calculate the 3D pose in decimal places then you may skip the OpenGL rendering part, However if you want to visually get the Feedback then you may try with OpenGL as well, But I would suggest you to ignore the OpenGL part as a beginner, So the smallest working code snippet extracted

深度学习帮你“认”人—人脸模型 by wilson

China☆狼群 提交于 2019-11-27 18:49:53
前言:   在6月底来到鹅厂实习,在这一个多月的时间内,主要将我之前研究的目标跟踪和人脸模型结合起来,完成一些人脸跟踪的应用。其中将之前研究的单目标跟踪(SOT, single object tracking)拓展到多目标跟踪(MOT, multi object tracking),针对人脸的应用引入人脸模型,形成针对人脸的多目标跟踪。   在这里还是学习到不少东西的:面向业务应用的算法开发;关注预研的过程;跨任务地思考;把控时间点。 整体和在实验室的感觉是差不多的,但是要比在实验室严肃一些,需要在一段时间内要有产出,不能说像在实验室一样,研究了半年,说没研究出来成果就过了。毕竟要有kpi的要求,要对自己要求严格一些。抛开心态来说,我反而觉得实验室要求还要更严一些:周报、每周的组会等等。在这里只要简单几句话的周报就可以了,但是这句话的周报含义和实验室是差很多的。 - -!   言归正传,这篇博文主要总结我在这段时间调研过的内容和尝试过的一些应用。其实百度一下“人脸检测、人脸识别”等等关键词也会出现很多相关博文,但是这篇主要是我在这段时间的总结。   特别要感谢 https://github.com/corberan/video_clipper ,奠定了我实现的算法的基本流程,在我迷茫不知道如何完成任务的时候,提供了重要的思路。 主要内容:   1. dlib: 基于C+

how to build DLIB for iOS

二次信任 提交于 2019-11-27 10:49:59
问题 I'm trying to build DLIB for an iOS project. Running the cmake results in a libdlib.a and a load of .o files. When I add the library to an Xcode project I get warning that the library hasn't been built for arm64 . My question is two-part: How can I build DLIB for iOS (I tried cmake **path_to_source** -DCMAKE_OSX_ARCHITECTURE="arm64" but it caused loads of errors e.g. unknown type name '__uint32_t'; did you mean '__uint128_t' )? What is the purpose of all the .o files that get built when you

dlib installation on Windows 10

梦想的初衷 提交于 2019-11-27 04:31:28
I want to use dlib with python for image recognition. I have the python app running great with OpenCV on Windows 10, but when I want to install dlib from the cmd it gives me this following error : error: Cannot find cmake, ensure it is installed and in the path. You can install cmake using the instructions at https://cmake.org/install/ You can also specify its path with --cmake parameter. What should I do? Install Dlib from .whl Dlib 19.7.0 pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5

头部姿态估计 - Android

荒凉一梦 提交于 2019-11-26 17:39:29
概括 通过Dlib获得当前人脸的特征点,然后通过旋转平移标准模型的特征点进行拟合,计算标准模型求得的特征点与Dlib获得的特征点之间的差,使用Ceres不断迭代优化,最终得到最佳的旋转和平移参数。 Android版本在原理上同C++版本: 头部姿态估计 - OpenCV/Dlib/Ceres 。 主要介绍在移植过程中遇到的问题。 使用环境 系统环境:Ubuntu 18.04 Java环境:JRE 1.8.0 使用语言:C++(clang), Java 编译工具:Android Studio 3.4.1 CMake 3.10.2 LLDB NDK 20.0 上述工具在Android Studio中SDK的管理工具里下载即可。 第三方工具 Dlib :用于获得人脸特征点 Ceres :用于进行非线性优化 源代码 https://github.com/Great-Keith/head-pose-estimation/tree/master/android/landmark-fitting 准备工作 第三方库的Android接口 Dlib 使用的GitHub上提供的现成接口:https://github.com/tzutalin/dlib-android 该项目还提供了具体的app样例:https://github.com/tzutalin/dlib-android-app/