From c9ff9ee2f36456492a06e5504a9caff75d0d0282 Mon Sep 17 00:00:00 2001 From: Tuan Nghia Nguyen Date: Sat, 22 Aug 2026 19:38:57 +1000 Subject: [PATCH] ANSFR-UnitTest: point the harness at the local ANSVIS deployment Repoints the hardcoded fixtures at the installed ANSVIS Server layout rather than the old E:/C: DemoAssets trees: - classroom.mp4 now read from C:\ProgramData\ANSCENTER\Shared - TestCompleteFR1 loads the GPU-specific ServerOptimised zips (ANS_FaceRecognizer_v1.1_NVIDIAGeForceRTX4070LaptopGPU.zip) and re-enables the InsertUser call ahead of InsertFace - main() runs ANSVISTest() Also comments out the --gpu argument handling in main(), so the harness no longer sets CUDA_VISIBLE_DEVICES and the single-GPU bisect flag is inert until that block is restored. Paths remain machine-specific; this is a developer harness, not a test suite. Co-Authored-By: Claude Opus 5 --- tests/ANSFR-UnitTest/ANSFR-UnitTest.cpp | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/ANSFR-UnitTest/ANSFR-UnitTest.cpp b/tests/ANSFR-UnitTest/ANSFR-UnitTest.cpp index a7cd09c..303112b 100644 --- a/tests/ANSFR-UnitTest/ANSFR-UnitTest.cpp +++ b/tests/ANSFR-UnitTest/ANSFR-UnitTest.cpp @@ -731,7 +731,7 @@ int ANSVISTest() { //std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\ANSVIS_Issues\\face.mp4"; //std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\TestFR\\Face31.mp4"; - std::string videoFilePath = "C:\\Programs\\DemoAssets\\Videos\\classroom.mp4"; + std::string videoFilePath = "C:\\ProgramData\\ANSCENTER\\Shared\\classroom.mp4"; //std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\TestFR\\school1.mp4";// "C:\\ProgramData\\ANSCENTER\\Shared\\classroom.mp4"; const char* configFilePath = ""; @@ -1619,13 +1619,13 @@ int InsertFace(std::string databaseFilePath, std::string recognizerFilePath, std } int TestCompleteFR1() { - std::filesystem::path currentPath = "E:\\Programs\\DemoAssets"; + //std::filesystem::path currentPath = "E:\\Programs\\DemoAssets"; std::string databaseFilePath = "C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSFR\\ANSFR.db"; - std::string recognizerFilePath = "C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSFR\\ANS_FaceRecognizer_v1.1.zip"; + std::string recognizerFilePath = "C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSFR\\ServerOptimised\\ANS_FaceRecognizer_v1.1_NVIDIAGeForceRTX4070LaptopGPU.zip"; std::string facedetectorFilePath = "C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSFDET\\ServerOptimised\\ANS_GenericFD(GPU)_v1.0_NVIDIAGeForceRTX4070LaptopGPU.zip"; //std::string imageFile = "E:\\Programs\\DemoAssets\\Images\\Face\\Original.jpg"; - std::string imageFile = "E:\\Programs\\DemoAssets\\Images\\Face\\61.png"; - //InsertUser(databaseFilePath, recognizerFilePath, facedetectorFilePath,"0001","Tien"); + std::string imageFile = "C:\\Programs\\DemoAssets\\OIP.jpg"; + InsertUser(databaseFilePath, recognizerFilePath, facedetectorFilePath,"0001","Tien"); InsertFace(databaseFilePath, recognizerFilePath, facedetectorFilePath, imageFile); std::cout << "End of program.\n"; @@ -1722,22 +1722,22 @@ int main(int argc, char** argv) // Sets CUDA_VISIBLE_DEVICES before the first CUDA call in this process, so // the CUDA runtime only enumerates the chosen physical GPU (it becomes // device 0 inside the process). - for (int i = 1; i + 1 < argc; ++i) { - if (std::string(argv[i]) == "--gpu") { - _putenv_s("CUDA_VISIBLE_DEVICES", argv[i + 1]); - std::cout << "==============================================\n" - << " GPU BISECT: CUDA_VISIBLE_DEVICES=" << argv[i + 1] << "\n" - << " (only this physical GPU is visible to CUDA)\n" - << "==============================================" << std::endl; - } - } + //for (int i = 1; i + 1 < argc; ++i) { + // if (std::string(argv[i]) == "--gpu") { + // _putenv_s("CUDA_VISIBLE_DEVICES", argv[i + 1]); + // std::cout << "==============================================\n" + // << " GPU BISECT: CUDA_VISIBLE_DEVICES=" << argv[i + 1] << "\n" + // << " (only this physical GPU is visible to CUDA)\n" + // << "==============================================" << std::endl; + // } + //} //FaceDetectorTest(); //TestFaceRecognition(); //TestCompleteFR1(); - + ANSVISTest(); //ANSVISImageTest(); - ANSVISTest(); + //ANSVISTest(); //ANSVISTestFilePlayer(); // ANSVISRecordingTest(); //FRStressTest();