Update test app

This commit is contained in:
2026-05-03 16:30:39 +10:00
parent 4214507e3b
commit fa6d95de82
+9 -9
View File
@@ -570,8 +570,8 @@ int ANSLPR_OD_FolderInferences_Test() {
boost::property_tree::ptree pt;
ANSCENTER::ANSALPR* infHandle = nullptr;
std::string licenseKey = "";
std::string modelZipFile ="C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSALPR\\ServerOptimised\\ANS_ALPR_v1.2_NVIDIAGeForceRTX4070LaptopGPU.zip";//"C:\\Projects\\ANSVIS\\Models\\ANS_ALPR_v1.3.zip";//"
std::string folderPath = "E:\\Programs\\DemoAssets\\ImageSeries\\ALPR character M\\EventDebug_20260419_162612.661";
std::string modelZipFile ="C:\\Projects\\ANSVIS\\Models\\ANS_ALPR_v1.3.zip";//""C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSALPR\\ServerOptimised\\ANS_ALPR_v1.2_NVIDIAGeForceRTX4070LaptopGPU.zip";//
std::string folderPath = "E:\\Programs\\DemoAssets\\ImageSeries\\ALPR character M";
int engineType = 1;
double detectionThreshold = 0.3;
@@ -596,7 +596,7 @@ int ANSLPR_OD_FolderInferences_Test() {
std::vector<std::filesystem::path> imageFiles;
const std::set<std::string> imageExts = { ".jpg", ".jpeg", ".png", ".bmp" };
for (const auto& entry : std::filesystem::directory_iterator(folderPath)) {
for (const auto& entry : std::filesystem::recursive_directory_iterator(folderPath)) {
if (!entry.is_regular_file()) continue;
std::string ext = entry.path().extension().string();
std::transform(ext.begin(), ext.end(), ext.begin(),
@@ -605,7 +605,7 @@ int ANSLPR_OD_FolderInferences_Test() {
}
std::sort(imageFiles.begin(), imageFiles.end());
std::cout << "Scanning folder: " << folderPath << std::endl;
std::cout << "Scanning folder (recursive): " << folderPath << std::endl;
std::cout << "Found " << imageFiles.size() << " image(s)." << std::endl;
int totalDetections = 0;
@@ -5040,7 +5040,7 @@ int ALPR_OCR_FolderInferences_Test() {
std::string modelZipFile = "C:\\ProgramData\\ANSCENTER\\ANSVIS Server\\ANSALPR\\ANS_GenericALPR_v2.0.zip";
// Same folder ANSLPR_OD_FolderInferences_Test scans.
std::string folderPath = "E:\\Programs\\DemoAssets\\ImageSeries\\ALPR character M\\EventDebug_20260419_151452.608";
std::string folderPath = "E:\\Programs\\DemoAssets\\ImageSeries\\ALPR character M";
int engineType = 2; // 2 = ANSALPR_OCR (Paddle-based OCR pipeline)
double detectionThreshold = 0.3;
@@ -5085,7 +5085,7 @@ int ALPR_OCR_FolderInferences_Test() {
std::vector<std::filesystem::path> imageFiles;
const std::set<std::string> imageExts = { ".jpg", ".jpeg", ".png", ".bmp" };
for (const auto& entry : std::filesystem::directory_iterator(folderPath)) {
for (const auto& entry : std::filesystem::recursive_directory_iterator(folderPath)) {
if (!entry.is_regular_file()) continue;
std::string ext = entry.path().extension().string();
std::transform(ext.begin(), ext.end(), ext.begin(),
@@ -5094,7 +5094,7 @@ int ALPR_OCR_FolderInferences_Test() {
}
std::sort(imageFiles.begin(), imageFiles.end());
std::cout << "Scanning folder: " << folderPath << std::endl;
std::cout << "Scanning folder (recursive): " << folderPath << std::endl;
std::cout << "Found " << imageFiles.size() << " image(s)." << std::endl;
// Step 5: Run inference per image.
@@ -5187,7 +5187,7 @@ int main()
// (ServerOptimised\ANS_ALPR_v1.2_NVIDIAGeForceRTX4070LaptopGPU.zip) that
// doesn't exist on AMD/Intel machines. Re-enable after fixing the path
// at line 573 if you need the OD folder test.
ANSLPR_OD_FolderInferences_Test();
//ANSLPR_OD_FolderInferences_Test();
//ANSLPR_OD_VideoTest();
//ANSLPR_BigSize_VideoTest();
//ANSLPR_CPU_VideoTest();
@@ -5202,7 +5202,7 @@ int main()
//ANSLPR_OD_CPU_VideoTest();
//ALPR_OCR_Test();
//ALPR_OCR_VideoTest();
//ALPR_OCR_FolderInferences_Test();
ALPR_OCR_FolderInferences_Test();
//ALPR_Helmet_Parallel_VideoTest(); // ANSVIS sim: ALPR + Helmet on same FilePlayer
return 0;