Skip to content

CivilNet/SYSZUX-FACE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SYSZUX-FACE

face detect based on opencv & libdeepvac

简介

本项目实现了人脸检测C++ API,支持在Linux上编译和运行。

//weights_path is face detect weights path.
SyszuxFace face_detect(weights_path);

//mat is cv::Mat type
//detect_out is std::vector<cv::Mat> type
auto detect_out = face_detect.process(mat);

从源码编译

我们使用Docker来作为构建环境,包括如下步骤:

  • 准备编译环境;
  • 克隆该仓库;
  • 配置和编译;
  • 运行。

准备编译环境

  • 启动容器
docker run -it --name gemfield -h gemfield ubuntu:20.04 bash
  • 安装依赖包
apt update
apt install cmake g++ git libopencv-dev
  • 下载libdeepvac预编译库
wget https://github.com/DeepVAC/libdeepvac/releases/download/1.6.0/libdeepvac.tar.gz
tar zxvf libdeepvac.tar.gz

克隆该仓库

git clone https://github.com/CivilNet/SYSZUX-FACE

配置和编译

cd SYSZUX-FACE
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=<libdeepvac_dir> ..
make

运行

#in build dir
bin/syszux_face_detect ../deepvac_zoo/face_retina.deepvac /home/gemfield/test1.jpg

程序输出检测到的人脸数量,以及将检测到的人脸裁切写入当前目录。

About

face detect based on opencv & libdeepvac

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published