Skip to content

Commit

Permalink
Merge pull request #96 from KangLin/develop
Browse files Browse the repository at this point in the history
Modify README
  • Loading branch information
seetafaceengine authored Feb 10, 2020
2 parents d80ecca + fc42a64 commit 24257c0
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 13 deletions.
42 changes: 36 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,46 @@ SeetaFace2 是面向于人脸识别商业落地的里程碑版本,其中人脸
cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DANDROID_PLATFORM=android-18 -DBUILD_EXAMPLE=OFF # 如果有OpenCV,则设置为ON
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="armeabi-v7a with NEON" \
-DANDROID_PLATFORM=android-24 \
-DBUILD_EXAMPLE=OFF # 如果有OpenCV,则设置为ON
cmake --build . --config Release --target install

- 主机是 windows
- windows控制台

cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%cd%\install ^
-G"Unix Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake ^
-DCMAKE_MAKE_PROGRAM=%ANDROID_NDK%/prebuilt/windows-x86_64/bin/make.exe ^
-DANDROID_ABI=arm64-v8a ^
-DANDROID_ARM_NEON=ON ^
-DANDROID_PLATFORM=android-24 ^
-DBUILD_EXAMPLE=OFF : 如果有 OpenCV,则设置为ON
cmake --build . --config Release --target install

cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}/prebuilt/windows-x86_64/bin/make.exe -DANDROID_ABI=arm64-v8a -DANDROID_ARM_NEON=ON -DBUILD_EXAMPLE=OFF # 如果有 OpenCV,则设置为ON
cmake --build . --config Release --target install
- msys2 或 cygwin

cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install \
-G"Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}/prebuilt/windows-x86_64/bin/make.exe \
-DANDROID_ABI=arm64-v8a \
-DANDROID_ARM_NEON=ON \
-DANDROID_PLATFORM=android-24 \
-DBUILD_EXAMPLE=OFF # 如果有 OpenCV,则设置为ON
cmake --build . --config Release --target install

- 参数说明:https://developer.android.google.cn/ndk/guides/cmake
+ ANDROID_ABI: 可取下列值:
Expand Down
31 changes: 24 additions & 7 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,33 @@ Knowing people to understand everything, open source empowerment and development
cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DANDROID_PLATFORM=android-18 -DBUILD_EXAMPLE=OFF # 如果有OpenCV,则设置为ON
cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DANDROID_PLATFORM=android-18 -DBUILD_EXAMPLE=OFF # set ON if OpenCV
cmake --build . --config Release --target install

- The host is windows

cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}\prebuilt\windows-x86_64\bin\make.exe -DANDROID_ABI=arm64-v8a -DANDROID_ARM_NEON=ON -DBUILD_EXAMPLE=OFF # 如果有 OpenCV,则设置为ON
cmake --build . --config Release --target install
- cmd

cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%cd%\install ^
-G"Unix Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake ^
-DCMAKE_MAKE_PROGRAM=%ANDROID_NDK%/prebuilt/windows-x86_64/bin/make.exe ^
-DANDROID_ABI=arm64-v8a ^
-DANDROID_ARM_NEON=ON ^
-DANDROID_PLATFORM=android-24 ^
-DBUILD_EXAMPLE=OFF : set ON if OpenCV
cmake --build . --config Release --target install

- msys2 or cygwin

cd SeetaFace2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}\prebuilt\windows-x86_64\bin\make.exe -DANDROID_ABI=arm64-v8a -DANDROID_ARM_NEON=ON -DBUILD_EXAMPLE=OFF # set ON if OpenCV
cmake --build . --config Release --target install

- Parameter Description: https://developer.android.google.cn/ndk/guides/cmake
+ ANDROID_ABI: The following values can be taken:
Expand Down
20 changes: 20 additions & 0 deletions build_android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
if [ -n "$1" ]; then
ANDROID_NDK=$1
fi
if [ -z "${ANDROID_NDK}" ]; then
echo "$0 ANDROID_NDK"
exit -1
fi

if [ ! -d build ]; then
mkdir -p build
fi
cd build

cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DANDROID_PLATFORM=android-18 -DBUILD_EXAMPLE=OFF # 如果有OpenCV,则设置为ON

cmake --build . --config Release -- -j`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`

cmake --build . --config Release --target install -- -j`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`

cd ..

0 comments on commit 24257c0

Please sign in to comment.