mirror of
https://github.com/deepinsight/insightface.git
synced 2026-07-22 06:30:59 +00:00
Update InspireFace to 1.1.6
This commit is contained in:
@@ -58,17 +58,17 @@ int main(int argc, char* argv[]) {
|
||||
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(packPath, "value")["--pack_path"]("The specified path to the pack file");
|
||||
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(packPath, "value")["--pack_path"]("The specified path to the pack file");
|
||||
|
||||
// Set combined CLI to the session
|
||||
session.cli(cli);
|
||||
|
||||
// Parse command line arguments
|
||||
int returnCode = session.applyCommandLine(argc, argv);
|
||||
if (returnCode != 0) // Indicate an error
|
||||
if (returnCode != 0) // Indicate an error
|
||||
return returnCode;
|
||||
|
||||
if (!testDir.empty()) {
|
||||
@@ -84,12 +84,15 @@ int main(int argc, char* argv[]) {
|
||||
SET_PACK_NAME(pack);
|
||||
fullPath = GET_MODEL_FILE();
|
||||
TEST_PRINT("Updated global Pack to: {}", TEST_MODEL_FILE);
|
||||
SET_RUNTIME_FULLPATH_NAME(fullPath);
|
||||
} else if (!packPath.empty()) {
|
||||
fullPath = packPath;
|
||||
TEST_PRINT("Updated global Pack File to: {}", packPath);
|
||||
SET_RUNTIME_FULLPATH_NAME(packPath);
|
||||
} else {
|
||||
fullPath = GET_MODEL_FILE();
|
||||
TEST_PRINT("Using default global Pack: {}", TEST_MODEL_FILE);
|
||||
SET_RUNTIME_FULLPATH_NAME(fullPath);
|
||||
}
|
||||
|
||||
std::cout << fullPath << std::endl;
|
||||
@@ -102,5 +105,8 @@ int main(int argc, char* argv[]) {
|
||||
// Set log level
|
||||
HFSetLogLevel(HF_LOG_INFO);
|
||||
|
||||
return session.run();
|
||||
ret = session.run();
|
||||
HFTerminateInspireFace();
|
||||
HFDeBugShowResourceStatistics();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user