Linux 硬件加速 开源人脸识别引擎SeetaFace:第一步配置开源代码

  1. 安装OpenCV 这个一开始配置,消耗时间,主要就交叉编译的问题,网上查一下,最后test一下成功就OK

  2. copy开源Seetaface
    这里写图片描述

  3. 第一步进入FaceDetection
    PS:因为build下是别人生成的额,我生成的都放在build2下,一样的
    !!!!!!操作步骤必须和Readme一样!!!!!
    我们在Linux上操作所以只要做这部分:

How to Build in Linux

  1. Build
mkdir build
cd build
cmake ..
make -j${nproc}

 2. Run demo
-shell
./build/facedet_test image_file model/seeta_fd_frontal_v1.0.bin

这一步为生成seeta_fd_frontal_v1.0.bin,后面需要使用!
我运行test的结果:
这里写图片描述

  1. 第二步进入FaceAlignment
    同样根据Readme
### Build in Linux

mkdir build

//copy the "face detection lib" and "face_detection.h" to the //directory "build" for building the test example.

cd build
cmake ..
make

If everything goes fine, move on to test the program. Note: you should copy the face detetion model [seeta_fd_frontal_v1.0.bin](../FaceDetection/model/seeta_fd_frontal_v1.0.bin) to the directory "build" before testing.

cd ..
./build/fa_test

The alignment results are stored in "result.jpg".

运行test后build下为:
这里写图片描述
6. 第三步进入Indentification
同样根据Readme

Linux & Mac OS
//Change current working directory to `SeetaFace/FaceIdentification` //and run the following command:

mkdir build
cd build
cmake .. && make

//If everything goes fine, move on to test the program:
./build/src/test/test_face_recognizer.bin

要把之前需要用到的lib和bin拷贝过来,因为识别需要之前的人脸标注和特征点

这里写图片描述
运行test完成表明配置完成了!

自己根据项目改的结果
一些数据也被注释掉了。反正要出好多数据
这里写图片描述

程序运行终于的问题总结:

1、mkdir build 将src/test 下的facedetection cpp 加入头文件include <cv.h>  在build 下make

2、./build2/facedet_test image_file ./model/seeta_fd_frontal_v1.0.bin

3、提示:copy the "face detection lib":libseeta_facedet_lib.a and "face_detection.h" to the directory    "build" for building the test example.

4、在Alignment里build2下运行./fa_test 

5、Identification问题:/usr/bin/ld: cannot find -lseeta_facedet_lib
               /usr/bin/ld: cannot find -lseeta_fa_lib

6、要在make之后的FaceIdentification的build2中加入图像 pic1 pic2 pic1_g pic2_g
还要加入seeta_fa_v1.1bin  &  seeta_fd_frontal_v1.0.bin 这两个其他文件的moudle

7、首先在build2下 进行 ./src/test/test_face_verification.bin 成功

8、在到Identification下的src 的test中对test_face_recognizer.cpp修改

需要添加如下缺少的代码后重新再build2下make

#include <opencv/cv.h>
#include <opencv/highgui.h>

#include "face_identification.h"
#include "common.h"

#include "math.h"
#include "time.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>

#include <stdlib.h>
#include <stdio.h>

#include "ctime"

#include "common_net.h"
#include "bias_adder_net.h"
#include "bn_net.h"
#include "conv_net.h"
#include "eltwise_net.h"
#include "inner_product_net.h"
#include "max_pooling_net.h"
#include "spatial_transform_net.h"
#include "pad_net.h"

using namespace seeta;
REGISTER_NET_CLASS(Common);
REGISTER_NET_CLASS(BiasAdder);
REGISTER_NET_CLASS(Bn);
REGISTER_NET_CLASS(Conv);
REGISTER_NET_CLASS(Eltwise);
REGISTER_NET_CLASS(InnerProduct);
REGISTER_NET_CLASS(MaxPooling);
REGISTER_NET_CLASS(SpatialTransform);
REGISTER_NET_CLASS(Pad);


1、按照READme操作,Detection-----Alignment------Identification
 新建build文件夹,在下面生成文件


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值