# facedetection_video **Repository Path**: hicrystal/facedetection_video ## Basic Information - **Project Name**: facedetection_video - **Description**: 基于ACL接口的人脸检测程序,可运行在Atlas 200 DK上。程序参考objectdetect_video修改facedetect的输入为从本地读取mp4文件。 - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2020-11-20 - **Last Updated**: 2025-03-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # facedetection_video #### 介绍 基于ACL接口的人脸检测程序,可运行在Atlas 200 DK上。本程序参考objectdetect_video修改facedetect的输入为从本地读取mp4文件。 #### 软件架构 1、用opencv读取本地mp4视频文件,获取每一帧图片; 2、用opencv的resize函数做预处理; 3、送入模型推理; 4、将结果推送到presentor显示。 #### 安装教程 环境安装参考华为官方教程。 #### 使用说明 1. 将视频文件放在data目录下。 2. 填入参数 ../data/xxx.mp4 ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/181511_3af18826_5320986.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/181600_726dd6c7_5320986.png "屏幕截图.png") 3. 修改data目录下param.conf文件中的参数 ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/180350_9492498d_5320986.png "屏幕截图.png") 4. 启动presentor: 在mindstudio的terminal中输入命令 **bash script/run_presenter_server.sh** 5. 模型转换 模型下载参考原样例https://gitee.com/ascend/samples/tree/master/facedetection/for_atlas200dk_1.7x.0.0_c++中的链接。 用mindstudio中的模型转换工个转换模型,参数配置如下图: ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/180806_8a8e0f21_5320986.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/181016_df6ec9e0_5320986.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/181038_a3381204_5320986.png "屏幕截图.png") 将转换好的模型放在model目录下,将main.cpp中模型文件名修改为model目录下的.om文件,如下图。 ![输入图片说明](https://images.gitee.com/uploads/images/2020/1120/181817_92be9a5c_5320986.png "屏幕截图.png") #### 参考 1. 华为官方人脸检测样例:https://gitee.com/ascend/samples/tree/master/facedetection/for_atlas200dk_1.7x.0.0_c++ 2. 参考的目标检测样例:https://gitee.com/ascend/samples/tree/master/objectdetection_video/for_atlas200dk_1.7x.0.0_c++