mirror of
https://github.com/deepinsight/insightface.git
synced 2026-07-30 20:37:49 +00:00
Update InspireFace to 1.1.2
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//
|
||||
// Created by tunm on 2023/10/11.
|
||||
//
|
||||
#include <string>
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
|
||||
#include <iostream>
|
||||
@@ -54,11 +55,13 @@ int main(int argc, char* argv[]) {
|
||||
// Pack file name and test directory
|
||||
std::string pack;
|
||||
std::string testDir;
|
||||
std::string packPath;
|
||||
|
||||
// Add command line options
|
||||
auto cli = session.cli()
|
||||
| Catch::clara::Opt(pack, "value")["--pack"]("Resource pack filename")
|
||||
| Catch::clara::Opt(testDir, "value")["--test_dir"]("Test dir resource");
|
||||
| Catch::clara::Opt(testDir, "value")["--test_dir"]("Test dir resource")
|
||||
| Catch::clara::Opt(packPath, "value")["--pack_path"]("The specified path to the pack file");
|
||||
|
||||
// Set combined CLI to the session
|
||||
session.cli(cli);
|
||||
@@ -75,15 +78,22 @@ int main(int argc, char* argv[]) {
|
||||
TEST_PRINT("Using default test dir: {}", getTestDataDir());
|
||||
}
|
||||
|
||||
std::string fullPath;
|
||||
// Check whether custom parameters are set
|
||||
if (!pack.empty()) {
|
||||
SET_PACK_NAME(pack);
|
||||
fullPath = GET_MODEL_FILE();
|
||||
TEST_PRINT("Updated global Pack to: {}", TEST_MODEL_FILE);
|
||||
} else if (!packPath.empty()) {
|
||||
fullPath = packPath;
|
||||
TEST_PRINT("Updated global Pack File to: {}", packPath);
|
||||
} else {
|
||||
fullPath = GET_MODEL_FILE();
|
||||
TEST_PRINT("Using default global Pack: {}", TEST_MODEL_FILE);
|
||||
}
|
||||
|
||||
auto ret = HFLaunchInspireFace(GET_MODEL_FILE().c_str());
|
||||
std::cout << fullPath << std::endl;
|
||||
auto ret = HFLaunchInspireFace(fullPath.c_str());
|
||||
if (ret != HSUCCEED) {
|
||||
spdlog::error("An error occurred while starting InspireFace: {}", ret);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user