mirror of
https://github.com/deepinsight/insightface.git
synced 2026-07-13 16:04:48 +00:00
Update InspireFace to 1.0.1
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include "unit/test_helper/simple_csv_writer.h"
|
||||
#include "unit/test_helper/test_help.h"
|
||||
#include "unit/test_helper/test_tools.h"
|
||||
#include "limonp/StringUtil.hpp"
|
||||
|
||||
TEST_CASE("test_Evaluation", "[face_evaluation") {
|
||||
DRAW_SPLIT_LINE
|
||||
@@ -53,7 +52,7 @@ TEST_CASE("test_Evaluation", "[face_evaluation") {
|
||||
|
||||
|
||||
SECTION("Test LFW evaluation") {
|
||||
#ifdef ENABLE_TEST_EVALUATION
|
||||
#ifdef ISF_ENABLE_TEST_EVALUATION
|
||||
HResult ret;
|
||||
HFSessionCustomParameter parameter = {0};
|
||||
parameter.enable_recognition = 1;
|
||||
@@ -88,9 +87,9 @@ TEST_CASE("test_Evaluation", "[face_evaluation") {
|
||||
person1 = pair[0];
|
||||
imgNum1 = std::stoi(pair[1]);
|
||||
imgNum2 = std::stoi(pair[2]);
|
||||
imgPath1 = limonp::PathJoin(limonp::PathJoin(getLFWFunneledDir(), person1),
|
||||
imgPath1 = PathJoin(PathJoin(getLFWFunneledDir(), person1),
|
||||
person1 + "_" + zfill(imgNum1, 4) + ".jpg");
|
||||
imgPath2 = limonp::PathJoin(limonp::PathJoin(getLFWFunneledDir(), person1),
|
||||
imgPath2 = PathJoin(PathJoin(getLFWFunneledDir(), person1),
|
||||
person1 + "_" + zfill(imgNum2, 4) + ".jpg");
|
||||
match = 1;
|
||||
} else {
|
||||
@@ -98,9 +97,9 @@ TEST_CASE("test_Evaluation", "[face_evaluation") {
|
||||
imgNum1 = std::stoi(pair[1]);
|
||||
person2 = pair[2];
|
||||
imgNum2 = std::stoi(pair[3]);
|
||||
imgPath1 = limonp::PathJoin(limonp::PathJoin(getLFWFunneledDir(), person1),
|
||||
imgPath1 = PathJoin(PathJoin(getLFWFunneledDir(), person1),
|
||||
person1 + "_" + zfill(imgNum1, 4) + ".jpg");
|
||||
imgPath2 = limonp::PathJoin(limonp::PathJoin(getLFWFunneledDir(), person2),
|
||||
imgPath2 = PathJoin(PathJoin(getLFWFunneledDir(), person2),
|
||||
person2 + "_" + zfill(imgNum2, 4) + ".jpg");
|
||||
match = 0;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ TEST_CASE("test_FaceTrack", "[face_track]") {
|
||||
}
|
||||
|
||||
SECTION("Face detection benchmark") {
|
||||
#ifdef ENABLE_BENCHMARK
|
||||
#ifdef ISF_ENABLE_BENCHMARK
|
||||
int loop = 1000;
|
||||
HResult ret;
|
||||
HFSessionCustomParameter parameter = {0};
|
||||
|
||||
@@ -117,7 +117,7 @@ TEST_CASE("test_FeatureManage", "[feature_manage]") {
|
||||
}
|
||||
|
||||
SECTION("Import a large faces data") {
|
||||
#ifdef ENABLE_USE_LFW_DATA
|
||||
#ifdef ISF_ENABLE_USE_LFW_DATA
|
||||
HResult ret;
|
||||
HFSessionCustomParameter parameter = {0};
|
||||
parameter.enable_recognition = 1;
|
||||
@@ -164,7 +164,7 @@ TEST_CASE("test_FeatureManage", "[feature_manage]") {
|
||||
}
|
||||
|
||||
SECTION("Faces feature CURD") {
|
||||
#ifdef ENABLE_USE_LFW_DATA
|
||||
#ifdef ISF_ENABLE_USE_LFW_DATA
|
||||
// This section needs to be connected to the "Import a large faces data" section before it can be executed
|
||||
HResult ret;
|
||||
HFSessionCustomParameter parameter = {0};
|
||||
@@ -315,6 +315,7 @@ TEST_CASE("test_FeatureManage", "[feature_manage]") {
|
||||
}
|
||||
|
||||
TEST_CASE("test_SearchTopK", "[feature_search_top_k]") {
|
||||
#ifdef ISF_ENABLE_USE_LFW_DATA
|
||||
DRAW_SPLIT_LINE
|
||||
TEST_PRINT_OUTPUT(true);
|
||||
|
||||
@@ -456,13 +457,14 @@ TEST_CASE("test_SearchTopK", "[feature_search_top_k]") {
|
||||
REQUIRE(ret == HSUCCEED);
|
||||
delete[]dbPathStr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST_CASE("test_FeatureBenchmark", "[feature_benchmark]") {
|
||||
|
||||
// Test the search time at 1k, 5k and 10k of the face library (the target face is at the back).
|
||||
SECTION("Search face benchmark from 1k") {
|
||||
#if defined(ENABLE_BENCHMARK) && defined(ENABLE_USE_LFW_DATA)
|
||||
#if defined(ISF_ENABLE_BENCHMARK) && defined(ISF_ENABLE_USE_LFW_DATA)
|
||||
size_t loop = 1000;
|
||||
size_t numOfNeedImport = 1000;
|
||||
HResult ret;
|
||||
@@ -555,7 +557,7 @@ TEST_CASE("test_FeatureBenchmark", "[feature_benchmark]") {
|
||||
}
|
||||
|
||||
SECTION("Search face benchmark from 5k") {
|
||||
#if defined(ENABLE_BENCHMARK) && defined(ENABLE_USE_LFW_DATA)
|
||||
#if defined(ISF_ENABLE_BENCHMARK) && defined(ISF_ENABLE_USE_LFW_DATA)
|
||||
size_t loop = 1000;
|
||||
size_t numOfNeedImport = 5000;
|
||||
HResult ret;
|
||||
@@ -648,7 +650,7 @@ TEST_CASE("test_FeatureBenchmark", "[feature_benchmark]") {
|
||||
}
|
||||
|
||||
SECTION("Search face benchmark from 10k") {
|
||||
#if defined(ENABLE_BENCHMARK) && defined(ENABLE_USE_LFW_DATA)
|
||||
#if defined(ISF_ENABLE_BENCHMARK) && defined(ISF_ENABLE_USE_LFW_DATA)
|
||||
size_t loop = 1000;
|
||||
size_t numOfNeedImport = 10000;
|
||||
HResult ret;
|
||||
@@ -778,7 +780,7 @@ TEST_CASE("test_FeatureBenchmark", "[feature_benchmark]") {
|
||||
}
|
||||
|
||||
SECTION("Face comparison benchmark") {
|
||||
#ifdef ENABLE_BENCHMARK
|
||||
#ifdef ISF_ENABLE_BENCHMARK
|
||||
int loop = 1000;
|
||||
HResult ret;
|
||||
std::string modelPath = GET_MODEL_FILE();
|
||||
@@ -885,7 +887,7 @@ TEST_CASE("test_FeatureBenchmark", "[feature_benchmark]") {
|
||||
}
|
||||
|
||||
SECTION("Face feature extract benchmark") {
|
||||
#ifdef ENABLE_BENCHMARK
|
||||
#ifdef ISF_ENABLE_BENCHMARK
|
||||
int loop = 1000;
|
||||
HResult ret;
|
||||
std::string modelPath = GET_MODEL_FILE();
|
||||
|
||||
@@ -11,7 +11,7 @@ TEST_CASE("test_HelpTools", "[help_tools]") {
|
||||
TEST_PRINT_OUTPUT(true);
|
||||
|
||||
SECTION("Load lfw funneled data") {
|
||||
#ifdef ENABLE_USE_LFW_DATA
|
||||
#ifdef ISF_ENABLE_USE_LFW_DATA
|
||||
HResult ret;
|
||||
HFSessionCustomParameter parameter = {0};
|
||||
parameter.enable_recognition = 1;
|
||||
|
||||
Reference in New Issue
Block a user