[go: up one dir, main page]

TWI877045B - Optimization method for defect detection model and electronic device - Google Patents

Optimization method for defect detection model and electronic device Download PDF

Info

Publication number
TWI877045B
TWI877045B TW113126099A TW113126099A TWI877045B TW I877045 B TWI877045 B TW I877045B TW 113126099 A TW113126099 A TW 113126099A TW 113126099 A TW113126099 A TW 113126099A TW I877045 B TWI877045 B TW I877045B
Authority
TW
Taiwan
Prior art keywords
range
optimized
model
defect
target
Prior art date
Application number
TW113126099A
Other languages
Chinese (zh)
Other versions
TW202603605A (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 TW113126099A priority Critical patent/TWI877045B/en
Application granted granted Critical
Publication of TWI877045B publication Critical patent/TWI877045B/en
Publication of TW202603605A publication Critical patent/TW202603605A/en

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides an optimization method for a defect detection model and an electronic device. The electronic device includes a processing device and a storage device electrically connected to the processing device. The processing device performs the optimization method, including: reading at least one negative sample training data, which has the same original image size; calculating an optimized segmentation range based on a target defect information; estimating an effective range of an overlapping area based on the optimized segmentation range; calculating a model segmentation quantity based on the original image size, the optimized segmentation range and the effective range to obtain an optimized modeling parameter; and applying the optimized modeling parameter to a defect detection model to perform model inference on at least one target image.

Description

瑕疵檢測模型之最佳化方法及電子裝置Defect detection model optimization method and electronic device

本案係有關一種瑕疵檢測模型之最佳化方法及對瑕疵檢測模型進行最佳化的電子裝置。This case is about a defect detection model optimization method and an electronic device for optimizing the defect detection model.

在人工智慧的製造領域中,為了盡可能地檢驗出所有瑕疵,高解析度與超高解析度影像普遍被使用。然而,將高解析度影像作為輸入來源,對於深度學習模型的訓練與推論均不利,會大幅增加使用之記憶體可能造成記憶體過載(Out-of-Memory,OOM)的問題,並延長預測時間、降低精準度等,導致模型無法達到使用者需求。In the field of artificial intelligence manufacturing, high-resolution and ultra-high-resolution images are widely used to detect all defects as much as possible. However, using high-resolution images as input sources is not conducive to the training and inference of deep learning models. It will greatly increase the memory used and may cause memory overload (Out-of-Memory, OOM) problems, extend prediction time, reduce accuracy, etc., resulting in the model failing to meet user needs.

目前針對高解析度影像作為深度學習模型之輸入通常有二種作法,一種是降低原始影像解析度,此種方式將解析度降低後容易造成微小或者細部瑕疵無法被偵測到。另一種則是將高解析度影像切分為數個低解析度影像,但此種作法會造成模型對於全域(global)或者較廣之特徵的分析能力下降,容易造成許多偽陽性(False Positive)的產生。There are two common approaches to using high-resolution images as input for deep learning models. One is to reduce the resolution of the original image, which can easily cause tiny or fine defects to be undetectable. The other is to split the high-resolution image into several low-resolution images, but this approach will reduce the model's ability to analyze global or broader features, and easily lead to many false positives.

本案提供一種瑕疵檢測模型之最佳化方法,包含:讀取至少一負樣本訓練資料,負樣本訓練資料係具有相同之一原始影像大小。根據一目標瑕疵資訊,計算出一最佳化分割範圍。根據最佳化分割範圍,推估一重複覆蓋區之一有效範圍。根據原始影像大小、最佳化分割範圍及有效範圍,計算出一模型分割數量,以得到一最佳化建模參數。將最佳化建模參數套用在一瑕疵檢測模型上,以對至少一目標影像進行模型推論。The present invention provides a defect detection model optimization method, comprising: reading at least one negative sample training data, the negative sample training data having the same original image size. According to a target defect information, an optimized segmentation range is calculated. According to the optimized segmentation range, an effective range of a repeated coverage area is estimated. According to the original image size, the optimized segmentation range and the effective range, a model segmentation quantity is calculated to obtain an optimized modeling parameter. The optimized modeling parameter is applied to a defect detection model to perform model inference on at least one target image.

本案另外提供一種電子裝置,包含一儲存裝置以及一處理裝置。一儲存裝置內儲存有至少一負樣本訓練資料及至少一目標影像,且負樣本訓練資料係具有相同之一原始影像大小。處理裝置電性連接儲存裝置,且內建有一瑕疵檢測模型,處理裝置執行下列步驟:根據一目標瑕疵資訊,計算出一最佳化分割範圍;根據最佳化分割範圍,推估一重複覆蓋區之一有效範圍;根據原始影像大小、最佳化分割範圍及有效範圍,計算出一模型分割數量,以得到一最佳化建模參數;將最佳化建模參數套用在瑕疵檢測模型上,以目標影像進行模型推論。The present invention further provides an electronic device, including a storage device and a processing device. A storage device stores at least one negative sample training data and at least one target image, and the negative sample training data has the same original image size. The processing device is electrically connected to the storage device and has a built-in defect detection model. The processing device performs the following steps: based on target defect information, an optimized segmentation range is calculated; based on the optimized segmentation range, an effective range of a repeated coverage area is estimated; based on the original image size, the optimized segmentation range and the effective range, a model segmentation quantity is calculated to obtain an optimized modeling parameter; the optimized modeling parameter is applied to the defect detection model, and the model is inferred using the target image.

綜上所述,本案提出一種瑕疵檢測模型之最佳化方法及電子裝置,其係採用目標瑕疵資訊,即可自動產生出最佳化建模參數來套用在瑕疵檢測模型上,不需要使用者自行決定需要降低多少解析度以及需要裁切成多少個低解析度影像,以降低預測時間並提高預測精準度,進而使瑕疵預測模型有效符合使用者需求。In summary, this case proposes a defect detection model optimization method and electronic device, which uses target defect information to automatically generate optimized modeling parameters to apply to the defect detection model. The user does not need to decide how much the resolution needs to be reduced and how many low-resolution images need to be cut, so as to reduce the prediction time and improve the prediction accuracy, thereby making the defect prediction model effectively meet the user's needs.

以下提出較佳實施例進行詳細說明,然而,實施例僅用以作為範例說明,並不會限縮本案欲保護之範圍。此外,實施例中的圖式省略部份元件,以清楚顯示本案的技術特點。在所有圖式中相同的標號將用於表示相同或相似的元件。The following is a detailed description of the preferred embodiments, however, the embodiments are only used as examples and do not limit the scope of protection of this case. In addition, some components are omitted in the drawings in the embodiments to clearly show the technical features of this case. The same reference numerals will be used to represent the same or similar components in all drawings.

請參閱圖1所示,一電子裝置10係包含一處理裝置12以及一儲存裝置14,處理裝置12電性連接至儲存裝置14,處理裝置12係內建有一瑕疵檢測模型16,且在儲存裝置14內係儲存有一張或多張負樣本訓練資料(正常圖片)以及一張或多張目標影像,在一實施例中,負樣本訓練資料係由使用者提供,且此負樣本訓練資料係可包含小幅度的旋轉或平移等資料的增強或誤差,但須保持每一負樣本訓練資料具有相同之一原始影像大小。處理裝置12會自儲存裝置14中讀取此負樣本訓練資料,並直接根據此負樣本訓練資料來進行瑕疵檢測模型16的最佳化,並根據目標影像進行模型推論與訓練。再者,電子裝置10更包含一圖形處理器18,圖形處理器18電性連接處理裝置12,當處理裝置12進行計算、推論或訓練時,圖形處理器18係協助處理裝置12進行相關運算處理,以透過圖形處理器18來輔助運算,加速整體運算速度。在一實施例中,電子裝置10係為一個人電腦、一筆記型電腦或是一平板電腦等可獨立進行人工智慧推論與訓練運算的設備,但本案不以此為限。Please refer to FIG. 1 , an electronic device 10 includes a processing device 12 and a storage device 14. The processing device 12 is electrically connected to the storage device 14. The processing device 12 has a built-in defect detection model 16, and the storage device 14 stores one or more negative sample training data (normal images) and one or more target images. In one embodiment, the negative sample training data is provided by the user, and the negative sample training data may include data enhancements or errors such as small rotations or translations, but each negative sample training data must have the same original image size. The processing device 12 reads the negative sample training data from the storage device 14, and directly optimizes the defect detection model 16 based on the negative sample training data, and performs model inference and training based on the target image. Furthermore, the electronic device 10 further includes a graphics processor 18, which is electrically connected to the processing device 12. When the processing device 12 performs calculations, inferences or training, the graphics processor 18 assists the processing device 12 in performing related calculations, so as to assist the calculations through the graphics processor 18 and accelerate the overall calculation speed. In one embodiment, the electronic device 10 is a personal computer, a laptop computer, or a tablet computer that can independently perform artificial intelligence inference and training operations, but the present invention is not limited thereto.

在一實施例中,處理裝置12係為一中央處理單元(central processing unit,CPU),或是其他一般用途或特殊用途的微處理器(microprocessor)、微控制器(microcontroller)、微控制單元(micro control unit,MCU)、數位信號處理器(digital signal processor,DSP)、可程式化控制器、特殊應用積體電路(application specific integrated circuit,ASIC),或其他類似元件或上述元件的組合,以進行整個演算法的運算,但本案不以此為限。In one embodiment, the processing device 12 is a central processing unit (CPU), or other general-purpose or special-purpose microprocessor, microcontroller, micro control unit (MCU), digital signal processor (DSP), programmable controller, application specific integrated circuit (ASIC), or other similar components or a combination of the above components to perform the operation of the entire algorithm, but the present invention is not limited to this.

在一實施例中,儲存裝置14可以是任何型態的固定式或可移動式的隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)、硬碟(hard disk drive,HDD)、固態硬碟(solid state drive,SSD)或其他類似元件或上述元件的組合,以用於儲存處理裝置12所需的任何模型或參數資料等,但本案不以此為限。In one embodiment, the storage device 14 can be any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, hard disk drive (HDD), solid state drive (SSD) or other similar components or a combination of the above components to store any model or parameter data required by the processing device 12, but the present case is not limited to this.

在電子裝置10中,處理裝置12係利用軟體方式來進行瑕疵檢測模型16之最佳化方法,請同時參閱圖1、圖2及圖3所示,如步驟S10所示,處理裝置12讀取至少一負樣本訓練資料20,此負樣本訓練資料20須保持同樣大小或調整為相同大小,以具有相同之原始影像大小。如步驟S12所示,根據一目標瑕疵資訊,處理裝置12計算出一最佳化分割範圍22,其中,目標瑕疵資訊係為使用者提供目標檢測出的一瑕疵大小範圍或一目標瑕疵影像及其瑕疵位置資訊,使用者可以決定於負樣本訓練資料20中預期想檢測出的瑕疵大小範圍或目標瑕疵影像及其瑕疵位置資訊。In the electronic device 10, the processing device 12 uses software to optimize the defect detection model 16. Please refer to FIG. 1, FIG. 2 and FIG. 3 at the same time. As shown in step S10, the processing device 12 reads at least one negative sample training data 20. The negative sample training data 20 must be kept the same size or adjusted to the same size to have the same original image size. As shown in step S12, the processing device 12 calculates an optimized segmentation range 22 based on a target defect information, wherein the target defect information provides a target defect size range or a target defect image and its defect location information for the user. The user can determine the defect size range or the target defect image and its defect location information expected to be detected in the negative sample training data 20.

在一實施例中,在步驟S12之計算出最佳化分割範圍22之步驟中,更進一步包含步驟S121及步驟S122。請同時參閱圖1、圖3及圖4所示,如步驟S121所示,處理裝置12根據一人工智慧模型,例如Backbone模型,計算出一感知範圍24之大小,詳言之,人工智慧模型係以一第一方程式: ,計算出感知範圍24,其中R為感知範圍24之大小,n為一模型捲積層數,s為一輸出層步長以及k為一輸出層捲積核大小,使處理裝置12透過Backbone模型執行第一方程式的運算而取得感知範圍24。然後如步驟S122所示,處理裝置12根據感知範圍24及目標瑕疵資訊,計算出最佳化分割範圍22,在此步驟中,處理裝置12係以一第二方程式: 計算出最佳化分割範圍22,其中S為最佳化分割範圍22,a為目標瑕疵資訊,在此係以最小的瑕疵範圍26為例,R為感知範圍24之大小以及N為一正整數,最佳化分割範圍22需能以感知範圍24來完整覆蓋瑕疵之特徵。並且,處理裝置12更可根據目標推論速度推估最佳化分割範圍22之長度H patch與最佳化分割範圍22之寬度W patch,以優化最佳化分割範圍22,當目標推論速度高時,將盡可能使用較大的最佳化分割範圍22(H patch*W patch);反之,當預期推論表現高時,則會選擇較小的最佳化分割範圍22,以提高偵測精準度。 In one embodiment, the step of calculating the optimal segmentation range 22 in step S12 further includes steps S121 and S122. Please refer to FIG. 1, FIG. 3 and FIG. 4 at the same time. As shown in step S121, the processing device 12 calculates the size of a perception range 24 according to an artificial intelligence model, such as a Backbone model. Specifically, the artificial intelligence model uses a first equation: , calculate the perception range 24, where R is the size of the perception range 24, n is the number of model convolution layers, s is an output layer step length and k is an output layer convolution kernel size, so that the processing device 12 obtains the perception range 24 by executing the operation of the first equation through the Backbone model. Then, as shown in step S122, the processing device 12 calculates the optimized segmentation range 22 according to the perception range 24 and the target defect information. In this step, the processing device 12 uses a second equation: The optimized segmentation range 22 is calculated, where S is the optimized segmentation range 22, a is the target defect information, here taking the smallest defect range 26 as an example, R is the size of the perception range 24, and N is a positive integer. The optimized segmentation range 22 needs to be able to completely cover the characteristics of the defect with the perception range 24. In addition, the processing device 12 can further estimate the length H patch of the optimized segmentation range 22 and the width W patch of the optimized segmentation range 22 according to the target inference speed to optimize the optimized segmentation range 22. When the target inference speed is high, a larger optimized segmentation range 22 (H patch *W patch ) will be used as much as possible; on the contrary, when the expected inference performance is high, a smaller optimized segmentation range 22 will be selected to improve the detection accuracy.

請同時參閱圖1、圖2及圖3所示,如步驟S14所示,根據此最佳化分割範圍22,處理裝置12推估一重複覆蓋(Overlapping)區28之一有效範圍。在取得最佳化分割範圍22及重複覆蓋區28之有效範圍之後,如步驟S16所示,處理裝置12根據原始影像大小、最佳化分割範圍22及有效範圍,計算出一模型分割數量,以得到一最佳化建模參數。其中,處理裝置12係以一第三方程式: 計算出模型分割數量,其中H ori為原始影像大小之長度,W ori為原始影像大小之寬度,H patch為最佳化分割範圍22之長度,W patch為最佳化分割範圍22之寬度,O為重複覆蓋區28之有效範圍,因此可以藉由第三方程式計算出作為最佳化建模參數之模型分割數量。最後,如步驟S18所示,將最佳化建模參數套用在一瑕疵檢測模型16上,處理裝置12自儲存裝置14讀取至少一目標影像,並將目標影像輸入至瑕疵檢測模型16中進行模型推論。當目標影像輸入至瑕疵檢測模型16中後,瑕疵檢測模型16內之演算法會自動對目標影像進行分割、訓練、推論、重組,以最終取得與輸入之目標影像相同大小的瑕疵熱區圖30,如圖5所示,或是輸出遮罩(Mask),此瑕疵熱區圖30或輸出遮罩可以表示預測瑕疵位置和範圍大小。前述將目標影像輸入至瑕疵檢測模型16中進行模型推論之各步驟係可為一般正常模型的訓練推論流程,本案不以前述流程為限。 Please refer to FIG. 1, FIG. 2 and FIG. 3 at the same time. As shown in step S14, based on the optimized segmentation range 22, the processing device 12 estimates an effective range of an overlapping area 28. After obtaining the optimized segmentation range 22 and the effective range of the overlapping area 28, as shown in step S16, the processing device 12 calculates a model segmentation quantity according to the original image size, the optimized segmentation range 22 and the effective range to obtain an optimized modeling parameter. The processing device 12 uses a third-party program: The number of model segmentation is calculated, where H ori is the length of the original image size, W ori is the width of the original image size, H patch is the length of the optimized segmentation range 22, W patch is the width of the optimized segmentation range 22, and O is the effective range of the repeated coverage area 28. Therefore, the number of model segmentation as the optimized modeling parameter can be calculated by a third-party program. Finally, as shown in step S18, the optimized modeling parameter is applied to a defect detection model 16, and the processing device 12 reads at least one target image from the storage device 14, and inputs the target image into the defect detection model 16 for model inference. When the target image is input into the defect detection model 16, the algorithm in the defect detection model 16 will automatically segment, train, infer, and reorganize the target image to finally obtain a defect hotspot map 30 of the same size as the input target image, as shown in FIG5, or an output mask. This defect hotspot map 30 or output mask can indicate the predicted defect location and range size. The aforementioned steps of inputting the target image into the defect detection model 16 for model inference can be a general normal model training and inference process, and the present case is not limited to the aforementioned process.

因此,本案只要使用者提供預檢測之瑕疵大小,即可自動產生出最佳之瑕疵檢測模型,不需要使用者自行決定「需降低多少解析度」以及「需要裁切成多少大小」。並且,使用者也提供目標推論速度,並且加入最佳化流程,以得到優化後的最佳化建模參數。Therefore, in this case, as long as the user provides the size of the pre-detected defect, the best defect detection model can be automatically generated, and the user does not need to decide by himself "how much resolution needs to be reduced" and "how much size needs to be cut". In addition, the user also provides the target inference speed and joins the optimization process to obtain the optimized modeling parameters.

綜上所述,本案提出一種瑕疵檢測模型之最佳化方法及電子裝置,其係採用目標瑕疵資訊,即可自動產生出最佳化建模參數來套用在瑕疵檢測模型上,不需要使用者自行決定需要降低多少解析度以及需要裁切成多少個低解析度影像,以降低預測時間並提高預測精準度,進而使瑕疵預測模型有效符合使用者需求。In summary, this case proposes a defect detection model optimization method and electronic device, which uses target defect information to automatically generate optimized modeling parameters to apply to the defect detection model. The user does not need to decide how much the resolution needs to be reduced and how many low-resolution images need to be cut, so as to reduce the prediction time and improve the prediction accuracy, thereby making the defect prediction model effectively meet the user's needs.

以上所述之實施例僅係為說明本案之技術思想及特點,其目的在使熟悉此項技術者能夠瞭解本案之內容並據以實施,當不能以之限定本案之專利範圍,即大凡依本案所揭示之精神所作之均等變化或修飾,仍應涵蓋在本案之申請專利範圍內。The implementation examples described above are only for illustrating the technical ideas and features of this case. Their purpose is to enable those familiar with this technology to understand the content of this case and implement it accordingly. They cannot be used to limit the patent scope of this case. In other words, any equivalent changes or modifications made according to the spirit disclosed in this case should still be covered by the scope of the patent application of this case.

10:電子裝置 12:處理裝置 14:儲存裝置 16:瑕疵檢測模型 18:圖形處理器 20:負樣本訓練資料 22:最佳化分割範圍 24:感知範圍 26:瑕疵範圍 28:重複覆蓋區 30:瑕疵熱區圖 H patch:最佳化分割範圍之長度 W patch:最佳化分割範圍之寬度 S10~S18:步驟 S121~S122:步驟10: electronic device 12: processing device 14: storage device 16: defect detection model 18: graphics processor 20: negative sample training data 22: optimized segmentation range 24: perception range 26: defect range 28: repeated coverage area 30: defect hotspot map H patch : length of optimized segmentation range W patch : width of optimized segmentation range S10~S18: steps S121~S122: steps

圖1為根據本案一實施例之電子裝置的方塊示意圖。 圖2為根據本案一實施例之電子裝置對瑕疵檢測模型進行最佳化的流程示意圖。 圖3為根據本案一實施例之顯示有最佳化分割範圍、瑕疵範圍及感知範圍之負樣本訓練資料示意圖。 圖4為根據本案一實施例之電子裝置計算出最佳化分割範圍的流程示意圖。 圖5為根據本案一實施例產生之瑕疵熱區圖的示意圖。 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present invention. FIG. 2 is a flow diagram of optimizing a defect detection model by an electronic device according to an embodiment of the present invention. FIG. 3 is a diagram of negative sample training data showing an optimized segmentation range, defect range, and perception range according to an embodiment of the present invention. FIG. 4 is a flow diagram of calculating an optimized segmentation range by an electronic device according to an embodiment of the present invention. FIG. 5 is a diagram of a defect hotspot map generated according to an embodiment of the present invention.

S10~S18:步驟 S10~S18: Steps

Claims (17)

一種瑕疵檢測模型之最佳化方法,包含: 讀取至少一負樣本訓練資料,該負樣本訓練資料係具有相同之一原始影像大小; 根據一目標瑕疵資訊,計算出一最佳化分割範圍; 根據該最佳化分割範圍,推估一重複覆蓋區之一有效範圍; 根據該原始影像大小、該最佳化分割範圍及該有效範圍,計算出一模型分割數量,以得到一最佳化建模參數;以及 將該最佳化建模參數套用在一瑕疵檢測模型上,以對至少一目標影像進行模型推論。 A defect detection model optimization method includes: Reading at least one negative sample training data, the negative sample training data has the same original image size; Calculating an optimized segmentation range based on target defect information; Estimating an effective range of a repeated coverage area based on the optimized segmentation range; Calculating a model segmentation quantity based on the original image size, the optimized segmentation range and the effective range to obtain an optimized modeling parameter; and Applying the optimized modeling parameter to a defect detection model to perform model inference on at least one target image. 如請求項1所述之瑕疵檢測模型之最佳化方法,其中該負樣本訓練資料係包含小幅度的旋轉或平移等資料的增強或誤差。The method for optimizing a defect detection model as described in claim 1, wherein the negative sample training data includes data enhancement or error such as small rotation or translation. 如請求項1所述之瑕疵檢測模型之最佳化方法,其中該目標瑕疵資訊係為一瑕疵大小範圍或一目標瑕疵影像及其瑕疵位置資訊。The method for optimizing a defect detection model as described in claim 1, wherein the target defect information is a defect size range or a target defect image and its defect location information. 如請求項1所述之瑕疵檢測模型之最佳化方法,其中在根據該目標瑕疵資訊,計算出該最佳化分割範圍之步驟中,更包含: 根據一人工智慧模型,計算一感知範圍;以及 根據該感知範圍及該目標瑕疵資訊,計算出該最佳化分割範圍。 The method for optimizing the defect detection model as described in claim 1, wherein the step of calculating the optimized segmentation range according to the target defect information further includes: calculating a perception range according to an artificial intelligence model; and calculating the optimized segmentation range according to the perception range and the target defect information. 如請求項4所述之瑕疵檢測模型之最佳化方法,其中該人工智慧模型係以一第一方程式: ,計算出該感知範圍,其中該R為該感知範圍之大小,該n為一模型捲積層數,該s為一輸出層步長,該k為一輸出層捲積核大小。 The method for optimizing a defect detection model as claimed in claim 4, wherein the artificial intelligence model is based on a first equation: , the perception range is calculated, where R is the size of the perception range, n is the number of model convolution layers, s is the step size of an output layer, and k is the size of an output layer convolution kernel. 如請求項4所述之瑕疵檢測模型之最佳化方法,其中該最佳化分割範圍係以一第二方程式: 計算出來,其中該S為該最佳化分割範圍,該a為該目標瑕疵資訊,該R為該感知範圍之大小,該N為一正整數。 The method for optimizing the defect detection model as claimed in claim 4, wherein the optimization segmentation range is based on a second equation: Calculated, where S is the optimized segmentation range, a is the target defect information, R is the size of the perception range, and N is a positive integer. 如請求項1所述之瑕疵檢測模型之最佳化方法,其中在計算出該最佳化分割範圍之步驟中,更可根據一目標推論速度推估該最佳化分割範圍。In the defect detection model optimization method as described in claim 1, in the step of calculating the optimized segmentation range, the optimized segmentation range can be estimated based on a target inference speed. 如請求項1所述之瑕疵檢測模型之最佳化方法,其中該模型分割數量係以一第三方程式: 計算出來,其中該H ori為該原始影像大小之長度,該W ori為該原始影像大小之寬度,H patch為該最佳化分割範圍之長度,W patch為該最佳化分割範圍之寬度,該O為該有效範圍。 The method for optimizing a defect detection model as claimed in claim 1, wherein the number of model segmentations is calculated using a third-party program: Calculated, where H ori is the length of the original image size, W ori is the width of the original image size, H patch is the length of the optimized segmentation range, W patch is the width of the optimized segmentation range, and O is the effective range. 一種電子裝置,包含: 一儲存裝置,其係內儲存有至少一負樣本訓練資料及至少一目標影像,且該負樣本訓練資料係具有相同之一原始影像大小;以及 一處理裝置,電性連接該儲存裝置,且內建有一瑕疵檢測模型,該處理裝置執行下列步驟: 根據一目標瑕疵資訊,計算出一最佳化分割範圍; 根據該最佳化分割範圍,推估一重複覆蓋區之一有效範圍; 根據該原始影像大小、該最佳化分割範圍及該有效範圍,計算出一模型分割數量,以得到一最佳化建模參數;以及 將該最佳化建模參數套用在該瑕疵檢測模型上,以該目標影像進行模型推論。 An electronic device includes: A storage device storing at least one negative sample training data and at least one target image, and the negative sample training data has the same original image size; and A processing device electrically connected to the storage device and having a built-in defect detection model, the processing device performing the following steps: Calculating an optimized segmentation range based on target defect information; Estimate an effective range of a repeated coverage area based on the optimized segmentation range; Calculating a model segmentation quantity based on the original image size, the optimized segmentation range and the effective range to obtain an optimized modeling parameter; and Applying the optimized modeling parameter to the defect detection model to perform model inference with the target image. 如請求項9所述之電子裝置,其中該負樣本訓練資料係包含小幅度的旋轉或平移等資料的增強或誤差。An electronic device as described in claim 9, wherein the negative sample training data includes data enhancement or error such as small rotation or translation. 如請求項9所述之電子裝置,其中該目標瑕疵資訊係為一瑕疵大小範圍或一目標瑕疵影像及其瑕疵位置資訊。An electronic device as described in claim 9, wherein the target defect information is a defect size range or a target defect image and its defect location information. 如請求項9所述之電子裝置,其中該處理器計算出該最佳化分割範圍之步驟,更包含: 根據一人工智慧模型,計算一感知範圍;以及 根據該感知範圍及該目標瑕疵資訊,計算出該最佳化分割範圍。 The electronic device as described in claim 9, wherein the step of the processor calculating the optimized segmentation range further includes: calculating a perception range based on an artificial intelligence model; and calculating the optimized segmentation range based on the perception range and the target defect information. 如請求項12所述之電子裝置,其中該人工智慧模型係以一第一方程式: ,計算出該感知範圍,其中該R為該感知範圍之大小,該n為一模型捲積層數,該s為一輸出層步長,該k為一輸出層捲積核大小。 The electronic device of claim 12, wherein the artificial intelligence model is based on a first equation: , the perception range is calculated, where R is the size of the perception range, n is the number of model convolution layers, s is the step size of an output layer, and k is the size of an output layer convolution kernel. 如請求項12所述之電子裝置,其中該處理裝置係透過一第二方程式: 計算出該最佳化分割範圍,其中該S為該最佳化分割範圍,該a為該目標瑕疵資訊,該R為該感知範圍之大小,該N為一正整數。 The electronic device of claim 12, wherein the processing device is configured to process the electronic device by a second equation: The optimal segmentation range is calculated, where S is the optimal segmentation range, a is the target defect information, R is the size of the perception range, and N is a positive integer. 如請求項12所述之電子裝置,其中該處理裝置更可根據一目標推論速度來推估該最佳化分割範圍。An electronic device as described in claim 12, wherein the processing device can further estimate the optimized segmentation range based on a target inference speed. 如請求項9所述之電子裝置,其中該處理裝置係透過一第三方程式: 計算出該模型分割數量,其中該H ori為該原始影像大小之長度,該W ori為該原始影像大小之寬度,H patch為該最佳化分割範圍之長度,W patch為該最佳化分割範圍之寬度,該O為該有效範圍。 The electronic device of claim 9, wherein the processing device is through a third party program: The number of segmentation of the model is calculated, where H ori is the length of the original image size, W ori is the width of the original image size, H patch is the length of the optimized segmentation range, W patch is the width of the optimized segmentation range, and O is the effective range. 如請求項9所述之電子裝置,更包含一圖形處理器,該圖形處理器電性連接該處理裝置,該圖形處理器係協助該處理裝置進行運算。The electronic device as described in claim 9 further includes a graphics processor, which is electrically connected to the processing device and assists the processing device in performing calculations.
TW113126099A 2024-07-11 2024-07-11 Optimization method for defect detection model and electronic device TWI877045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW113126099A TWI877045B (en) 2024-07-11 2024-07-11 Optimization method for defect detection model and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW113126099A TWI877045B (en) 2024-07-11 2024-07-11 Optimization method for defect detection model and electronic device

Publications (2)

Publication Number Publication Date
TWI877045B true TWI877045B (en) 2025-03-11
TW202603605A TW202603605A (en) 2026-01-16

Family

ID=95830784

Family Applications (1)

Application Number Title Priority Date Filing Date
TW113126099A TWI877045B (en) 2024-07-11 2024-07-11 Optimization method for defect detection model and electronic device

Country Status (1)

Country Link
TW (1) TWI877045B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4209995A1 (en) * 2021-11-23 2023-07-12 Contemporary Amperex Technology Co., Limited Image recognition method and apparatus, and computer-readable storage medium
CN116433978A (en) * 2023-04-18 2023-07-14 心鉴智控(深圳)科技有限公司 Automatic generation and automatic labeling method and device for high-quality flaw image
TWI826108B (en) * 2022-11-10 2023-12-11 州巧科技股份有限公司 Method for establishing defect-detection model using fake defect images and system
TWI843591B (en) * 2023-06-01 2024-05-21 聯策科技股份有限公司 Method for creating flaw image detection model, method for detecting flaw image and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4209995A1 (en) * 2021-11-23 2023-07-12 Contemporary Amperex Technology Co., Limited Image recognition method and apparatus, and computer-readable storage medium
TWI826108B (en) * 2022-11-10 2023-12-11 州巧科技股份有限公司 Method for establishing defect-detection model using fake defect images and system
CN116433978A (en) * 2023-04-18 2023-07-14 心鉴智控(深圳)科技有限公司 Automatic generation and automatic labeling method and device for high-quality flaw image
TWI843591B (en) * 2023-06-01 2024-05-21 聯策科技股份有限公司 Method for creating flaw image detection model, method for detecting flaw image and electronic device

Similar Documents

Publication Publication Date Title
WO2023280148A1 (en) Blood vessel segmentation method and apparatus, and electronic device and readable medium
CN112258558B (en) Ultrasound carotid plaque video tracking method based on multi-scale Siamese network
CN112132265A (en) Model training method, cup-to-disk ratio determination method, device, equipment and storage medium
WO2024041480A1 (en) Data processing method and related apparatus
CN111444807B (en) Target detection method, device, electronic equipment and computer readable medium
WO2022116678A1 (en) Method and apparatus for determining pose of target object, storage medium and electronic device
CN110110798A (en) A kind of weld joint recognition method based on Mask-RCNN network
CN117576109B (en) A defect detection method, device, equipment and storage medium
CN110796624A (en) Image generation method and device and electronic equipment
CN114782768A (en) Training method of pre-training network model, medical image processing method and equipment
CN115742314A (en) 3D printing pre-exposure waiting time prediction method, device, equipment and medium
CN114972492A (en) A bird's-eye view-based pose determination method, device and computer storage medium
CN116758096A (en) Aneurysm segmentation method, electronic device, and storage medium
CN115661435A (en) Rice flour cake processing positioning method, related equipment and storage medium
CN113449539A (en) Training method, device, equipment and storage medium for animal body information extraction model
TWI877045B (en) Optimization method for defect detection model and electronic device
CN111832693A (en) Neural network layer operation, model training method, device and equipment
CN113962948A (en) Plaque stability detection method and device, computer equipment and readable storage medium
JP7661745B2 (en) Appearance determination device, appearance determination method, and program
CN114550207B (en) Neck key point detection method and device, detection model training method and device
CN112257686B (en) Training method and device for human body posture recognition model and storage medium
CN116468702A (en) Chloasma assessment method, device, electronic device, and computer-readable storage medium
CN115131708A (en) Video segmentation method, device, device and medium based on fusion coding network
TWI906979B (en) Anomaly detection method and electronic device
CN117456542B (en) Image matching method, device, electronic device and storage medium