From 5ad8f89815f16f47ca89d58e89ac0667fd56e10f Mon Sep 17 00:00:00 2001 From: liusiyang Date: Mon, 19 Oct 2026 17:40:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=88=86=E7=B1=BB=E6=B7=BB=E5=8A=A0panel?= =?UTF-8?q?=EF=BC=8C=E5=88=86=E7=B1=BB=E5=88=86=E6=95=B0=E4=B8=8D=E5=81=9A?= =?UTF-8?q?softmax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIEngineModule/src/AIModel_Impl.cpp | 4 ++-- AlgorithmModule/include/AICommonDefine.h | 2 ++ AlgorithmModule/src/ImgCheckAnalysisy.cpp | 12 +++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/AIEngineModule/src/AIModel_Impl.cpp b/AIEngineModule/src/AIModel_Impl.cpp index faeb525..476c2db 100644 --- a/AIEngineModule/src/AIModel_Impl.cpp +++ b/AIEngineModule/src/AIModel_Impl.cpp @@ -600,8 +600,8 @@ int AIModel_Impl::F2softmaxId(float *data, int class_num, float *fmaxScore) std::vector output(cls_num); for (int i = 0; i < output.size(); i++) { - float outi = (float)exp(data[i]) / (float)total; - output[i] = outi; + // float outi = (float)exp(data[i]) / (float)total; + output[i] = data[i]; // 不做softmax处理(模型已经做了) // output.push_back(outi); // std::cout<<"output["<cls_score); + std::string strclassName = AI_CLass_QX_NAME_Names[cls_num]; + m_pdetlog->AddCheckstr(PrintLevel_1, "AI Class num", "%d = %s %f\n", cls_num, strclassName.c_str(), result->cls_score); // 分类存图 开启。 if (m_pbaseCheckFunction->saveImg.bSaveClsImg) @@ -2186,7 +2189,7 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType) { // 无对应缺陷类型时返回 CONFIG_QX_NAME_count(缺陷列表已移除 other) - int resultError_type = CONFIG_QX_NAME_count; + int resultError_type = AI_CLass_QX_NAME_Panel; switch (nAIQXType) { case AI_CLass_QX_NAME_PIN_PoSun: @@ -2210,6 +2213,9 @@ int ImgCheckAnalysisy::AIClassTypeToConfigType(int nAIQXType) case AI_CLass_QX_NAME_C_BianXing: resultError_type = CONFIG_QX_NAME_C_BianXing; break; + case AI_CLass_QX_NAME_Panel: + resultError_type = CONFIG_QX_NAME_Panel; + break; default: break; }