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 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 19:38:57 +10:00
co-authored by Claude Opus 5
parent b5a88b9335
commit c9ff9ee2f3
+16 -16
View File
@@ -731,7 +731,7 @@ int ANSVISTest() {
//std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\ANSVIS_Issues\\face.mp4"; //std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\ANSVIS_Issues\\face.mp4";
//std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\TestFR\\Face31.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"; //std::string videoFilePath = "E:\\Programs\\DemoAssets\\Videos\\TestFR\\school1.mp4";// "C:\\ProgramData\\ANSCENTER\\Shared\\classroom.mp4";
const char* configFilePath = ""; const char* configFilePath = "";
@@ -1619,13 +1619,13 @@ int InsertFace(std::string databaseFilePath, std::string recognizerFilePath, std
} }
int TestCompleteFR1() { 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 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 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\\Original.jpg";
std::string imageFile = "E:\\Programs\\DemoAssets\\Images\\Face\\61.png"; std::string imageFile = "C:\\Programs\\DemoAssets\\OIP.jpg";
//InsertUser(databaseFilePath, recognizerFilePath, facedetectorFilePath,"0001","Tien"); InsertUser(databaseFilePath, recognizerFilePath, facedetectorFilePath,"0001","Tien");
InsertFace(databaseFilePath, recognizerFilePath, facedetectorFilePath, imageFile); InsertFace(databaseFilePath, recognizerFilePath, facedetectorFilePath, imageFile);
std::cout << "End of program.\n"; 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 // Sets CUDA_VISIBLE_DEVICES before the first CUDA call in this process, so
// the CUDA runtime only enumerates the chosen physical GPU (it becomes // the CUDA runtime only enumerates the chosen physical GPU (it becomes
// device 0 inside the process). // device 0 inside the process).
for (int i = 1; i + 1 < argc; ++i) { //for (int i = 1; i + 1 < argc; ++i) {
if (std::string(argv[i]) == "--gpu") { // if (std::string(argv[i]) == "--gpu") {
_putenv_s("CUDA_VISIBLE_DEVICES", argv[i + 1]); // _putenv_s("CUDA_VISIBLE_DEVICES", argv[i + 1]);
std::cout << "==============================================\n" // std::cout << "==============================================\n"
<< " GPU BISECT: CUDA_VISIBLE_DEVICES=" << argv[i + 1] << "\n" // << " GPU BISECT: CUDA_VISIBLE_DEVICES=" << argv[i + 1] << "\n"
<< " (only this physical GPU is visible to CUDA)\n" // << " (only this physical GPU is visible to CUDA)\n"
<< "==============================================" << std::endl; // << "==============================================" << std::endl;
} // }
} //}
//FaceDetectorTest(); //FaceDetectorTest();
//TestFaceRecognition(); //TestFaceRecognition();
//TestCompleteFR1(); //TestCompleteFR1();
ANSVISTest();
//ANSVISImageTest(); //ANSVISImageTest();
ANSVISTest(); //ANSVISTest();
//ANSVISTestFilePlayer(); //ANSVISTestFilePlayer();
// ANSVISRecordingTest(); // ANSVISRecordingTest();
//FRStressTest(); //FRStressTest();