[go: up one dir, main page]

TWI813522B - Classification Model Building Method - Google Patents

Classification Model Building Method Download PDF

Info

Publication number
TWI813522B
TWI813522B TW111149014A TW111149014A TWI813522B TW I813522 B TWI813522 B TW I813522B TW 111149014 A TW111149014 A TW 111149014A TW 111149014 A TW111149014 A TW 111149014A TW I813522 B TWI813522 B TW I813522B
Authority
TW
Taiwan
Prior art keywords
classification model
training
category
preset
classification
Prior art date
Application number
TW111149014A
Other languages
Chinese (zh)
Other versions
TW202427226A (en
Inventor
黃侯瑋
Original Assignee
悟智股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 悟智股份有限公司 filed Critical 悟智股份有限公司
Priority to TW111149014A priority Critical patent/TWI813522B/en
Application granted granted Critical
Publication of TWI813522B publication Critical patent/TWI813522B/en
Publication of TW202427226A publication Critical patent/TW202427226A/en

Links

Images

Landscapes

  • Geophysics And Detection Of Objects (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Image Analysis (AREA)

Abstract

一種分類模型建立方法,由一電腦裝置來實施,包含以下步驟:(A)根據多筆訓練資料之多張訓練影像及多個類別標記,利用一神經網路演算法建立一用以分類一影像之類別的分類模型;(B)根據該分類模型,利用一神經網路可視化演算法,產生多張分別對應該等訓練影像的熱力圖,每一熱力圖具有一相關於該分類模型的模型感興趣區域;(C)產生多筆校正資料,每一校正資料包括對應該等訓練影像之其中一者的熱力圖,及對應該等訓練影像之其中該者的訓練感興趣區域位置標註;及(D)根據該等校正資料訓練該分類模型,以調整該分類模型之模型感興趣區域。A method for establishing a classification model, implemented by a computer device, includes the following steps: (A) Based on multiple training images and multiple category tags of multiple training data, use a neural network algorithm to create a model for classifying an image Classification model of the category; (B) According to the classification model, a neural network visualization algorithm is used to generate multiple heat maps corresponding to the training images. Each heat map has a model of interest related to the classification model. area; (C) generate multiple correction data, each correction data includes a heat map corresponding to one of the training images, and a training area of interest position annotation corresponding to one of the training images; and (D) ) train the classification model based on the correction data to adjust the model area of interest of the classification model.

Description

分類模型建立方法Classification model building method

本發明是有關於一種模型建立方法,特別是指一種分類模型建立方法。The present invention relates to a method for establishing a model, in particular to a method for establishing a classification model.

半導體、面板(LED)、手機等電子產品製造過程中,零組件難免會出現不同程度的缺陷,例如產生在電路板及液晶面板上的孔洞、割痕、裂紋、錯位等,均會嚴重影響產品性能。During the manufacturing process of electronic products such as semiconductors, panels (LEDs), and mobile phones, components will inevitably have varying degrees of defects, such as holes, cuts, cracks, and misalignments on circuit boards and LCD panels, which will seriously affect the products. performance.

過往,為了判斷缺陷,傳統的檢測方式為人工目視檢視法,但人員需在強光照明下以顯微鏡進行,不僅對檢測人員的眼睛傷害很大、檢測人員常因視力老化無法勝任工作,人員流動率高,且存在不同檢測員判斷缺陷的主觀性以及效率低的缺點,難以滿足高速、高解析度的檢測要求。In the past, in order to judge defects, the traditional inspection method was manual visual inspection. However, personnel needed to use a microscope under strong light illumination, which not only caused great harm to the eyes of the inspectors, but also often caused inspection personnel to be unable to perform their work due to aging eyesight, resulting in personnel turnover. The rate is high, and there are disadvantages such as the subjectivity of different inspectors in judging defects and low efficiency, making it difficult to meet the high-speed and high-resolution inspection requirements.

為解決上述問題,中華民國專利公告號I694250提供一種表面缺陷偵測方法,其主要技術為執行一深度學習演算法以從一影像中選取多個定界框及輸出關聯於這些定界框的多個特徵參數,其中每個定界框中包含該表面之一可能缺陷,再根據該等定界框及該等特徵參數執行一分類判定演算法,以判斷該表面是否符合一規格,其中所述的深度學習演算法例如採用區域基礎的卷積神經網路(Region-based Convolutional Neural Network,R-CNN)經事先訓練得到的缺陷偵測模型。In order to solve the above problems, the Republic of China Patent Announcement No. I694250 provides a surface defect detection method. Its main technology is to execute a deep learning algorithm to select multiple bounding boxes from an image and output multiple bounding boxes associated with these bounding boxes. characteristic parameters, where each bounding box contains a possible defect of the surface, and then a classification determination algorithm is executed based on the bounding boxes and the characteristic parameters to determine whether the surface meets a specification, wherein The deep learning algorithm uses a defect detection model that has been trained in advance using a Region-based Convolutional Neural Network (R-CNN).

然而,用以分類出缺陷類別的缺陷偵測模型僅是根據訓練影像及對應的訓練參數,以現有的監督式學習演算法進行訓練,其中訓練參數包括具有缺陷之訓練影像標註的樣本定界框及對應的缺陷類型標籤,其準確率有所限制。However, the defect detection model used to classify defect types is only trained with the existing supervised learning algorithm based on the training images and corresponding training parameters. The training parameters include sample bounding boxes annotated with the training images with defects. and corresponding defect type labels, whose accuracy is limited.

因此,本發明的目的,即在提供一種提高模型準確率的分類模型建立方法。Therefore, the purpose of the present invention is to provide a method for establishing a classification model that improves model accuracy.

於是,本發明分類模型建立方法,由一電腦裝置來實施,該電腦裝置儲存有多筆訓練資料,每一訓練資料包括一訓練影像、一對應該訓練影像的訓練類別標註,及一對應該訓練影像的訓練感興趣區域位置標註,該方法包含一步驟(A)、一步驟(B)、一步驟(C),及(D)。Therefore, the classification model establishment method of the present invention is implemented by a computer device that stores a plurality of training data. Each training data includes a training image, a pair of training category annotations of the training image, and a pair of training data. The method includes a step (A), a step (B), a step (C), and (D) for position labeling of training regions of interest in images.

在該步驟(A)中,該電腦裝置根據該等訓練資料之訓練影像及類別標記,利用一神經網路演算法,建立一用以分類一影像之類別的分類模型。In the step (A), the computer device uses a neural network algorithm to establish a classification model for classifying an image category based on the training images and category labels of the training data.

在該步驟(B)中,該電腦裝置根據該分類模型,利用一神經網路可視化演算法,產生多張分別對應該等訓練影像的熱力圖,每一熱力圖具有一相關於該分類模型的模型感興趣區域。In step (B), the computer device uses a neural network visualization algorithm to generate a plurality of heat maps corresponding to the training images based on the classification model. Each heat map has a heat map related to the classification model. Model area of interest.

在該步驟(C)中,該電腦裝置產生多筆校正資料,每一校正資料包括對應該等訓練影像之其中一者的熱力圖,及對應該等訓練影像之其中該者的訓練感興趣區域位置標註。In this step (C), the computer device generates a plurality of correction data. Each correction data includes a heat map corresponding to one of the training images, and a training area of interest corresponding to the one of the training images. Location annotation.

在該步驟(D)中,該電腦裝置根據該等訓練資料及該等校正資料訓練該分類模型,以調整該分類模型之模型感興趣區域。In the step (D), the computer device trains the classification model based on the training data and the correction data to adjust the model area of interest of the classification model.

本發明之功效在於:藉由該電腦裝置建立該分類模型後,再產生包括該等熱力圖的該等校正資料,並根據該等校正資料調整該分類模型之模型感興趣區域,以提高該分類模型的準確率。The effect of the present invention is to: after establishing the classification model through the computer device, the correction data including the heat maps are generated, and the model interest area of the classification model is adjusted according to the correction data to improve the classification. The accuracy of the model.

在本發明被詳細描述之前,應當注意在以下的說明內容中,類似的元件是以相同的編號來表示。Before the present invention is described in detail, it should be noted that in the following description, similar elements are designated with the same numbering.

參閱圖1,用來實施本發明分類模型建立方法的一實施例的一電腦裝置1,包含一儲存單元11及一電連接該儲存單元11的處理單元12。Referring to FIG. 1 , a computer device 1 used to implement an embodiment of the classification model building method of the present invention includes a storage unit 11 and a processing unit 12 electrically connected to the storage unit 11 .

該儲存單元11儲存多筆訓練資料及多筆測試資料,每一訓練資料包括一相關於一物件的訓練影像、一對應該訓練影像的訓練類別標註,及一對應該訓練影像的訓練感興趣區域位置標註。該訓練/測試類別標註包括一正常標註、一破損標註、一刮傷標註、一裂紋標註、一異物標註,及一沾汙標註,該訓練/測試感興趣區域位置標註為該物件的缺陷區域,若該物件為正常,該訓練/測試感興趣區域位置標註則為空,但不以此為限。The storage unit 11 stores a plurality of training data and a plurality of test data. Each training data includes a training image related to an object, a pair of training category annotations of the training image, and a pair of training regions of interest of the training image. Location annotation. The training/test category annotations include a normal annotation, a damaged annotation, a scratch annotation, a crack annotation, a foreign matter annotation, and a contamination annotation, and the training/testing area of interest is annotated as the defective area of the object, If the object is normal, the training/testing region of interest position label will be empty, but it is not limited to this.

參閱圖1及圖2,說明了該電腦裝置1如何執行本發明分類模型建立方法之該實施例,該實施例包含以下步驟。Referring to Figures 1 and 2, it is described how the computer device 1 executes this embodiment of the classification model building method of the present invention. This embodiment includes the following steps.

在步驟21中,該處理單元12根據該等訓練資料之訓練影像及類別標記,利用一神經網路演算法,建立一用以分類一影像之類別的分類模型。值得注意的是,在本實施例中,該神經網路演算法例如為卷積神經網路(Convolutional Neural Network, CNN),但不以此為限。In step 21 , the processing unit 12 uses a neural network algorithm to establish a classification model for classifying an image category based on the training images and category labels of the training data. It is worth noting that in this embodiment, the neural network algorithm is, for example, a convolutional neural network (CNN), but it is not limited to this.

搭配參閱圖3,以下說明步驟21包括的子步驟211~215。With reference to Figure 3, the sub-steps 211~215 included in step 21 are described below.

在子步驟211中,對於每一訓練影像,該處理單元12利用一預設分類模型,根據該訓練影像產生一第一分類結果。在本實施例中,該預設分類模型例如為最後一層的softmax函數改為sigmoid函數的Inception-ResNet-V2,但不以此為限。In sub-step 211, for each training image, the processing unit 12 uses a preset classification model to generate a first classification result based on the training image. In this embodiment, the preset classification model is, for example, Inception-ResNet-V2 in which the softmax function of the last layer is changed to a sigmoid function, but it is not limited to this.

在子步驟212中,該處理單元12根據對應該等訓練影像的第一分類結果及訓練類別標註,利用一第一損失函數計算出一第一類別誤差值。In sub-step 212, the processing unit 12 uses a first loss function to calculate a first category error value based on the first classification results and training category annotations corresponding to the training images.

值得注意的是,在本實施例中,該第一損失函數可為任意的損失函數,例如均方誤差(Mean square error, MSE)、平均絕對值誤差(Mean absolute error MAE)等損失函數。It is worth noting that in this embodiment, the first loss function can be any loss function, such as mean square error (Mean square error, MSE), mean absolute error MAE, and other loss functions.

在子步驟213中,該處理單元12根據該第一類別誤差值,判定該預設分類模型是否收斂。當該處理單元12判定出該預設分類模型不收斂時,流程進行子步驟214;而當該處理單元12判定出該預設分類模型收斂時,則流程進行子步驟215。In sub-step 213, the processing unit 12 determines whether the preset classification model converges according to the first category error value. When the processing unit 12 determines that the preset classification model does not converge, the process proceeds to sub-step 214; and when the processing unit 12 determines that the preset classification model converges, the process proceeds to sub-step 215.

在子步驟214中,該處理單元12調整該預設分類模型,並重複步驟211~213直到收斂。In sub-step 214, the processing unit 12 adjusts the preset classification model and repeats steps 211 to 213 until convergence.

在子步驟215中,該處理單元12將該預設分類模型作為該分類模型。In sub-step 215, the processing unit 12 uses the preset classification model as the classification model.

在步驟22中,該處理單元12根據該分類模型,利用一神經網路可視化演算法,產生多張分別對應該等訓練影像的熱力圖,每一熱力圖具有一相關於該分類模型的模型感興趣區域。In step 22, the processing unit 12 uses a neural network visualization algorithm to generate a plurality of heat maps corresponding to the training images according to the classification model. Each heat map has a model sense related to the classification model. area of interest.

值得注意的是,在本實施例中,該神經網路可視化演算法例如為梯度加權類別活化映射改良(Gradient-weighted Class Activation Mapping++, Grad-CAM++)演算法,根據該分類模型最後幾層的卷積(convolution)的特徵圖(feature map)獲得該等熱力圖,但不以此為限。It is worth noting that in this embodiment, the neural network visualization algorithm is, for example, the Gradient-weighted Class Activation Mapping++ (Grad-CAM++) algorithm. According to the volumes of the last few layers of the classification model, The heat map is obtained by using a feature map of convolution, but is not limited to this.

在步驟23中,該處理單元12產生多筆校正資料,每一校正資料包括對應該等訓練影像之其中一者的熱力圖,及對應該等訓練影像之其中該者的訓練感興趣區域位置標註。In step 23 , the processing unit 12 generates a plurality of correction data. Each correction data includes a heat map corresponding to one of the training images, and a training region of interest position annotation corresponding to the one of the training images. .

在步驟24中,該處理單元12根據該等校正資料訓練該分類模型,以調整該分類模型之模型感興趣區域。In step 24 , the processing unit 12 trains the classification model according to the correction data to adjust the model region of interest of the classification model.

搭配參閱圖4,以下說明步驟24包括的子步驟241~242。With reference to Figure 4, the sub-steps 241~242 included in step 24 are described below.

在子步驟241中,該處理單元12根據該等校正資料,利用一第二損失函數,計算出一位置誤差值及一第二類別誤差值。In sub-step 241, the processing unit 12 uses a second loss function to calculate a position error value and a second category error value based on the correction data.

值得注意的是,在本實施例中,該第二損失函數可為異於該第一損失函數的任意損失函數,該處理單元12利用該神經網路可視化演算法可微分且能反向傳播的特性計算出該位置誤差值及該第二類別誤差值。It is worth noting that in this embodiment, the second loss function can be any loss function different from the first loss function. The processing unit 12 uses the neural network visualization algorithm to be differentiable and capable of backpropagation. The characteristic calculates the position error value and the second type error value.

在子步驟242中,該處理單元12根據該第二類別誤差值及該位置誤差,利用一遷移式學習(Transfer Learning)演算法訓練該分類模型。In sub-step 242, the processing unit 12 uses a transfer learning algorithm to train the classification model according to the second category error value and the position error.

在步驟25中,該處理單元12根據該等測試資料判定該分類模型是否到達一預設標準。當該處理單元12判定出該分類模型未到達該預設標準時,結束流程;當該處理單元12判定出該分類模型未到達該預設標準時,則流程進行步驟26。In step 25, the processing unit 12 determines whether the classification model reaches a preset standard based on the test data. When the processing unit 12 determines that the classification model does not reach the preset standard, the process ends; when the processing unit 12 determines that the classification model does not reach the preset standard, the process proceeds to step 26.

值得注意的是,在本實施例中,該預設標準例如為該分類模型的準確率(Accuracy)大於一預設門檻值,在其他實施例亦可為該分類模型的精確率(Precision)、召回率(Recall)、F1分數(F1 Score)、及/或ROC曲線下面積(Area under the Curve of ROC, AUC ROC)大於各自對應的預設門檻值,不以此為限。It is worth noting that in this embodiment, the preset standard is, for example, that the accuracy of the classification model is greater than a preset threshold. In other embodiments, the preset standard can also be the accuracy of the classification model, The recall rate (Recall), F1 score (F1 Score), and/or area under the Curve of ROC (AUC ROC) are greater than their corresponding preset thresholds, but are not limited to this.

搭配參閱圖5,以下說明步驟25包括的子步驟251~253。With reference to Figure 5, the sub-steps 251~253 included in step 25 are described below.

在子步驟251中,對於每一測試資料的測試影像,該處理單元12利用該分類模型根據該測試影像產生一第二分類結果。In sub-step 251, for each test image of the test data, the processing unit 12 uses the classification model to generate a second classification result based on the test image.

在子步驟252中,該處理單元12根據該等測試影像對應的第二分類結果及測試類別標註計算出一準確率。In sub-step 252, the processing unit 12 calculates an accuracy rate based on the second classification results and test category annotations corresponding to the test images.

在子步驟253中,該處理單元12判定該準確率是否大於一預設門檻值,以判定該分類模型是否到達該預設標準。當該處理單元12判定出該準確率大於該預設門檻值,判定該分類模型到達該預設標準。In sub-step 253, the processing unit 12 determines whether the accuracy rate is greater than a preset threshold to determine whether the classification model reaches the preset standard. When the processing unit 12 determines that the accuracy rate is greater than the preset threshold, it is determined that the classification model reaches the preset standard.

在步驟26中,該處理單元12調整該第一損失函數及該第二損失函數,並根據該位置誤差值及該第二類別誤差值計算出一相關於該位置誤差值及該第二類別誤差值的參數閾值。In step 26, the processing unit 12 adjusts the first loss function and the second loss function, and calculates a correlation between the position error value and the second type error based on the position error value and the second type error value. Parameter threshold for value.

在步驟27中,該處理單元12根據該第一損失函數、該第二損失函數,及該參數閾值調整該分類模型,並重複步驟25直到該分類模型到達該預設標準。In step 27 , the processing unit 12 adjusts the classification model according to the first loss function, the second loss function, and the parameter threshold, and repeats step 25 until the classification model reaches the preset standard.

值得注意的是,在本實施例中,在步驟25會先判定該分類模型是否到達該預設標準,若未到達該預設標準,該處理單元12會調整該第一損失函數及該第二損失函數,並根據該位置誤差值及該第二類別誤差值計算出該參數閾值後,再重新調整該分類模型,以確保該分類模型的準確率,其他實施方式中,可僅執行步驟21~24,不以此為限。It is worth noting that in this embodiment, in step 25, it will first be determined whether the classification model reaches the preset standard. If it does not reach the preset standard, the processing unit 12 will adjust the first loss function and the second loss function. The loss function is calculated, and the parameter threshold is calculated based on the position error value and the second category error value, and then the classification model is re-adjusted to ensure the accuracy of the classification model. In other implementations, only steps 21~ 24, not limited to this.

要特別注意的是,在該分類模型調整完成後,使用該分類模型判定一相關於一待測物件的待測影像時,亦可使用該神經網路可視化演算法獲得一對應該待測影像的熱力圖,以讓使用者不僅可以根據該分類模型輸出的分類結果得知該待測物件的類別外,亦可根據該熱力圖快速知道該待測物件的缺陷區域。It is important to note that after the classification model is adjusted, when using the classification model to determine a test image related to an object to be tested, the neural network visualization algorithm can also be used to obtain a pair of images to be tested. The heat map allows users to not only know the category of the object to be tested based on the classification results output by the classification model, but also to quickly know the defective areas of the object to be tested based on the heat map.

綜上所述,本發明分類模型建立方法,藉由該處理單元12建立該分類模型後,再產生包括該等熱力圖的該等校正資料,並根據該等校正資料調整該分類模型之模型感興趣區域,以提高該分類模型的準確率,此外,該分類模型不需要該等訓練資料的該等訓練感興趣區域位置標註進行訓練學習,該處理單元12利用該神經網路可視化演算法直接獲得包括模型感興趣區域的熱力圖,相較於需要根據界定框進行訓練學習的前案,本案的分類模型架構較為簡單,且預測速度較為快速,故確實能達成本發明的目的。In summary, the classification model establishment method of the present invention uses the processing unit 12 to establish the classification model, then generates the correction data including the heat maps, and adjusts the model sense of the classification model based on the correction data. The region of interest is used to improve the accuracy of the classification model. In addition, the classification model does not require the position annotation of the training region of interest of the training data for training and learning. The processing unit 12 uses the neural network visualization algorithm to directly obtain Including the heat map of the model's area of interest, compared to the previous case that required training and learning based on the bounding box, the classification model structure of this case is relatively simple, and the prediction speed is relatively fast, so it can indeed achieve the purpose of the present invention.

惟以上所述者,僅為本發明的實施例而已,當不能以此限定本發明實施的範圍,凡是依本發明申請專利範圍及專利說明書內容所作的簡單的等效變化與修飾,皆仍屬本發明專利涵蓋的範圍內。However, the above are only examples of the present invention and should not be used to limit the scope of the present invention. All simple equivalent changes and modifications made based on the patent scope of the present invention and the content of the patent specification are still within the scope of the present invention. within the scope covered by the patent of this invention.

1:電腦裝置 11:儲存單元 12:處理單元 21~27:步驟 211~215:子步驟 241~242:子步驟 251~253:子步驟 1: Computer device 11:Storage unit 12: Processing unit 21~27: Steps 211~215: Sub-steps 241~242: Sub-steps 251~253: Sub-steps

本發明的其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中: 圖1是一方塊圖,說明用以實施本發明分類模型建立方法的一實施例的一電腦裝置; 圖2是一流程圖,說明本發明分類模型建立方法的該實施例; 圖3是一流程圖,輔助說明圖2步驟21的子步驟; 圖4是一流程圖,輔助說明圖2步驟24的子步驟;及 圖5是一流程圖,輔助說明圖2步驟25的子步驟。 Other features and effects of the present invention will be clearly presented in the embodiments with reference to the drawings, in which: Figure 1 is a block diagram illustrating a computer device used to implement an embodiment of the classification model building method of the present invention; Figure 2 is a flow chart illustrating this embodiment of the classification model establishment method of the present invention; Figure 3 is a flow chart to assist in explaining the sub-steps of step 21 in Figure 2; Figure 4 is a flow chart to assist in explaining the sub-steps of step 24 in Figure 2; and FIG. 5 is a flow chart to assist in explaining the sub-steps of step 25 in FIG. 2 .

21~27:步驟 21~27: Steps

Claims (4)

一種分類模型建立方法,由一電腦裝置來實施,該電腦裝置儲存有多筆訓練資料,每一訓練資料包括一訓練影像、一對應該訓練影像的訓練類別標註,及一對應該訓練影像的訓練感興趣區域位置標註,該方法包含以下步驟:(A)根據該等訓練資料之訓練影像及類別標記,利用一神經網路演算法,建立一用以分類一影像之類別的分類模型;(B)根據該分類模型,利用一神經網路可視化演算法,產生多張分別對應該等訓練影像的熱力圖,每一熱力圖具有一相關於該分類模型的模型感興趣區域;(C)產生多筆校正資料,每一校正資料包括對應該等訓練影像之其中一者的熱力圖,及對應該等訓練影像之其中該者的訓練感興趣區域位置標註;及(D)根據該等校正資料訓練該分類模型,以調整該分類模型之模型感興趣區域,步驟(D)包括以下子步驟:(D-1)根據該等校正資料,利用一第二損失函數,計算出一位置誤差值及一第二類別誤差值,及(D-2)根據該第二類別誤差值及該位置誤差利用一遷移式學習演算法訓練該分類模型。 A method for establishing a classification model is implemented by a computer device. The computer device stores a plurality of training data. Each training data includes a training image, a pair of training category annotations corresponding to the training image, and a pair of training data corresponding to the training image. Region of interest position annotation, the method includes the following steps: (A) Based on the training images and category labels of the training data, use a neural network algorithm to establish a classification model for classifying the category of an image; (B) According to the classification model, a neural network visualization algorithm is used to generate multiple heat maps corresponding to the training images. Each heat map has a model area of interest related to the classification model; (C) Generating multiple strokes Correction data, each correction data including a heat map corresponding to one of the training images, and a training area of interest position annotation corresponding to one of the training images; and (D) training the correction data based on the correction data Classification model to adjust the model area of interest of the classification model. Step (D) includes the following sub-steps: (D-1) Based on the correction data, use a second loss function to calculate a position error value and a first two categories of error values, and (D-2) using a transfer learning algorithm to train the classification model based on the second category error values and the position error. 如請求項1所述的分類模型建立方法,其中,步驟(A)包括以下子步驟:(A-1)對於每一訓練影像,利用一預設分類模型根據該訓練影像產生一第一分類結果; (A-2)根據對應該等訓練影像的第一分類結果及訓練類別標註,利用一第一損失函數計算出一第一類別誤差值;(A-3)根據該第一類別誤差值判定該預設分類模型是否收斂;(A-4)當判定出該預設分類模型不收斂時,調整該預設分類模型,重複子步驟(A-1)~(A-3)直到收斂;及(A-5)當判定出該預設分類模型收斂時,將該預設分類模型作為該分類模型。 The method for establishing a classification model as described in claim 1, wherein step (A) includes the following sub-steps: (A-1) for each training image, use a preset classification model to generate a first classification result based on the training image ; (A-2) Use a first loss function to calculate a first category error value based on the first classification results and training category annotations corresponding to the training images; (A-3) Determine the first category error value based on the first category error value Whether the preset classification model converges; (A-4) When it is determined that the preset classification model does not converge, adjust the preset classification model and repeat sub-steps (A-1) ~ (A-3) until convergence; and ( A-5) When it is determined that the preset classification model has converged, the preset classification model is used as the classification model. 如請求項1所述的分類模型建立方法,該電腦裝置還儲存有多筆測試資料,每一測試資料包括一測試影像、一對應該測試影像的測試類別標註,及一對應該測試影像的測試感興趣區域位置標註,在步驟(D)之後還包含以下步驟:(E)根據該等測試資料判定該分類模型是否到達一預設標準;(F)當判定出該分類模型未到達該預設標準時,調整該第一損失函數及該第二損失函數,並根據該位置誤差值及該第二類別誤差值計算出一相關於該位置誤差值及該第二類別誤差值的參數閾值;及(G)根據該第一損失函數、該第二損失函數,及該參數閾值調整該分類模型,並重複步驟(E)直到該分類模型到達該預設標準。 According to the classification model building method described in claim 1, the computer device also stores a plurality of test data. Each test data includes a test image, a pair of test category annotations of the test image, and a pair of tests of the test image. The location labeling of the region of interest also includes the following steps after step (D): (E) Determining whether the classification model reaches a preset standard based on the test data; (F) When it is determined that the classification model does not reach the preset standard When standard, adjust the first loss function and the second loss function, and calculate a parameter threshold related to the position error value and the second type error value based on the position error value and the second type error value; and ( G) Adjust the classification model according to the first loss function, the second loss function, and the parameter threshold, and repeat step (E) until the classification model reaches the preset standard. 如請求項3所述的分類模型建立方法,其中,步驟(E)包括以下子步驟: (E-1)對於每一測試資料的測試影像,利用該分類模型根據該測試影像產生一第二分類結果;(E-2)根據該等測試影像對應的第二分類結果及測試類別標註計算出一準確率;及(E-3)判定該準確率是否大於一預設門檻值,以判定該分類模型是否到達該預設標準,當判定出該準確率大於該預設門檻值判定該分類模型到達該預設標準。 The method for establishing a classification model as described in claim 3, wherein step (E) includes the following sub-steps: (E-1) For each test image of the test data, use the classification model to generate a second classification result based on the test image; (E-2) Calculate based on the second classification result and test category label corresponding to the test image Determine an accuracy rate; and (E-3) determine whether the accuracy rate is greater than a preset threshold value to determine whether the classification model reaches the preset standard. When it is determined that the accuracy rate is greater than the preset threshold value, determine the classification The model reaches this preset standard.
TW111149014A 2022-12-20 2022-12-20 Classification Model Building Method TWI813522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111149014A TWI813522B (en) 2022-12-20 2022-12-20 Classification Model Building Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111149014A TWI813522B (en) 2022-12-20 2022-12-20 Classification Model Building Method

Publications (2)

Publication Number Publication Date
TWI813522B true TWI813522B (en) 2023-08-21
TW202427226A TW202427226A (en) 2024-07-01

Family

ID=88586081

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111149014A TWI813522B (en) 2022-12-20 2022-12-20 Classification Model Building Method

Country Status (1)

Country Link
TW (1) TWI813522B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190108420A1 (en) * 2017-05-14 2019-04-11 International Business Machines Corporation Systems and methods for identifying a target object in an image
CN111126379A (en) * 2019-11-22 2020-05-08 苏州浪潮智能科技有限公司 A target detection method and device
TW202127312A (en) * 2019-12-31 2021-07-16 大陸商鄭州富聯智能工坊有限公司 Image processing method and computer readable medium thereof
CN114037830A (en) * 2021-11-10 2022-02-11 深圳市联影高端医疗装备创新研究院 Training method for enhanced image generation model, image processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190108420A1 (en) * 2017-05-14 2019-04-11 International Business Machines Corporation Systems and methods for identifying a target object in an image
CN111126379A (en) * 2019-11-22 2020-05-08 苏州浪潮智能科技有限公司 A target detection method and device
TW202127312A (en) * 2019-12-31 2021-07-16 大陸商鄭州富聯智能工坊有限公司 Image processing method and computer readable medium thereof
CN114037830A (en) * 2021-11-10 2022-02-11 深圳市联影高端医疗装备创新研究院 Training method for enhanced image generation model, image processing method and device

Also Published As

Publication number Publication date
TW202427226A (en) 2024-07-01

Similar Documents

Publication Publication Date Title
CN110658198B (en) Optical detection method, optical detection device and optical detection system
CN112070134B (en) Power equipment image classification method, device, power equipment and storage medium
CN117974595A (en) A circuit board defect detection method and system using image processing technology
TW202141027A (en) Method and system for classifying defects in wafer using wafer-defect images, based on deep learning
CN113409245A (en) Automatic identification method for X-ray inspection defects of electronic components
CN103500459B (en) Printed circuit board defect detecting method based on regularization parameters
CN112053317A (en) Workpiece surface defect detection method based on cascade neural network
CN101915769A (en) An automatic optical inspection method for resistive components in printed circuit boards
CN118534302B (en) Circuit board positioning tool detection system based on artificial intelligence
TWI618940B (en) Device and method for detecting blind hole of printed circuit board
TWI715051B (en) Machine learning method and automatic optical inspection device using the method thereof
TWI798650B (en) Automated optical inspection method, automated optical inspection system and storage medium
CN116309509A (en) Solder joint defect detection method, device, electronic device and readable storage medium
CN116152244A (en) SMT defect detection method and system
CN116934737A (en) A method for identifying and classifying weld combination defects
TWI813522B (en) Classification Model Building Method
CN118071733A (en) PCB bare board defect detection method based on improved YOLOv8 neural network
CN111598858B (en) A detection method and system for rubber gloves based on migration learning
CN116881530A (en) Device surface defect detection system based on deep learning
CN112053357A (en) FPN-based steel surface flaw detection method
JP7015235B2 (en) Range-based real-time scanning electron microscope invisible binner
Ma et al. Automated void detection in high resolution x-ray printed circuit boards (PCBs) images with deep segmentation neural network
TWI856420B (en) Lead frame delivery method
CN116245802B (en) Electronic component defect identification method and device based on convolutional neural network
Yu et al. Enhancing IC substrate manufacturing through differential geometry and lightweight networks for etching defect detection