-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
朱林
committed
Aug 20, 2019
1 parent
19b8253
commit 07eef61
Showing
313 changed files
with
1,326 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/gradle.xml | ||
.idea/dictionaries | ||
.idea/libraries | ||
|
||
# Keystore files | ||
# Uncomment the following line if you do not want to check your keystore files in. | ||
#*.jks | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
# Freeline | ||
freeline.py | ||
freeline/ | ||
freeline_project_description.json | ||
app/official/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.4.1) | ||
|
||
set(lib_DIR ${CMAKE_SOURCE_DIR}/libs) | ||
include_directories(${CMAKE_SOURCE_DIR}/includes) | ||
|
||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") | ||
set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fopenmp") | ||
|
||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math") | ||
set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -Wl,--gc-sections") | ||
|
||
add_library(libncnn STATIC IMPORTED) | ||
set_target_properties(libncnn PROPERTIES IMPORTED_LOCATION ${lib_DIR}/${ANDROID_ABI}/libncnn.a) | ||
|
||
add_library(libopencv_java3 SHARED IMPORTED) | ||
set_target_properties(libopencv_java3 PROPERTIES IMPORTED_LOCATION ${lib_DIR}/${ANDROID_ABI}/libopencv_java3.so) | ||
|
||
file(GLOB_RECURSE CPP_SRCS src/main/cpp/*.h | ||
src/main/cpp/*.cpp | ||
src/main/cpp/mtcnn.cpp | ||
src/main/cpp/mtcnn_gpu.cpp | ||
src/main/cpp/mtcnn_gpu_jni.cpp | ||
src/main/cpp/mtcnn_jni.cpp) | ||
|
||
add_library(faceDetect SHARED ${CPP_SRCS} ) | ||
|
||
find_library(log-lib log) | ||
find_library(jnigraphics-lib jnigraphics) | ||
find_library(vulkan-lib vulkan) | ||
|
||
target_link_libraries(faceDetect libncnn libopencv_java3 z ${log-lib} ${jnigraphics-lib} ${vulkan-lib}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
|
||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
externalNativeBuild { | ||
cmake { | ||
arguments "-DANDROID_STL=c++_shared" | ||
arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_PLATFORM=android-24" | ||
abiFilters 'armeabi-v7a' | ||
} | ||
} | ||
ndk { | ||
abiFilters 'armeabi-v7a' | ||
stl "gnustl_static" | ||
} | ||
} | ||
compileOptions { | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path "CMakeLists.txt" | ||
} | ||
} | ||
|
||
sourceSets { | ||
main { | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.