|
@@ -6,8 +6,19 @@
|
|
|
#include "ImageProcessor.h"
|
|
#include "ImageProcessor.h"
|
|
|
#include "SQLiteVecManager.h"
|
|
#include "SQLiteVecManager.h"
|
|
|
|
|
|
|
|
|
|
+#include "../tool/CSetting.h"
|
|
|
|
|
+#include "../tool/debuglog.h"
|
|
|
|
|
+
|
|
|
|
|
+#include <opencv2/opencv.hpp>
|
|
|
|
|
+
|
|
|
|
|
+#include <filesystem>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
int AITest()
|
|
int AITest()
|
|
|
{
|
|
{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
// 设置路径(可根据实际情况修改)
|
|
// 设置路径(可根据实际情况修改)
|
|
@@ -15,7 +26,11 @@ int AITest()
|
|
|
std::string classesPath = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\ai\\cls.names"; // 类别文件路径
|
|
std::string classesPath = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\ai\\cls.names"; // 类别文件路径
|
|
|
std::string galleryDir = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\images"; // 图库目录路径
|
|
std::string galleryDir = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\images"; // 图库目录路径
|
|
|
std::string searchImagePath = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\3.jpg"; // 搜索图片路径
|
|
std::string searchImagePath = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\3.jpg"; // 搜索图片路径
|
|
|
- std::string databasePath = "E:\\code\\zhipuzi\\zhipuzi_pos_windows\\res\\image_features.db"; // SQLite数据库路径
|
|
|
|
|
|
|
+
|
|
|
|
|
+ std::wstring folderPath = CSystem::GetProgramDir() + L"\\db\\image_features.db";
|
|
|
|
|
+ std::string databasePath = CLewaimaiString::UnicodeToUTF8(folderPath);
|
|
|
|
|
+
|
|
|
|
|
+ std::filesystem::remove(folderPath);
|
|
|
|
|
|
|
|
std::cout << "=== YOLO2026图像检索系统 (SQLite-Vec版本) ===" << std::endl;
|
|
std::cout << "=== YOLO2026图像检索系统 (SQLite-Vec版本) ===" << std::endl;
|
|
|
std::cout << "模型路径: " << modelPath << std::endl;
|
|
std::cout << "模型路径: " << modelPath << std::endl;
|