1ee93083 by 乔峰昇

add error_code

1 parent a6c4a7ba
...@@ -6,13 +6,9 @@ set(CMAKE_CXX_STANDARD 11) ...@@ -6,13 +6,9 @@ set(CMAKE_CXX_STANDARD 11)
6 find_package(OpenCV REQUIRED) 6 find_package(OpenCV REQUIRED)
7 set(MNN_DIR /home/situ/MNN/MNN1.0/MNN) 7 set(MNN_DIR /home/situ/MNN/MNN1.0/MNN)
8 include_directories(${MNN_DIR}/include) 8 include_directories(${MNN_DIR}/include)
9 include_directories(/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/include) 9 include_directories(/home/situ/qfs/face_recognize_mnn/include)
10 LINK_DIRECTORIES(${MNN_DIR}/build) 10 link_directories(${MNN_DIR}/build)
11 set(FACECOMPARISON_DIR /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/lib)
12 # add_library(facecomparison SHARED facerecognize.cpp retinaface.cpp facelandmarks.cpp facecomparison.cpp)
13 add_executable(main main.cpp facerecognize.cpp retinaface.cpp facelandmarks.cpp facecomparison.cpp) 11 add_executable(main main.cpp facerecognize.cpp retinaface.cpp facelandmarks.cpp facecomparison.cpp)
14 # add_executable(main main.cpp) 12 target_link_libraries(main -lMNN ${OpenCV_LIBS})
15 # add_executable(main z.cpp) 13
16 target_link_libraries(main ${FACECOMPARISON_DIR}/libfacecomparison.so -lMNN ${OpenCV_LIBS})
17 # target_link_libraries(facecomparison -lMNN ${OpenCV_LIBS})
18 14
......
1 # This is the CMakeCache file. 1 # This is the CMakeCache file.
2 # For build in directory: /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build 2 # For build in directory: /home/situ/qfs/face_recognize_mnn/build
3 # It was generated by CMake: /usr/bin/cmake 3 # It was generated by CMake: /usr/bin/cmake
4 # You can edit this file to change values found and used by cmake. 4 # You can edit this file to change values found and used by cmake.
5 # If you do not want to change any of the values, simply exit the editor. 5 # If you do not want to change any of the values, simply exit the editor.
...@@ -329,10 +329,10 @@ CUDA_rt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so ...@@ -329,10 +329,10 @@ CUDA_rt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so
329 OpenCV_DIR:PATH=/usr/local/lib/cmake/opencv4 329 OpenCV_DIR:PATH=/usr/local/lib/cmake/opencv4
330 330
331 //Value Computed by CMake 331 //Value Computed by CMake
332 main_BINARY_DIR:STATIC=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build 332 main_BINARY_DIR:STATIC=/home/situ/qfs/face_recognize_mnn/build
333 333
334 //Value Computed by CMake 334 //Value Computed by CMake
335 main_SOURCE_DIR:STATIC=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn 335 main_SOURCE_DIR:STATIC=/home/situ/qfs/face_recognize_mnn
336 336
337 337
338 ######################## 338 ########################
...@@ -342,7 +342,7 @@ main_SOURCE_DIR:STATIC=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mn ...@@ -342,7 +342,7 @@ main_SOURCE_DIR:STATIC=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mn
342 //ADVANCED property for variable: CMAKE_AR 342 //ADVANCED property for variable: CMAKE_AR
343 CMAKE_AR-ADVANCED:INTERNAL=1 343 CMAKE_AR-ADVANCED:INTERNAL=1
344 //This is the directory where this CMakeCache.txt was created 344 //This is the directory where this CMakeCache.txt was created
345 CMAKE_CACHEFILE_DIR:INTERNAL=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build 345 CMAKE_CACHEFILE_DIR:INTERNAL=/home/situ/qfs/face_recognize_mnn/build
346 //Major version of cmake used to create the current loaded cache 346 //Major version of cmake used to create the current loaded cache
347 CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 347 CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
348 //Minor version of cmake used to create the current loaded cache 348 //Minor version of cmake used to create the current loaded cache
...@@ -423,7 +423,7 @@ CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 ...@@ -423,7 +423,7 @@ CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1
423 CMAKE_HAVE_PTHREAD_H:INTERNAL=1 423 CMAKE_HAVE_PTHREAD_H:INTERNAL=1
424 //Source directory with the top level CMakeLists.txt file for this 424 //Source directory with the top level CMakeLists.txt file for this
425 // project 425 // project
426 CMAKE_HOME_DIRECTORY:INTERNAL=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn 426 CMAKE_HOME_DIRECTORY:INTERNAL=/home/situ/qfs/face_recognize_mnn
427 //Install .so files without execute permission. 427 //Install .so files without execute permission.
428 CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 428 CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
429 //ADVANCED property for variable: CMAKE_LINKER 429 //ADVANCED property for variable: CMAKE_LINKER
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
2 # Generated by "Unix Makefiles" Generator, CMake Version 3.10 2 # Generated by "Unix Makefiles" Generator, CMake Version 3.10
3 3
4 # Relative path conversion top directories. 4 # Relative path conversion top directories.
5 set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn") 5 set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/situ/qfs/face_recognize_mnn")
6 set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build") 6 set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/situ/qfs/face_recognize_mnn/build")
7 7
8 # Force unix paths in dependencies. 8 # Force unix paths in dependencies.
9 set(CMAKE_FORCE_UNIX_PATHS 1) 9 set(CMAKE_FORCE_UNIX_PATHS 1)
......
1 Determining if the pthread_create exist failed with the following output: 1 Determining if the pthread_create exist failed with the following output:
2 Change Dir: /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp 2 Change Dir: /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp
3 3
4 Run Build Command:"/usr/bin/make" "cmTC_016db/fast" 4 Run Build Command:"/usr/bin/make" "cmTC_5f5f2/fast"
5 /usr/bin/make -f CMakeFiles/cmTC_016db.dir/build.make CMakeFiles/cmTC_016db.dir/build 5 /usr/bin/make -f CMakeFiles/cmTC_5f5f2.dir/build.make CMakeFiles/cmTC_5f5f2.dir/build
6 make[1]: 进入目录“/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp” 6 make[1]: 进入目录“/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp”
7 Building C object CMakeFiles/cmTC_016db.dir/CheckSymbolExists.c.o 7 Building C object CMakeFiles/cmTC_5f5f2.dir/CheckSymbolExists.c.o
8 /usr/bin/cc -fPIC -o CMakeFiles/cmTC_016db.dir/CheckSymbolExists.c.o -c /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c 8 /usr/bin/cc -fPIC -o CMakeFiles/cmTC_5f5f2.dir/CheckSymbolExists.c.o -c /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
9 Linking C executable cmTC_016db 9 Linking C executable cmTC_5f5f2
10 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_016db.dir/link.txt --verbose=1 10 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5f5f2.dir/link.txt --verbose=1
11 /usr/bin/cc -fPIC CMakeFiles/cmTC_016db.dir/CheckSymbolExists.c.o -o cmTC_016db 11 /usr/bin/cc -fPIC CMakeFiles/cmTC_5f5f2.dir/CheckSymbolExists.c.o -o cmTC_5f5f2
12 CMakeFiles/cmTC_016db.dir/CheckSymbolExists.c.o:在函数‘main’中: 12 CMakeFiles/cmTC_5f5f2.dir/CheckSymbolExists.c.o:在函数‘main’中:
13 CheckSymbolExists.c:(.text+0x1b):对‘pthread_create’未定义的引用 13 CheckSymbolExists.c:(.text+0x1b):对‘pthread_create’未定义的引用
14 collect2: error: ld returned 1 exit status 14 collect2: error: ld returned 1 exit status
15 CMakeFiles/cmTC_016db.dir/build.make:97: recipe for target 'cmTC_016db' failed 15 CMakeFiles/cmTC_5f5f2.dir/build.make:97: recipe for target 'cmTC_5f5f2' failed
16 make[1]: *** [cmTC_016db] Error 1 16 make[1]: *** [cmTC_5f5f2] Error 1
17 make[1]: 离开目录“/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp” 17 make[1]: 离开目录“/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp”
18 Makefile:126: recipe for target 'cmTC_016db/fast' failed 18 Makefile:126: recipe for target 'cmTC_5f5f2/fast' failed
19 make: *** [cmTC_016db/fast] Error 2 19 make: *** [cmTC_5f5f2/fast] Error 2
20 20
21 File /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: 21 File /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
22 /* */ 22 /* */
23 #include <pthread.h> 23 #include <pthread.h>
24 24
...@@ -34,22 +34,22 @@ int main(int argc, char** argv) ...@@ -34,22 +34,22 @@ int main(int argc, char** argv)
34 } 34 }
35 35
36 Determining if the function pthread_create exists in the pthreads failed with the following output: 36 Determining if the function pthread_create exists in the pthreads failed with the following output:
37 Change Dir: /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp 37 Change Dir: /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp
38 38
39 Run Build Command:"/usr/bin/make" "cmTC_99b26/fast" 39 Run Build Command:"/usr/bin/make" "cmTC_aa652/fast"
40 /usr/bin/make -f CMakeFiles/cmTC_99b26.dir/build.make CMakeFiles/cmTC_99b26.dir/build 40 /usr/bin/make -f CMakeFiles/cmTC_aa652.dir/build.make CMakeFiles/cmTC_aa652.dir/build
41 make[1]: 进入目录“/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp” 41 make[1]: 进入目录“/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp”
42 Building C object CMakeFiles/cmTC_99b26.dir/CheckFunctionExists.c.o 42 Building C object CMakeFiles/cmTC_aa652.dir/CheckFunctionExists.c.o
43 /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_99b26.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c 43 /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_aa652.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
44 Linking C executable cmTC_99b26 44 Linking C executable cmTC_aa652
45 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_99b26.dir/link.txt --verbose=1 45 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_aa652.dir/link.txt --verbose=1
46 /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_99b26.dir/CheckFunctionExists.c.o -o cmTC_99b26 -lpthreads 46 /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_aa652.dir/CheckFunctionExists.c.o -o cmTC_aa652 -lpthreads
47 /usr/bin/ld: 找不到 -lpthreads 47 /usr/bin/ld: 找不到 -lpthreads
48 collect2: error: ld returned 1 exit status 48 collect2: error: ld returned 1 exit status
49 CMakeFiles/cmTC_99b26.dir/build.make:97: recipe for target 'cmTC_99b26' failed 49 CMakeFiles/cmTC_aa652.dir/build.make:97: recipe for target 'cmTC_aa652' failed
50 make[1]: *** [cmTC_99b26] Error 1 50 make[1]: *** [cmTC_aa652] Error 1
51 make[1]: 离开目录“/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/CMakeTmp” 51 make[1]: 离开目录“/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/CMakeTmp”
52 Makefile:126: recipe for target 'cmTC_99b26/fast' failed 52 Makefile:126: recipe for target 'cmTC_aa652/fast' failed
53 make: *** [cmTC_99b26/fast] Error 2 53 make: *** [cmTC_aa652/fast] Error 2
54 54
55 55
......
...@@ -11,99 +11,29 @@ set(CMAKE_MAKEFILE_DEPENDS ...@@ -11,99 +11,29 @@ set(CMAKE_MAKEFILE_DEPENDS
11 "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 11 "CMakeFiles/3.10.2/CMakeCCompiler.cmake"
12 "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 12 "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake"
13 "CMakeFiles/3.10.2/CMakeSystem.cmake" 13 "CMakeFiles/3.10.2/CMakeSystem.cmake"
14 "CMakeFiles/feature_tests.c"
15 "CMakeFiles/feature_tests.cxx"
16 "/usr/local/lib/cmake/opencv4/OpenCVConfig-version.cmake" 14 "/usr/local/lib/cmake/opencv4/OpenCVConfig-version.cmake"
17 "/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake" 15 "/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake"
18 "/usr/local/lib/cmake/opencv4/OpenCVModules-release.cmake" 16 "/usr/local/lib/cmake/opencv4/OpenCVModules-release.cmake"
19 "/usr/local/lib/cmake/opencv4/OpenCVModules.cmake" 17 "/usr/local/lib/cmake/opencv4/OpenCVModules.cmake"
20 "/usr/share/cmake-3.10/Modules/CMakeCCompiler.cmake.in"
21 "/usr/share/cmake-3.10/Modules/CMakeCCompilerABI.c"
22 "/usr/share/cmake-3.10/Modules/CMakeCInformation.cmake" 18 "/usr/share/cmake-3.10/Modules/CMakeCInformation.cmake"
23 "/usr/share/cmake-3.10/Modules/CMakeCXXCompiler.cmake.in"
24 "/usr/share/cmake-3.10/Modules/CMakeCXXCompilerABI.cpp"
25 "/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake" 19 "/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake"
26 "/usr/share/cmake-3.10/Modules/CMakeCommonLanguageInclude.cmake" 20 "/usr/share/cmake-3.10/Modules/CMakeCommonLanguageInclude.cmake"
27 "/usr/share/cmake-3.10/Modules/CMakeCompilerIdDetection.cmake"
28 "/usr/share/cmake-3.10/Modules/CMakeConfigurableFile.in"
29 "/usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake"
30 "/usr/share/cmake-3.10/Modules/CMakeDetermineCXXCompiler.cmake"
31 "/usr/share/cmake-3.10/Modules/CMakeDetermineCompileFeatures.cmake"
32 "/usr/share/cmake-3.10/Modules/CMakeDetermineCompiler.cmake"
33 "/usr/share/cmake-3.10/Modules/CMakeDetermineCompilerABI.cmake"
34 "/usr/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake"
35 "/usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake"
36 "/usr/share/cmake-3.10/Modules/CMakeFindBinUtils.cmake"
37 "/usr/share/cmake-3.10/Modules/CMakeGenericSystem.cmake" 21 "/usr/share/cmake-3.10/Modules/CMakeGenericSystem.cmake"
38 "/usr/share/cmake-3.10/Modules/CMakeLanguageInformation.cmake" 22 "/usr/share/cmake-3.10/Modules/CMakeLanguageInformation.cmake"
39 "/usr/share/cmake-3.10/Modules/CMakeParseImplicitLinkInfo.cmake"
40 "/usr/share/cmake-3.10/Modules/CMakeSystem.cmake.in"
41 "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake" 23 "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake"
42 "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInitialize.cmake" 24 "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInitialize.cmake"
43 "/usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake"
44 "/usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake"
45 "/usr/share/cmake-3.10/Modules/CMakeTestCompilerCommon.cmake"
46 "/usr/share/cmake-3.10/Modules/CMakeUnixFindMake.cmake"
47 "/usr/share/cmake-3.10/Modules/CheckFunctionExists.c"
48 "/usr/share/cmake-3.10/Modules/CheckIncludeFile.c.in"
49 "/usr/share/cmake-3.10/Modules/CheckIncludeFile.cmake" 25 "/usr/share/cmake-3.10/Modules/CheckIncludeFile.cmake"
50 "/usr/share/cmake-3.10/Modules/CheckLibraryExists.cmake" 26 "/usr/share/cmake-3.10/Modules/CheckLibraryExists.cmake"
51 "/usr/share/cmake-3.10/Modules/CheckSymbolExists.cmake" 27 "/usr/share/cmake-3.10/Modules/CheckSymbolExists.cmake"
52 "/usr/share/cmake-3.10/Modules/Compiler/ADSP-DetermineCompiler.cmake"
53 "/usr/share/cmake-3.10/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
54 "/usr/share/cmake-3.10/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
55 "/usr/share/cmake-3.10/Modules/Compiler/Borland-DetermineCompiler.cmake"
56 "/usr/share/cmake-3.10/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
57 "/usr/share/cmake-3.10/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 28 "/usr/share/cmake-3.10/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
58 "/usr/share/cmake-3.10/Modules/Compiler/Clang-DetermineCompiler.cmake"
59 "/usr/share/cmake-3.10/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
60 "/usr/share/cmake-3.10/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
61 "/usr/share/cmake-3.10/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
62 "/usr/share/cmake-3.10/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
63 "/usr/share/cmake-3.10/Modules/Compiler/Cray-DetermineCompiler.cmake"
64 "/usr/share/cmake-3.10/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
65 "/usr/share/cmake-3.10/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
66 "/usr/share/cmake-3.10/Modules/Compiler/GHS-DetermineCompiler.cmake"
67 "/usr/share/cmake-3.10/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
68 "/usr/share/cmake-3.10/Modules/Compiler/GNU-C-FeatureTests.cmake"
69 "/usr/share/cmake-3.10/Modules/Compiler/GNU-C.cmake" 29 "/usr/share/cmake-3.10/Modules/Compiler/GNU-C.cmake"
70 "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
71 "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX-FeatureTests.cmake"
72 "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX.cmake" 30 "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX.cmake"
73 "/usr/share/cmake-3.10/Modules/Compiler/GNU-FindBinUtils.cmake"
74 "/usr/share/cmake-3.10/Modules/Compiler/GNU.cmake" 31 "/usr/share/cmake-3.10/Modules/Compiler/GNU.cmake"
75 "/usr/share/cmake-3.10/Modules/Compiler/HP-C-DetermineCompiler.cmake"
76 "/usr/share/cmake-3.10/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
77 "/usr/share/cmake-3.10/Modules/Compiler/IAR-DetermineCompiler.cmake"
78 "/usr/share/cmake-3.10/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
79 "/usr/share/cmake-3.10/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
80 "/usr/share/cmake-3.10/Modules/Compiler/Intel-DetermineCompiler.cmake"
81 "/usr/share/cmake-3.10/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
82 "/usr/share/cmake-3.10/Modules/Compiler/MSVC-DetermineCompiler.cmake"
83 "/usr/share/cmake-3.10/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
84 "/usr/share/cmake-3.10/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
85 "/usr/share/cmake-3.10/Modules/Compiler/PGI-DetermineCompiler.cmake"
86 "/usr/share/cmake-3.10/Modules/Compiler/PathScale-DetermineCompiler.cmake"
87 "/usr/share/cmake-3.10/Modules/Compiler/SCO-DetermineCompiler.cmake"
88 "/usr/share/cmake-3.10/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
89 "/usr/share/cmake-3.10/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
90 "/usr/share/cmake-3.10/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
91 "/usr/share/cmake-3.10/Modules/Compiler/TI-DetermineCompiler.cmake"
92 "/usr/share/cmake-3.10/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
93 "/usr/share/cmake-3.10/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
94 "/usr/share/cmake-3.10/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
95 "/usr/share/cmake-3.10/Modules/Compiler/Watcom-DetermineCompiler.cmake"
96 "/usr/share/cmake-3.10/Modules/Compiler/XL-C-DetermineCompiler.cmake"
97 "/usr/share/cmake-3.10/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
98 "/usr/share/cmake-3.10/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
99 "/usr/share/cmake-3.10/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
100 "/usr/share/cmake-3.10/Modules/FindCUDA.cmake" 32 "/usr/share/cmake-3.10/Modules/FindCUDA.cmake"
101 "/usr/share/cmake-3.10/Modules/FindCUDA/select_compute_arch.cmake" 33 "/usr/share/cmake-3.10/Modules/FindCUDA/select_compute_arch.cmake"
102 "/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake" 34 "/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake"
103 "/usr/share/cmake-3.10/Modules/FindPackageMessage.cmake" 35 "/usr/share/cmake-3.10/Modules/FindPackageMessage.cmake"
104 "/usr/share/cmake-3.10/Modules/FindThreads.cmake" 36 "/usr/share/cmake-3.10/Modules/FindThreads.cmake"
105 "/usr/share/cmake-3.10/Modules/Internal/FeatureTesting.cmake"
106 "/usr/share/cmake-3.10/Modules/Platform/Linux-Determine-CXX.cmake"
107 "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-C.cmake" 37 "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-C.cmake"
108 "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-CXX.cmake" 38 "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-CXX.cmake"
109 "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU.cmake" 39 "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU.cmake"
...@@ -119,11 +49,6 @@ set(CMAKE_MAKEFILE_OUTPUTS ...@@ -119,11 +49,6 @@ set(CMAKE_MAKEFILE_OUTPUTS
119 49
120 # Byproducts of CMake generate step: 50 # Byproducts of CMake generate step:
121 set(CMAKE_MAKEFILE_PRODUCTS 51 set(CMAKE_MAKEFILE_PRODUCTS
122 "CMakeFiles/3.10.2/CMakeSystem.cmake"
123 "CMakeFiles/3.10.2/CMakeCCompiler.cmake"
124 "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake"
125 "CMakeFiles/3.10.2/CMakeCCompiler.cmake"
126 "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake"
127 "CMakeFiles/CMakeDirectoryInformation.cmake" 52 "CMakeFiles/CMakeDirectoryInformation.cmake"
128 ) 53 )
129 54
......
...@@ -54,10 +54,10 @@ RM = /usr/bin/cmake -E remove -f ...@@ -54,10 +54,10 @@ RM = /usr/bin/cmake -E remove -f
54 EQUALS = = 54 EQUALS = =
55 55
56 # The top-level source directory on which CMake was run. 56 # The top-level source directory on which CMake was run.
57 CMAKE_SOURCE_DIR = /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn 57 CMAKE_SOURCE_DIR = /home/situ/qfs/face_recognize_mnn
58 58
59 # The top-level build directory on which CMake was run. 59 # The top-level build directory on which CMake was run.
60 CMAKE_BINARY_DIR = /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build 60 CMAKE_BINARY_DIR = /home/situ/qfs/face_recognize_mnn/build
61 61
62 #============================================================================= 62 #=============================================================================
63 # Target rules for target CMakeFiles/main.dir 63 # Target rules for target CMakeFiles/main.dir
...@@ -66,7 +66,7 @@ CMAKE_BINARY_DIR = /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/bu ...@@ -66,7 +66,7 @@ CMAKE_BINARY_DIR = /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/bu
66 CMakeFiles/main.dir/all: 66 CMakeFiles/main.dir/all:
67 $(MAKE) -f CMakeFiles/main.dir/build.make CMakeFiles/main.dir/depend 67 $(MAKE) -f CMakeFiles/main.dir/build.make CMakeFiles/main.dir/depend
68 $(MAKE) -f CMakeFiles/main.dir/build.make CMakeFiles/main.dir/build 68 $(MAKE) -f CMakeFiles/main.dir/build.make CMakeFiles/main.dir/build
69 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles --progress-num=1,2,3,4,5,6 "Built target main" 69 @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/situ/qfs/face_recognize_mnn/build/CMakeFiles --progress-num=1,2,3,4,5,6 "Built target main"
70 .PHONY : CMakeFiles/main.dir/all 70 .PHONY : CMakeFiles/main.dir/all
71 71
72 # Include target in all. 72 # Include target in all.
...@@ -76,9 +76,9 @@ all: CMakeFiles/main.dir/all ...@@ -76,9 +76,9 @@ all: CMakeFiles/main.dir/all
76 76
77 # Build rule for subdir invocation for target. 77 # Build rule for subdir invocation for target.
78 CMakeFiles/main.dir/rule: cmake_check_build_system 78 CMakeFiles/main.dir/rule: cmake_check_build_system
79 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles 6 79 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/face_recognize_mnn/build/CMakeFiles 6
80 $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/main.dir/all 80 $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/main.dir/all
81 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles 0 81 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/face_recognize_mnn/build/CMakeFiles 0
82 .PHONY : CMakeFiles/main.dir/rule 82 .PHONY : CMakeFiles/main.dir/rule
83 83
84 # Convenience name for target. 84 # Convenience name for target.
......
1 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/rebuild_cache.dir 1 /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/rebuild_cache.dir
2 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/main.dir 2 /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/main.dir
3 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/edit_cache.dir 3 /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/edit_cache.dir
......
...@@ -124,25 +124,25 @@ MNN/HalideRuntime.h ...@@ -124,25 +124,25 @@ MNN/HalideRuntime.h
124 MNN/MNNDefine.h 124 MNN/MNNDefine.h
125 - 125 -
126 126
127 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facecomparison.cpp 127 /home/situ/qfs/face_recognize_mnn/facecomparison.cpp
128 facecomparison.h 128 facecomparison.h
129 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facecomparison.h 129 /home/situ/qfs/face_recognize_mnn/facecomparison.h
130 130
131 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facelandmarks.cpp 131 /home/situ/qfs/face_recognize_mnn/facelandmarks.cpp
132 facelandmarks.h 132 facelandmarks.h
133 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facelandmarks.h 133 /home/situ/qfs/face_recognize_mnn/facelandmarks.h
134 134
135 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facerecognize.cpp 135 /home/situ/qfs/face_recognize_mnn/facerecognize.cpp
136 facerecognize.h 136 facerecognize.h
137 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facerecognize.h 137 /home/situ/qfs/face_recognize_mnn/facerecognize.h
138 138
139 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/main.cpp 139 /home/situ/qfs/face_recognize_mnn/main.cpp
140 facecomparison.h 140 facecomparison.h
141 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facecomparison.h 141 /home/situ/qfs/face_recognize_mnn/facecomparison.h
142 142
143 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/retinaface.cpp 143 /home/situ/qfs/face_recognize_mnn/retinaface.cpp
144 retinaface.h 144 retinaface.h
145 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/retinaface.h 145 /home/situ/qfs/face_recognize_mnn/retinaface.h
146 146
147 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp 147 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp
148 opencv2/imgproc.hpp 148 opencv2/imgproc.hpp
......
...@@ -4,11 +4,11 @@ set(CMAKE_DEPENDS_LANGUAGES ...@@ -4,11 +4,11 @@ set(CMAKE_DEPENDS_LANGUAGES
4 ) 4 )
5 # The set of files for implicit dependencies of each language: 5 # The set of files for implicit dependencies of each language:
6 set(CMAKE_DEPENDS_CHECK_CXX 6 set(CMAKE_DEPENDS_CHECK_CXX
7 "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facecomparison.cpp" "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/main.dir/facecomparison.cpp.o" 7 "/home/situ/qfs/face_recognize_mnn/facecomparison.cpp" "/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/main.dir/facecomparison.cpp.o"
8 "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facelandmarks.cpp" "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/main.dir/facelandmarks.cpp.o" 8 "/home/situ/qfs/face_recognize_mnn/facelandmarks.cpp" "/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/main.dir/facelandmarks.cpp.o"
9 "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facerecognize.cpp" "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/main.dir/facerecognize.cpp.o" 9 "/home/situ/qfs/face_recognize_mnn/facerecognize.cpp" "/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/main.dir/facerecognize.cpp.o"
10 "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/main.cpp" "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/main.dir/main.cpp.o" 10 "/home/situ/qfs/face_recognize_mnn/main.cpp" "/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/main.dir/main.cpp.o"
11 "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/retinaface.cpp" "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/main.dir/retinaface.cpp.o" 11 "/home/situ/qfs/face_recognize_mnn/retinaface.cpp" "/home/situ/qfs/face_recognize_mnn/build/CMakeFiles/main.dir/retinaface.cpp.o"
12 ) 12 )
13 set(CMAKE_CXX_COMPILER_ID "GNU") 13 set(CMAKE_CXX_COMPILER_ID "GNU")
14 14
......
...@@ -15,7 +15,7 @@ CMakeFiles/main.dir/facecomparison.cpp.o ...@@ -15,7 +15,7 @@ CMakeFiles/main.dir/facecomparison.cpp.o
15 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h 15 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h
16 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h 16 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h
17 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp 17 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp
18 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facecomparison.cpp 18 /home/situ/qfs/face_recognize_mnn/facecomparison.cpp
19 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp 19 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp
20 /usr/local/include/opencv4/opencv2/calib3d.hpp 20 /usr/local/include/opencv4/opencv2/calib3d.hpp
21 /usr/local/include/opencv4/opencv2/core.hpp 21 /usr/local/include/opencv4/opencv2/core.hpp
...@@ -130,7 +130,7 @@ CMakeFiles/main.dir/facelandmarks.cpp.o ...@@ -130,7 +130,7 @@ CMakeFiles/main.dir/facelandmarks.cpp.o
130 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h 130 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h
131 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h 131 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h
132 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp 132 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp
133 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facelandmarks.cpp 133 /home/situ/qfs/face_recognize_mnn/facelandmarks.cpp
134 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp 134 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp
135 /usr/local/include/opencv4/opencv2/calib3d.hpp 135 /usr/local/include/opencv4/opencv2/calib3d.hpp
136 /usr/local/include/opencv4/opencv2/core.hpp 136 /usr/local/include/opencv4/opencv2/core.hpp
...@@ -245,7 +245,7 @@ CMakeFiles/main.dir/facerecognize.cpp.o ...@@ -245,7 +245,7 @@ CMakeFiles/main.dir/facerecognize.cpp.o
245 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h 245 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h
246 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h 246 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h
247 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp 247 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp
248 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/facerecognize.cpp 248 /home/situ/qfs/face_recognize_mnn/facerecognize.cpp
249 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp 249 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp
250 /usr/local/include/opencv4/opencv2/calib3d.hpp 250 /usr/local/include/opencv4/opencv2/calib3d.hpp
251 /usr/local/include/opencv4/opencv2/core.hpp 251 /usr/local/include/opencv4/opencv2/core.hpp
...@@ -363,7 +363,7 @@ CMakeFiles/main.dir/main.cpp.o ...@@ -363,7 +363,7 @@ CMakeFiles/main.dir/main.cpp.o
363 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h 363 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h
364 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h 364 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h
365 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp 365 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp
366 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/main.cpp 366 /home/situ/qfs/face_recognize_mnn/main.cpp
367 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp 367 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp
368 /usr/local/include/opencv4/opencv2/calib3d.hpp 368 /usr/local/include/opencv4/opencv2/calib3d.hpp
369 /usr/local/include/opencv4/opencv2/core.hpp 369 /usr/local/include/opencv4/opencv2/core.hpp
...@@ -478,7 +478,7 @@ CMakeFiles/main.dir/retinaface.cpp.o ...@@ -478,7 +478,7 @@ CMakeFiles/main.dir/retinaface.cpp.o
478 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h 478 /home/situ/MNN/MNN1.0/MNN/include/MNN/Matrix.h
479 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h 479 /home/situ/MNN/MNN1.0/MNN/include/MNN/Rect.h
480 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp 480 /home/situ/MNN/MNN1.0/MNN/include/MNN/Tensor.hpp
481 /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/retinaface.cpp 481 /home/situ/qfs/face_recognize_mnn/retinaface.cpp
482 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp 482 /usr/local/include/opencv4/opencv2/./imgproc/segmentation.hpp
483 /usr/local/include/opencv4/opencv2/calib3d.hpp 483 /usr/local/include/opencv4/opencv2/calib3d.hpp
484 /usr/local/include/opencv4/opencv2/core.hpp 484 /usr/local/include/opencv4/opencv2/core.hpp
......
...@@ -6,5 +6,5 @@ CXX_FLAGS = -std=gnu++11 ...@@ -6,5 +6,5 @@ CXX_FLAGS = -std=gnu++11
6 6
7 CXX_DEFINES = 7 CXX_DEFINES =
8 8
9 CXX_INCLUDES = -I/home/situ/MNN/MNN1.0/MNN/include -I/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/include -isystem /usr/local/include/opencv4 9 CXX_INCLUDES = -I/home/situ/MNN/MNN1.0/MNN/include -I/home/situ/qfs/face_recognize_mnn/include -isystem /usr/local/include/opencv4
10 10
......
1 /usr/bin/c++ CMakeFiles/main.dir/main.cpp.o CMakeFiles/main.dir/facerecognize.cpp.o CMakeFiles/main.dir/retinaface.cpp.o CMakeFiles/main.dir/facelandmarks.cpp.o CMakeFiles/main.dir/facecomparison.cpp.o -o main -L/usr/local/cuda-10.1/lib64 -L/home/situ/MNN/MNN1.0/MNN/build -Wl,-rpath,/usr/local/cuda-10.1/lib64:/home/situ/MNN/MNN1.0/MNN/build:/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/lib:/usr/local/lib ../lib/libfacecomparison.so -lMNN /usr/local/lib/libopencv_gapi.so.4.5.5 /usr/local/lib/libopencv_stitching.so.4.5.5 /usr/local/lib/libopencv_aruco.so.4.5.5 /usr/local/lib/libopencv_barcode.so.4.5.5 /usr/local/lib/libopencv_bgsegm.so.4.5.5 /usr/local/lib/libopencv_bioinspired.so.4.5.5 /usr/local/lib/libopencv_ccalib.so.4.5.5 /usr/local/lib/libopencv_cudabgsegm.so.4.5.5 /usr/local/lib/libopencv_cudafeatures2d.so.4.5.5 /usr/local/lib/libopencv_cudaobjdetect.so.4.5.5 /usr/local/lib/libopencv_cudastereo.so.4.5.5 /usr/local/lib/libopencv_dnn_objdetect.so.4.5.5 /usr/local/lib/libopencv_dnn_superres.so.4.5.5 /usr/local/lib/libopencv_dpm.so.4.5.5 /usr/local/lib/libopencv_face.so.4.5.5 /usr/local/lib/libopencv_freetype.so.4.5.5 /usr/local/lib/libopencv_fuzzy.so.4.5.5 /usr/local/lib/libopencv_hfs.so.4.5.5 /usr/local/lib/libopencv_img_hash.so.4.5.5 /usr/local/lib/libopencv_intensity_transform.so.4.5.5 /usr/local/lib/libopencv_line_descriptor.so.4.5.5 /usr/local/lib/libopencv_mcc.so.4.5.5 /usr/local/lib/libopencv_quality.so.4.5.5 /usr/local/lib/libopencv_rapid.so.4.5.5 /usr/local/lib/libopencv_reg.so.4.5.5 /usr/local/lib/libopencv_rgbd.so.4.5.5 /usr/local/lib/libopencv_saliency.so.4.5.5 /usr/local/lib/libopencv_stereo.so.4.5.5 /usr/local/lib/libopencv_structured_light.so.4.5.5 /usr/local/lib/libopencv_superres.so.4.5.5 /usr/local/lib/libopencv_surface_matching.so.4.5.5 /usr/local/lib/libopencv_tracking.so.4.5.5 /usr/local/lib/libopencv_videostab.so.4.5.5 /usr/local/lib/libopencv_wechat_qrcode.so.4.5.5 /usr/local/lib/libopencv_xfeatures2d.so.4.5.5 /usr/local/lib/libopencv_xobjdetect.so.4.5.5 /usr/local/lib/libopencv_xphoto.so.4.5.5 /usr/local/lib/libopencv_shape.so.4.5.5 /usr/local/lib/libopencv_highgui.so.4.5.5 /usr/local/lib/libopencv_datasets.so.4.5.5 /usr/local/lib/libopencv_plot.so.4.5.5 /usr/local/lib/libopencv_text.so.4.5.5 /usr/local/lib/libopencv_ml.so.4.5.5 /usr/local/lib/libopencv_phase_unwrapping.so.4.5.5 /usr/local/lib/libopencv_cudacodec.so.4.5.5 /usr/local/lib/libopencv_videoio.so.4.5.5 /usr/local/lib/libopencv_cudaoptflow.so.4.5.5 /usr/local/lib/libopencv_cudalegacy.so.4.5.5 /usr/local/lib/libopencv_cudawarping.so.4.5.5 /usr/local/lib/libopencv_optflow.so.4.5.5 /usr/local/lib/libopencv_ximgproc.so.4.5.5 /usr/local/lib/libopencv_video.so.4.5.5 /usr/local/lib/libopencv_imgcodecs.so.4.5.5 /usr/local/lib/libopencv_objdetect.so.4.5.5 /usr/local/lib/libopencv_calib3d.so.4.5.5 /usr/local/lib/libopencv_dnn.so.4.5.5 /usr/local/lib/libopencv_features2d.so.4.5.5 /usr/local/lib/libopencv_flann.so.4.5.5 /usr/local/lib/libopencv_photo.so.4.5.5 /usr/local/lib/libopencv_cudaimgproc.so.4.5.5 /usr/local/lib/libopencv_cudafilters.so.4.5.5 /usr/local/lib/libopencv_imgproc.so.4.5.5 /usr/local/lib/libopencv_cudaarithm.so.4.5.5 /usr/local/lib/libopencv_core.so.4.5.5 /usr/local/lib/libopencv_cudev.so.4.5.5 1 /usr/bin/c++ CMakeFiles/main.dir/main.cpp.o CMakeFiles/main.dir/facerecognize.cpp.o CMakeFiles/main.dir/retinaface.cpp.o CMakeFiles/main.dir/facelandmarks.cpp.o CMakeFiles/main.dir/facecomparison.cpp.o -o main -L/usr/local/cuda-10.1/lib64 -L/home/situ/MNN/MNN1.0/MNN/build -Wl,-rpath,/usr/local/cuda-10.1/lib64:/home/situ/MNN/MNN1.0/MNN/build:/usr/local/lib -lMNN /usr/local/lib/libopencv_gapi.so.4.5.5 /usr/local/lib/libopencv_stitching.so.4.5.5 /usr/local/lib/libopencv_aruco.so.4.5.5 /usr/local/lib/libopencv_barcode.so.4.5.5 /usr/local/lib/libopencv_bgsegm.so.4.5.5 /usr/local/lib/libopencv_bioinspired.so.4.5.5 /usr/local/lib/libopencv_ccalib.so.4.5.5 /usr/local/lib/libopencv_cudabgsegm.so.4.5.5 /usr/local/lib/libopencv_cudafeatures2d.so.4.5.5 /usr/local/lib/libopencv_cudaobjdetect.so.4.5.5 /usr/local/lib/libopencv_cudastereo.so.4.5.5 /usr/local/lib/libopencv_dnn_objdetect.so.4.5.5 /usr/local/lib/libopencv_dnn_superres.so.4.5.5 /usr/local/lib/libopencv_dpm.so.4.5.5 /usr/local/lib/libopencv_face.so.4.5.5 /usr/local/lib/libopencv_freetype.so.4.5.5 /usr/local/lib/libopencv_fuzzy.so.4.5.5 /usr/local/lib/libopencv_hfs.so.4.5.5 /usr/local/lib/libopencv_img_hash.so.4.5.5 /usr/local/lib/libopencv_intensity_transform.so.4.5.5 /usr/local/lib/libopencv_line_descriptor.so.4.5.5 /usr/local/lib/libopencv_mcc.so.4.5.5 /usr/local/lib/libopencv_quality.so.4.5.5 /usr/local/lib/libopencv_rapid.so.4.5.5 /usr/local/lib/libopencv_reg.so.4.5.5 /usr/local/lib/libopencv_rgbd.so.4.5.5 /usr/local/lib/libopencv_saliency.so.4.5.5 /usr/local/lib/libopencv_stereo.so.4.5.5 /usr/local/lib/libopencv_structured_light.so.4.5.5 /usr/local/lib/libopencv_superres.so.4.5.5 /usr/local/lib/libopencv_surface_matching.so.4.5.5 /usr/local/lib/libopencv_tracking.so.4.5.5 /usr/local/lib/libopencv_videostab.so.4.5.5 /usr/local/lib/libopencv_wechat_qrcode.so.4.5.5 /usr/local/lib/libopencv_xfeatures2d.so.4.5.5 /usr/local/lib/libopencv_xobjdetect.so.4.5.5 /usr/local/lib/libopencv_xphoto.so.4.5.5 /usr/local/lib/libopencv_shape.so.4.5.5 /usr/local/lib/libopencv_highgui.so.4.5.5 /usr/local/lib/libopencv_datasets.so.4.5.5 /usr/local/lib/libopencv_plot.so.4.5.5 /usr/local/lib/libopencv_text.so.4.5.5 /usr/local/lib/libopencv_ml.so.4.5.5 /usr/local/lib/libopencv_phase_unwrapping.so.4.5.5 /usr/local/lib/libopencv_cudacodec.so.4.5.5 /usr/local/lib/libopencv_videoio.so.4.5.5 /usr/local/lib/libopencv_cudaoptflow.so.4.5.5 /usr/local/lib/libopencv_cudalegacy.so.4.5.5 /usr/local/lib/libopencv_cudawarping.so.4.5.5 /usr/local/lib/libopencv_optflow.so.4.5.5 /usr/local/lib/libopencv_ximgproc.so.4.5.5 /usr/local/lib/libopencv_video.so.4.5.5 /usr/local/lib/libopencv_imgcodecs.so.4.5.5 /usr/local/lib/libopencv_objdetect.so.4.5.5 /usr/local/lib/libopencv_calib3d.so.4.5.5 /usr/local/lib/libopencv_dnn.so.4.5.5 /usr/local/lib/libopencv_features2d.so.4.5.5 /usr/local/lib/libopencv_flann.so.4.5.5 /usr/local/lib/libopencv_photo.so.4.5.5 /usr/local/lib/libopencv_cudaimgproc.so.4.5.5 /usr/local/lib/libopencv_cudafilters.so.4.5.5 /usr/local/lib/libopencv_imgproc.so.4.5.5 /usr/local/lib/libopencv_cudaarithm.so.4.5.5 /usr/local/lib/libopencv_core.so.4.5.5 /usr/local/lib/libopencv_cudev.so.4.5.5
......
...@@ -48,10 +48,10 @@ RM = /usr/bin/cmake -E remove -f ...@@ -48,10 +48,10 @@ RM = /usr/bin/cmake -E remove -f
48 EQUALS = = 48 EQUALS = =
49 49
50 # The top-level source directory on which CMake was run. 50 # The top-level source directory on which CMake was run.
51 CMAKE_SOURCE_DIR = /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn 51 CMAKE_SOURCE_DIR = /home/situ/qfs/face_recognize_mnn
52 52
53 # The top-level build directory on which CMake was run. 53 # The top-level build directory on which CMake was run.
54 CMAKE_BINARY_DIR = /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build 54 CMAKE_BINARY_DIR = /home/situ/qfs/face_recognize_mnn/build
55 55
56 #============================================================================= 56 #=============================================================================
57 # Targets provided globally by CMake. 57 # Targets provided globally by CMake.
...@@ -80,9 +80,9 @@ edit_cache/fast: edit_cache ...@@ -80,9 +80,9 @@ edit_cache/fast: edit_cache
80 80
81 # The main all target 81 # The main all target
82 all: cmake_check_build_system 82 all: cmake_check_build_system
83 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles/progress.marks 83 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/face_recognize_mnn/build/CMakeFiles /home/situ/qfs/face_recognize_mnn/build/CMakeFiles/progress.marks
84 $(MAKE) -f CMakeFiles/Makefile2 all 84 $(MAKE) -f CMakeFiles/Makefile2 all
85 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/CMakeFiles 0 85 $(CMAKE_COMMAND) -E cmake_progress_start /home/situ/qfs/face_recognize_mnn/build/CMakeFiles 0
86 .PHONY : all 86 .PHONY : all
87 87
88 # The main clean target 88 # The main clean target
......
1 # Install script for directory: /home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn 1 # Install script for directory: /home/situ/qfs/face_recognize_mnn
2 2
3 # Set the install prefix 3 # Set the install prefix
4 if(NOT DEFINED CMAKE_INSTALL_PREFIX) 4 if(NOT DEFINED CMAKE_INSTALL_PREFIX)
...@@ -45,5 +45,5 @@ endif() ...@@ -45,5 +45,5 @@ endif()
45 45
46 string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 46 string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
47 "${CMAKE_INSTALL_MANIFEST_FILES}") 47 "${CMAKE_INSTALL_MANIFEST_FILES}")
48 file(WRITE "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/build/${CMAKE_INSTALL_MANIFEST}" 48 file(WRITE "/home/situ/qfs/face_recognize_mnn/build/${CMAKE_INSTALL_MANIFEST}"
49 "${CMAKE_INSTALL_MANIFEST_CONTENT}") 49 "${CMAKE_INSTALL_MANIFEST_CONTENT}")
......
No preview for this file type
1 #include "facecomparison.h" 1 #include "facecomparison.h"
2 2
3 bool FaceComparison::init_model(string face_det_model,string face_landm_model,string face_rec_model,InitModelError &model_error){
4
5 face_det = RetinaFace();
6 face_det.confidence_threshold = confidence_threshold;
7 face_det.is_bbox_process = is_bbox_process;
8 face_det.num_thread=num_thread;
9 face_det.forward_type = forward_type;
10 bool init_det_code = face_det.init_model(face_det_model);
11 model_error.init_error.push_back(init_det_code);
12 face_landm =FaceLandmarks();
13 bool init_landm_code = face_landm.init_model(face_landm_model);
14 face_landm.num_thread=num_thread;
15 face_landm.forward_type=forward_type;
16 model_error.init_error.push_back(init_landm_code);
17 face_rec =FaceRecognize();
18 bool init_rec_code = face_rec.init_model(face_rec_model);
19 face_rec.num_thread=num_thread;
20 face_rec.forward_type=forward_type;
21 model_error.init_error.push_back(init_rec_code);
22 if(init_det_code&&init_landm_code&&init_rec_code){
23 return true;
24 }else{
25 return false;
26 }
27 }
3 28
4 bool FaceComparison::inference(string image1_path,string image2_path){ 29 int FaceComparison::inference(string image1_path,string image2_path,OutputInfo &output_info){
5 bool result=false; 30 bool result=false;
6 cv::Mat image1=cv::imread(image1_path); 31 cv::Mat image1=cv::imread(image1_path);
7 cv::Mat image2=cv::imread(image2_path); 32 cv::Mat image2=cv::imread(image2_path);
8 if(image1.empty()||image2.empty()){ 33 if(image1.empty()){
9 return false; 34 cout<<"Please check if the first picture path exists"<<endl;
35 output_info.error_code=9001;
36 return -1;
37 }
38 if(image2.empty()){
39 cout<<"Please check if the second picture path exists"<<endl;
40 output_info.error_code=9002;
41 return -1;
10 } 42 }
11 vector<Bbox> box1=face_det.inference(image1); 43 vector<Bbox> box1=face_det.inference(image1);
12 vector<Bbox> box2=face_det.inference(image2); 44 vector<Bbox> box2=face_det.inference(image2);
13 if(box1.empty()||box2.empty()){ 45 if(box1.empty()){
14 return false; 46 cout<<"No faces are detected in the first picture"<<endl;
47 output_info.error_code=9003;
48 return -1;
49 }
50 if(box2.empty()){
51 cout<<"No faces are detected in the second picture"<<endl;
52 output_info.error_code=9004;
53 return -1;
15 } 54 }
16 int max_box1=0; 55 int max_box1=0;
17 double max_area1=0,max_area2=0; 56 double max_area1=0,max_area2=0;
...@@ -47,18 +86,38 @@ bool FaceComparison::inference(string image1_path,string image2_path){ ...@@ -47,18 +86,38 @@ bool FaceComparison::inference(string image1_path,string image2_path){
47 Mat align_resize_image2=face_rec.preprocess_face(face_area2,land2); 86 Mat align_resize_image2=face_rec.preprocess_face(face_area2,land2);
48 double samilar_score=face_rec.inference(align_resize_image1,align_resize_image2); 87 double samilar_score=face_rec.inference(align_resize_image1,align_resize_image2);
49 if(samilar_score>face_recongnize_thr){ 88 if(samilar_score>face_recongnize_thr){
50 result=true; 89 output_info.error_code=0;
90 output_info.result=true;
91 }else{
92 output_info.error_code=0;
93 output_info.result=false;
51 } 94 }
52 } 95 }
53 return result; 96 return result;
54 } 97 }
55 98
56 bool FaceComparison::inference(Mat image1,Mat image2){ 99 int FaceComparison::inference(Mat image1,Mat image2,OutputInfo &output_info){
57 bool result=false; 100 if(image1.empty()){
101 cout<<"Please check if the first picture path exists"<<endl;
102 output_info.error_code=9001;
103 return -1;
104 }
105 if(image2.empty()){
106 cout<<"Please check if the second picture path exists"<<endl;
107 output_info.error_code=9002;
108 return -1;
109 }
58 vector<Bbox> box1=face_det.inference(image1); 110 vector<Bbox> box1=face_det.inference(image1);
59 vector<Bbox> box2=face_det.inference(image2); 111 vector<Bbox> box2=face_det.inference(image2);
60 if(box1.empty()||box2.empty()){ 112 if(box1.empty()){
61 return false; 113 cout<<"No faces are detected in the first picture"<<endl;
114 output_info.error_code=9003;
115 return -1;
116 }
117 if(box2.empty()){
118 cout<<"No faces are detected in the second picture"<<endl;
119 output_info.error_code=9004;
120 return -1;
62 } 121 }
63 int max_box1=0; 122 int max_box1=0;
64 double max_area1=0,max_area2=0; 123 double max_area1=0,max_area2=0;
...@@ -94,8 +153,12 @@ bool FaceComparison::inference(Mat image1,Mat image2){ ...@@ -94,8 +153,12 @@ bool FaceComparison::inference(Mat image1,Mat image2){
94 Mat align_resize_image2=face_rec.preprocess_face(face_area2,land2); 153 Mat align_resize_image2=face_rec.preprocess_face(face_area2,land2);
95 double samilar_score=face_rec.inference(align_resize_image1,align_resize_image2); 154 double samilar_score=face_rec.inference(align_resize_image1,align_resize_image2);
96 if(samilar_score>face_recongnize_thr){ 155 if(samilar_score>face_recongnize_thr){
97 result=true; 156 output_info.error_code=0;
157 output_info.result=true;
158 }else{
159 output_info.error_code=0;
160 output_info.result=false;
98 } 161 }
99 } 162 }
100 return result;
101 }
...\ No newline at end of file ...\ No newline at end of file
163 return 0;
164 }
......
1 #include "facelandmarks.h" 1 #include "facelandmarks.h"
2 2
3 FaceLandmarks::FaceLandmarks(){ 3
4 model_init=false;
5 }
6 // FaceLandmarks::~FaceLandmarks(){ 4 // FaceLandmarks::~FaceLandmarks(){
7 // pfld_interpreter->releaseModel(); 5 // pfld_interpreter->releaseModel();
8 // pfld_interpreter->releaseSession(session); 6 // pfld_interpreter->releaseSession(session);
...@@ -36,7 +34,7 @@ bool FaceLandmarks::init_model(string model_path){ ...@@ -36,7 +34,7 @@ bool FaceLandmarks::init_model(string model_path){
36 pretreat = shared_ptr<MNN::CV::ImageProcess>(MNN::CV::ImageProcess::create(image_config)); 34 pretreat = shared_ptr<MNN::CV::ImageProcess>(MNN::CV::ImageProcess::create(image_config));
37 // pretreat->setMatrix(transforms); 35 // pretreat->setMatrix(transforms);
38 36
39 model_init = true; 37 return true;
40 } 38 }
41 39
42 vector<vector<float>> FaceLandmarks::inference(string image_path){ 40 vector<vector<float>> FaceLandmarks::inference(string image_path){
...@@ -86,4 +84,4 @@ vector<vector<float>> FaceLandmarks::inference(Mat image){ ...@@ -86,4 +84,4 @@ vector<vector<float>> FaceLandmarks::inference(Mat image){
86 landmarks.push_back(curr_pt); 84 landmarks.push_back(curr_pt);
87 } 85 }
88 return landmarks; 86 return landmarks;
89 }
...\ No newline at end of file ...\ No newline at end of file
87 }
......
1 #include "facerecognize.h"
2 1
3 FaceRecognize::FaceRecognize(){} 2
3 #include "facerecognize.h" FaceRecognize::FaceRecognize(){} // FaceRecognize::~FaceRecognize(){ // net->releaseModel(); // net->releaseSession(session1); // net->releaseSession(session2); // } bool FaceRecognize::init_model(string model_path){ net=shared_ptr<MNN::Interpreter>(MNN::Interpreter::createFromFile(model_path.c_str())); ScheduleConfig config; config.numThread=num_thread; config.type=forward_type; session1 = net->createSession(config); session2 = net->createSession(config); input_tensor1 = net->getSessionInput(session1,NULL); input_tensor2 = net->getSessionInput(session2,NULL); net->resizeTensor(input_tensor1,{1,3,input_size[1],input_size[0]}); net->resizeSession(session1); net->resizeTensor(input_tensor2,{1,3,input_size[1],input_size[0]}); net->resizeSession(session2); //数据预处理 MNN::CV::ImageProcess::Config image_config; image_config.sourceFormat = MNN::CV::BGR; image_config.destFormat = MNN::CV::BGR; ::memcpy(image_config.mean,mean,sizeof(mean)); ::memcpy(image_config.normal,normal,sizeof(normal)); pretreat = shared_ptr<MNN::CV::ImageProcess>(MNN::CV::ImageProcess::create(image_config)); model_init = true; return model_init; } cv::Mat FaceRecognize::meanAxis0(const cv::Mat &src) { int num = src.rows; int dim = src.cols; cv::Mat output(1,dim,CV_32F); for(int i = 0 ; i < dim; i ++) { float sum = 0 ; for(int j = 0 ; j < num ; j++) { sum+=src.at<float>(j,i); } output.at<float>(0,i) = sum/num; } return output; } cv::Mat FaceRecognize::elementwiseMinus(const cv::Mat &A,const cv::Mat &B) { cv::Mat output(A.rows,A.cols,A.type()); assert(B.cols == A.cols); if(B.cols == A.cols) { for(int i = 0 ; i < A.rows; i ++) { for(int j = 0 ; j < B.cols; j++) { output.at<float>(i,j) = A.at<float>(i,j) - B.at<float>(0,j); } } } return output; } cv::Mat FaceRecognize::varAxis0(const cv::Mat &src) { cv:Mat temp_ = elementwiseMinus(src,meanAxis0(src)); cv::multiply(temp_ ,temp_ ,temp_ ); return meanAxis0(temp_); } int FaceRecognize::MatrixRank(cv::Mat M) { Mat w, u, vt; SVD::compute(M, w, u, vt); Mat1b nonZeroSingularValues = w > 0.0001; int rank = countNonZero(nonZeroSingularValues); return rank; } cv::Mat FaceRecognize::similarTransform(cv::Mat src,cv::Mat dst) { int num = src.rows; int dim = src.cols; cv::Mat src_mean = meanAxis0(src); cv::Mat dst_mean = meanAxis0(dst); cv::Mat src_demean = elementwiseMinus(src, src_mean); cv::Mat dst_demean = elementwiseMinus(dst, dst_mean); cv::Mat A = (dst_demean.t() * src_demean) / static_cast<float>(num); cv::Mat d(dim, 1, CV_32F); d.setTo(1.0f); if (cv::determinant(A) < 0) { d.at<float>(dim - 1, 0) = -1; } Mat T = cv::Mat::eye(dim + 1, dim + 1, CV_32F); cv::Mat U, S, V; SVD::compute(A, S,U, V); // the SVD function in opencv differ from scipy . int rank = MatrixRank(A); if (rank == 0) { assert(rank == 0); } else if (rank == dim - 1) { if (cv::determinant(U) * cv::determinant(V) > 0) { T.rowRange(0, dim).colRange(0, dim) = U * V; } else { int s = d.at<float>(dim - 1, 0) = -1; d.at<float>(dim - 1, 0) = -1; T.rowRange(0, dim).colRange(0, dim) = U * V; cv::Mat diag_ = cv::Mat::diag(d); cv::Mat twp = diag_*V; //np.dot(np.diag(d), V.T) Mat B = Mat::zeros(3, 3, CV_8UC1); Mat C = B.diag(0); T.rowRange(0, dim).colRange(0, dim) = U* twp; d.at<float>(dim - 1, 0) = s; } } else{ cv::Mat diag_ = cv::Mat::diag(d); cv::Mat twp = diag_*V.t(); //np.dot(np.diag(d), V.T) cv::Mat res = U* twp; // U T.rowRange(0, dim).colRange(0, dim) = -U.t()* twp; } cv::Mat var_ = varAxis0(src_demean); float val = cv::sum(var_).val[0]; cv::Mat res; cv::multiply(d,S,res); float scale = 1.0/val*cv::sum(res).val[0]; T.rowRange(0, dim).colRange(0, dim) = - T.rowRange(0, dim).colRange(0, dim).t(); cv::Mat temp1 = T.rowRange(0, dim).colRange(0, dim); // T[:dim, :dim] cv::Mat temp2 = src_mean.t(); //src_mean.T cv::Mat temp3 = temp1*temp2; // np.dot(T[:dim, :dim], src_mean.T) cv::Mat temp4 = scale*temp3; T.rowRange(0, dim).colRange(dim, dim+1)= -(temp4 - dst_mean.t()) ; T.rowRange(0, dim).colRange(0, dim) *= scale; return T; } Mat FaceRecognize::preprocess_face(Mat image,vector<vector<float>> land){ Mat out; cv::resize(image,out,Size(112,112)); float default1[5][2] = { {38.2946f, 51.6963f}, {73.5318f, 51.6963f}, {56.0252f, 71.7366f}, {41.5493f, 92.3655f}, {70.7299f, 92.3655f} }; float lands[5][2]={ {float(land[0][0]*112.0)/float(image.cols),float(land[0][1]*112.0)/float(image.rows)}, {float(land[1][0]*112.0)/float(image.cols),float(land[1][1]*112.0)/float(image.rows)}, {float(land[2][0]*112.0)/float(image.cols),float(land[2][1]*112.0)/float(image.rows)}, {float(land[3][0]*112.0)/float(image.cols),float(land[3][1]*112.0)/float(image.rows)}, {float(land[4][0]*112.0)/float(image.cols),float(land[4][1]*112.0)/float(image.rows)} }; cv::Mat src(5,2,CV_32FC1,default1); memcpy(src.data, default1, 2 * 5 * sizeof(float)); cv::Mat dst(5,2,CV_32FC1,lands); memcpy(dst.data, lands, 2 * 5 * sizeof(float)); cv::Mat M = similarTransform(dst, src); float M_[2][3]={ {M.at<float>(0,0),M.at<float>(0,1),M.at<float>(0,2)}, {M.at<float>(1,0),M.at<float>(1,1),M.at<float>(1,2)}, }; cv::Mat M__(2,3,CV_32FC1,M_); cv::Mat align_image; cv::warpAffine(out,align_image,M__,Size(112, 112)); return align_image; } double FaceRecognize::getMold(const vector<double>& vec) { int n = vec.size(); double sum = 0.0; for (int i = 0; i < n; ++i) sum += vec[i] * vec[i]; return sqrt(sum); } double FaceRecognize::cos_distance(const vector<double>& base, const vector<double>& target) { int n = base.size(); assert(n == target.size()); double tmp = 0.0; for (int i = 0; i < n; ++i) tmp += base[i] * target[i]; double simility = tmp / (getMold(base)*getMold(target)); return simility; } double FaceRecognize::inference(Mat image1,Mat image2){ cv::resize(image1,image1,Size2d(input_size[0],input_size[1])); cv::resize(image2,image2,Size2d(input_size[0],input_size[1])); pretreat->convert(image1.data,input_size[0],input_size[1],0,input_tensor1); pretreat->convert(image2.data,input_size[0],input_size[1],0,input_tensor2); //推理 net->runSession(session1); auto output1= net->getSessionOutput(session1, NULL); //推理 net->runSession(session2); auto output2= net->getSessionOutput(session2, NULL); MNN::Tensor feat_tensor1(output1, output1->getDimensionType()); MNN::Tensor feat_tensor2(output2, output2->getDimensionType()); output1->copyToHostTensor(&feat_tensor1); output2->copyToHostTensor(&feat_tensor2); auto feature1 = feat_tensor1.host<float>(); auto feature2 = feat_tensor2.host<float>(); vector<double> v1,v2; for(int i=0;i<int(feat_tensor1.size()/4);i++){ v1.push_back((double)feature1[i]); v2.push_back((double)feature2[i]); } double cos_score=cos_distance(v1,v2); return cos_score; } double FaceRecognize::inference(string image_path1,string image_path2){ Mat image1 = cv::imread(image_path1); Mat image2 = cv::imread(image_path2); cv::resize(image1,image1,Size2d(input_size[0],input_size[1])); cv::resize(image2,image2,Size2d(input_size[0],input_size[1])); pretreat->convert(image1.data,input_size[0],input_size[1],0,input_tensor1); pretreat->convert(image2.data,input_size[0],input_size[1],0,input_tensor2); //推理 net->runSession(session1); auto output1= net->getSessionOutput(session1, NULL); //推理 net->runSession(session2); auto output2= net->getSessionOutput(session2, NULL); MNN::Tensor feat_tensor1(output1, output1->getDimensionType()); MNN::Tensor feat_tensor2(output2, output2->getDimensionType()); output1->copyToHostTensor(&feat_tensor1); output2->copyToHostTensor(&feat_tensor2); auto feature1 = feat_tensor1.host<float>(); auto feature2 = feat_tensor2.host<float>(); vector<double> v1,v2; for(int i=0;i<int(feat_tensor1.size()/4);i++){ v1.push_back((double)feature1[i]); v2.push_back((double)feature2[i]); } double cos_score=cos_distance(v1,v2); return cos_score; }
4
5 #include "facerecognize.h"
4 6
5 // FaceRecognize::~FaceRecognize(){ 7 // FaceRecognize::~FaceRecognize(){
6 // net->releaseModel(); 8 // net->releaseModel();
...@@ -10,7 +12,9 @@ FaceRecognize::FaceRecognize(){} ...@@ -10,7 +12,9 @@ FaceRecognize::FaceRecognize(){}
10 12
11 bool FaceRecognize::init_model(string model_path){ 13 bool FaceRecognize::init_model(string model_path){
12 net=shared_ptr<MNN::Interpreter>(MNN::Interpreter::createFromFile(model_path.c_str())); 14 net=shared_ptr<MNN::Interpreter>(MNN::Interpreter::createFromFile(model_path.c_str()));
13 15 if(nullptr==net){
16 return false;
17 }
14 ScheduleConfig config; 18 ScheduleConfig config;
15 config.numThread=num_thread; 19 config.numThread=num_thread;
16 config.type=forward_type; 20 config.type=forward_type;
...@@ -32,8 +36,8 @@ bool FaceRecognize::init_model(string model_path){ ...@@ -32,8 +36,8 @@ bool FaceRecognize::init_model(string model_path){
32 ::memcpy(image_config.mean,mean,sizeof(mean)); 36 ::memcpy(image_config.mean,mean,sizeof(mean));
33 ::memcpy(image_config.normal,normal,sizeof(normal)); 37 ::memcpy(image_config.normal,normal,sizeof(normal));
34 pretreat = shared_ptr<MNN::CV::ImageProcess>(MNN::CV::ImageProcess::create(image_config)); 38 pretreat = shared_ptr<MNN::CV::ImageProcess>(MNN::CV::ImageProcess::create(image_config));
35 model_init = true; 39
36 return model_init; 40 return true;
37 } 41 }
38 42
39 43
......
...@@ -6,11 +6,20 @@ ...@@ -6,11 +6,20 @@
6 #include "retinaface.h" 6 #include "retinaface.h"
7 #include "facelandmarks.h" 7 #include "facelandmarks.h"
8 8
9 struct OutputInfo{
10 int error_code;
11 bool result;
12 };
13
14 struct InitModelError{
15 vector<bool> init_error;
16 };
17
9 18
10 class FaceComparison{ 19 class FaceComparison{
11 public: 20 public:
12 // 人脸检测阈值 21 // 人脸检测阈值
13 float confidence_threshold = 0.2; 22 float confidence_threshold = 0.5;
14 // 是否进行人脸外廓 23 // 是否进行人脸外廓
15 bool is_bbox_process = true; 24 bool is_bbox_process = true;
16 25
...@@ -25,8 +34,8 @@ class FaceComparison{ ...@@ -25,8 +34,8 @@ class FaceComparison{
25 34
26 35
27 //接口 36 //接口
28 bool inference(string image_path1,string image_path2); 37 int inference(string image_path1,string image_path2,OutputInfo &output_info);
29 bool inference(Mat image1,Mat image2); 38 int inference(Mat image1,Mat image2,OutputInfo &output_info);
30 39
31 private: 40 private:
32 RetinaFace face_det; 41 RetinaFace face_det;
...@@ -35,18 +44,6 @@ class FaceComparison{ ...@@ -35,18 +44,6 @@ class FaceComparison{
35 44
36 public: 45 public:
37 FaceComparison(){}; 46 FaceComparison(){};
38 FaceComparison(string face_det_model,string face_landm_model,string face_rec_model){ 47 bool init_model(string face_det_model,string face_landm_model,string face_rec_model,InitModelError &model_error);
39 face_det = RetinaFace(face_det_model);
40 face_det.confidence_threshold = confidence_threshold;
41 face_det.is_bbox_process = is_bbox_process;
42 face_det.num_thread=num_thread;
43 face_det.forward_type = forward_type;
44 face_landm =FaceLandmarks(face_landm_model);
45 face_landm.num_thread=num_thread;
46 face_landm.forward_type=forward_type;
47 face_rec =FaceRecognize(face_rec_model);
48 face_rec.num_thread=num_thread;
49 face_rec.forward_type=forward_type;
50 }
51 }; 48 };
52 #endif
...\ No newline at end of file ...\ No newline at end of file
49 #endif
......
...@@ -16,11 +16,8 @@ class FaceLandmarks{ ...@@ -16,11 +16,8 @@ class FaceLandmarks{
16 MNNForwardType forward_type = MNN_FORWARD_CPU; 16 MNNForwardType forward_type = MNN_FORWARD_CPU;
17 17
18 public: 18 public:
19 FaceLandmarks(); 19 FaceLandmarks(){};
20 // ~FaceLandmarks(); 20 // ~FaceLandmarks();
21 FaceLandmarks(string model_path){
22 init_model(model_path);
23 };
24 bool init_model(string model_path); 21 bool init_model(string model_path);
25 vector<vector<float>> inference(string image_path); 22 vector<vector<float>> inference(string image_path);
26 vector<vector<float>> inference(Mat image); 23 vector<vector<float>> inference(Mat image);
...@@ -34,3 +31,4 @@ class FaceLandmarks{ ...@@ -34,3 +31,4 @@ class FaceLandmarks{
34 shared_ptr<MNN::CV::ImageProcess> pretreat; 31 shared_ptr<MNN::CV::ImageProcess> pretreat;
35 }; 32 };
36 #endif 33 #endif
34
......
...@@ -35,7 +35,7 @@ class FaceRecognize{ ...@@ -35,7 +35,7 @@ class FaceRecognize{
35 float normal[3] = {1.0f/127.5f,1.0f/127.5f,1.0f/127.5f}; 35 float normal[3] = {1.0f/127.5f,1.0f/127.5f,1.0f/127.5f};
36 36
37 public: 37 public:
38 FaceRecognize(); 38 FaceRecognize(){};
39 // ~FaceRecognize(); 39 // ~FaceRecognize();
40 FaceRecognize(string model_path){ 40 FaceRecognize(string model_path){
41 init_model(model_path); 41 init_model(model_path);
......
...@@ -63,15 +63,12 @@ class RetinaFace{ ...@@ -63,15 +63,12 @@ class RetinaFace{
63 63
64 public: 64 public:
65 65
66 RetinaFace(); 66 RetinaFace(){};
67 // ~RetinaFace(); 67 // ~RetinaFace();
68 RetinaFace(string model_path){
69 init_model(model_path);
70 }
71 bool init_model(string model_path); 68 bool init_model(string model_path);
72 69
73 // 推理 70 // 推理
74 vector<Bbox> inference(string image_path); 71 vector<Bbox> inference(string image_path);
75 vector<Bbox> inference(Mat image); 72 vector<Bbox> inference(Mat image);
76 }; 73 };
77 #endif
...\ No newline at end of file ...\ No newline at end of file
74 #endif
......
No preview for this file type
1 #include "facecomparison.h" 1 #include "facecomparison.h"
2 int main(){ 2 int main(){
3 // FaceLandmarks face_landmarks1 = FaceLandmarks("/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/det_landmarks_106_v0.0.1.mnn"); 3 // FaceLandmarks face_landmarks1 = FaceLandmarks();
4 // face_landmarks1.init_model("/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/det_landmarks_106_v0.0.1.mnn");
4 // vector<string> filenames; 5 // vector<string> filenames;
5 // cv::glob("/home/situ/图片/img3", filenames, false); 6 // cv::glob("/home/situ/图片/img3", filenames, false);
6 // for(auto path:filenames){ 7 // for(auto path:filenames){
...@@ -17,14 +18,16 @@ int main(){ ...@@ -17,14 +18,16 @@ int main(){
17 18
18 Mat image1 = cv::imread("/data/face_recognize/pipeline_test/35326a760af111ec9f2300163e772630/310cardImageContent163047910320427.jpg"); 19 Mat image1 = cv::imread("/data/face_recognize/pipeline_test/35326a760af111ec9f2300163e772630/310cardImageContent163047910320427.jpg");
19 Mat image2 = cv::imread("/data/face_recognize/pipeline_test/35326a760af111ec9f2300163e772630/310faceImageContent163047910353714.jpg"); 20 Mat image2 = cv::imread("/data/face_recognize/pipeline_test/35326a760af111ec9f2300163e772630/310faceImageContent163047910353714.jpg");
20 string face_det_model = "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/det_face_retina_mnn_1.0.0_v0.1.1.mnn"; 21 string face_det_model = "/home/situ/qfs/face_recognize_mnn/model/det_face_retina_mnn_1.0.0_v0.1.1.mnn";
21 string face_landm_model = "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/det_landmarks_106_v0.0.1.mnn"; 22 string face_landm_model = "/home/situ/qfs/face_recognize_mnn/model/det_landmarks_106_v0.0.1.mnn";
22 string face_rec_model = "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/cls_face_mnn_1.0.0_v0.1.1.mnn"; 23 string face_rec_model = "/home/situ/qfs/face_recognize_mnn/model/cls_face_mnn_1.0.0_v0.1.1.mnn";
23
24 FaceComparison face_rec = FaceComparison(face_det_model,face_landm_model,face_rec_model);
25 bool result = face_rec.inference(image1,image2);
26 cout<<result<<endl;
27 24
25 InitModelError init_model_code;
26 OutputInfo output_info;
27 FaceComparison face_rec = FaceComparison();
28 bool init_model = face_rec.init_model(face_det_model,face_landm_model,face_rec_model,init_model_code);
29 int result = face_rec.inference(image1,image2,output_info);
30 cout<<output_info.error_code<<" "<<output_info.result<<endl;
28 31
29 // string model_path = "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/det_face_retina_mnn_1.0.0_v0.1.1.mnn"; 32 // string model_path = "/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/det_face_retina_mnn_1.0.0_v0.1.1.mnn";
30 // RetinaFace face_det = RetinaFace(model_path.c_str()); 33 // RetinaFace face_det = RetinaFace(model_path.c_str());
...@@ -38,3 +41,4 @@ int main(){ ...@@ -38,3 +41,4 @@ int main(){
38 // cv::waitKey(0); 41 // cv::waitKey(0);
39 // return 0; 42 // return 0;
40 } 43 }
44
......
1 #include "retinaface.h" 1 #include "retinaface.h"
2 2
3 RetinaFace::RetinaFace(){}
4 3
5 // RetinaFace::~RetinaFace(){ 4 // RetinaFace::~RetinaFace(){
6 // net->releaseModel(); 5 // net->releaseModel();
...@@ -28,7 +27,7 @@ bool RetinaFace::init_model(string model_path){ ...@@ -28,7 +27,7 @@ bool RetinaFace::init_model(string model_path){
28 ::memcpy(image_config.mean,mean,sizeof(mean)); 27 ::memcpy(image_config.mean,mean,sizeof(mean));
29 pretreat = shared_ptr<MNN::CV::ImageProcess>(CV::ImageProcess::create(image_config)); 28 pretreat = shared_ptr<MNN::CV::ImageProcess>(CV::ImageProcess::create(image_config));
30 29
31 model_init = true; 30 return true;
32 } 31 }
33 32
34 33
...@@ -267,4 +266,4 @@ vector<Bbox> RetinaFace::inference(Mat image){ ...@@ -267,4 +266,4 @@ vector<Bbox> RetinaFace::inference(Mat image){
267 }else{ 266 }else{
268 return results; 267 return results;
269 } 268 }
270 }
...\ No newline at end of file ...\ No newline at end of file
269 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!