├── FaceAlignment ├── CMakeLists.txt ├── README.md ├── data │ └── image_0001.png ├── doc │ └── aflw_nrmse.png ├── examples │ ├── FaceAlignment │ │ ├── FaceAlignment.vcxproj │ │ └── FaceAlignment.vcxproj.filters │ ├── examples.sln │ ├── examples.v12.suo │ └── examples │ │ ├── FaceDetection.dll │ │ ├── FaceDetection.lib │ │ ├── examples.vcxproj │ │ ├── examples.vcxproj.filters │ │ └── examples.vcxproj.user ├── include │ ├── cfan.h │ ├── common.h │ ├── face_alignment.h │ └── sift.h ├── model │ └── seeta_fa_v1.1.bin └── src │ ├── cfan.cpp │ ├── face_alignment.cpp │ ├── sift.cpp │ └── test │ └── face_alignment_test.cpp ├── FaceDetection ├── .gitignore ├── CMakeLists.txt ├── README.md ├── data │ └── 0_1_1.jpg ├── doc │ └── fddb_roc.png ├── examples │ ├── FaceDetection │ │ ├── FaceDetection.vcxproj │ │ └── FaceDetection.vcxproj.filters │ ├── examples.sln │ ├── examples.v12.suo │ └── examples │ │ ├── examples.vcxproj │ │ ├── examples.vcxproj.filters │ │ └── examples.vcxproj.user ├── include │ ├── classifier.h │ ├── classifier │ │ ├── lab_boosted_classifier.h │ │ ├── mlp.h │ │ └── surf_mlp.h │ ├── common.h │ ├── detector.h │ ├── face_detection.h │ ├── feat │ │ ├── lab_feature_map.h │ │ └── surf_feature_map.h │ ├── feature_map.h │ ├── fust.h │ ├── io │ │ ├── lab_boost_model_reader.h │ │ └── surf_mlp_model_reader.h │ ├── model_reader.h │ └── util │ │ ├── image_pyramid.h │ │ ├── math_func.h │ │ └── nms.h ├── model │ └── seeta_fd_frontal_v1.0.bin └── src │ ├── classifier │ ├── lab_boosted_classifier.cpp │ ├── mlp.cpp │ └── surf_mlp.cpp │ ├── face_detection.cpp │ ├── feat │ ├── lab_feature_map.cpp │ └── surf_feature_map.cpp │ ├── fust.cpp │ ├── io │ ├── lab_boost_model_reader.cpp │ └── surf_mlp_model_reader.cpp │ ├── test │ └── facedetection_test.cpp │ └── util │ ├── image_pyramid.cpp │ └── nms.cpp ├── FaceIdentification ├── .gitignore ├── CMakeLists.txt ├── README.md ├── data │ └── test_face_recognizer │ │ ├── crop_file_list.txt │ │ ├── crop_sdk_file_list.txt │ │ ├── feats.dat │ │ ├── images │ │ ├── compare_im │ │ │ ├── Aaron_Peirsol_0001.jpg │ │ │ └── Aaron_Peirsol_0004.jpg │ │ ├── crop │ │ │ ├── NF_200001_001.jpg │ │ │ ├── NF_200002_002.jpg │ │ │ ├── NF_200003_002.jpg │ │ │ ├── NF_200004_003.jpg │ │ │ ├── NF_200005_037.jpg │ │ │ ├── NF_200006_005.jpg │ │ │ ├── NF_200007_001.jpg │ │ │ ├── NF_200008_002.jpg │ │ │ ├── NF_200009_001.jpg │ │ │ ├── NF_200010_003.jpg │ │ │ ├── NF_200011_001.jpg │ │ │ ├── NF_200012_001.jpg │ │ │ ├── NF_200013_004.jpg │ │ │ ├── NF_200014_006.jpg │ │ │ ├── NF_200015_001.jpg │ │ │ ├── NF_200016_005.jpg │ │ │ ├── NF_200017_005.jpg │ │ │ ├── NF_200018_001.jpg │ │ │ ├── NF_200019_004.jpg │ │ │ ├── NF_200020_003.jpg │ │ │ ├── NF_200021_002.jpg │ │ │ ├── NF_200022_001.jpg │ │ │ ├── NF_200023_001.jpg │ │ │ ├── NF_200024_004.jpg │ │ │ ├── NF_200025_006.jpg │ │ │ ├── NF_200026_003.jpg │ │ │ ├── NF_200027_001.jpg │ │ │ ├── NF_200028_002.jpg │ │ │ ├── NF_200029_005.jpg │ │ │ ├── NF_200030_003.jpg │ │ │ ├── NF_200031_001.jpg │ │ │ ├── NF_200032_001.jpg │ │ │ ├── NF_200033_001.jpg │ │ │ ├── NF_200034_001.jpg │ │ │ ├── NF_200035_002.jpg │ │ │ ├── NF_200036_004.jpg │ │ │ ├── NF_200037_002.jpg │ │ │ ├── NF_200038_002.jpg │ │ │ ├── NF_200039_006.jpg │ │ │ ├── NF_200040_003.jpg │ │ │ ├── NF_200041_001.jpg │ │ │ ├── NF_200042_001.jpg │ │ │ ├── NF_200043_003.jpg │ │ │ ├── NF_200044_006.jpg │ │ │ ├── NF_200045_003.jpg │ │ │ ├── NF_200046_006.jpg │ │ │ ├── NF_200047_004.jpg │ │ │ ├── NF_200048_002.jpg │ │ │ ├── NF_200049_020.jpg │ │ │ └── NF_200050_002.jpg │ │ ├── crop_sdk │ │ │ ├── NF_200001_001.jpg │ │ │ ├── NF_200002_002.jpg │ │ │ ├── NF_200003_002.jpg │ │ │ ├── NF_200004_003.jpg │ │ │ ├── NF_200005_037.jpg │ │ │ ├── NF_200006_005.jpg │ │ │ ├── NF_200007_001.jpg │ │ │ ├── NF_200008_002.jpg │ │ │ ├── NF_200009_001.jpg │ │ │ ├── NF_200010_003.jpg │ │ │ ├── NF_200011_001.jpg │ │ │ ├── NF_200012_001.jpg │ │ │ ├── NF_200013_004.jpg │ │ │ ├── NF_200014_006.jpg │ │ │ ├── NF_200015_001.jpg │ │ │ ├── NF_200016_005.jpg │ │ │ ├── NF_200017_005.jpg │ │ │ ├── NF_200018_001.jpg │ │ │ ├── NF_200019_004.jpg │ │ │ ├── NF_200020_003.jpg │ │ │ ├── NF_200021_002.jpg │ │ │ ├── NF_200022_001.jpg │ │ │ ├── NF_200023_001.jpg │ │ │ ├── NF_200024_004.jpg │ │ │ ├── NF_200025_006.jpg │ │ │ ├── NF_200026_003.jpg │ │ │ ├── NF_200027_001.jpg │ │ │ ├── NF_200028_002.jpg │ │ │ ├── NF_200029_005.jpg │ │ │ ├── NF_200030_003.jpg │ │ │ ├── NF_200031_001.jpg │ │ │ ├── NF_200032_001.jpg │ │ │ ├── NF_200033_001.jpg │ │ │ ├── NF_200034_001.jpg │ │ │ ├── NF_200035_002.jpg │ │ │ ├── NF_200036_004.jpg │ │ │ ├── NF_200037_002.jpg │ │ │ ├── NF_200038_002.jpg │ │ │ ├── NF_200039_006.jpg │ │ │ ├── NF_200040_003.jpg │ │ │ ├── NF_200041_001.jpg │ │ │ ├── NF_200042_001.jpg │ │ │ ├── NF_200043_003.jpg │ │ │ ├── NF_200044_006.jpg │ │ │ ├── NF_200045_003.jpg │ │ │ ├── NF_200046_006.jpg │ │ │ ├── NF_200047_004.jpg │ │ │ ├── NF_200048_002.jpg │ │ │ ├── NF_200049_020.jpg │ │ │ └── NF_200050_002.jpg │ │ └── src │ │ │ ├── NF_200001_001.jpg │ │ │ ├── NF_200002_002.jpg │ │ │ ├── NF_200003_002.jpg │ │ │ ├── NF_200004_003.jpg │ │ │ ├── NF_200005_037.jpg │ │ │ ├── NF_200006_005.jpg │ │ │ ├── NF_200007_001.jpg │ │ │ ├── NF_200008_002.jpg │ │ │ ├── NF_200009_001.jpg │ │ │ ├── NF_200010_003.jpg │ │ │ ├── NF_200011_001.jpg │ │ │ ├── NF_200012_001.jpg │ │ │ ├── NF_200013_004.jpg │ │ │ ├── NF_200014_006.jpg │ │ │ ├── NF_200015_001.jpg │ │ │ ├── NF_200016_005.jpg │ │ │ ├── NF_200017_005.jpg │ │ │ ├── NF_200018_001.jpg │ │ │ ├── NF_200019_004.jpg │ │ │ ├── NF_200020_003.jpg │ │ │ ├── NF_200021_002.jpg │ │ │ ├── NF_200022_001.jpg │ │ │ ├── NF_200023_001.jpg │ │ │ ├── NF_200024_004.jpg │ │ │ ├── NF_200025_006.jpg │ │ │ ├── NF_200026_003.jpg │ │ │ ├── NF_200027_001.jpg │ │ │ ├── NF_200028_002.jpg │ │ │ ├── NF_200029_005.jpg │ │ │ ├── NF_200030_003.jpg │ │ │ ├── NF_200031_001.jpg │ │ │ ├── NF_200032_001.jpg │ │ │ ├── NF_200033_001.jpg │ │ │ ├── NF_200034_001.jpg │ │ │ ├── NF_200035_002.jpg │ │ │ ├── NF_200036_004.jpg │ │ │ ├── NF_200037_002.jpg │ │ │ ├── NF_200038_002.jpg │ │ │ ├── NF_200039_006.jpg │ │ │ ├── NF_200040_003.jpg │ │ │ ├── NF_200041_001.jpg │ │ │ ├── NF_200042_001.jpg │ │ │ ├── NF_200043_003.jpg │ │ │ ├── NF_200044_006.jpg │ │ │ ├── NF_200045_003.jpg │ │ │ ├── NF_200046_006.jpg │ │ │ ├── NF_200047_004.jpg │ │ │ ├── NF_200048_002.jpg │ │ │ ├── NF_200049_020.jpg │ │ │ └── NF_200050_002.jpg │ │ └── test_file_list.txt ├── examples │ ├── Identification │ │ ├── Identification.vcxproj │ │ └── Identification.vcxproj.filters │ ├── Tester │ │ ├── Tester.vcxproj │ │ ├── Tester.vcxproj.filters │ │ └── Tester.vcxproj.user │ ├── examples.sln │ └── examples.v12.suo ├── include │ ├── aligner.h │ ├── bias_adder_net.h │ ├── blob.h │ ├── bn_net.h │ ├── common.h │ ├── common_net.h │ ├── conv_net.h │ ├── eltwise_net.h │ ├── face_identification.h │ ├── hyper_param.h │ ├── inner_product_net.h │ ├── log.h │ ├── math_functions.h │ ├── max_pooling_net.h │ ├── net.h │ ├── net_factory.h │ ├── pad_net.h │ ├── recognizer.h │ ├── spatial_transform_net.h │ ├── tform_maker_net.h │ └── viplnet.h ├── model │ ├── seeta_fr_v1.0.part1.rar │ └── seeta_fr_v1.0.part2.rar ├── src │ ├── CMakeLists.txt │ ├── bias_adder_net.cpp │ ├── blob.cpp │ ├── bn_net.cpp │ ├── common_net.cpp │ ├── conv_net.cpp │ ├── eltwise_net.cpp │ ├── inner_product_net.cpp │ ├── log.cpp │ ├── math_functions.cpp │ ├── max_pooling_net.cpp │ ├── net.cpp │ ├── pad_net.cpp │ ├── spatial_transform_net.cpp │ ├── test │ │ ├── CMakeLists.txt │ │ ├── test_face_recognizer.cpp │ │ └── test_face_verification.cpp │ └── tform_maker_net.cpp └── tools │ ├── aligner.cpp │ └── face_identification.cpp ├── LICENSE ├── README.md └── SeetaFace_config.docx /FaceAlignment/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.4) 2 | 3 | project(seeta_fa_lib) 4 | 5 | # Build options 6 | option(BUILD_EXAMPLES "Set to ON to build examples" ON) 7 | 8 | # Use C++11 9 | #set(CMAKE_CXX_STANDARD 11) 10 | #set(CMAKE_CXX_STANDARD_REQUIRED ON) 11 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 12 | message(STATUS "C++11 support has been enabled by default.") 13 | 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") 15 | 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") 17 | 18 | include_directories(include) 19 | 20 | set(src_files 21 | src/cfan.cpp 22 | src/face_alignment.cpp 23 | src/sift.cpp 24 | ) 25 | 26 | add_library(seeta_fa_lib SHARED ${src_files}) 27 | set(fa_required_libs seeta_fa_lib) 28 | 29 | if (BUILD_EXAMPLES) 30 | message(STATUS "Build with examples.") 31 | find_package(OpenCV) 32 | if (NOT OpenCV_FOUND) 33 | message(WARNING "OpenCV not found. Test will not be built.") 34 | else() 35 | include_directories(${OpenCV_INCLUDE_DIRS} build) 36 | link_directories(build) 37 | list(APPEND fa_required_libs ${OpenCV_LIBS} seeta_facedet_lib) 38 | add_executable(fa_test src/test/face_alignment_test.cpp) 39 | target_link_libraries(fa_test ${fa_required_libs}) 40 | endif() 41 | endif() 42 | -------------------------------------------------------------------------------- /FaceAlignment/data/image_0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceAlignment/data/image_0001.png -------------------------------------------------------------------------------- /FaceAlignment/doc/aflw_nrmse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceAlignment/doc/aflw_nrmse.png -------------------------------------------------------------------------------- /FaceAlignment/examples/FaceAlignment/FaceAlignment.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | -------------------------------------------------------------------------------- /FaceAlignment/examples/examples.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples", "examples\examples.vcxproj", "{1270EE26-839E-4881-8AA8-B08D359CC17F}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FaceAlignment", "FaceAlignment\FaceAlignment.vcxproj", "{FAF101E7-0459-44D0-B59B-3DC55642B25C}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|x64 = Debug|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Debug|Win32.Build.0 = Debug|Win32 20 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Debug|x64.ActiveCfg = Debug|x64 21 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Debug|x64.Build.0 = Debug|x64 22 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Release|Win32.ActiveCfg = Release|Win32 23 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Release|Win32.Build.0 = Release|Win32 24 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Release|x64.ActiveCfg = Release|x64 25 | {1270EE26-839E-4881-8AA8-B08D359CC17F}.Release|x64.Build.0 = Release|x64 26 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Debug|Win32.Build.0 = Debug|Win32 28 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Debug|x64.ActiveCfg = Debug|x64 29 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Debug|x64.Build.0 = Debug|x64 30 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Release|Win32.ActiveCfg = Release|Win32 31 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Release|Win32.Build.0 = Release|Win32 32 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Release|x64.ActiveCfg = Release|x64 33 | {FAF101E7-0459-44D0-B59B-3DC55642B25C}.Release|x64.Build.0 = Release|x64 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /FaceAlignment/examples/examples.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceAlignment/examples/examples.v12.suo -------------------------------------------------------------------------------- /FaceAlignment/examples/examples/FaceDetection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceAlignment/examples/examples/FaceDetection.dll -------------------------------------------------------------------------------- /FaceAlignment/examples/examples/FaceDetection.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceAlignment/examples/examples/FaceDetection.lib -------------------------------------------------------------------------------- /FaceAlignment/examples/examples/examples.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /FaceAlignment/examples/examples/examples.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FaceAlignment/include/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Alignment module, containing codes implementing the 7 | * facial landmarks location method described in the following paper: 8 | * 9 | * 10 | * Coarse-to-Fine Auto-Encoder Networks (CFAN) for Real-Time Face Alignment, 11 | * Jie Zhang, Shiguang Shan, Meina Kan, Xilin Chen. In Proceeding of the 12 | * European Conference on Computer Vision (ECCV), 2014 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Jie Zhang (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_COMMON_H_ 33 | #define SEETA_COMMON_H_ 34 | 35 | #include 36 | 37 | #if defined (_MSC_VER) || defined (_WIN32) || defined (_WIN64) 38 | #ifdef SEETA_EXPORTS 39 | #define SEETA_API __declspec(dllexport) 40 | #else 41 | #define SEETA_API __declspec(dllimport) 42 | #endif // SEETA_API 43 | #else // defined (windows) 44 | #define SEETA_API 45 | #endif 46 | 47 | #define DISABLE_COPY_AND_ASSIGN(classname) \ 48 | private: \ 49 | classname(const classname&); \ 50 | classname& operator=(const classname&) 51 | 52 | #ifdef USE_OPENMP 53 | #include 54 | 55 | #define SEETA_NUM_THREADS 4 56 | #endif 57 | 58 | namespace seeta { 59 | 60 | typedef struct ImageData { 61 | ImageData() { 62 | data = nullptr; 63 | width = 0; 64 | height = 0; 65 | num_channels = 0; 66 | } 67 | 68 | ImageData(int32_t img_width, int32_t img_height, 69 | int32_t img_num_channels = 1) { 70 | data = nullptr; 71 | width = img_width; 72 | height = img_height; 73 | num_channels = img_num_channels; 74 | } 75 | 76 | uint8_t* data; 77 | int32_t width; 78 | int32_t height; 79 | int32_t num_channels; 80 | } ImageData; 81 | 82 | typedef struct Rect { 83 | int32_t x; 84 | int32_t y; 85 | int32_t width; 86 | int32_t height; 87 | } Rect; 88 | 89 | typedef struct FaceInfo { 90 | seeta::Rect bbox; 91 | 92 | double roll; 93 | double pitch; 94 | double yaw; 95 | 96 | double score; /**< Larger score should mean higher confidence. */ 97 | } FaceInfo; 98 | 99 | typedef struct { 100 | double x; 101 | double y; 102 | } FacialLandmark; 103 | } // namespace seeta 104 | 105 | #endif // SEETA_COMMON_H_ 106 | 107 | -------------------------------------------------------------------------------- /FaceAlignment/include/face_alignment.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Alignment module, containing codes implementing the 7 | * facial landmarks location method described in the following paper: 8 | * 9 | * 10 | * Coarse-to-Fine Auto-Encoder Networks (CFAN) for Real-Time Face Alignment, 11 | * Jie Zhang, Shiguang Shan, Meina Kan, Xilin Chen. In Proceeding of the 12 | * European Conference on Computer Vision (ECCV), 2014 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Jie Zhang (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FACE_ALIGNMENT_H_ 33 | #define SEETA_FACE_ALIGNMENT_H_ 34 | 35 | #include 36 | #include "common.h" 37 | class CCFAN; 38 | 39 | namespace seeta { 40 | class FaceAlignment{ 41 | public: 42 | /** A constructor with an optional argument specifying path of the model file. 43 | * If called with no argument, the model file is assumed to be stored in the 44 | * the working directory as "seeta_fa_v1.1.bin". 45 | * 46 | * @param model_path Path of the model file, either absolute or relative to 47 | * the working directory. 48 | */ 49 | SEETA_API FaceAlignment(const char* model_path = NULL); 50 | 51 | /** A Destructor which should never be called explicitly. 52 | * Release all dynamically allocated resources. 53 | */ 54 | SEETA_API ~FaceAlignment(); 55 | 56 | /** Detect five facial landmarks, i.e., two eye centers, nose tip and two mouth corners. 57 | * @param gray_im A grayscale image 58 | * @param face_info The face bounding box 59 | * @param[out] points The locations of detected facial points 60 | */ 61 | SEETA_API bool PointDetectLandmarks(ImageData gray_im, FaceInfo face_info, FacialLandmark *points); 62 | 63 | private: 64 | CCFAN *facial_detector; 65 | }; 66 | } // namespace seeta 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /FaceAlignment/model/seeta_fa_v1.1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceAlignment/model/seeta_fa_v1.1.bin -------------------------------------------------------------------------------- /FaceAlignment/src/face_alignment.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Alignment module, containing codes implementing the 7 | * facial landmarks location method described in the following paper: 8 | * 9 | * 10 | * Coarse-to-Fine Auto-Encoder Networks (CFAN) for Real-Time Face Alignment, 11 | * Jie Zhang, Shiguang Shan, Meina Kan, Xilin Chen. In Proceeding of the 12 | * European Conference on Computer Vision (ECCV), 2014 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Jie Zhang (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "face_alignment.h" 33 | 34 | #include 35 | #include 36 | #include "cfan.h" 37 | 38 | namespace seeta { 39 | /** A constructor with an optional argument specifying path of the model file. 40 | * If called with no argument, the model file is assumed to be stored in the 41 | * the working directory as "seeta_fa_v1.1.bin". 42 | * 43 | * @param model_path Path of the model file, either absolute or relative to 44 | * the working directory. 45 | */ 46 | FaceAlignment::FaceAlignment(const char * model_path){ 47 | facial_detector = new CCFAN(); 48 | if (model_path == NULL) 49 | model_path = "seeta_fa_v1.1.bin"; 50 | facial_detector->InitModel(model_path); 51 | } 52 | 53 | /** Detect five facial landmarks, i.e., two eye centers, nose tip and two mouth corners. 54 | * @param gray_im A grayscale image 55 | * @param face_info The face bounding box 56 | * @param[out] points The locations of detected facial points 57 | */ 58 | bool FaceAlignment::PointDetectLandmarks(ImageData gray_im, FaceInfo face_info, FacialLandmark *points) 59 | { 60 | if (gray_im.num_channels != 1) { 61 | return false; 62 | } 63 | int pts_num = 5; 64 | float *facial_loc = new float[pts_num * 2]; 65 | facial_detector->FacialPointLocate(gray_im.data, gray_im.width, gray_im.height, face_info, facial_loc); 66 | 67 | for (int i = 0; i < pts_num; i++) { 68 | points[i].x = facial_loc[i * 2]; 69 | points[i].y = facial_loc[i * 2 + 1]; 70 | } 71 | 72 | delete[]facial_loc; 73 | return true; 74 | } 75 | 76 | /** A Destructor which should never be called explicitly. 77 | * Release all dynamically allocated resources. 78 | */ 79 | FaceAlignment::~FaceAlignment() { 80 | if (facial_detector != NULL) { 81 | delete facial_detector; 82 | facial_detector = NULL; 83 | } 84 | } 85 | } // namespace seeta 86 | -------------------------------------------------------------------------------- /FaceDetection/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /FaceDetection/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1.0) 2 | 3 | project(seeta_facedet_lib) 4 | 5 | # Build options 6 | option(BUILD_EXAMPLES "Set to ON to build examples" ON) 7 | option(USE_OPENMP "Set to ON to build use openmp" ON) 8 | option(USE_SSE "Set to ON to build use SSE" ON) 9 | 10 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") 11 | 12 | # Use C++11 13 | set(CMAKE_CXX_STANDARD 11) 14 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 15 | message(STATUS "C++11 support has been enabled by default.") 16 | 17 | # Use SSE 18 | if (USE_SSE) 19 | add_definitions(-DUSE_SSE) 20 | message(STATUS "Use SSE") 21 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") 22 | endif() 23 | 24 | # Use OpenMP 25 | if (USE_OPENMP) 26 | find_package(OpenMP QUIET) 27 | if (OPENMP_FOUND) 28 | message(STATUS "Use OpenMP") 29 | add_definitions(-DUSE_OPENMP) 30 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 31 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 32 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") 33 | endif() 34 | endif() 35 | 36 | include_directories(include) 37 | 38 | set(src_files 39 | src/util/nms.cpp 40 | src/util/image_pyramid.cpp 41 | src/io/lab_boost_model_reader.cpp 42 | src/io/surf_mlp_model_reader.cpp 43 | src/feat/lab_feature_map.cpp 44 | src/feat/surf_feature_map.cpp 45 | src/classifier/lab_boosted_classifier.cpp 46 | src/classifier/mlp.cpp 47 | src/classifier/surf_mlp.cpp 48 | src/face_detection.cpp 49 | src/fust.cpp 50 | ) 51 | 52 | # Build shared library 53 | add_library(seeta_facedet_lib SHARED ${src_files}) 54 | set(facedet_required_libs seeta_facedet_lib) 55 | 56 | # Build examples 57 | if (BUILD_EXAMPLES) 58 | message(STATUS "Build with examples.") 59 | find_package(OpenCV) 60 | if (NOT OpenCV_FOUND) 61 | message(WARNING "OpenCV not found. Test will not be built.") 62 | else() 63 | include_directories(${OpenCV_INCLUDE_DIRS}) 64 | list(APPEND facedet_required_libs ${OpenCV_LIBS}) 65 | 66 | add_executable(facedet_test src/test/facedetection_test.cpp) 67 | target_link_libraries(facedet_test ${facedet_required_libs}) 68 | endif() 69 | endif() 70 | -------------------------------------------------------------------------------- /FaceDetection/data/0_1_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceDetection/data/0_1_1.jpg -------------------------------------------------------------------------------- /FaceDetection/doc/fddb_roc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceDetection/doc/fddb_roc.png -------------------------------------------------------------------------------- /FaceDetection/examples/FaceDetection/FaceDetection.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | Source Files 50 | 51 | 52 | -------------------------------------------------------------------------------- /FaceDetection/examples/examples.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FaceDetection", "FaceDetection\FaceDetection.vcxproj", "{9A085B45-3F55-41CF-94CB-274C37584BA0}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples", "examples\examples.vcxproj", "{DAAEFCB0-44DA-49B8-B666-91603E744600}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Mixed Platforms = Debug|Mixed Platforms 13 | Debug|Win32 = Debug|Win32 14 | Debug|x64 = Debug|x64 15 | Release|Mixed Platforms = Release|Mixed Platforms 16 | Release|Win32 = Release|Win32 17 | Release|x64 = Release|x64 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 21 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Debug|Mixed Platforms.Build.0 = Debug|Win32 22 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Debug|Win32.ActiveCfg = Debug|x64 23 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Debug|Win32.Build.0 = Debug|x64 24 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Debug|x64.ActiveCfg = Debug|x64 25 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Debug|x64.Build.0 = Debug|x64 26 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Release|Mixed Platforms.ActiveCfg = Release|Win32 27 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Release|Mixed Platforms.Build.0 = Release|Win32 28 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Release|Win32.ActiveCfg = Release|Win32 29 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Release|Win32.Build.0 = Release|Win32 30 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Release|x64.ActiveCfg = Release|x64 31 | {9A085B45-3F55-41CF-94CB-274C37584BA0}.Release|x64.Build.0 = Release|x64 32 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 33 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Debug|Mixed Platforms.Build.0 = Debug|Win32 34 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Debug|Win32.Build.0 = Debug|Win32 36 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Debug|x64.ActiveCfg = Debug|x64 37 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Debug|x64.Build.0 = Debug|x64 38 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Release|Mixed Platforms.ActiveCfg = Release|Win32 39 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Release|Mixed Platforms.Build.0 = Release|Win32 40 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Release|Win32.ActiveCfg = Release|Win32 41 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Release|Win32.Build.0 = Release|Win32 42 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Release|x64.ActiveCfg = Release|x64 43 | {DAAEFCB0-44DA-49B8-B666-91603E744600}.Release|x64.Build.0 = Release|x64 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | EndGlobal 49 | -------------------------------------------------------------------------------- /FaceDetection/examples/examples.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceDetection/examples/examples.v12.suo -------------------------------------------------------------------------------- /FaceDetection/examples/examples/examples.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /FaceDetection/examples/examples/examples.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ..\..\data\0_1_1.jpg ..\..\model\seeta_fd_frontal_v1.0.bin 5 | WindowsLocalDebugger 6 | 7 | 8 | ..\..\data\0_1_1.jpg ..\..\model\seeta_fd_frontal_v1.0.bin 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /FaceDetection/include/classifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_CLASSIFIER_H_ 33 | #define SEETA_FD_CLASSIFIER_H_ 34 | 35 | #include "common.h" 36 | #include "feature_map.h" 37 | 38 | namespace seeta { 39 | namespace fd { 40 | 41 | enum ClassifierType { 42 | LAB_Boosted_Classifier, 43 | SURF_MLP 44 | }; 45 | 46 | class Classifier { 47 | public: 48 | Classifier() {} 49 | virtual ~Classifier() {} 50 | 51 | virtual void SetFeatureMap(seeta::fd::FeatureMap* feat_map) = 0; 52 | virtual bool Classify(float* score = nullptr, float* outputs = nullptr) = 0; 53 | 54 | virtual seeta::fd::ClassifierType type() = 0; 55 | 56 | DISABLE_COPY_AND_ASSIGN(Classifier); 57 | }; 58 | 59 | } // namespace fd 60 | } // namespace seeta 61 | 62 | #endif // SEETA_FD_CLASSIFIER_H_ 63 | -------------------------------------------------------------------------------- /FaceDetection/include/classifier/lab_boosted_classifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_CLASSIFIER_LAB_BOOSTED_CLASSIFIER_H_ 33 | #define SEETA_FD_CLASSIFIER_LAB_BOOSTED_CLASSIFIER_H_ 34 | 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #include "classifier.h" 41 | #include "feat/lab_feature_map.h" 42 | 43 | namespace seeta { 44 | namespace fd { 45 | 46 | /** 47 | * @class LABBaseClassifier 48 | * @brief Base classifier using LAB feature. 49 | */ 50 | class LABBaseClassifier { 51 | public: 52 | LABBaseClassifier() 53 | : num_bin_(255), thresh_(0.0f) { 54 | weights_.resize(num_bin_ + 1); 55 | } 56 | 57 | ~LABBaseClassifier() {} 58 | 59 | void SetWeights(const float* weights, int32_t num_bin); 60 | 61 | inline void SetThreshold(float thresh) { thresh_ = thresh; } 62 | 63 | inline int32_t num_bin() const { return num_bin_; } 64 | inline float weights(int32_t val) const { return weights_[val]; } 65 | inline float threshold() const { return thresh_; } 66 | 67 | private: 68 | int32_t num_bin_; 69 | 70 | std::vector weights_; 71 | float thresh_; 72 | }; 73 | 74 | /** 75 | * @class LABBoostedClassifier 76 | * @Brief A strong classifier constructed from base classifiers using LAB features. 77 | */ 78 | class LABBoostedClassifier : public Classifier { 79 | public: 80 | LABBoostedClassifier() : use_std_dev_(true) {} 81 | virtual ~LABBoostedClassifier() {} 82 | 83 | virtual bool Classify(float* score = nullptr, float* outputs = nullptr); 84 | 85 | inline virtual seeta::fd::ClassifierType type() { 86 | return seeta::fd::ClassifierType::LAB_Boosted_Classifier; 87 | } 88 | 89 | void AddFeature(int32_t x, int32_t y); 90 | void AddBaseClassifier(const float* weights, int32_t num_bin, float thresh); 91 | 92 | inline virtual void SetFeatureMap(seeta::fd::FeatureMap* featMap) { 93 | feat_map_ = dynamic_cast(featMap); 94 | } 95 | 96 | inline void SetUseStdDev(bool useStdDev) { use_std_dev_ = useStdDev; } 97 | 98 | private: 99 | static const int32_t kFeatGroupSize = 10; 100 | const float kStdDevThresh = 10.0f; 101 | 102 | std::vector feat_; 103 | std::vector > base_classifiers_; 104 | seeta::fd::LABFeatureMap* feat_map_; 105 | bool use_std_dev_; 106 | }; 107 | 108 | } // namespace fd 109 | } // namespace seeta 110 | 111 | #endif // SEETA_FD_CLASSIFIER_LAB_BOOSTED_CLASSIFIER_H_ 112 | -------------------------------------------------------------------------------- /FaceDetection/include/classifier/surf_mlp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_CLASSIFIER_SURF_MLP_H_ 33 | #define SEETA_FD_CLASSIFIER_SURF_MLP_H_ 34 | 35 | #include 36 | #include 37 | 38 | #include "classifier.h" 39 | #include "classifier/mlp.h" 40 | #include "feat/surf_feature_map.h" 41 | 42 | namespace seeta { 43 | namespace fd { 44 | 45 | class SURFMLP : public Classifier { 46 | public: 47 | SURFMLP() : Classifier(), model_(new seeta::fd::MLP()) {} 48 | virtual ~SURFMLP() {} 49 | 50 | virtual bool Classify(float* score = nullptr, float* outputs = nullptr); 51 | 52 | inline virtual void SetFeatureMap(seeta::fd::FeatureMap* feat_map) { 53 | feat_map_ = dynamic_cast(feat_map); 54 | } 55 | 56 | inline virtual seeta::fd::ClassifierType type() { 57 | return seeta::fd::ClassifierType::SURF_MLP; 58 | } 59 | 60 | void AddFeatureByID(int32_t feat_id); 61 | void AddLayer(int32_t input_dim, int32_t output_dim, const float* weights, 62 | const float* bias, bool is_output = false); 63 | 64 | inline void SetThreshold(float thresh) { thresh_ = thresh; } 65 | 66 | private: 67 | std::vector feat_id_; 68 | std::vector input_buf_; 69 | std::vector output_buf_; 70 | 71 | std::shared_ptr model_; 72 | float thresh_; 73 | seeta::fd::SURFFeatureMap* feat_map_; 74 | }; 75 | 76 | } // namespace fd 77 | } // namespace seeta 78 | 79 | #endif // SEETA_FD_CLASSIFIER_SURF_MLP_H_ 80 | -------------------------------------------------------------------------------- /FaceDetection/include/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_COMMON_H_ 33 | #define SEETA_COMMON_H_ 34 | 35 | #include 36 | 37 | #if defined _WIN32 38 | #ifdef SEETA_EXPORTS 39 | #define SEETA_API __declspec(dllexport) 40 | #else 41 | #define SEETA_API __declspec(dllimport) 42 | #endif 43 | 44 | #else 45 | #define SEETA_API 46 | #endif 47 | 48 | #define DISABLE_COPY_AND_ASSIGN(classname) \ 49 | private: \ 50 | classname(const classname&); \ 51 | classname& operator=(const classname&) 52 | 53 | #ifdef USE_OPENMP 54 | #include 55 | 56 | #define SEETA_NUM_THREADS 4 57 | #endif 58 | 59 | namespace seeta { 60 | 61 | typedef struct ImageData { 62 | ImageData() { 63 | data = nullptr; 64 | width = 0; 65 | height = 0; 66 | num_channels = 0; 67 | } 68 | 69 | ImageData(int32_t img_width, int32_t img_height, 70 | int32_t img_num_channels = 1) { 71 | data = nullptr; 72 | width = img_width; 73 | height = img_height; 74 | num_channels = img_num_channels; 75 | } 76 | 77 | uint8_t* data; 78 | int32_t width; 79 | int32_t height; 80 | int32_t num_channels; 81 | } ImageData; 82 | 83 | typedef struct Rect { 84 | int32_t x; 85 | int32_t y; 86 | int32_t width; 87 | int32_t height; 88 | } Rect; 89 | 90 | typedef struct FaceInfo { 91 | seeta::Rect bbox; 92 | 93 | double roll; 94 | double pitch; 95 | double yaw; 96 | 97 | double score; /**< Larger score should mean higher confidence. */ 98 | } FaceInfo; 99 | 100 | typedef struct { 101 | double x; 102 | double y; 103 | } FacialLandmark; 104 | } // namespace seeta 105 | 106 | #endif // SEETA_COMMON_H_ 107 | -------------------------------------------------------------------------------- /FaceDetection/include/detector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_DETECTOR_H_ 33 | #define SEETA_FD_DETECTOR_H_ 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | #include "common.h" 40 | #include "util/image_pyramid.h" 41 | 42 | namespace seeta { 43 | namespace fd { 44 | 45 | class Detector { 46 | public: 47 | Detector() {} 48 | virtual ~Detector() {} 49 | 50 | virtual bool LoadModel(const std::string & model_path) = 0; 51 | virtual std::vector Detect(seeta::fd::ImagePyramid* img_pyramid) = 0; 52 | 53 | virtual void SetWindowSize(int32_t size) {} 54 | virtual void SetSlideWindowStep(int32_t step_x, int32_t step_y) {} 55 | 56 | DISABLE_COPY_AND_ASSIGN(Detector); 57 | }; 58 | 59 | } // namespace fd 60 | } // namespace seeta 61 | 62 | #endif // SEETA_FD_DETECTOR_H_ 63 | -------------------------------------------------------------------------------- /FaceDetection/include/feat/lab_feature_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_FEAT_LAB_FEATURE_MAP_H_ 33 | #define SEETA_FD_FEAT_LAB_FEATURE_MAP_H_ 34 | 35 | #include 36 | 37 | #include "feature_map.h" 38 | 39 | namespace seeta { 40 | namespace fd { 41 | 42 | /** @struct LABFeature 43 | * @brief Locally Assembled Binary (LAB) feature. 44 | * 45 | * It is parameterized by the coordinates of top left corner. 46 | */ 47 | typedef struct LABFeature { 48 | int32_t x; 49 | int32_t y; 50 | } LABFeature; 51 | 52 | class LABFeatureMap : public seeta::fd::FeatureMap { 53 | public: 54 | LABFeatureMap() : rect_width_(3), rect_height_(3), num_rect_(3) {} 55 | virtual ~LABFeatureMap() {} 56 | 57 | virtual void Compute(const uint8_t* input, int32_t width, int32_t height); 58 | 59 | inline uint8_t GetFeatureVal(int32_t offset_x, int32_t offset_y) const { 60 | return feat_map_[(roi_.y + offset_y) * width_ + roi_.x + offset_x]; 61 | } 62 | 63 | float GetStdDev() const; 64 | 65 | private: 66 | void Reshape(int32_t width, int32_t height); 67 | void ComputeIntegralImages(const uint8_t* input); 68 | void ComputeRectSum(); 69 | void ComputeFeatureMap(); 70 | 71 | template 72 | inline void Integral(Int32Type* data) { 73 | const Int32Type* src = data; 74 | Int32Type* dest = data; 75 | const Int32Type* dest_above = dest; 76 | 77 | *dest = *(src++); 78 | for (int32_t c = 1; c < width_; c++, src++, dest++) 79 | *(dest + 1) = (*dest) + (*src); 80 | dest++; 81 | for (int32_t r = 1; r < height_; r++) { 82 | for (int32_t c = 0, s = 0; c < width_; c++, src++, dest++, dest_above++) { 83 | s += (*src); 84 | *dest = *dest_above + s; 85 | } 86 | } 87 | } 88 | 89 | const int32_t rect_width_; 90 | const int32_t rect_height_; 91 | const int32_t num_rect_; 92 | 93 | std::vector feat_map_; 94 | std::vector rect_sum_; 95 | std::vector int_img_; 96 | std::vector square_int_img_; 97 | }; 98 | 99 | } // namespace fd 100 | } // namespace seeta 101 | 102 | #endif // SEETA_FD_FEAT_LAB_FEATURE_MAP_H_ 103 | -------------------------------------------------------------------------------- /FaceDetection/include/feature_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_FEATURE_MAP_H_ 33 | #define SEETA_FD_FEATURE_MAP_H_ 34 | 35 | #include "common.h" 36 | 37 | namespace seeta { 38 | namespace fd { 39 | 40 | class FeatureMap { 41 | public: 42 | FeatureMap() 43 | : width_(0), height_(0) { 44 | roi_.x = 0; 45 | roi_.y = 0; 46 | roi_.width = 0; 47 | roi_.height = 0; 48 | } 49 | 50 | virtual ~FeatureMap() {} 51 | 52 | virtual void Compute(const uint8_t* input, int32_t width, int32_t height) = 0; 53 | 54 | inline virtual void SetROI(const seeta::Rect & roi) { 55 | roi_ = roi; 56 | } 57 | 58 | protected: 59 | int32_t width_; 60 | int32_t height_; 61 | 62 | seeta::Rect roi_; 63 | }; 64 | 65 | } // namespace fd 66 | } // namespace seeta 67 | 68 | #endif // SEETA_FD_FEATURE_MAP_H_ 69 | -------------------------------------------------------------------------------- /FaceDetection/include/fust.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_FUST_H_ 33 | #define SEETA_FD_FUST_H_ 34 | 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #include "classifier.h" 43 | #include "detector.h" 44 | #include "feature_map.h" 45 | #include "model_reader.h" 46 | 47 | namespace seeta { 48 | namespace fd { 49 | 50 | class FuStDetector : public Detector { 51 | public: 52 | FuStDetector() 53 | : wnd_size_(40), slide_wnd_step_x_(4), slide_wnd_step_y_(4), 54 | num_hierarchy_(0) { 55 | wnd_data_buf_.resize(wnd_size_ * wnd_size_); 56 | wnd_data_.resize(wnd_size_ * wnd_size_); 57 | } 58 | 59 | ~FuStDetector() {} 60 | 61 | virtual bool LoadModel(const std::string & model_path); 62 | virtual std::vector Detect(seeta::fd::ImagePyramid* img_pyramid); 63 | 64 | inline virtual void SetWindowSize(int32_t size) { 65 | if (size >= 20) 66 | wnd_size_ = size; 67 | } 68 | 69 | inline virtual void SetSlideWindowStep(int32_t step_x, int32_t step_y) { 70 | if (step_x > 0) 71 | slide_wnd_step_x_ = step_x; 72 | if (step_y > 0) 73 | slide_wnd_step_y_ = step_y; 74 | } 75 | 76 | private: 77 | std::shared_ptr CreateModelReader(seeta::fd::ClassifierType type); 78 | std::shared_ptr CreateClassifier(seeta::fd::ClassifierType type); 79 | std::shared_ptr CreateFeatureMap(seeta::fd::ClassifierType type); 80 | 81 | void GetWindowData(const seeta::ImageData & img, const seeta::Rect & wnd); 82 | 83 | int32_t wnd_size_; 84 | int32_t slide_wnd_step_x_; 85 | int32_t slide_wnd_step_y_; 86 | 87 | int32_t num_hierarchy_; 88 | std::vector hierarchy_size_; 89 | std::vector num_stage_; 90 | std::vector > wnd_src_id_; 91 | 92 | std::vector wnd_data_buf_; 93 | std::vector wnd_data_; 94 | 95 | std::vector > model_; 96 | std::vector > feat_map_; 97 | std::map cls2feat_idx_; 98 | 99 | DISABLE_COPY_AND_ASSIGN(FuStDetector); 100 | }; 101 | 102 | } // namespace fd 103 | } // namespace seeta 104 | 105 | #endif // SEETA_FD_FUST_H_ 106 | -------------------------------------------------------------------------------- /FaceDetection/include/io/lab_boost_model_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_IO_LAB_BOOST_MODEL_READER_H_ 33 | #define SEETA_FD_IO_LAB_BOOST_MODEL_READER_H_ 34 | 35 | #include 36 | #include 37 | 38 | #include "model_reader.h" 39 | #include "classifier/lab_boosted_classifier.h" 40 | 41 | namespace seeta { 42 | namespace fd { 43 | 44 | class LABBoostModelReader : public ModelReader { 45 | public: 46 | LABBoostModelReader() : ModelReader() {} 47 | virtual ~LABBoostModelReader() {} 48 | 49 | virtual bool Read(std::istream* input, seeta::fd::Classifier* model); 50 | 51 | private: 52 | bool ReadFeatureParam(std::istream* input, 53 | seeta::fd::LABBoostedClassifier* model); 54 | bool ReadBaseClassifierParam(std::istream* input, 55 | seeta::fd::LABBoostedClassifier* model); 56 | 57 | int32_t num_bin_; 58 | int32_t num_base_classifer_; 59 | }; 60 | 61 | } // namespace fd 62 | } // namespace seeta 63 | 64 | #endif // SEETA_FD_IO_LAB_BOOST_MODEL_READER_H_ 65 | -------------------------------------------------------------------------------- /FaceDetection/include/io/surf_mlp_model_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_IO_SURF_MLP_MODEL_READER_H_ 33 | #define SEETA_FD_IO_SURF_MLP_MODEL_READER_H_ 34 | 35 | #include 36 | #include 37 | 38 | #include "model_reader.h" 39 | 40 | namespace seeta { 41 | namespace fd { 42 | 43 | class SURFMLPModelReader : public ModelReader { 44 | public: 45 | SURFMLPModelReader() {} 46 | virtual ~SURFMLPModelReader() {} 47 | 48 | virtual bool Read(std::istream* input, seeta::fd::Classifier* model); 49 | 50 | private: 51 | std::vector feat_id_buf_; 52 | std::vector weights_buf_; 53 | std::vector bias_buf_; 54 | }; 55 | 56 | } // namespace fd 57 | } // namespace seeta 58 | 59 | #endif // SEETA_FD_IO_SURF_MLP_MODEL_READER_H_ 60 | -------------------------------------------------------------------------------- /FaceDetection/include/model_reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_MODEL_READER_H_ 33 | #define SEETA_FD_MODEL_READER_H_ 34 | 35 | #include 36 | 37 | #include "classifier.h" 38 | 39 | namespace seeta { 40 | namespace fd { 41 | 42 | class ModelReader { 43 | public: 44 | ModelReader() {} 45 | virtual ~ModelReader() {} 46 | 47 | virtual bool Read(std::istream* input, seeta::fd::Classifier* model) = 0; 48 | 49 | DISABLE_COPY_AND_ASSIGN(ModelReader); 50 | }; 51 | 52 | } // namespace fd 53 | } // namespace seeta 54 | 55 | #endif // SEETA_FD_MODEL_READER_H_ 56 | -------------------------------------------------------------------------------- /FaceDetection/include/util/nms.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SEETA_FD_UTIL_NMS_H_ 33 | #define SEETA_FD_UTIL_NMS_H_ 34 | 35 | #include 36 | 37 | #include "common.h" 38 | 39 | namespace seeta { 40 | namespace fd { 41 | 42 | void NonMaximumSuppression(std::vector* bboxes, 43 | std::vector* bboxes_nms, float iou_thresh = 0.8f); 44 | 45 | } // namespace fd 46 | } // namespace seeta 47 | 48 | #endif // SEETA_FD_UTIL_NMS_H_ 49 | -------------------------------------------------------------------------------- /FaceDetection/model/seeta_fd_frontal_v1.0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceDetection/model/seeta_fd_frontal_v1.0.bin -------------------------------------------------------------------------------- /FaceDetection/src/classifier/lab_boosted_classifier.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "classifier/lab_boosted_classifier.h" 33 | 34 | #include 35 | #include 36 | 37 | namespace seeta { 38 | namespace fd { 39 | 40 | void LABBaseClassifier::SetWeights(const float* weights, int32_t num_bin) { 41 | weights_.resize(num_bin + 1); 42 | num_bin_ = num_bin; 43 | std::copy(weights, weights + num_bin_ + 1, weights_.begin()); 44 | } 45 | 46 | bool LABBoostedClassifier::Classify(float* score, float* outputs) { 47 | bool isPos = true; 48 | float s = 0.0f; 49 | 50 | for (size_t i = 0; isPos && i < base_classifiers_.size();) { 51 | for (int32_t j = 0; j < kFeatGroupSize; j++, i++) { 52 | uint8_t featVal = feat_map_->GetFeatureVal(feat_[i].x, feat_[i].y); 53 | s += base_classifiers_[i]->weights(featVal); 54 | } 55 | if (s < base_classifiers_[i - 1]->threshold()) 56 | isPos = false; 57 | } 58 | isPos = isPos && ((!use_std_dev_) || feat_map_->GetStdDev() > kStdDevThresh); 59 | 60 | if (score != nullptr) 61 | *score = s; 62 | if (outputs != nullptr) 63 | *outputs = s; 64 | 65 | return isPos; 66 | } 67 | 68 | void LABBoostedClassifier::AddFeature(int32_t x, int32_t y) { 69 | LABFeature feat; 70 | feat.x = x; 71 | feat.y = y; 72 | feat_.push_back(feat); 73 | } 74 | 75 | void LABBoostedClassifier::AddBaseClassifier(const float* weights, 76 | int32_t num_bin, float thresh) { 77 | std::shared_ptr classifier(new LABBaseClassifier()); 78 | classifier->SetWeights(weights, num_bin); 79 | classifier->SetThreshold(thresh); 80 | base_classifiers_.push_back(classifier); 81 | } 82 | 83 | } // namespace fd 84 | } // namespace seeta 85 | -------------------------------------------------------------------------------- /FaceDetection/src/classifier/mlp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "classifier/mlp.h" 33 | 34 | #include "common.h" 35 | 36 | namespace seeta { 37 | namespace fd { 38 | 39 | void MLPLayer::Compute(const float* input, float* output) { 40 | #pragma omp parallel num_threads(SEETA_NUM_THREADS) 41 | { 42 | #pragma omp for nowait 43 | for (int32_t i = 0; i < output_dim_; i++) { 44 | output[i] = seeta::fd::MathFunction::VectorInnerProduct(input, 45 | weights_.data() + i * input_dim_, input_dim_) + bias_[i]; 46 | output[i] = (act_func_type_ == 1 ? ReLU(output[i]) : Sigmoid(-output[i])); 47 | } 48 | } 49 | } 50 | 51 | void MLP::Compute(const float* input, float* output) { 52 | layer_buf_[0].resize(layers_[0]->GetOutputDim()); 53 | layers_[0]->Compute(input, layer_buf_[0].data()); 54 | 55 | size_t i; /**< layer index */ 56 | for (i = 1; i < layers_.size() - 1; i++) { 57 | layer_buf_[i % 2].resize(layers_[i]->GetOutputDim()); 58 | layers_[i]->Compute(layer_buf_[(i + 1) % 2].data(), layer_buf_[i % 2].data()); 59 | } 60 | layers_.back()->Compute(layer_buf_[(i + 1) % 2].data(), output); 61 | } 62 | 63 | void MLP::AddLayer(int32_t inputDim, int32_t outputDim, const float* weights, 64 | const float* bias, bool is_output) { 65 | if (layers_.size() > 0 && inputDim != layers_.back()->GetOutputDim()) 66 | return; // @todo handle the errors!!! 67 | 68 | std::shared_ptr layer(new seeta::fd::MLPLayer(is_output ? 0 : 1)); 69 | layer->SetSize(inputDim, outputDim); 70 | layer->SetWeights(weights, inputDim * outputDim); 71 | layer->SetBias(bias, outputDim); 72 | layers_.push_back(layer); 73 | } 74 | 75 | } // namespace fd 76 | } // namespace seeta 77 | -------------------------------------------------------------------------------- /FaceDetection/src/classifier/surf_mlp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "classifier/surf_mlp.h" 33 | 34 | #include 35 | 36 | namespace seeta { 37 | namespace fd { 38 | 39 | bool SURFMLP::Classify(float* score, float* outputs) { 40 | float* dest = input_buf_.data(); 41 | for (size_t i = 0; i < feat_id_.size(); i++) { 42 | feat_map_->GetFeatureVector(feat_id_[i] - 1, dest); 43 | dest += feat_map_->GetFeatureVectorDim(feat_id_[i]); 44 | } 45 | output_buf_.resize(model_->GetOutputDim()); 46 | model_->Compute(input_buf_.data(), output_buf_.data()); 47 | 48 | if (score != nullptr) 49 | *score = output_buf_[0]; 50 | if (outputs != nullptr) { 51 | std::memcpy(outputs, output_buf_.data(), 52 | model_->GetOutputDim() * sizeof(float)); 53 | } 54 | 55 | return (output_buf_[0] > thresh_); 56 | } 57 | 58 | void SURFMLP::AddFeatureByID(int32_t feat_id) { 59 | feat_id_.push_back(feat_id); 60 | } 61 | 62 | void SURFMLP::AddLayer(int32_t input_dim, int32_t output_dim, 63 | const float* weights, const float* bias, bool is_output) { 64 | if (model_->GetLayerNum() == 0) 65 | input_buf_.resize(input_dim); 66 | model_->AddLayer(input_dim, output_dim, weights, bias, is_output); 67 | } 68 | 69 | } // namespace fd 70 | } // namespace seeta 71 | -------------------------------------------------------------------------------- /FaceDetection/src/io/lab_boost_model_reader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "io/lab_boost_model_reader.h" 33 | 34 | #include 35 | 36 | namespace seeta { 37 | namespace fd { 38 | 39 | bool LABBoostModelReader::Read(std::istream* input, 40 | seeta::fd::Classifier* model) { 41 | bool is_read; 42 | seeta::fd::LABBoostedClassifier* lab_boosted_classifier = 43 | dynamic_cast(model); 44 | 45 | input->read(reinterpret_cast(&num_base_classifer_), sizeof(int32_t)); 46 | input->read(reinterpret_cast(&num_bin_), sizeof(int32_t)); 47 | 48 | is_read = (!input->fail()) && num_base_classifer_ > 0 && num_bin_ > 0 && 49 | ReadFeatureParam(input, lab_boosted_classifier) && 50 | ReadBaseClassifierParam(input, lab_boosted_classifier); 51 | 52 | return is_read; 53 | } 54 | 55 | bool LABBoostModelReader::ReadFeatureParam(std::istream* input, 56 | seeta::fd::LABBoostedClassifier* model) { 57 | int32_t x; 58 | int32_t y; 59 | for (int32_t i = 0; i < num_base_classifer_; i++) { 60 | input->read(reinterpret_cast(&x), sizeof(int32_t)); 61 | input->read(reinterpret_cast(&y), sizeof(int32_t)); 62 | model->AddFeature(x, y); 63 | } 64 | 65 | return !input->fail(); 66 | } 67 | 68 | bool LABBoostModelReader::ReadBaseClassifierParam(std::istream* input, 69 | seeta::fd::LABBoostedClassifier* model) { 70 | std::vector thresh; 71 | thresh.resize(num_base_classifer_); 72 | input->read(reinterpret_cast(thresh.data()), 73 | sizeof(float)* num_base_classifer_); 74 | 75 | int32_t weight_len = sizeof(float)* (num_bin_ + 1); 76 | std::vector weights; 77 | weights.resize(num_bin_ + 1); 78 | for (int32_t i = 0; i < num_base_classifer_; i++) { 79 | input->read(reinterpret_cast(weights.data()), weight_len); 80 | model->AddBaseClassifier(weights.data(), num_bin_, thresh[i]); 81 | } 82 | 83 | return !input->fail(); 84 | } 85 | 86 | } // namespace fd 87 | } // namespace seeta 88 | -------------------------------------------------------------------------------- /FaceDetection/src/io/surf_mlp_model_reader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "io/surf_mlp_model_reader.h" 33 | 34 | #include 35 | 36 | #include "classifier/surf_mlp.h" 37 | 38 | namespace seeta { 39 | namespace fd { 40 | 41 | bool SURFMLPModelReader::Read(std::istream* input, 42 | seeta::fd::Classifier* model) { 43 | bool is_read = false; 44 | seeta::fd::SURFMLP* surf_mlp = dynamic_cast(model); 45 | int32_t num_layer; 46 | int32_t num_feat; 47 | int32_t input_dim; 48 | int32_t output_dim; 49 | float thresh; 50 | 51 | input->read(reinterpret_cast(&num_layer), sizeof(int32_t)); 52 | if (num_layer <= 0) { 53 | is_read = false; // @todo handle the errors and the following ones!!! 54 | } 55 | input->read(reinterpret_cast(&num_feat), sizeof(int32_t)); 56 | if (num_feat <= 0) { 57 | is_read = false; 58 | } 59 | 60 | feat_id_buf_.resize(num_feat); 61 | input->read(reinterpret_cast(feat_id_buf_.data()), 62 | sizeof(int32_t) * num_feat); 63 | for (int32_t i = 0; i < num_feat; i++) 64 | surf_mlp->AddFeatureByID(feat_id_buf_[i]); 65 | 66 | input->read(reinterpret_cast(&thresh), sizeof(float)); 67 | surf_mlp->SetThreshold(thresh); 68 | input->read(reinterpret_cast(&input_dim), sizeof(int32_t)); 69 | if (input_dim <= 0) { 70 | is_read = false; 71 | } 72 | 73 | for (int32_t i = 1; i < num_layer; i++) { 74 | input->read(reinterpret_cast(&output_dim), sizeof(int32_t)); 75 | if (output_dim <= 0) { 76 | is_read = false; 77 | } 78 | 79 | int32_t len = input_dim * output_dim; 80 | weights_buf_.resize(len); 81 | input->read(reinterpret_cast(weights_buf_.data()), 82 | sizeof(float) * len); 83 | 84 | bias_buf_.resize(output_dim); 85 | input->read(reinterpret_cast(bias_buf_.data()), 86 | sizeof(float) * output_dim); 87 | 88 | if (i < num_layer - 1) { 89 | surf_mlp->AddLayer(input_dim, output_dim, weights_buf_.data(), 90 | bias_buf_.data()); 91 | } else { 92 | surf_mlp->AddLayer(input_dim, output_dim, weights_buf_.data(), 93 | bias_buf_.data(), true); 94 | } 95 | input_dim = output_dim; 96 | } 97 | 98 | is_read = !input->fail(); 99 | 100 | return is_read; 101 | } 102 | 103 | } // namespace fd 104 | } // namespace seeta 105 | -------------------------------------------------------------------------------- /FaceDetection/src/test/facedetection_test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is an example of how to use SeetaFace engine for face detection, the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include "opencv2/highgui/highgui.hpp" 38 | #include "opencv2/imgproc/imgproc.hpp" 39 | 40 | #include "face_detection.h" 41 | 42 | using namespace std; 43 | 44 | int main(int argc, char** argv) { 45 | if (argc < 3) { 46 | cout << "Usage: " << argv[0] 47 | << " image_path model_path" 48 | << endl; 49 | return -1; 50 | } 51 | 52 | const char* img_path = argv[1]; 53 | seeta::FaceDetection detector(argv[2]); 54 | 55 | detector.SetMinFaceSize(40); 56 | detector.SetScoreThresh(2.f); 57 | detector.SetImagePyramidScaleFactor(0.8f); 58 | detector.SetWindowStep(4, 4); 59 | 60 | cv::Mat img = cv::imread(img_path, cv::IMREAD_UNCHANGED); 61 | cv::Mat img_gray; 62 | 63 | if (img.channels() != 1) 64 | cv::cvtColor(img, img_gray, cv::COLOR_BGR2GRAY); 65 | else 66 | img_gray = img; 67 | 68 | seeta::ImageData img_data; 69 | img_data.data = img_gray.data; 70 | img_data.width = img_gray.cols; 71 | img_data.height = img_gray.rows; 72 | img_data.num_channels = 1; 73 | 74 | long t0 = cv::getTickCount(); 75 | std::vector faces = detector.Detect(img_data); 76 | long t1 = cv::getTickCount(); 77 | double secs = (t1 - t0)/cv::getTickFrequency(); 78 | 79 | cout << "Detections takes " << secs << " seconds " << endl; 80 | #ifdef USE_OPENMP 81 | cout << "OpenMP is used." << endl; 82 | #else 83 | cout << "OpenMP is not used. " << endl; 84 | #endif 85 | 86 | #ifdef USE_SSE 87 | cout << "SSE is used." << endl; 88 | #else 89 | cout << "SSE is not used." << endl; 90 | #endif 91 | 92 | cout << "Image size (wxh): " << img_data.width << "x" 93 | << img_data.height << endl; 94 | 95 | cv::Rect face_rect; 96 | int32_t num_face = static_cast(faces.size()); 97 | 98 | for (int32_t i = 0; i < num_face; i++) { 99 | face_rect.x = faces[i].bbox.x; 100 | face_rect.y = faces[i].bbox.y; 101 | face_rect.width = faces[i].bbox.width; 102 | face_rect.height = faces[i].bbox.height; 103 | 104 | cv::rectangle(img, face_rect, CV_RGB(0, 0, 255), 4, 8, 0); 105 | } 106 | 107 | cv::namedWindow("Test", cv::WINDOW_AUTOSIZE); 108 | cv::imshow("Test", img); 109 | cv::waitKey(0); 110 | cv::destroyAllWindows(); 111 | } 112 | -------------------------------------------------------------------------------- /FaceDetection/src/util/image_pyramid.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "util/image_pyramid.h" 33 | 34 | namespace seeta { 35 | namespace fd { 36 | 37 | const seeta::ImageData* ImagePyramid::GetNextScaleImage(float* scale_factor) { 38 | if (scale_factor_ >= min_scale_) { 39 | if (scale_factor != nullptr) 40 | *scale_factor = scale_factor_; 41 | 42 | width_scaled_ = static_cast(width1x_ * scale_factor_); 43 | height_scaled_ = static_cast(height1x_ * scale_factor_); 44 | 45 | seeta::ImageData src_img(width1x_, height1x_); 46 | seeta::ImageData dest_img(width_scaled_, height_scaled_); 47 | src_img.data = buf_img_; 48 | dest_img.data = buf_img_scaled_; 49 | seeta::fd::ResizeImage(src_img, &dest_img); 50 | scale_factor_ *= scale_step_; 51 | 52 | img_scaled_.data = buf_img_scaled_; 53 | img_scaled_.width = width_scaled_; 54 | img_scaled_.height = height_scaled_; 55 | return &img_scaled_; 56 | } else { 57 | return nullptr; 58 | } 59 | } 60 | 61 | void ImagePyramid::SetImage1x(const uint8_t* img_data, int32_t width, 62 | int32_t height) { 63 | if (width > buf_img_width_ || height > buf_img_height_) { 64 | delete[] buf_img_; 65 | 66 | buf_img_width_ = width; 67 | buf_img_height_ = height; 68 | buf_img_ = new uint8_t[width * height]; 69 | } 70 | 71 | width1x_ = width; 72 | height1x_ = height; 73 | std::memcpy(buf_img_, img_data, width * height * sizeof(uint8_t)); 74 | scale_factor_ = max_scale_; 75 | UpdateBufScaled(); 76 | } 77 | 78 | void ImagePyramid::UpdateBufScaled() { 79 | if (width1x_ == 0 || height1x_ == 0) 80 | return; 81 | 82 | int32_t max_width = static_cast(width1x_ * max_scale_ + 0.5); 83 | int32_t max_height = static_cast(height1x_ * max_scale_ + 0.5); 84 | 85 | if (max_width > buf_scaled_width_ || max_height > buf_scaled_height_) { 86 | delete[] buf_img_scaled_; 87 | 88 | buf_scaled_width_ = max_width; 89 | buf_scaled_height_ = max_height; 90 | buf_img_scaled_ = new uint8_t[max_width * max_height]; 91 | 92 | img_scaled_.data = nullptr; 93 | img_scaled_.width = 0; 94 | img_scaled_.height = 0; 95 | } 96 | } 97 | 98 | } // namespace fd 99 | } // namespace seeta 100 | -------------------------------------------------------------------------------- /FaceDetection/src/util/nms.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * Funnel-structured cascade for multi-view face detection with alignment awareness, 11 | * Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. 12 | * In Neurocomputing (under review) 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shuzhe Wu (a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "util/nms.h" 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | namespace seeta { 39 | namespace fd { 40 | 41 | bool CompareBBox(const seeta::FaceInfo & a, const seeta::FaceInfo & b) { 42 | return a.score > b.score; 43 | } 44 | 45 | void NonMaximumSuppression(std::vector* bboxes, 46 | std::vector* bboxes_nms, float iou_thresh) { 47 | bboxes_nms->clear(); 48 | std::sort(bboxes->begin(), bboxes->end(), seeta::fd::CompareBBox); 49 | 50 | int32_t select_idx = 0; 51 | int32_t num_bbox = static_cast(bboxes->size()); 52 | std::vector mask_merged(num_bbox, 0); 53 | bool all_merged = false; 54 | 55 | while (!all_merged) { 56 | while (select_idx < num_bbox && mask_merged[select_idx] == 1) 57 | select_idx++; 58 | if (select_idx == num_bbox) { 59 | all_merged = true; 60 | continue; 61 | } 62 | 63 | bboxes_nms->push_back((*bboxes)[select_idx]); 64 | mask_merged[select_idx] = 1; 65 | 66 | seeta::Rect select_bbox = (*bboxes)[select_idx].bbox; 67 | float area1 = static_cast(select_bbox.width * select_bbox.height); 68 | float x1 = static_cast(select_bbox.x); 69 | float y1 = static_cast(select_bbox.y); 70 | float x2 = static_cast(select_bbox.x + select_bbox.width - 1); 71 | float y2 = static_cast(select_bbox.y + select_bbox.height - 1); 72 | 73 | select_idx++; 74 | for (int32_t i = select_idx; i < num_bbox; i++) { 75 | if (mask_merged[i] == 1) 76 | continue; 77 | 78 | seeta::Rect & bbox_i = (*bboxes)[i].bbox; 79 | float x = std::max(x1, static_cast(bbox_i.x)); 80 | float y = std::max(y1, static_cast(bbox_i.y)); 81 | float w = std::min(x2, static_cast(bbox_i.x + bbox_i.width - 1)) - x + 1; 82 | float h = std::min(y2, static_cast(bbox_i.y + bbox_i.height - 1)) - y + 1; 83 | if (w <= 0 || h <= 0) 84 | continue; 85 | 86 | float area2 = static_cast(bbox_i.width * bbox_i.height); 87 | float area_intersect = w * h; 88 | float area_union = area1 + area2 - area_intersect; 89 | if (static_cast(area_intersect) / area_union > iou_thresh) { 90 | mask_merged[i] = 1; 91 | bboxes_nms->back().score += (*bboxes)[i].score; 92 | } 93 | } 94 | } 95 | } 96 | 97 | } // namespace fd 98 | } // namespace seeta 99 | -------------------------------------------------------------------------------- /FaceIdentification/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /FaceIdentification/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | 3 | project (viplnet) 4 | 5 | set (VIPLNET_VERSION_MAJOR 4) 6 | set (VIPLNET_VERSION_MINOR 5) 7 | 8 | set(CMAKE_BUILD_TYPE "Release") 9 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -g -ggdb") 10 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -std=c++11 -O2") 11 | 12 | MESSAGE(STATUS "other platform: ${CMAKE_SYSTEM_NAME}") 13 | 14 | if (CMAKE_SYSTEM_NAME MATCHES "Darwin") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGTEST_USE_OWN_TR1_TUPLE=1") 16 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DGTEST_USE_OWN_TR1_TUPLE=1") 17 | endif (CMAKE_SYSTEM_NAME MATCHES "Darwin") 18 | 19 | set(VIPLNET_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include) 20 | set(VIPLNET_SRC_DIR ${PROJECT_SOURCE_DIR}/src) 21 | # set __VIOL_LOG__ macro 22 | # add_definitions(-D__VIPL_LOG__) 23 | 24 | include_directories(${VIPLNET_INCLUDE_DIR}) 25 | include_directories(${VIPLNET_SRC_DIR}) 26 | 27 | add_subdirectory(src) 28 | 29 | aux_source_directory(./src SRC_LIST) 30 | aux_source_directory(./tools TOOLS_LIST) 31 | add_library(viplnet SHARED ${SRC_LIST} ${TOOLS_LIST}) 32 | set_target_properties(viplnet PROPERTIES 33 | VERSION ${VIPLNET_VERSION_MAJOR}.${VIPLNET_VERSION_MINOR} 34 | SOVERSION ${VIPLNET_VERSION_MAJOR}.${VIPLNET_VERSION_MINOR}) 35 | -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/crop_file_list.txt: -------------------------------------------------------------------------------- 1 | images/crop/NF_200001_001.jpg -1 2 | images/crop/NF_200002_002.jpg -1 3 | images/crop/NF_200003_002.jpg -1 4 | images/crop/NF_200004_003.jpg -1 5 | images/crop/NF_200005_037.jpg -1 6 | images/crop/NF_200006_005.jpg -1 7 | images/crop/NF_200007_001.jpg -1 8 | images/crop/NF_200008_002.jpg -1 9 | images/crop/NF_200009_001.jpg -1 10 | images/crop/NF_200010_003.jpg -1 11 | images/crop/NF_200011_001.jpg -1 12 | images/crop/NF_200012_001.jpg -1 13 | images/crop/NF_200013_004.jpg -1 14 | images/crop/NF_200014_006.jpg -1 15 | images/crop/NF_200015_001.jpg -1 16 | images/crop/NF_200016_005.jpg -1 17 | images/crop/NF_200017_005.jpg -1 18 | images/crop/NF_200018_001.jpg -1 19 | images/crop/NF_200019_004.jpg -1 20 | images/crop/NF_200020_003.jpg -1 21 | images/crop/NF_200021_002.jpg -1 22 | images/crop/NF_200022_001.jpg -1 23 | images/crop/NF_200023_001.jpg -1 24 | images/crop/NF_200024_004.jpg -1 25 | images/crop/NF_200025_006.jpg -1 26 | images/crop/NF_200026_003.jpg -1 27 | images/crop/NF_200027_001.jpg -1 28 | images/crop/NF_200028_002.jpg -1 29 | images/crop/NF_200029_005.jpg -1 30 | images/crop/NF_200030_003.jpg -1 31 | images/crop/NF_200031_001.jpg -1 32 | images/crop/NF_200032_001.jpg -1 33 | images/crop/NF_200033_001.jpg -1 34 | images/crop/NF_200034_001.jpg -1 35 | images/crop/NF_200035_002.jpg -1 36 | images/crop/NF_200036_004.jpg -1 37 | images/crop/NF_200037_002.jpg -1 38 | images/crop/NF_200038_002.jpg -1 39 | images/crop/NF_200039_006.jpg -1 40 | images/crop/NF_200040_003.jpg -1 41 | images/crop/NF_200041_001.jpg -1 42 | images/crop/NF_200042_001.jpg -1 43 | images/crop/NF_200043_003.jpg -1 44 | images/crop/NF_200044_006.jpg -1 45 | images/crop/NF_200045_003.jpg -1 46 | images/crop/NF_200046_006.jpg -1 47 | images/crop/NF_200047_004.jpg -1 48 | images/crop/NF_200048_002.jpg -1 49 | images/crop/NF_200049_020.jpg -1 50 | images/crop/NF_200050_002.jpg -1 51 | -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/crop_sdk_file_list.txt: -------------------------------------------------------------------------------- 1 | images/crop_sdk/NF_200001_001.jpg -1 2 | images/crop_sdk/NF_200002_002.jpg -1 3 | images/crop_sdk/NF_200003_002.jpg -1 4 | images/crop_sdk/NF_200004_003.jpg -1 5 | images/crop_sdk/NF_200005_037.jpg -1 6 | images/crop_sdk/NF_200006_005.jpg -1 7 | images/crop_sdk/NF_200007_001.jpg -1 8 | images/crop_sdk/NF_200008_002.jpg -1 9 | images/crop_sdk/NF_200009_001.jpg -1 10 | images/crop_sdk/NF_200010_003.jpg -1 11 | images/crop_sdk/NF_200011_001.jpg -1 12 | images/crop_sdk/NF_200012_001.jpg -1 13 | images/crop_sdk/NF_200013_004.jpg -1 14 | images/crop_sdk/NF_200014_006.jpg -1 15 | images/crop_sdk/NF_200015_001.jpg -1 16 | images/crop_sdk/NF_200016_005.jpg -1 17 | images/crop_sdk/NF_200017_005.jpg -1 18 | images/crop_sdk/NF_200018_001.jpg -1 19 | images/crop_sdk/NF_200019_004.jpg -1 20 | images/crop_sdk/NF_200020_003.jpg -1 21 | images/crop_sdk/NF_200021_002.jpg -1 22 | images/crop_sdk/NF_200022_001.jpg -1 23 | images/crop_sdk/NF_200023_001.jpg -1 24 | images/crop_sdk/NF_200024_004.jpg -1 25 | images/crop_sdk/NF_200025_006.jpg -1 26 | images/crop_sdk/NF_200026_003.jpg -1 27 | images/crop_sdk/NF_200027_001.jpg -1 28 | images/crop_sdk/NF_200028_002.jpg -1 29 | images/crop_sdk/NF_200029_005.jpg -1 30 | images/crop_sdk/NF_200030_003.jpg -1 31 | images/crop_sdk/NF_200031_001.jpg -1 32 | images/crop_sdk/NF_200032_001.jpg -1 33 | images/crop_sdk/NF_200033_001.jpg -1 34 | images/crop_sdk/NF_200034_001.jpg -1 35 | images/crop_sdk/NF_200035_002.jpg -1 36 | images/crop_sdk/NF_200036_004.jpg -1 37 | images/crop_sdk/NF_200037_002.jpg -1 38 | images/crop_sdk/NF_200038_002.jpg -1 39 | images/crop_sdk/NF_200039_006.jpg -1 40 | images/crop_sdk/NF_200040_003.jpg -1 41 | images/crop_sdk/NF_200041_001.jpg -1 42 | images/crop_sdk/NF_200042_001.jpg -1 43 | images/crop_sdk/NF_200043_003.jpg -1 44 | images/crop_sdk/NF_200044_006.jpg -1 45 | images/crop_sdk/NF_200045_003.jpg -1 46 | images/crop_sdk/NF_200046_006.jpg -1 47 | images/crop_sdk/NF_200047_004.jpg -1 48 | images/crop_sdk/NF_200048_002.jpg -1 49 | images/crop_sdk/NF_200049_020.jpg -1 50 | images/crop_sdk/NF_200050_002.jpg -1 51 | -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/feats.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/feats.dat -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/compare_im/Aaron_Peirsol_0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/compare_im/Aaron_Peirsol_0001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/compare_im/Aaron_Peirsol_0004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/compare_im/Aaron_Peirsol_0004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200001_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200001_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200002_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200002_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200003_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200003_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200004_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200004_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200005_037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200005_037.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200006_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200006_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200007_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200007_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200008_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200008_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200009_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200009_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200010_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200010_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200011_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200011_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200012_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200012_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200013_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200013_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200014_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200014_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200015_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200015_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200016_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200016_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200017_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200017_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200018_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200018_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200019_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200019_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200020_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200020_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200021_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200021_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200022_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200022_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200023_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200023_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200024_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200024_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200025_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200025_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200026_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200026_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200027_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200027_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200028_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200028_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200029_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200029_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200030_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200030_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200031_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200031_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200032_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200032_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200033_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200033_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200034_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200034_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200035_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200035_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200036_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200036_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200037_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200037_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200038_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200038_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200039_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200039_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200040_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200040_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200041_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200041_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200042_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200042_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200043_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200043_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200044_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200044_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200045_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200045_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200046_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200046_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200047_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200047_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200048_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200048_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200049_020.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200049_020.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop/NF_200050_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop/NF_200050_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200001_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200001_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200002_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200002_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200003_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200003_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200004_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200004_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200005_037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200005_037.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200006_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200006_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200007_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200007_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200008_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200008_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200009_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200009_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200010_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200010_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200011_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200011_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200012_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200012_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200013_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200013_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200014_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200014_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200015_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200015_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200016_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200016_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200017_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200017_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200018_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200018_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200019_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200019_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200020_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200020_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200021_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200021_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200022_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200022_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200023_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200023_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200024_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200024_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200025_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200025_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200026_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200026_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200027_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200027_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200028_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200028_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200029_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200029_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200030_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200030_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200031_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200031_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200032_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200032_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200033_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200033_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200034_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200034_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200035_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200035_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200036_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200036_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200037_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200037_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200038_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200038_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200039_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200039_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200040_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200040_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200041_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200041_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200042_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200042_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200043_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200043_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200044_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200044_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200045_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200045_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200046_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200046_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200047_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200047_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200048_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200048_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200049_020.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200049_020.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200050_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/crop_sdk/NF_200050_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200001_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200001_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200002_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200002_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200003_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200003_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200004_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200004_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200005_037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200005_037.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200006_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200006_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200007_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200007_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200008_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200008_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200009_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200009_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200010_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200010_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200011_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200011_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200012_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200012_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200013_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200013_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200014_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200014_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200015_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200015_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200016_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200016_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200017_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200017_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200018_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200018_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200019_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200019_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200020_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200020_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200021_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200021_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200022_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200022_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200023_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200023_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200024_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200024_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200025_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200025_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200026_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200026_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200027_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200027_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200028_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200028_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200029_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200029_005.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200030_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200030_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200031_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200031_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200032_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200032_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200033_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200033_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200034_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200034_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200035_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200035_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200036_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200036_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200037_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200037_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200038_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200038_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200039_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200039_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200040_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200040_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200041_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200041_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200042_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200042_001.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200043_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200043_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200044_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200044_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200045_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200045_003.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200046_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200046_006.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200047_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200047_004.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200048_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200048_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200049_020.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200049_020.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/images/src/NF_200050_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/data/test_face_recognizer/images/src/NF_200050_002.jpg -------------------------------------------------------------------------------- /FaceIdentification/data/test_face_recognizer/test_file_list.txt: -------------------------------------------------------------------------------- 1 | images/src/NF_200001_001.jpg 85 106 115 106 102 125 86 138 110 138 2 | images/src/NF_200002_002.jpg 106 154 170 156 137 195 108 222 169 221 3 | images/src/NF_200003_002.jpg 123 180 220 168 189 224 142 279 215 278 4 | images/src/NF_200004_003.jpg 87 107 153 102 119 144 101 174 158 167 5 | images/src/NF_200005_037.jpg 102 166 188 158 144 202 120 253 187 246 6 | images/src/NF_200006_005.jpg 116 91 156 90 137 115 116 132 155 130 7 | images/src/NF_200007_001.jpg 151 118 196 123 180 151 149 174 183 177 8 | images/src/NF_200008_002.jpg 83 45 109 42 93 53 87 71 107 69 9 | images/src/NF_200009_001.jpg 102 155 178 158 138 218 102 232 176 236 10 | images/src/NF_200010_003.jpg 150 98 193 99 170 123 150 143 192 143 11 | images/src/NF_200011_001.jpg 140 138 201 144 170 175 142 201 189 204 12 | images/src/NF_200012_001.jpg 126 148 183 153 160 195 129 216 168 219 13 | images/src/NF_200013_004.jpg 92 83 129 81 108 108 96 125 126 123 14 | images/src/NF_200014_006.jpg 95 181 178 172 134 238 113 269 179 265 15 | images/src/NF_200015_001.jpg 98 173 157 170 128 224 100 245 155 240 16 | images/src/NF_200016_005.jpg 97 112 142 116 115 148 98 166 133 169 17 | images/src/NF_200017_005.jpg 112 144 179 133 155 179 130 237 184 227 18 | images/src/NF_200018_001.jpg 133 73 160 70 147 89 138 106 160 106 19 | images/src/NF_200019_004.jpg 120 175 185 183 149 226 116 240 176 246 20 | images/src/NF_200020_003.jpg 185 144 254 145 219 176 188 218 250 216 21 | images/src/NF_200021_002.jpg 199 82 233 82 217 103 204 116 230 114 22 | images/src/NF_200022_001.jpg 158 108 204 106 184 138 161 164 207 160 23 | images/src/NF_200023_001.jpg 65 110 108 113 85 141 70 155 99 156 24 | images/src/NF_200024_004.jpg 84 109 124 112 101 137 83 151 120 152 25 | images/src/NF_200025_006.jpg 96 168 168 162 125 218 109 259 167 255 26 | images/src/NF_200026_003.jpg 118 178 188 169 158 216 136 259 200 244 27 | images/src/NF_200027_001.jpg 106 177 215 202 140 264 91 271 191 295 28 | images/src/NF_200028_002.jpg 83 111 143 116 115 149 86 184 133 188 29 | images/src/NF_200029_005.jpg 124 159 153 155 138 171 131 192 153 190 30 | images/src/NF_200030_003.jpg 161 153 218 151 194 179 169 203 221 199 31 | images/src/NF_200031_001.jpg 127 182 202 183 170 233 134 271 195 271 32 | images/src/NF_200032_001.jpg 135 116 177 110 162 141 145 172 186 163 33 | images/src/NF_200033_001.jpg 133 167 167 165 155 188 140 206 166 204 34 | images/src/NF_200034_001.jpg 108 102 168 101 132 127 112 164 158 165 35 | images/src/NF_200035_002.jpg 92 101 130 96 112 124 97 138 134 134 36 | images/src/NF_200036_004.jpg 120 117 168 112 144 142 126 170 166 169 37 | images/src/NF_200037_002.jpg 167 227 206 220 192 243 172 264 209 258 38 | images/src/NF_200038_002.jpg 146 114 205 119 177 148 156 186 195 187 39 | images/src/NF_200039_006.jpg 142 91 183 92 163 117 148 137 175 139 40 | images/src/NF_200040_003.jpg 131 103 155 102 146 116 130 127 153 127 41 | images/src/NF_200041_001.jpg 134 105 175 106 155 131 133 144 172 143 42 | images/src/NF_200042_001.jpg 131 81 167 88 148 106 130 123 159 129 43 | images/src/NF_200043_003.jpg 128 74 159 75 144 92 129 102 158 102 44 | images/src/NF_200044_006.jpg 71 60 99 60 82 77 70 86 96 86 45 | images/src/NF_200045_003.jpg 101 77 149 78 117 105 92 138 138 138 46 | images/src/NF_200046_006.jpg 165 81 200 82 179 102 167 114 193 116 47 | images/src/NF_200047_004.jpg 125 97 166 96 146 113 132 144 160 142 48 | images/src/NF_200048_002.jpg 121 115 186 128 152 148 120 192 160 200 49 | images/src/NF_200049_020.jpg 150 191 183 192 166 207 151 222 179 222 50 | images/src/NF_200050_002.jpg 101 176 198 182 141 217 95 279 188 284 51 | -------------------------------------------------------------------------------- /FaceIdentification/examples/Tester/Tester.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /FaceIdentification/examples/Tester/Tester.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FaceIdentification/examples/examples.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.40629.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tester", "Tester\Tester.vcxproj", "{E51A4702-C253-4E48-9510-E4D7C274DBEB}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Identification", "Identification\Identification.vcxproj", "{7D4CC245-77B4-42A4-90AE-4137093D2A34}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Mixed Platforms = Debug|Mixed Platforms 13 | Debug|Win32 = Debug|Win32 14 | Debug|x64 = Debug|x64 15 | Release|Mixed Platforms = Release|Mixed Platforms 16 | Release|Win32 = Release|Win32 17 | Release|x64 = Release|x64 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 21 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Debug|Mixed Platforms.Build.0 = Debug|Win32 22 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Debug|Win32.ActiveCfg = Debug|Win32 23 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Debug|Win32.Build.0 = Debug|Win32 24 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Debug|x64.ActiveCfg = Debug|x64 25 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Debug|x64.Build.0 = Debug|x64 26 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Release|Mixed Platforms.ActiveCfg = Release|x64 27 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Release|Win32.ActiveCfg = Release|Win32 28 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Release|Win32.Build.0 = Release|Win32 29 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Release|x64.ActiveCfg = Release|x64 30 | {E51A4702-C253-4E48-9510-E4D7C274DBEB}.Release|x64.Build.0 = Release|x64 31 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 32 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Debug|Mixed Platforms.Build.0 = Debug|Win32 33 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Debug|Win32.ActiveCfg = Debug|Win32 34 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Debug|Win32.Build.0 = Debug|Win32 35 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Debug|x64.ActiveCfg = Debug|x64 36 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Debug|x64.Build.0 = Debug|x64 37 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Release|Mixed Platforms.ActiveCfg = Release|x64 38 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Release|Mixed Platforms.Build.0 = Release|x64 39 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Release|Win32.ActiveCfg = Release|Win32 40 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Release|Win32.Build.0 = Release|Win32 41 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Release|x64.ActiveCfg = Release|x64 42 | {7D4CC245-77B4-42A4-90AE-4137093D2A34}.Release|x64.Build.0 = Release|x64 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /FaceIdentification/examples/examples.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/examples/examples.v12.suo -------------------------------------------------------------------------------- /FaceIdentification/include/aligner.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | #ifndef ALIGNER_H_ 32 | #define ALIGNER_H_ 33 | 34 | #include "common.h" 35 | #include "common_net.h" 36 | #include "net.h" 37 | 38 | namespace seeta { 39 | class Aligner { 40 | public: 41 | Aligner(); 42 | Aligner(int crop_height, int crop_width, std::string type = "bicubic"); 43 | ~Aligner(); 44 | // Alignment and return to a ImageData 45 | void Alignment(const ImageData &src_img, 46 | const float* const llpoint, 47 | const ImageData &dst_img); 48 | // Alignment and return to a Blob 49 | void Alignment(const ImageData &src_img, 50 | const float* const llpoint, 51 | Blob* const dst_blob); 52 | 53 | void set_height(int height) { crop_height_ = height; } 54 | void set_width(int width) {crop_width_ = width; } 55 | 56 | int crop_height() { return crop_height_; } 57 | int crop_width() { return crop_width_; } 58 | private: 59 | int crop_height_; 60 | int crop_width_; 61 | std::shared_ptr net_; 62 | }; 63 | } // namespace 64 | #endif // ALIGNER_H_ 65 | -------------------------------------------------------------------------------- /FaceIdentification/include/bias_adder_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Mengru Zhang(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | #ifndef BIAS_ADDER_NET_H_ 32 | #define BIAS_ADDER_NET_H_ 33 | 34 | #include "net.h" 35 | #include "net_factory.h" 36 | 37 | class BiasAdderNet : public Net { 38 | public: 39 | BiasAdderNet():Net() {} 40 | virtual ~BiasAdderNet(){} 41 | virtual void SetUp(); 42 | virtual void Execute(); 43 | }; 44 | #endif // BIAS_ADDER_NET_H_ 45 | -------------------------------------------------------------------------------- /FaceIdentification/include/blob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef BLOB_H_ 33 | #define BLOB_H_ 34 | #include "log.h" 35 | #include "viplnet.h" 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | // basic computational unit 43 | 44 | class Blob { 45 | public: 46 | Blob(); 47 | Blob(const Blob &source); 48 | Blob(int n, int c, int h, int w); 49 | Blob(int n, int c, int h, int w, float* data); 50 | Blob(FILE* file); 51 | 52 | virtual ~Blob(); 53 | void reshape(int n, int c, int h, int w); 54 | void Permute(int dim1, int dim2, int dim3, int dim4); 55 | void Release(); 56 | inline int offset(const int n, const int c=0, const int h=0, 57 | const int w=0) const { 58 | if (n < 0 || n >= num() || c < 0 || c >= channels() || 59 | h < 0 || h >= height() || w < 0 || w >= width()) { 60 | LOG(ERROR) 61 | << "Index: (" << n << ", " << c << ", " << h << ", " << w << "), " 62 | << "Bound: [" << num() << ", " << channels() << ", " << height() 63 | <<", " << width() << "]."; 64 | exit(0); 65 | } 66 | return ((n * channels() + c) * height() + h) * width() + w; 67 | } 68 | void SetData(); 69 | void SetData(Blob &source); 70 | void SetData(int n, int c, int h, int w); 71 | void CopyData(int n, int c, int h, int w, const float* const data); 72 | // copy data from unsigned char 73 | void CopyData(int n, int c, int h, int w, const unsigned char* const data); 74 | // copy data to unsigned char 75 | void CopyTo(unsigned char* const data); 76 | // copy data to float 77 | void CopyTo(float* const data); 78 | void ToFile(const std::string file_name); 79 | void ToBinaryFile(const std::string file_name); 80 | 81 | inline const float operator [](int i) const { 82 | return data_.get()[i]; 83 | } 84 | inline float & operator [](int i) { 85 | return data_.get()[i]; 86 | } 87 | 88 | inline int num() const { return shape(0); } 89 | inline int channels() const { return shape(1); } 90 | inline int height() const { return shape(2); } 91 | inline int width() const { return shape(3); } 92 | inline std::vector shape() const { return shape_; } 93 | int count() const { return count_; } 94 | std::shared_ptr data() const { return data_; } 95 | private: 96 | inline int shape(int index) const { 97 | return index < shape_.size() ? shape_[index] : 1; 98 | } 99 | std::shared_ptr data_; 100 | std::vector shape_; 101 | int count_; 102 | }; 103 | 104 | #endif // BLOB_H_ 105 | -------------------------------------------------------------------------------- /FaceIdentification/include/bn_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Mengru Zhang(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef BN_NET_H_ 33 | #define BN_NET_H_ 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | 38 | class BnNet : public Net { 39 | public: 40 | BnNet(): Net() {} 41 | virtual ~BnNet() {} 42 | virtual void SetUp(); 43 | virtual void Execute(); 44 | 45 | private: 46 | float epsilon_; 47 | }; 48 | 49 | 50 | # endif //BN_NET_H_ 51 | -------------------------------------------------------------------------------- /FaceIdentification/include/common.h: -------------------------------------------------------------------------------- 1 | #ifndef SEETA_COMMON_H_ 2 | #define SEETA_COMMON_H_ 3 | 4 | #include 5 | 6 | #if defined (_MSC_VER) || defined (_WIN32) || defined (_WIN64) 7 | #ifndef SEETA_EXPORTS 8 | #define SEETA_API __declspec(dllexport) 9 | #else 10 | #define SEETA_API __declspec(dllimport) 11 | #endif // SEETA_API 12 | #else // defined (windows) 13 | #define SEETA_API 14 | #endif 15 | 16 | #define DISABLE_COPY_AND_ASSIGN(classname) \ 17 | private: \ 18 | classname(const classname&); \ 19 | classname& operator=(const classname&) 20 | 21 | #ifdef USE_OPENMP 22 | #include 23 | 24 | #define SEETA_NUM_THREADS 4 25 | #endif 26 | 27 | namespace seeta { 28 | 29 | typedef struct ImageData { 30 | ImageData() { 31 | data = nullptr; 32 | width = 0; 33 | height = 0; 34 | num_channels = 0; 35 | } 36 | 37 | ImageData(int32_t img_width, int32_t img_height, 38 | int32_t img_num_channels = 1) { 39 | data = nullptr; 40 | width = img_width; 41 | height = img_height; 42 | num_channels = img_num_channels; 43 | } 44 | 45 | uint8_t* data; 46 | int32_t width; 47 | int32_t height; 48 | int32_t num_channels; 49 | } ImageData; 50 | 51 | typedef struct Rect { 52 | int32_t x; 53 | int32_t y; 54 | int32_t width; 55 | int32_t height; 56 | } Rect; 57 | 58 | typedef struct FaceInfo { 59 | seeta::Rect bbox; 60 | 61 | double roll; 62 | double pitch; 63 | double yaw; 64 | 65 | double score; /**< Larger score should mean higher confidence. */ 66 | } FaceInfo; 67 | 68 | typedef struct { 69 | double x; 70 | double y; 71 | } FacialLandmark; 72 | } // namespace seeta 73 | 74 | #endif // SEETA_COMMON_H_ 75 | 76 | -------------------------------------------------------------------------------- /FaceIdentification/include/common_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef COMMON_NET_H_ 33 | #define COMMON_NET_H_ 34 | 35 | #include "blob.h" 36 | #include "log.h" 37 | #include "net_factory.h" 38 | #include "net.h" 39 | 40 | #include 41 | 42 | class CommonNet : public Net { 43 | public: 44 | CommonNet(); 45 | ~CommonNet(); 46 | // load model 47 | static std::shared_ptr Load(FILE* file); 48 | // initialize the networks from a binary file 49 | virtual void SetUp(); 50 | // execute the networks 51 | virtual void Execute(); 52 | }; 53 | 54 | #endif // COMMON_NET_H_ 55 | -------------------------------------------------------------------------------- /FaceIdentification/include/conv_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Zining Xu(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef CONV_NET_H_ 33 | #define CONV_NET_H_ 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | class ConvNet: public Net { 43 | public: 44 | ConvNet(): Net() {} 45 | virtual ~ConvNet() {} 46 | virtual void SetUp(); 47 | virtual void Execute(); 48 | 49 | protected: 50 | int stride_h_; 51 | int stride_w_; 52 | }; 53 | 54 | #endif //CONV_NET_H_ 55 | 56 | -------------------------------------------------------------------------------- /FaceIdentification/include/eltwise_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Detection module, containing codes implementing the 7 | * face detection method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef _ELTWISE_NET_H 33 | #define _ELTWISE_NET_H 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | #include 38 | 39 | class EltwiseNet: public Net { 40 | public: 41 | EltwiseNet(): Net() {} 42 | virtual ~EltwiseNet() {} 43 | virtual void SetUp(); 44 | virtual void Execute(); 45 | protected: 46 | std::string op_; 47 | float scale_; 48 | float upper_; 49 | float lower_; 50 | }; 51 | 52 | #endif // _ELTWISE_NET_H 53 | -------------------------------------------------------------------------------- /FaceIdentification/include/inner_product_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Zining Xu(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef INNER_PRODUCT_NET_H_ 33 | #define INNER_PRODUCT_NET_H_ 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | class InnerProductNet: public Net { 43 | public: 44 | InnerProductNet(): Net() {} 45 | virtual ~InnerProductNet() {} 46 | virtual void SetUp(); 47 | virtual void Execute(); 48 | 49 | protected: 50 | }; 51 | 52 | #endif //INNER_PRODUCT_NET_H_ 53 | 54 | -------------------------------------------------------------------------------- /FaceIdentification/include/math_functions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Zining Xu(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef MATH_FUNCTIONS_H_ 33 | #define MATH_FUNCTIONS_H_ 34 | 35 | #include "log.h" 36 | 37 | #ifdef _BLAS 38 | #ifdef _WIN64 39 | #pragma comment( lib, "blas_win64_MT" ) 40 | #pragma comment( lib, "lapack_win64_MT" ) 41 | #else 42 | #pragma comment( lib, "libblas" ) 43 | #pragma comment( lib, "liblapack" ) 44 | #endif 45 | #include 46 | #endif 47 | 48 | float simd_dot(const float* x, const float* y, const long& len); 49 | 50 | // matrix product: 51 | // MA = ta ? A^T : A; 52 | // MB = tb ? B^T : B; 53 | // return C(n, m) = MA(n, k) * MB(k, m); 54 | void matrix_procuct(const float* A, const float* B, float* C, const int n, 55 | const int m, const int k, bool ta = false, bool tb = false); 56 | 57 | #endif // MATH_FUNCTIONS_H_ 58 | -------------------------------------------------------------------------------- /FaceIdentification/include/max_pooling_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Zining Xu(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef MAX_POOLING_NET_H_ 33 | #define MAX_POOLING_NET_H_ 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | class MaxPoolingNet: public Net { 43 | public: 44 | MaxPoolingNet(): Net() {} 45 | virtual ~MaxPoolingNet() {} 46 | virtual void SetUp(); 47 | virtual void Execute(); 48 | 49 | protected: 50 | int kernel_h_; 51 | int kernel_w_; 52 | int stride_h_; 53 | int stride_w_; 54 | }; 55 | 56 | #endif //MAX_POOLING_NET_H_ 57 | 58 | -------------------------------------------------------------------------------- /FaceIdentification/include/net_factory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef NET_FACTORY_H_ 33 | #define NET_FACTORY_H_ 34 | 35 | #include "net.h" 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | class NetRegistry { 43 | public: 44 | typedef std::shared_ptr (*Creator)(); 45 | typedef std::map CreatorRegistry; 46 | 47 | static CreatorRegistry& Registry() { 48 | static CreatorRegistry* g_registry_ = new CreatorRegistry(); 49 | return *g_registry_; 50 | } 51 | 52 | static void AddCreator(const std::string& type, Creator creator) { 53 | CreatorRegistry& registry = Registry(); 54 | if (registry.count(type) != 0) { 55 | LOG(INFO) << "Net type " << type << " already registered."; 56 | } 57 | registry[type] = creator; 58 | } 59 | 60 | static std::shared_ptr CreateNet(const std::string type) { 61 | CreatorRegistry& registry = Registry(); 62 | if (registry.count(type) != 1) { 63 | LOG(ERROR) << "Net type " << type << " haven't registered."; 64 | } 65 | return registry[type](); 66 | } 67 | private: 68 | NetRegistry() {} 69 | 70 | }; 71 | 72 | class NetRegisterer { 73 | public: 74 | NetRegisterer(const std::string& type, 75 | std::shared_ptr (*creator)()) { 76 | LOG(INFO) << "Registering net type: " << type; 77 | NetRegistry::AddCreator(type, creator); 78 | } 79 | }; 80 | 81 | #define REGISTER_NET_CREATOR(type, creator) \ 82 | static NetRegisterer g_creator_##type(#type, creator) 83 | 84 | #define REGISTER_NET_CLASS(type) \ 85 | std::shared_ptr Creator_##type##Net() \ 86 | { \ 87 | return std::shared_ptr(new type##Net()); \ 88 | } \ 89 | REGISTER_NET_CREATOR(type, Creator_##type##Net); \ 90 | static type##Net type 91 | #endif //NET_FACTORY_H_ 92 | -------------------------------------------------------------------------------- /FaceIdentification/include/pad_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef PAD_NET_H_ 33 | #define PAD_NET_H_ 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | class PadNet: public Net { 43 | public: 44 | PadNet(): Net() {} 45 | virtual ~PadNet() {} 46 | virtual void SetUp(); 47 | virtual void Execute(); 48 | 49 | protected: 50 | int left_, right_, bottom_, top_; 51 | }; 52 | 53 | #endif //PAD_NET_H_ 54 | -------------------------------------------------------------------------------- /FaceIdentification/include/spatial_transform_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef SPATIAL_TRANSFORM_NET_H_ 33 | #define SPATIAL_TRANSFORM_NET_H_ 34 | 35 | #include "net.h" 36 | #include "net_factory.h" 37 | 38 | class SpatialTransformNet : public Net { 39 | public: 40 | SpatialTransformNet() : Net() {} 41 | virtual ~SpatialTransformNet() {} 42 | virtual void SetUp(); 43 | virtual void Execute(); 44 | 45 | protected: 46 | // sampling for common blob data 47 | virtual double Sampling(const float* const feat_map, int H, int W, double x, 48 | double y, double scale = 1.0); 49 | 50 | // sampling for cv::Mat::data 51 | virtual double Sampling(const unsigned char* const feat_map, int c, int H, 52 | int W, int C, double x, double y, double scale = 1.0); 53 | 54 | virtual double Cubic(double x); 55 | 56 | inline void Norm(std::vector& weights) { 57 | float sum = 0; 58 | for (int i = 0; i < weights.size(); ++ i) 59 | sum += weights[i]; 60 | for (int i = 0; i < weights.size(); ++ i) 61 | weights[i] /= sum; 62 | } 63 | 64 | // transformation type: linear or bicubic 65 | std::string type_; 66 | // whether input with cv::Mat::data 67 | int is_mat_data_; 68 | // output feature map height and width 69 | int new_height_, new_width_; 70 | }; 71 | 72 | #endif //SPATIAL_TRANSFORM_NET_H_ 73 | -------------------------------------------------------------------------------- /FaceIdentification/include/tform_maker_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef TFORM_MAKER_NET_H_ 33 | #define TFORM_MAKER_NET_H_ 34 | 35 | #include "net.h" 36 | 37 | // Calculate affine transformation according to feature points 38 | class TransformationMakerNet: public Net { 39 | public: 40 | TransformationMakerNet(): Net() {} 41 | virtual ~TransformationMakerNet() {} 42 | virtual void SetUp(); 43 | virtual void Execute(); 44 | protected: 45 | // the number of feature points 46 | int points_num_; 47 | }; 48 | 49 | #endif //TFORM_MAKER_NET_H_ 50 | -------------------------------------------------------------------------------- /FaceIdentification/include/viplnet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Shiying Luo(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #ifndef VIPLNET_H_ 33 | #define VIPLNET_H_ 34 | 35 | #if defined(__unix__) || defined(__APPLE__) 36 | 37 | #ifndef fopen_s 38 | 39 | #define fopen_s(pFile,filename,mode) ((*(pFile))=fopen((filename),(mode)))==NULL 40 | 41 | #endif //fopen_s 42 | 43 | #endif //__unix__, __APPLE__ 44 | 45 | #endif //VIPLNET_H_ 46 | -------------------------------------------------------------------------------- /FaceIdentification/model/seeta_fr_v1.0.part1.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/model/seeta_fr_v1.0.part1.rar -------------------------------------------------------------------------------- /FaceIdentification/model/seeta_fr_v1.0.part2.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/FaceIdentification/model/seeta_fr_v1.0.part2.rar -------------------------------------------------------------------------------- /FaceIdentification/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(VIPLNET_TEST_DIR ${PROJECT_SRC_DIR}/test) 2 | add_subdirectory(test) 3 | -------------------------------------------------------------------------------- /FaceIdentification/src/bias_adder_net.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Mengru Zhang(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "bias_adder_net.h" 33 | 34 | void BiasAdderNet::SetUp() { 35 | this->input_blobs().resize(1); 36 | this->output_blobs().resize(1); 37 | this->input_plugs().resize(1); 38 | this->output_plugs().resize(1); 39 | this->params().resize(1); 40 | } 41 | 42 | void BiasAdderNet::Execute() { 43 | CheckInput(); 44 | 45 | const Blob* const input = this->input_blobs(0); 46 | const Blob* const bias = this->params(0); 47 | Blob* const output = this->output_blobs(0); 48 | 49 | int channels = bias->channels(); 50 | CHECK_EQ(channels, input->channels()); 51 | 52 | int height = input->height(); 53 | int width = input->width(); 54 | int num = input->num(); 55 | 56 | LOG(DEBUG) << "input blob: (" << num << "," << input->channels() << "," 57 | << height << "," << width << ")"; 58 | LOG(DEBUG) << "bias blob: (" << bias->num() << "," << bias->channels() 59 | << "," << bias->height() << "," << bias->width() << ")"; 60 | 61 | float* const dst_head = new float[num*channels*height*width]; 62 | 63 | int size = height * width; 64 | for (int n = 0, offset = 0; n < num; ++n) { 65 | for (int ichannel = 0; ichannel < channels; ++ichannel) { 66 | for(int i = 0; i < size; ++i, ++offset) { 67 | dst_head[offset] = (*input)[offset] + (*bias)[ichannel]; 68 | } 69 | } 70 | } 71 | 72 | output->CopyData(num, channels, height, width, dst_head); 73 | delete []dst_head; 74 | CheckOutput(); 75 | } 76 | 77 | REGISTER_NET_CLASS(BiasAdder); 78 | -------------------------------------------------------------------------------- /FaceIdentification/src/bn_net.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Mengru Zhang(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "bn_net.h" 33 | #include "math.h" 34 | 35 | void BnNet::SetUp() { 36 | epsilon_ = *(float*)(this->hyper_param()->param("epsilon")); 37 | 38 | //check input and output blob size 39 | this->input_blobs().resize(1); 40 | this->output_blobs().resize(1); 41 | this->input_plugs().resize(1); 42 | this->output_plugs().resize(1); 43 | this->params().resize(3); 44 | } 45 | 46 | void BnNet::Execute() { 47 | CheckInput(); 48 | 49 | const Blob* const input = this->input_blobs(0); 50 | const Blob* const para_mean = this->params(0); 51 | const Blob* const para_var = this->params(1); 52 | const Blob* const para_scale = this->params(2); 53 | Blob* const output = this->output_blobs(0); 54 | 55 | int channels = input->channels(); 56 | CHECK_EQ(channels, para_mean->channels()); 57 | CHECK_EQ(channels, para_var->channels()); 58 | 59 | int height = input->height(); 60 | int width = input->width(); 61 | int num = input->num(); 62 | 63 | float* const dst_head = new float[num*channels*height*width]; 64 | 65 | float scale = (*para_scale)[0]; 66 | if (scale > 0){ 67 | scale = 1.0f / scale; 68 | } else if (scale < 0){ 69 | scale = 1.0f; 70 | } else { // scale and epsilon should not both be equal to 0. 71 | if (epsilon_ < 1e-5){ 72 | epsilon_ = 1e-5; 73 | } 74 | } 75 | 76 | int size = height * width; 77 | for (int n = 0, offset = 0; n < num; ++n) { 78 | for (int ichannel = 0; ichannel < channels; ++ichannel) { 79 | float mean = (*para_mean)[ichannel] * scale; 80 | float var = sqrt((*para_var)[ichannel] * scale + epsilon_); 81 | for (int i = 0; i < size; ++i, ++offset) { 82 | dst_head[offset] = ((*input)[offset] - mean) / var; 83 | } 84 | } 85 | } 86 | output->CopyData(num, channels, height, width, dst_head); 87 | delete[] dst_head; 88 | CheckOutput(); 89 | } 90 | 91 | REGISTER_NET_CLASS(Bn); 92 | -------------------------------------------------------------------------------- /FaceIdentification/src/inner_product_net.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Zining Xu(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "inner_product_net.h" 33 | #include "math_functions.h" 34 | 35 | void InnerProductNet::SetUp() { 36 | // check input and output blob size 37 | this->input_blobs().resize(1); 38 | this->output_blobs().resize(1); 39 | this->input_plugs().resize(1); 40 | this->output_plugs().resize(1); 41 | this->params().resize(1); 42 | } 43 | 44 | void InnerProductNet::Execute() { 45 | CheckInput(); 46 | const Blob* const input = this->input_blobs(0); // src_num * vec_len 47 | const Blob* const weight = this->params(0); // dst_channels * vec_len 48 | Blob* const output = this->output_blobs(0); // src_num * dst_channels 49 | 50 | int src_num = input->num(); 51 | int src_channels = input->channels(); 52 | int src_h = input->height(); 53 | int src_w = input->width(); 54 | int dst_channels = weight->num(); 55 | 56 | LOG(DEBUG) << "input blob: (" <data().get(); 62 | for (int sn = 0, didx = 0; sn < src_num; ++sn) { 63 | const float* weight_data = weight->data().get(); 64 | for (int dc = 0; dc < dst_channels; ++dc) { 65 | dst_head[didx++] = simd_dot(src_data, weight_data, vec_len); 66 | weight_data += vec_len; 67 | } // for dc 68 | 69 | src_data += vec_len; 70 | } // for sn 71 | 72 | output->CopyData(src_num, dst_channels, 1, 1, dst_head); 73 | delete[] dst_head; 74 | LOG(DEBUG) << "output blob: (" << output->num() << "," << output->channels() 75 | << "," << output->height() << "," << output->width() << ")"; 76 | CheckOutput(); 77 | } 78 | 79 | REGISTER_NET_CLASS(InnerProduct); 80 | -------------------------------------------------------------------------------- /FaceIdentification/src/log.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "log.h" 33 | #ifdef _WIN32 34 | #include "windows.h" 35 | #endif 36 | 37 | ViplLog::~ViplLog() { 38 | #ifdef __VIPL_LOG__ 39 | #ifdef _WIN32 40 | std::string out_str = my_cout_.str(); 41 | std::string sys_cmd = "color 0"; 42 | std::string log_color_str = "LOG_COLOR_"; 43 | std::size_t s_idx = 0, p = out_str.find(log_color_str); 44 | std::size_t log_color_str_size = log_color_str.size(); 45 | while (p != std::string::npos) { 46 | std::cout << out_str.substr(s_idx, p - s_idx); 47 | HANDLE hdl = GetStdHandle(STD_OUTPUT_HANDLE); 48 | WORD f_color; 49 | if (out_str[p + log_color_str_size] == 'R') { 50 | f_color = FOREGROUND_RED; 51 | } 52 | else if (out_str[p + log_color_str_size] == 'G') { 53 | f_color = FOREGROUND_GREEN; 54 | } 55 | else if (out_str[p + log_color_str_size] == 'W') { 56 | f_color = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; 57 | } 58 | else if (out_str[p + log_color_str_size] == 'Y') { 59 | f_color = FOREGROUND_RED | FOREGROUND_GREEN; 60 | } 61 | SetConsoleTextAttribute(hdl, f_color | FOREGROUND_INTENSITY); 62 | s_idx = p + log_color_str_size + 1; 63 | p = out_str.find(log_color_str, s_idx); 64 | } 65 | std::cout << out_str.substr(s_idx) << std::endl; 66 | #else 67 | std::cout << my_cout_.str() << std::endl; 68 | #endif // _WIN32 69 | #endif // __VIPL_LOG__ 70 | } 71 | -------------------------------------------------------------------------------- /FaceIdentification/src/math_functions.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Zining Xu(a M.S. supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "math_functions.h" 33 | #include 34 | #include 35 | 36 | #ifdef _WIN32 37 | #include 38 | #else 39 | #include 40 | #endif 41 | 42 | float simd_dot(const float* x, const float* y, const long& len) { 43 | float inner_prod = 0.0f; 44 | __m128 X, Y; // 128-bit values 45 | __m128 acc = _mm_setzero_ps(); // set to (0, 0, 0, 0) 46 | float temp[4]; 47 | 48 | long i; 49 | for (i = 0; i + 4 < len; i += 4) { 50 | X = _mm_loadu_ps(x + i); // load chunk of 4 floats 51 | Y = _mm_loadu_ps(y + i); 52 | acc = _mm_add_ps(acc, _mm_mul_ps(X, Y)); 53 | } 54 | _mm_storeu_ps(&temp[0], acc); // store acc into an array 55 | inner_prod = temp[0] + temp[1] + temp[2] + temp[3]; 56 | 57 | // add the remaining values 58 | for (; i < len; ++i) { 59 | inner_prod += x[i] * y[i]; 60 | } 61 | return inner_prod; 62 | } 63 | 64 | void matrix_procuct(const float* A, const float* B, float* C, const int n, 65 | const int m, const int k, bool ta, bool tb) { 66 | #ifdef _BLAS 67 | arma::fmat mA = ta ? arma::fmat(A, k, n).t() : arma::fmat(A, n, k); 68 | arma::fmat mB = tb ? arma::fmat(B, m, k).t() : arma::fmat(B, k, m); 69 | arma::fmat mC(C, n, m, false); 70 | mC = mA * mB; 71 | #else 72 | CHECK_TRUE(ta && !tb); 73 | const float* x = B; 74 | for (int i = 0, idx = 0; i < m; ++i) { 75 | const float* y = A; 76 | for (int j = 0; j < n; ++j, ++idx) { 77 | C[idx] = simd_dot(x, y, k); 78 | y += k; 79 | } 80 | x += k; 81 | } 82 | #endif 83 | } 84 | -------------------------------------------------------------------------------- /FaceIdentification/src/net.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "net.h" 33 | 34 | Net::Net() { 35 | nets_.clear(); 36 | 37 | input_blobs_.clear(); 38 | output_blobs_.clear(); 39 | 40 | input_plugs_.clear(); 41 | output_plugs_.clear(); 42 | 43 | father_ = nullptr; 44 | } 45 | 46 | Net::~Net() { 47 | nets_.clear(); 48 | 49 | input_blobs_.clear(); 50 | output_blobs_.clear(); 51 | 52 | input_plugs_.clear(); 53 | output_plugs_.clear(); 54 | 55 | params_.clear(); 56 | } 57 | 58 | void Net::SetUp() { 59 | input_blobs_.clear(); 60 | output_blobs_.clear(); 61 | 62 | input_plugs_.clear(); 63 | output_plugs_.clear(); 64 | 65 | nets_.clear(); 66 | 67 | params_.clear(); 68 | } 69 | 70 | void Net::Execute() { 71 | // 1. check input blobs 72 | CheckInput(); 73 | // 2. execute 74 | for (int i = 0; i < nets_.size(); ++ i) { 75 | nets_[i]->Execute(); 76 | } 77 | // 3. check output blobs 78 | CheckOutput(); 79 | } 80 | 81 | void Net::CheckInput() { 82 | for (int i = 0; i < input_blobs_.size(); ++ i) { 83 | if (input_blobs_[i].data() == nullptr) { 84 | LOG(INFO) << "Net input haven't been initialized completely!"; 85 | exit(0); 86 | } 87 | } 88 | } 89 | 90 | void Net::CheckOutput() { 91 | for (int i = 0; i < input_blobs_.size(); ++ i) { 92 | input_blobs_[i].Release(); 93 | } 94 | for (int i = 0; i < output_blobs_.size(); ++ i) { 95 | // connecting output plugs 96 | for (std::vector::iterator blob = output_plugs_[i].begin(); 97 | blob != output_plugs_[i].end(); ++ blob) { 98 | (*blob)->SetData(output_blobs_[i]); 99 | } 100 | // release output blobs 101 | if (output_plugs_[i].size() != 0) { 102 | output_blobs_[i].Release(); 103 | } 104 | } 105 | } 106 | 107 | -------------------------------------------------------------------------------- /FaceIdentification/src/pad_net.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of the open-source SeetaFace engine, which includes three modules: 4 | * SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification. 5 | * 6 | * This file is part of the SeetaFace Identification module, containing codes implementing the 7 | * face identification method described in the following paper: 8 | * 9 | * 10 | * VIPLFaceNet: An Open Source Deep Face Recognition SDK, 11 | * Xin Liu, Meina Kan, Wanglong Wu, Shiguang Shan, Xilin Chen. 12 | * In Frontiers of Computer Science. 13 | * 14 | * 15 | * Copyright (C) 2016, Visual Information Processing and Learning (VIPL) group, 16 | * Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China. 17 | * 18 | * The codes are mainly developed by Wanglong Wu(a Ph.D supervised by Prof. Shiguang Shan) 19 | * 20 | * As an open-source face recognition engine: you can redistribute SeetaFace source codes 21 | * and/or modify it under the terms of the BSD 2-Clause License. 22 | * 23 | * You should have received a copy of the BSD 2-Clause License along with the software. 24 | * If not, see < https://opensource.org/licenses/BSD-2-Clause>. 25 | * 26 | * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems. 27 | * 28 | * Note: the above information must be kept whenever or wherever the codes are used. 29 | * 30 | */ 31 | 32 | #include "pad_net.h" 33 | 34 | #include 35 | 36 | void PadNet::SetUp() { 37 | left_ = right_ = bottom_ = top_ = *(int*)(this->hyper_param()->param("pad")); 38 | // check input and output blob size 39 | this->nets().resize(0); 40 | this->params().resize(0); 41 | this->input_blobs().resize(1); 42 | this->output_blobs().resize(1); 43 | this->input_plugs().resize(1); 44 | this->output_plugs().resize(1); 45 | } 46 | 47 | void PadNet::Execute() { 48 | CheckInput(); 49 | const Blob* const input = this->input_blobs(0); 50 | Blob* const output = this->output_blobs(0); 51 | int src_w = input->width(); 52 | int src_h = input->height(); 53 | int num = input->num(); 54 | int channels = input->channels(); 55 | 56 | LOG(DEBUG) << "input blob: (" << num << "," << channels << "," << src_h 57 | << "," << src_w << ")"; 58 | 59 | int dst_w = src_w + left_ + right_; 60 | int dst_h = src_h + top_ + bottom_; 61 | 62 | int height = std::min(src_h, dst_h); 63 | int width = std::min(src_w, dst_w); 64 | 65 | output->reshape(num, channels, dst_h, dst_w); 66 | 67 | float* const data = new float[num * channels * dst_h * dst_w](); 68 | 69 | for (int n = 0; n < num; ++ n) { 70 | int src_off = input->offset(n), dst_off = output->offset(n); 71 | for (int c = 0; c < channels; ++ c) { 72 | if (top_ < 0 && left_ < 0) { 73 | src_off = input->offset(n, c, -top_, -left_); 74 | } 75 | else if(top_ >= 0 && left_ >= 0) { 76 | dst_off = output->offset(n, c, top_, left_); 77 | } 78 | else { 79 | LOG(ERROR) << "Illegal padding parameters!"; 80 | exit(0); 81 | } 82 | for (int h = 0; h < height; ++ h) { 83 | memcpy(data + dst_off, input->data().get() + src_off, 84 | sizeof(float) * width); 85 | src_off += src_w; 86 | dst_off += dst_w; 87 | } 88 | } 89 | } 90 | output->CopyData(num, channels, dst_h, dst_w, data); 91 | delete[] data; 92 | CheckOutput(); 93 | } 94 | 95 | REGISTER_NET_CLASS(Pad); 96 | -------------------------------------------------------------------------------- /FaceIdentification/src/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory (. SRC_LIST) 2 | 3 | message(${SRC_LIST}) 4 | 5 | # add external libraries 6 | find_package(OpenCV REQUIRED) 7 | 8 | enable_testing () 9 | foreach (f ${SRC_LIST}) 10 | string(REGEX REPLACE "[.]cpp" ".bin" BIN ${f}) 11 | add_executable(${BIN} ${f}) 12 | target_link_libraries(${BIN} viplnet ${OpenCV_LIBS}) 13 | endforeach () 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Visual Information Processing and Learning (VIPL) group, 2 | Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## SeetaFace Engine 2 | 3 | [![License](https://img.shields.io/badge/license-BSD-blue.svg)](LICENSE) 4 | 5 | ### Description 6 | 7 | **SeetaFace Engine** is an open source C++ face recognition engine, which can run on CPU with no third-party dependence. It contains three key parts, i.e., **SeetaFace Detection**, **SeetaFace Alignment** and **SeetaFace Identification**, which are necessary and sufficient for building a real-world face recognition applicaiton system. 8 | 9 | * SeetaFace Detection implements a funnel-structured (FuSt) cascade schema for real-time multi-view face detection, which achieves a good trade-off between detection accuracy and speed. State of the art accuracy can be achieved on the public dataset [FDDB](http://vis-www.cs.umass.edu/fddb/) in high speed. See [SeetaFace Detection](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceDetection) for more details. 10 | 11 | * SeetaFace Alignment cascades several stacked auto-encoder networks to detect landmarks in real time (more than 200 fps on a single I7 desktop CPU), and achieves the state-of-the-art accuracy at least on some public datasets [AFLW](http://lrs.icg.tugraz.at/research/aflw/). See [SeetaFace Alignment](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceAlignment) for more details. 12 | 13 | * SeetaFace Identification is a modification of AlexNet CNN for face recognition, with better performance in terms of both accuracy (97.1% on [LFW] (http://vis-www.cs.umass.edu/lfw/) and speed (about 120ms on a single I7 desktop CPU). See [SeetaFace Identification](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceIdentification) for more details. 14 | 15 | This face recognition engine is developed by Visual Information Processing and Learning (VIPL) group, Institute of Computing Technology, Chinese Academy of Sciences. The codes are written in C++ without dependence on any 3rd-party libraries. The open source is now released under BSD-2 license (see [LICENSE](LICENSE) for details), which means the codes can be used freely for both acedemic purpose and industrial products. 16 | 17 | If you meet problems when using SeetaFace Engine, you may seek help from [Configuration Documentation](./SeetaFace_config.docx). 18 | 19 | ### Contact Info 20 | 21 | If you have any problem on SeetaFace Engine, please contact us by sending email to SeetaFace@vipl.ict.ac.cn. 22 | If Seetaface can not meet your business needs, please contact business@seetatech.com for business cooperation. For more AI services, please visit SeetaTech official website: http://www.seetatech.com. 23 | 24 | SeetaTech is a start-up company with the focus on computer vision technology, whose founding team comes from Visual Information Processing and Learning (VIPL) group, Institute of Computing Technology, Chinese Academy of Sciences. We have always been adhering to the development principle of "open source striving to develop AI", promoting the rapid integration of Artificial Intelligence and other industries. 25 | 26 | ### Other Documentation 27 | 28 | * [SeetaFace Detection](./FaceDetection/README.md) 29 | * [SeetaFace Alignment](./FaceAlignment/README.md) 30 | * [SeetaFace Identification](./FaceIdentification/README.md) -------------------------------------------------------------------------------- /SeetaFace_config.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seetaface/SeetaFaceEngine/6068307b9ddc7ec1c6130dbe3f85a170be760225/SeetaFace_config.docx --------------------------------------------------------------------------------