mirror of
https://github.com/deepinsight/insightface.git
synced 2026-07-15 17:48:59 +00:00
Update inspireface to 1.2.0
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user