Update inspireface to 1.2.0

This commit is contained in:
Jingyu
2025-03-25 00:51:26 +08:00
parent 977ea6795b
commit ca64996b84
388 changed files with 28584 additions and 13036 deletions

View File

@@ -1,14 +1,15 @@
//
// Created by Tunm-Air13 on 2024/3/20.
//
/**
* Created by Jingyu Yan
* @date 2024-10-01
*/
#include <iostream>
#include "settings/test_settings.h"
#include "../test_helper/test_help.h"
TEST_CASE("test_HelpTools", "[help_tools]") {
DRAW_SPLIT_LINE
TEST_PRINT_OUTPUT(true);
DRAW_SPLIT_LINE
TEST_PRINT_OUTPUT(true);
SECTION("Load lfw funneled data") {
#ifdef ISF_ENABLE_USE_LFW_DATA
@@ -19,17 +20,17 @@ TEST_CASE("test_HelpTools", "[help_tools]") {
HFSession session;
ret = HFCreateInspireFaceSession(parameter, detMode, 3, -1, -1, &session);
REQUIRE(ret == HSUCCEED);
HFFeatureHubConfiguration configuration = {0};
HFFeatureHubConfiguration configuration;
auto dbPath = GET_SAVE_DATA(".test");
HString dbPathStr = new char[dbPath.size() + 1];
std::strcpy(dbPathStr, dbPath.c_str());
configuration.primaryKeyMode = HF_PK_AUTO_INCREMENT;
configuration.enablePersistence = 1;
configuration.dbPath = dbPathStr;
configuration.featureBlockNum = 20;
configuration.persistenceDbPath = dbPathStr;
configuration.searchMode = HF_SEARCH_MODE_EXHAUSTIVE;
configuration.searchThreshold = 0.48f;
// Delete the previous data before testing
if (std::remove(configuration.dbPath) != 0) {
if (std::remove(configuration.persistenceDbPath) != 0) {
spdlog::trace("Error deleting file");
}
ret = HFFeatureHubDataEnable(configuration);
@@ -46,8 +47,8 @@ TEST_CASE("test_HelpTools", "[help_tools]") {
REQUIRE(ret == HSUCCEED);
CHECK(count == numOfNeedImport);
// ret = HF_ViewFaceDBTable(session);
// REQUIRE(ret == HSUCCEED);
// ret = HF_ViewFaceDBTable(session);
// REQUIRE(ret == HSUCCEED);
// Finish
ret = HFReleaseInspireFaceSession(session);
@@ -56,7 +57,7 @@ TEST_CASE("test_HelpTools", "[help_tools]") {
ret = HFFeatureHubDataDisable();
REQUIRE(ret == HSUCCEED);
delete []dbPathStr;
delete[] dbPathStr;
#else
TEST_PRINT("The test case that uses LFW is not enabled, so it will be skipped.");