dlib landmark+人面识别
识别 dlib
2023-09-14 08:58:29 时间
#include "stdafx.h" #include <dlib/image_processing/frontal_face_detector.h> #include <dlib/image_processing/render_face_detections.h> #include <dlib/image_processing.h> #include <dlib/gui_widgets.h> #include <dlib/image_io.h> #include <iostream> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; using namespace dlib; //#pragma comment(lib,"dlib.lib") int main(int argc, char** argv) { long start, end; char img_file[] = "test.bmp"; char landmark_file[] = "68.dat"; // Mat img = imread(img_file); // frontal_face_detector detector = get_frontal_face_detector(); shape_predictor sp; deserialize(landmark_file) >> sp; array2d<rgb_pixel> arrImg; load_image(arrImg, img_file); start = clock(); std::vector<dlib::rectangle> dets = detector(arrImg); for (unsigned long j = 0; j < dets.size(); ++j) { full_object_detection shape = sp(arrImg, dets[j]); for (unsigned long i = 0; i < shape.num_parts(); i++) { point pt = shape.part(i); int x = pt.x(); int y = pt.y(); line(img, Point(pt.x(), pt.y()), Point(pt.x(), pt.y()), Scalar(0, 0, 255), 2); } } end = clock(); printf("%ld\n", end - start);//单位:毫秒 // imshow("img", img); waitKey(); }
相关文章
- CVPR 2022 ActivityNet竞赛冠军:中科院深圳先进院提出高低分双模态行为识别框架
- java tess4j mave_图片处理,Tess4j读取验证码、识别文字
- 加油站智能视频监控系统(人员离岗、抽烟、打电话、烟火识别)
- 工地反光衣识别检测系统
- pytorch ocr 数字识别库_pytorch handbook
- 佩戴安全帽 人员聚集识别
- 【经典课程】《基于深度学习和行人重识别》
- 【文本检测与识别白皮书-3.2】第三节:常用的文本识别模型
- Meta AI 的研究人员创建了用于对象识别的“OMNI3D”数据集和可以推广到看不见的图像的“Cube R-CNN”模型
- AIBOX视频边缘计算终端,助力识别人员违规行为!
- 移动端车牌识别技术的应用,助力智慧停车系统建设
- 智慧工地火焰烟火识别检测系统
- 择时荟萃(五):周期转折点识别与择时(附源码)
- 深度学习基础5:交叉熵损失函数、MSE、CTC损失适用于字识别语音等序列问题、Balanced L1 Loss适用于目标检测
- Linux系统识别磁盘的技术体系(linux识别磁盘)
- 支付宝停车场识别车牌实现无感支付,称下一步就是刷脸支付
- 有人把 iPhone X 面部表情识别数据导入 Maya,结果……
- 解决VR内身份识别和支付,七鑫易维推出集成虹膜识别技术的眼球追踪解决方案