|
|
|
|
@ -15,6 +15,10 @@
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
#include <cctype>
|
|
|
|
|
|
|
|
|
|
// AI缺陷分类模型开关:当前暂无分类模型(Class.engine),分类流程代码先预留;
|
|
|
|
|
// 待分类模型部署后,将 AI_CLASS_MODEL_ENABLE 置 1,即可恢复 AI_QX_Class_Thread 中的AI分类流程
|
|
|
|
|
#define AI_CLASS_MODEL_ENABLE 0
|
|
|
|
|
|
|
|
|
|
// 把手判定参数:
|
|
|
|
|
// 每个非空的"把手区域"附近都应该有一个把手:凸起宽高与该区域外接矩形宽高的比值落在下面范围内才算匹配
|
|
|
|
|
#define HANDLE_SIZE_MIN_RATIO 0.8f
|
|
|
|
|
@ -2066,6 +2070,21 @@ int ImgCheckAnalysisy::AI_QX_Class_Thread()
|
|
|
|
|
|
|
|
|
|
m_pdetlog->AddCheckstr(PrintLevel_1, DET_LOG_LEVEL_3, "QX_Class", " Start");
|
|
|
|
|
|
|
|
|
|
#if !AI_CLASS_MODEL_ENABLE
|
|
|
|
|
// 当前暂无AI分类模型(Class.engine):所有缺陷先统一按 铜箔标记(TBMark) 类型返回;
|
|
|
|
|
// 原AI分类流程代码先预留(见下方),待分类模型部署后置 AI_CLASS_MODEL_ENABLE 为 1 即可恢复
|
|
|
|
|
{
|
|
|
|
|
int defaultqx = AIClassTypeToConfigType(AI_CLass_QX_NAME_TBMark);
|
|
|
|
|
for (int i = 0; i < blobs.blobCount; i++)
|
|
|
|
|
{
|
|
|
|
|
blobs.blobTab[i].AIclasstype = defaultqx;
|
|
|
|
|
}
|
|
|
|
|
m_pdetlog->AddCheckstr(PrintLevel_1, DET_LOG_LEVEL_3, "QX_Class", " no class model, all %d qx -> TBMark(%d)", blobs.blobCount, defaultqx);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
#endif // !AI_CLASS_MODEL_ENABLE
|
|
|
|
|
|
|
|
|
|
// ==================== 以下为AI分类模型流程(模型未部署期间代码预留,勿删) ====================
|
|
|
|
|
std::shared_ptr<AIModel_Base> pAIDet;
|
|
|
|
|
// printf("=====>>>>AI_QX_Class_Thread m_strCurDetChannel %s \n", m_strCurDetChannel.c_str());
|
|
|
|
|
{
|
|
|
|
|
|