目录
目录README.md

0.原说明

MLU Offline Examples: using Cambricon Neuware Runtime API

Cambricon Neuware Runtime (CNRT) provides the ability to run neural networks without the need of deep learning frameworks.

environment

Ubuntu16.04
MLU270 / MLU220 M.2

install

The first execution requires the installation of the runtime dependency library.

  sudo apt-get install libopencv-dev libgflags-dev libgoogle-glog-dev libboost-all-dev libgeos-dev zip python-opencv
  pip install Cython pycocotools numpy==1.17.0 matplotlib shapely pillow

1.文件夹目录说明

cross_compiling_libs:交叉编译的依赖库 csv:存放人脸注册的数据(如对csv文件进行操作,操作完成后要添加权限,权限不对容易出现段错误) face_images:人脸图片文件夹 libs:运行时的依赖库 resnet_model:dlib的模型 yolo_220:AIM16T模组

2.交叉编译配置

0.依赖库:dlib_19.24(动态库),gflags(静态库),opencv 3.4(GTK2.0 ON),boost(编译链下自带的库可用),glog(官方给的可用)。(放在项目目录下的cross_compiling_libs文件夹) 1.删除build文件夹(如有),并进入scripts目录中 3.source export_lib.sh (配置交叉编译链位置、mtcnn_offline项目文件夹位置) 4.build_offline_aarch64.sh(交叉编译)

3.部署配置

0.AIM16T从模式烧录、换源、emmc扩容等。(参考系统烧录说明) 1.安装 aptitude,命令:sudo apt-get install aptitude (version(0.8.11-7)) 2.安装依赖 sudo apt-get install pkg-config (version (0.29-6)) sudo aptitude install libgtk2.0-dev(弹出第一个窗口的时候,选==N==(Y为保持当前现状) 后边选Y) sudo aptitude install libgflags-dev libgoogle-glog-dev libboost-all-dev libgeos-dev(Y)

4.运行

1.开机上电 2.执行 mtcnn_offline/mtcnn/go.sh 3.注册:./reg.sh 注册人名 (注:csv文件中重名可以有多条记录,人脸图片存储一个名字只能一张) 4.检测:./det.sh

go.sh参数说明 1.argv[1]运行模式: REG:摄像头注册,识别到人脸后,将人脸图片保存到face_images,人名和人脸特征写入csv/face_descriptors.csv DET:摄像头检测 PIC_REG:将face_images人名和人脸特征写入csv/face_descriptors.csv PIC_SAVE:用摄像存储图片到face_images 2.argv[2]新注册人名:存储图片的姓名,CSV注册中新用户的人名 3.argv[3]抽帧设置.默认五帧抽一 4.argc[4]人脸检测门栏设置,默认0.13

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号