SeetaFace2 Android 平台编译
欢迎入群交流
开源地址:https://github.com/seetafaceengine/SeetaFace2
SeetaFace2 人脸识别引擎包括了搭建一套全自动人脸识别系统所需的三个核心模块,即:人脸检测模块 FaceDetector 、面部关键点定位模块 FaceLandmarker 以及人脸特征提取与比对模块 FaceRecognizer 。面部关键点定位支持 5 点 和 81 点 定位,两个辅助模块 FaceTracker 和 QualityAssessor 用于人脸跟踪和质量评估。
Android 平台编译说明
安装 ndk 编译工具
https://developer.android.com/ndk/downloads 下载 ndk,并安装到:/home/android-ndk
设置环境变量:
export ANDROID_NDK=/home/android-ndk
linux 下编译
cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="armeabi-v7a" \
-DANDROID_PLATFORM=android-24 \
-DBUILD_EXAMPLE=OFF
cmake --build . --config MinSizeRel
armeabi-v7a
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="armeabi-v7a with NEON" \
-DBUILD_EXAMPLE=OFF
arm64-v8a
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="arm64-v8a" \
-DBUILD_EXAMPLE=OFF
x86_64
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="x86_64" \
-DBUILD_EXAMPLE=OFF
x86
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="x86" \
-DBUILD_EXAMPLE=OFF
安装
cmake --build . --config MinSizeRel --target install/strip
编译报错
fatal: No names found, cannot describe anything.
-- == BUILD_VERSION: a587833
CMake Error at SeetaNet/CMakeLists.txt:44 (target_link_options):
Unknown CMake command "target_link_options".
-- Configuring incomplete, errors occurred!
See also "/home/build/workspace/hqq/SeetaFace2/build/CMakeFiles/CMakeOutput.log".
Unknown CMake command "target_link_options".
解决方案:https://github.com/seetafaceengine/SeetaFace2/issues/108
将cmake 版本升级,如何升级百度哇
编译成功
编译出的动态库在此目录下
SeetaFace2/build/install/
模型下载
-
人脸检测模块 FaceDetector 模型下载链接: MD5 :E88669E5F1301CA56162DE8AEF1FD5D5 百度网盘:https://pan.baidu.com/s/1Dt0M6LXeSe4a0Pjyz5ifkg 提取码:fs8r Dropbox : https://www.dropbox.com/s/cemt9fl48t5igfh/fd_2_00.dat?dl=0 -
面部特征5点定位模块 FaceLandmarker 模型下载链接: MD5 :877A44AA6F07CB3064AD2828F50F261A 百度网盘:https://pan.baidu.com/s/1MqofXbmTv8MIxnZTDt3h5A 提取码:7861 Dropbox : https://www.dropbox.com/s/noy8tien1gmw165/pd_2_00_pts5.dat?dl=0 -
面部特征81点定位模块 FaceLandmarker 模型下载链接: MD5 :F3F812F01121B5A80384AF3C35211BDD 百度网盘:https://pan.baidu.com/s/1CCfTGaSg_JSY3cN-R1Myaw 提取码:p8mc Dropbox : https://www.dropbox.com/s/v41lmclaxpwow1d/pd_2_00_pts81.dat?dl=0 -
人脸特征提取和比对模块 FaceRecognizer 模型下载链接: MD5 :2D637AAD8B1B7AE62154A877EC291C99 百度网盘:https://pan.baidu.com/s/1y2vh_BHtYftR24V4xwAVWg 提取码:pim2 Dropbox : https://www.dropbox.com/s/6aslqcokpljha5j/fr_2_10.dat?dl=0
微信公众号(他晓),关注并转发,谢谢
|