dlib

opencv Mat和Dlib变量类型转换

匆匆过客 提交于 2020-08-20 07:33:27
Mat转matrix<dlib::rgb_pixel> cv::Mat frame = cv::imread("test.jpg"); matrix<dlib::rgb_pixel> img; assign_image(img,cv_image<rgb_pixel>(frame)); array2d<dlib::bgr_pixel>转Mat 方法一: dlib::array2d<dlib::bgr_pixel> img_bgr;//使用dlib载入彩色的RGB图像 dlib::load_image(img_bgr, "test.jpg"); cv::Mat img = dlib::toMat(img_bgr); 方法二: cv::Mat temp_Roi; temp_Roi=imread("test.jpg"); array2d< bgr_pixel> img(temp_Roi.rows, temp_Roi.cols); for (int i = 0; i < temp_Roi.rows; i++) { for (int j = 0; j < temp_Roi.cols; j++) { img[i][j].blue = temp_Roi.at< cv::Vec3b>(i, j)[0]; img[i][j].green = temp_Roi.at< cv::Vec3b>(i, j)

dlib win32

此生再无相见时 提交于 2020-08-12 18:16:07
python3.5 32位下载,可以安装 https://pypi.org/project/dlib/18.17.100/#files https://www.jb51.net/softs/543679.html#downintro2 人脸检测 import sys import os import dlib # import glob import numpy as np import cv2 import time cap = cv2.VideoCapture(0) # fourcc = cv2.VideoWriter_fourcc(*'XVID') # out = cv2.VideoWriter('output.avi',fourcc, 20.0, (1280, 720)) # predictor_path = 'shape_predictor_81_face_landmarks.dat' predictor_path = 'shape_predictor_68_face_landmarks.dat' detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor(predictor_path) while(cap.isOpened()): ret, frame = cap.read()

Facing problem in compilatoin of C++ code (having dlib and opencv) to WASM

拟墨画扇 提交于 2020-08-05 13:08:19
问题 I am trying to compile the C++ code to WASM but facing problems in it. My C++ code included dlib and OpenCV libraries. I have successfully compiled OpenCV and dlib for C++ environment. Also, I have installed emscripten in my system. Recently I was facing problems in including the dlib and OpenCV libraries during compilation. So I have asked another question here. Now though I am successfully able to provide header files information. But now I am unable to compile the code. When I am executing

Installing dlib with python 3.8 windows 10 error

眉间皱痕 提交于 2020-06-08 12:37:33
问题 I cant install dlib on python with cmd , I have downloaded cmake and putted it on PATH, or is there any plugin i have to download it first ? Or does my pip's environment is located at a wrong place ? Or do I have to change my python to 64 bit instead of 32 bit ? If I have to do so , please let me know the way to do it , I am a newbie C:\Users\Yusuf>python -m pip install dlib --user Collecting dlib Using cached https://files.pythonhosted.org/packages/63/92

How to fix error while installing dlib on python 3.7.3 64 bit windows 10

本秂侑毒 提交于 2020-05-15 21:21:17
问题 I'm trying to install dlib on Windows 10 using anaconda prompt. Using pip install dlib But I'm getting this error Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib CMake Error in CMakeLists.txt: Generator NMake Makefiles does not support platform specification, but platform x64 was specified. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! I

How to fix error while installing dlib on python 3.7.3 64 bit windows 10

一世执手 提交于 2020-05-15 21:19:31
问题 I'm trying to install dlib on Windows 10 using anaconda prompt. Using pip install dlib But I'm getting this error Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib CMake Error in CMakeLists.txt: Generator NMake Makefiles does not support platform specification, but platform x64 was specified. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! I

【CV学习1】opencv-python:第一,二章

限于喜欢 提交于 2020-05-08 08:28:22
第一章 Introduction   OpenCV     Opencv现在支持多种与计算机视觉和机器学习相关的算法   OpenCV-Python     它是由C/C++写的Py的封装器,优点:       1,运行速度与原始的c/c++一样快(本质是c/c++写的)       2,用py写代码比c/c++方便 第二章 Install OpenCV-Python in Windows   0. 引言     对于opencv-python的安装并不友好,前前后后大概捣鼓了2-3天,总结原因就是对于opencv-python不要用太新版的whl   1. 目标     在Anaconda的虚拟环境中安装OpenCV-Python及其相关组件   2. 安装环境     Windows 7 64位操作系统     Anaconda: Anaconda3-5.2.0-Windows-x86_64(对应于Python 3.6)     OpenCV-Python: opencv_python-3.3.1-cp36-cp36m-win_amd64.whl     (ps:如果想用SIFT,SURF等的,可以直接pip install opencv-contrib-python==3.3.1.11)     Dlib: dlib-19.7.0-cp36-cp36m-win_amd64

DeepFaceLab小白入门(4):提取人脸图片!

偶尔善良 提交于 2020-05-03 23:59:36
通过上面级片文章,你应该基本知道了换脸的流出,也能换出一个视频来。此时,你可能会产生好多疑问,比如每个环节点点到底是什么意思,那些黑漆漆屏幕输出的又是什么内容,我换脸效果这么差,该如何提升?等等,好奇宝宝已上线,不搞明白睡不着。接下来,我就把每个环节展开说一说。本篇文章主要说“人脸提取部分”。 DeepFaceLab 更目录如下。 workspace工作目录如下 1) clear workspace.bat (清空项目) 这是一个用来初始化项目目录的文件,由于软件本身自带了一个workspace,所以你第一次使用的时候可点,可不点。点了之后,一个回车,界面如下。 2) extract PNG from video data_src.bat(视频转图片) 双击这个文件之后程序就开始运行,会出现一个提示。 Enter FPS ( ?:help skip:fullfps ) : 此时你可以直接回车,这样转换出的图片最多,你也可以输入一个20以内的数字,比如10,这样图片就会少一点,设置5 也可以。输入数字后回车即可。 运行结束之后出现 Done Press any key to continue 。 此时在 workspace\data_src 目录中会出现好多图片,这些图片就是把视频一帧帧分解成图片了。 3.2) extract PNG from video data_dst FULL

DeepFaceLab小白入门(3):软件使用!

大兔子大兔子 提交于 2020-05-03 22:09:52
换脸程序执行步骤,大部分程序都是类似。DeepFaceLab 虽然没有可视化界面,但是将整个过程分成了8个步骤,每个步骤只需点击BAT文件即可执行。只要看着序号,一个个点过去就可以了,这样的操作应该不复杂吧。 DeepFaceLab 换脸的八个步骤主要可以分为 五个阶段 。 1.视频转图片 2.提取脸部, 3.训练模型, 4.人脸替换, 5.合成视频。 出于不同的原因,目录里准备了很多批处理(bat)文件,但是完成一次换脸,并不需要点击每一个文件。下面我举个例子。 按以下文件名依次点击,即可换成换脸( 某个环节停住了不动,请按Enter键 )。 1) clear workspace.bat (重置工作空间,第一次使用可不点) 2) extract PNG from video data_src.bat (把src视频转换成图片,按一次Enter键) 3.2) extract PNG from video data_dst FULL FPS.bat (把dst视频转换成图片) 4) data_src extract faces DLIB best GPU.bat (从src图片中提取脸部图片) 5) data_dst extract faces DLIB best GPU.bat (从dst图片中提取脸部图片) 6) train H64.bat (使用H64开始训练模型,耗时久

dlib换脸

三世轮回 提交于 2020-05-03 16:54:31
https://blog.csdn.net/hongbin_xu/article/details/78878745 https://download.csdn.net/download/hongbin_xu/10170440 来源: oschina 链接: https://my.oschina.net/u/4279909/blog/4263438