TWI771010B - Defect detection method, computer device, and storage medium - Google Patents
Defect detection method, computer device, and storage medium Download PDFInfo
- Publication number
- TWI771010B TWI771010B TW110118306A TW110118306A TWI771010B TW I771010 B TWI771010 B TW I771010B TW 110118306 A TW110118306 A TW 110118306A TW 110118306 A TW110118306 A TW 110118306A TW I771010 B TWI771010 B TW I771010B
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- defect
- defect detection
- detection method
- error
- Prior art date
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本發明涉及產品檢測領域,特別是指一種缺陷檢測方法、電腦裝置及儲存介質。 The invention relates to the field of product testing, in particular to a defect detection method, a computer device and a storage medium.
在實際工業生產過程中,產品的表面缺陷會對產品的美觀、舒適度和使用性能產生不良影響,因此需要對產品進行外觀缺陷檢測來實現對產品的品質控制。傳統的人工檢測方法過於依賴人的主觀判斷,還有即時性差、勞動強度大等缺點,因此對實際產品物體採樣圖像,並基於採樣圖像進行自動缺陷檢測有很重要的實用價值。 In the actual industrial production process, the surface defects of the product will have a negative impact on the appearance, comfort and performance of the product. Therefore, it is necessary to detect the appearance defect of the product to realize the quality control of the product. The traditional manual detection method relies too much on the subjective judgment of people, and also has the disadvantages of poor immediacy and high labor intensity. Therefore, it is of great practical value to sample images of actual product objects and perform automatic defect detection based on the sampled images.
鑒於以上內容,有必要提供一種缺陷檢測方法、電腦裝置及儲存介質,可以輔助檢測產品缺陷,以解決上述問題。 In view of the above content, it is necessary to provide a defect detection method, a computer device and a storage medium, which can assist in the detection of product defects and solve the above problems.
所述缺陷檢測方法,包括:使用無缺陷圖像訓練自編碼器模型;將待檢測圖像輸入所述自編碼器模型,利用所述自編碼器模型獲得與所述待檢測圖像對應的重建圖像;基於預設的過濾閾值,計算所述待檢測圖像與所述重建圖像之間的圖像誤差;將所述圖像誤差作為引數輸入T分佈進行計算,獲得計算結果;當所述計算結果落入預設的缺陷判斷準則的範圍時,確定所述待檢測圖像為無缺陷圖像;及當所述計算結果沒有落入所述預設的缺陷判斷準則的範圍時,確定所述待檢測圖像為有缺陷圖像。 The defect detection method includes: training a self-encoder model using a defect-free image; inputting an image to be detected into the self-encoder model, and using the self-encoder model to obtain a reconstruction corresponding to the to-be-detected image image; based on a preset filtering threshold, calculate the image error between the to-be-detected image and the reconstructed image; input the image error as an argument to the T distribution for calculation, and obtain the calculation result; when When the calculation result falls within the range of the preset defect judgment criteria, it is determined that the to-be-detected image is a defect-free image; and when the calculation result does not fall within the range of the preset defect judgment criteria, It is determined that the to-be-detected image is a defective image.
可選地,所述使用無缺陷圖像訓練自編碼器模型包括:將所述無缺陷圖像輸入所述自編碼器模型,獲得所述無缺陷圖像的重建圖像;採用預設的優化目標函數訓練所述自編碼器模型,所述優化目標函數為:|X-X'|1+λ|X-X'|2,其中,X為所述無缺陷圖像,X'為所述無缺陷圖像的重建圖像,λ為權重。 Optionally, the using the defect-free image to train the auto-encoder model includes: inputting the defect-free image into the auto-encoder model to obtain a reconstructed image of the defect-free image; using a preset optimization The objective function trains the autoencoder model, and the optimization objective function is: |X-X'| 1 +λ|X-X'| 2 , where X is the defect-free image and X' is the The reconstructed image of the defect-free image, λ is the weight.
可選地,所述權重λ的取值範圍為0.1-10。 Optionally, the value range of the weight λ is 0.1-10.
可選地,所述基於預設的過濾閾值,計算所述待檢測圖像與所述重建圖像之間的圖像誤差包括:計算所述待檢測圖像與所述重建圖像之間的差值圖像;基於所述差值圖像和所述過濾閾值,獲得差值圖像的二值圖像;基於所述差值圖像和所述二值圖像計算所述圖像誤差。 Optionally, the calculating the image error between the to-be-detected image and the reconstructed image based on a preset filtering threshold includes: calculating the difference between the to-be-detected image and the reconstructed image. difference image; obtaining a binary image of the difference image based on the difference image and the filtering threshold; calculating the image error based on the difference image and the binary image.
可選地,所述圖像誤差的計算公式為:
可選地,所述二值圖像定義為:
可選地,所述T分佈的密度函數運算式為:
可選地,所述自由度v的預設值為1。 Optionally, the preset value of the degree of freedom v is 1.
所述電腦可讀儲存介質儲存有至少一個指令,所述至少一個指令被處理器執行時實現所述缺陷檢測方法。 The computer-readable storage medium stores at least one instruction that, when executed by a processor, implements the defect detection method.
所述電腦裝置包括儲存器和至少一個處理器,所述儲存器中儲存 有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現所述缺陷檢測檢查方法。 The computer device includes a memory and at least one processor, the memory stores There is at least one instruction that, when executed by the at least one processor, implements the defect detection inspection method.
相較於習知技術,所述缺陷檢測方法、電腦裝置及儲存介質,可以過濾影像處理中的小雜訊誤差,利用自編碼器模型基於T分佈的性質來檢測產品缺陷,提高產品檢測的效率和準確率。 Compared with the prior art, the defect detection method, computer device and storage medium can filter small noise errors in image processing, and use the self-encoder model to detect product defects based on the properties of T distribution, thereby improving the efficiency of product inspection. and accuracy.
3:電腦裝置 3: Computer device
30:缺陷檢測系統 30: Defect Detection System
301:獲取模組 301: Get Mods
302:執行模組 302: Execute the module
31:儲存器 31: Storage
32:處理器 32: Processor
33:攝像機 33: Camera
S1~S7:步驟 S1~S7: Steps
為了更清楚地說明本申請實施例或習知技術中的技術方案,下面將對實施例或習知技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本申請的實施例,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據提供的附圖獲得其他的附圖。 In order to more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort.
圖1是本申請較佳實施例的缺陷檢測方法的流程圖。 FIG. 1 is a flowchart of a defect detection method according to a preferred embodiment of the present application.
圖2是本申請較佳實施例的缺陷檢測系統的功能模組圖。 FIG. 2 is a functional module diagram of a defect detection system according to a preferred embodiment of the present application.
圖3是本申請較佳實施例的電腦裝置的架構圖。 FIG. 3 is a structural diagram of a computer device according to a preferred embodiment of the present application.
為了能夠更清楚地理解本申請的上述目的、特徵和優點,下面結合附圖和具體實施例對本申請進行詳細描述。需要說明的是,在不衝突的情況下,本申請的實施例及實施例中的特徵可以相互組合。 In order to more clearly understand the above objects, features and advantages of the present application, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments may be combined with each other in the case of no conflict.
在下面的描述中闡述了很多具體細節以便於充分理解本申請,所描述的實施例僅僅是本申請一部分實施例,而不是全部的實施例。基於本申請中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本申請保護的範圍。 In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
除非另有定義,本文所使用的所有的技術和科學術語與屬於本申請的技術領域的技術人員通常理解的含義相同。本文中在本申請的說明書 中所使用的術語只是為了描述具體的實施例的目的,不是旨在於限制本申請。 Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. Specifications herein in this application The terminology used is for the purpose of describing particular embodiments only and is not intended to limit the application.
參閱圖1所示,為本申請較佳實施例的缺陷檢測方法的流程圖。 Referring to FIG. 1 , it is a flowchart of a defect detection method according to a preferred embodiment of the present application.
在本實施例中,所述缺陷檢測方法可以應用於電腦裝置中,對於需要進行缺陷檢測的電腦裝置,可以直接在電腦裝置上集成本申請的方法所提供的用於缺陷檢測的功能,或者以軟體開發套件(Software Development Kit,SDK)的形式運行在電腦裝置上。 In this embodiment, the defect detection method can be applied to a computer device. For a computer device that needs to perform defect detection, the function for defect detection provided by the method of the present application can be directly integrated on the computer device, or the function for defect detection provided by the method of the present application can be directly integrated on the computer device. The form of software development kit (Software Development Kit, SDK) runs on the computer device.
如圖1所示,所述缺陷檢測方法具體包括以下步驟,根據不同的需求,該流程圖中步驟的順序可以改變,某些步驟可以省略。 As shown in FIG. 1 , the defect detection method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步驟S1、電腦裝置使用無缺陷圖像訓練自編碼器模型。 Step S1, the computer device uses the defect-free images to train the autoencoder model.
在一個實施例中,所述使用無缺陷圖像訓練自編碼器模型包括(a1)-(a3): In one embodiment, the use of defect-free images to train an autoencoder model includes (a1)-(a3):
(a1)收集預設數量的無缺陷圖像。 (a1) Collect a preset number of defect-free images.
在一個實施例中,所述無缺陷圖像是指對無缺陷的產品所拍攝的圖像。對應地,對存在缺陷的產品所拍攝的圖像稱為有缺陷圖像。在一個實施例中,可以利用工業攝像機拍攝獲取所述預設數量的無缺陷圖像。由於在實際生產過程中產品的無缺陷率較高,可以在即時生產過程中拍攝足夠的(例如,10萬張)無缺陷圖像作為訓練樣本。 In one embodiment, the defect-free image refers to an image captured of a defect-free product. Correspondingly, an image captured of a defective product is called a defective image. In one embodiment, the preset number of defect-free images may be acquired by using an industrial camera. Due to the high defect-free rate of products in the actual production process, enough (eg, 100,000) defect-free images can be taken as training samples during the just-in-time production process.
(a2)將所述無缺陷圖像輸入所述自編碼器模型,獲得所述無缺陷圖像的重建圖像。 (a2) Input the defect-free image into the autoencoder model to obtain a reconstructed image of the defect-free image.
在一個實施例中,所述自編碼器模型可以為變分自編碼器(Variational AutoEncoder,VAE)模型,所述自編碼器模型包含編碼器(encorder)和解碼器(decorder)。 In one embodiment, the autoencoder model may be a variational autoencoder (Variational AutoEncoder, VAE) model, and the autoencoder model includes an encoder (encoder) and a decoder (decorder).
在一個實施例中,電腦裝置可以對每個無缺陷圖像X進行影像處理,例如,主成分分析(Principal Component Analysis,PCA)降維,得到每個無缺陷圖像X對應的圖像向量;利用所述編碼器將所述每個無缺陷 圖像X的圖像向量進行壓縮,得到每個無缺陷圖像X對應的隱含低維向量h;利用所述解碼器解譯所述無缺陷圖像X的隱含低維向量h,生成與所述無缺陷圖像X對應的重建圖像X'。 In one embodiment, the computer device may perform image processing on each defect-free image X, for example, Principal Component Analysis (PCA) dimensionality reduction, to obtain an image vector corresponding to each defect-free image X; Use the encoder to convert the each defect-free The image vector of the image X is compressed to obtain an implicit low-dimensional vector h corresponding to each defect-free image X; the decoder is used to interpret the implicit low-dimensional vector h of the defect-free image X to generate A reconstructed image X' corresponding to the defect-free image X.
(a3)採用預設的優化目標函數|X-X'|1+λ|X-X'|2訓練所述自編碼器模型,其中,X為所述無缺陷圖像,X'為所述無缺陷圖像的重建圖像,λ為權重,所述權重λ的取值範圍為0.1-10。 (a3) Using a preset optimization objective function |X-X'| 1 +λ|X-X'| 2 to train the autoencoder model, where X is the defect-free image and X' is the For the reconstructed image of the defect-free image, λ is a weight, and the value of the weight λ ranges from 0.1 to 10.
在一個實施例中,首先使用計算公式X-X'計算所述無缺陷圖像與對應的所述重建圖像之間的誤差圖像;然後度量所述誤差圖像的稀疏性,即計算所述誤差圖像的L1範數:|X-X'|1;之後度量所述誤差圖像的平滑性,即計算所述誤差圖像的L2範數:|X-X'|2。在一個實施例中,電腦裝置可以使用視覺庫OpenCV中的函數計算所述誤差圖像、所述誤差圖像的L1範數和所述誤差圖像的L2範數。 In one embodiment, the error image between the defect-free image and the corresponding reconstructed image is first calculated using the calculation formula XX'; then the sparsity of the error image is measured, that is, the calculated The L1 norm of the error image: |X-X'| 1 ; then the smoothness of the error image is measured, that is, the L2 norm of the error image is calculated: |X-X'| 2 . In one embodiment, the computer device may calculate the error image, the L1 norm of the error image, and the L2 norm of the error image using functions in the vision library OpenCV.
在一個實施例中,為了相容由所述自編碼器模型得到的重建圖像的平滑性及稀疏性,構建損失函數,即優化目標函數:|X-X'|1+λ|X-X'|2,其中λ為權重,所述權重λ的取值範圍為0.1-10,透過取不同的值來實現所述自編碼器的重建誤差圖像平滑性和稀疏性的平衡,值越大訓練得到的所述自編碼器的重建誤差圖像越平滑,反之重建誤差圖像越稀疏。在一個實施例中,將所述無缺陷圖像X和對應的重建圖像X'代入所述優化目標函數,計算得到的值即所述無缺陷圖像X的重建誤差。 In one embodiment, in order to be compatible with the smoothness and sparsity of the reconstructed image obtained by the autoencoder model, a loss function is constructed, that is, the optimization objective function: |X-X'| 1 +λ|X-X '| 2 , where λ is the weight, and the value of the weight λ ranges from 0.1 to 10. By taking different values, the balance between the smoothness and sparsity of the reconstructed error image of the self-encoder is achieved, and the larger the value is The reconstructed error image of the autoencoder obtained by training is smoother, and conversely, the reconstructed error image is sparser. In one embodiment, the defect-free image X and the corresponding reconstructed image X' are substituted into the optimization objective function, and the calculated value is the reconstruction error of the defect-free image X.
在一個實施例中,訓練所述自編碼器,即是使所述無缺陷圖像X的所述重建誤差小於預設的重建誤差度量閾值T,即:|X-X'|1+λ|X-X'|2<τ。在一個實施例中,所述重建誤差度量閾值的選擇方式依賴於對所述自編碼器模型缺陷檢測能力的期望,一般基於對缺陷檢測召回率和準確率的平衡進行選擇。如果期待高的準確率,取所有訓練樣本中圖像重建誤差的最大值;而如果期望召回率較高,基於訓練樣本中無缺陷圖像重建誤差度量的一種統計值作為閾值,比如假設訓練時無缺陷圖像的重建誤差服從高斯分 佈,可以將高斯分佈的90%分位值作為重建誤差度量閾值T。 In one embodiment, training the self-encoder is to make the reconstruction error of the defect-free image X smaller than a preset reconstruction error metric threshold T, namely: |X-X'| 1 +λ| X-X'| 2 <τ. In one embodiment, the selection of the reconstruction error metric threshold depends on the expectation of the defect detection capability of the autoencoder model, and is generally selected based on a balance between defect detection recall and accuracy. If a high accuracy rate is expected, take the maximum value of the image reconstruction error in all training samples; and if the recall rate is expected to be high, a statistic based on a measure of the error-free image reconstruction error in the training sample is used as the threshold, such as assuming that during training The reconstruction error of the defect-free image obeys the Gaussian distribution, and the 90% quantile value of the Gaussian distribution can be used as the reconstruction error metric threshold T.
步驟S2、電腦裝置將待檢測圖像輸入所述自編碼器模型,利用所述自編碼器模型獲得與所述待檢測圖像對應的重建圖像。 In step S2, the computer device inputs the image to be detected into the auto-encoder model, and uses the auto-encoder model to obtain a reconstructed image corresponding to the image to be detected.
在一個實施例中,所述待檢測圖像可以為對待檢測的產品進行拍攝所獲得的圖像。 In one embodiment, the image to be inspected may be an image obtained by photographing the product to be inspected.
在一個實施例中,電腦裝置對每個待檢測圖像Y進行影像處理(例如,PCA降維)得到每個待檢測圖像Y對應的圖像向量;利用編碼器將所述每個待檢測圖像Y的圖像向量進行壓縮,得到每個待檢測圖像Y對應的隱含低維向量s,利用解碼器對所述待檢測圖像Y的隱含低維向量s進行解譯,生成與所述待檢測圖像Y對應的重建圖像Y'。 In one embodiment, the computer device performs image processing (eg, PCA dimensionality reduction) on each image to be detected Y to obtain an image vector corresponding to each image to be detected Y; The image vector of the image Y is compressed to obtain the implicit low-dimensional vector s corresponding to each image Y to be detected, and the decoder is used to interpret the implicit low-dimensional vector s of the image Y to be detected, and generate The reconstructed image Y' corresponding to the to-be-detected image Y.
步驟S3、電腦裝置基於預設的過濾閾值,計算所述待檢測圖像與所述重建圖像之間的圖像誤差。 Step S3, the computer device calculates the image error between the image to be detected and the reconstructed image based on a preset filtering threshold.
在一個實施例中,電腦裝置計算所述待檢測圖像與所述重建圖像之間的差值圖像;基於所述差值圖像和所述過濾閾值,獲得差值圖像的二值圖像;基於所述差值圖像和所述二值圖像計算所述圖像誤差。 In one embodiment, the computer device calculates a difference image between the to-be-detected image and the reconstructed image; based on the difference image and the filtering threshold, a binary value of the difference image is obtained an image; calculating the image error based on the difference image and the binary image.
在一個實施例中,所述預設的過濾閾值可以是影像處理時,為了對小雜訊進行過濾而預設的雜訊過濾閾值。 In one embodiment, the preset filtering threshold may be a preset noise filtering threshold for filtering small noise during image processing.
在一個實施例中,可以利用Python程式計算得到所述待檢測圖像Y與所述重建圖像Y'之間的差值圖像△Y i,j ,其中i,j表示圖元位置,例如,使用視覺庫OpenCV中的函數cv2.absdiff計算得到所述差值圖像△Y i,j 。 In one embodiment, the difference image Δ Y i,j between the image to be detected Y and the reconstructed image Y' can be calculated by using a Python program, where i, j represent the position of the primitive, for example , and use the function cv2.absdiff in the vision library OpenCV to calculate the difference image Δ Y i,j .
在一個實施例中,為了過濾掉較小的重建誤差圖元,基於訓練樣本中的無缺陷圖像的重建誤差,選取過濾閾值,基於所述過濾閾值定義所述差值圖像△Y i,j 的二值圖像:
步驟S4、電腦裝置將所述圖像誤差作為引數輸入T分佈進行計算,獲得計算結果。 Step S4, the computer device inputs the image error as an argument to the T distribution for calculation, and obtains a calculation result.
在一個實施例中,所述T分佈的密度函數運算式為:
步驟S5、電腦裝置判斷所述計算結果是否落入預設的缺陷判斷準則的範圍,當確定所述計算結果落入預設的缺陷判斷準則的範圍時,執行步驟S6,當確定所述計算結果沒有落入所述預設的缺陷判斷準則的範圍時,執行步驟S7。 In step S5, the computer device determines whether the calculation result falls within the range of the preset defect judgment criterion. When it is determined that the calculation result falls within the range of the preset defect judgment criterion, step S6 is executed, and when the calculation result is determined to fall within the range of the preset defect judgment criterion When it does not fall within the range of the preset defect judgment criterion, step S7 is performed.
在一個實施例中,所述缺陷判斷準則的範圍的選擇方式依賴於對所述自編碼器模型缺陷檢測能力的期望,一般基於對缺陷檢測召回率和準確率的平衡進行選擇,可以將T分佈的90%分位值以內作為所述缺陷判斷準則的範圍。 In one embodiment, the selection method of the range of the defect judgment criterion depends on the expectation of the defect detection capability of the autoencoder model, and is generally selected based on the balance between the recall rate and the accuracy rate of defect detection, and the T distribution can be Within the 90% quantile value of , as the range of the defect judgment criteria.
在一個實施例中,所述T分佈的分佈相似性具有相似的更相似,不相似的更不相似的特點,所述T分佈偏重長尾分佈。舉例而言,所述待檢測圖像的缺陷越大,在所述T分佈中就會越靠近分佈的尾端。 In one embodiment, the distribution similarity of the T distribution has the characteristics of being similar and more similar, and dissimilar and less similar, and the T distribution is biased towards long-tailed distribution. For example, the larger the defect of the image to be inspected, the closer to the tail end of the distribution in the T distribution.
步驟S6、電腦裝置確定所述待檢測圖像為無缺陷圖像。 Step S6, the computer device determines that the to-be-detected image is a defect-free image.
步驟S7、電腦裝置確定所述待檢測圖像為有缺陷圖像。 Step S7, the computer device determines that the image to be detected is a defective image.
上述圖1詳細介紹了本申請的缺陷檢測方法,下面結合圖2和圖3,對實現所述缺陷檢測方法的軟體系統的功能模組以及實現所述缺陷檢測方法的硬體裝置架構進行介紹。 The above-mentioned FIG. 1 describes the defect detection method of the present application in detail. The functional modules of the software system for implementing the defect detection method and the hardware device architecture for implementing the defect detection method are introduced below with reference to FIG. 2 and FIG. 3 .
應該瞭解,所述實施例僅為說明之用,在專利申請範圍上並不受 此結構的限制。 It should be understood that the embodiments are only used for illustration, and are not subject to the scope of the patent application. limitations of this structure.
參閱圖2所示,是本申請較佳實施例提供的缺陷檢測系統的模組圖。 Referring to FIG. 2 , it is a module diagram of a defect detection system provided by a preferred embodiment of the present application.
在一些實施例中,所述缺陷檢測系統30運行於電腦裝置3中。所述缺陷檢測系統30可以包括多個由程式碼段所組成的功能模組。所述缺陷檢測系統30中的各個程式段的程式碼可以儲存於電腦裝置3的儲存器31中,並由至少一個處理器32所執行,以實現缺陷檢測功能(詳見圖3描述)。
In some embodiments, the
本實施例中,所述缺陷檢測系統30根據其所執行的功能,可以被劃分為多個功能模組。所述功能模組可以包括:獲取模組301、執行模組302。本申請所稱的模組是指一種能夠被至少一個處理器所執行並且能夠完成固定功能的一系列電腦程式段,其儲存在儲存器中。在本實施例中,關於各模組的功能將在後續的實施例中詳述。
In this embodiment, the
具體地,獲取模組301可以用於獲取攝像機33拍攝的無缺陷圖像和待檢測圖像。執行模組302可以用於使用所述無缺陷圖像訓練自編碼器模型。執行模組302還可以用於將待檢測圖像輸入所述自編碼器模型,利用所述自編碼器模型獲得與所述待檢測圖像對應的重建圖像:基於預設的過濾閾值,計算所述待檢測圖像與所述重建圖像之間的圖像誤差;將所述圖像誤差作為引數輸入T分佈進行計算,獲得計算結果;判斷所述計算結果是否落入預設的缺陷判斷準則的範圍,當所述計算結果落入預設的缺陷判斷準則的範圍時,確定所述待檢測圖像為無缺陷圖像;及當所述計算結果沒有落入所述預設的缺陷判斷準則的範圍時,確定所述待檢測圖像為有缺陷圖像。
Specifically, the
參閱圖3所示,為本申請較佳實施例提供的電腦裝置的結構示意圖。在本申請較佳實施例中,所述電腦裝置3包括儲存器31、至少一個處理器32、攝像機33。本領域技術人員應該瞭解,圖3示出的電腦裝置的結構並不構成本申請實施例的限定,既可以是匯流排型結構,也可以是星形 結構,所述電腦裝置3還可以包括比圖示更多或更少的其他硬體或者軟體,或者不同的部件佈置。 Referring to FIG. 3 , it is a schematic structural diagram of a computer device according to a preferred embodiment of the present application. In a preferred embodiment of the present application, the computer device 3 includes a storage 31 , at least one processor 32 , and a camera 33 . Those skilled in the art should understand that the structure of the computer device shown in FIG. 3 does not constitute a limitation of the embodiments of the present application, and it may be a busbar type structure or a star-shaped structure. structure, the computer device 3 may also include more or less other hardware or software than shown, or different component arrangements.
在一些實施例中,所述電腦裝置3包括一種能夠按照事先設定或儲存的指令,自動進行數值計算和/或資訊處理的終端,其硬體包括但不限於微處理器、專用積體電路、可程式設計閘陣列、數位訊號處理器及嵌入式設備等。 In some embodiments, the computer device 3 includes a terminal capable of automatically performing numerical calculations and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, dedicated integrated circuits, Programmable gate arrays, digital signal processors and embedded devices, etc.
需要說明的是,所述電腦裝置3僅為舉例,其他現有的或今後可能出現的電子產品如可適應於本申請,也應包含在本申請的保護範圍以內,並以引用方式包含於此。 It should be noted that the computer device 3 is only an example, and other existing or future electronic products, if applicable to the present application, should also be included within the protection scope of the present application, and are incorporated herein by reference.
在一些實施例中,所述儲存器31用於儲存程式碼和各種資料,例如安裝在所述電腦裝置3中的缺陷檢測系統30,並在電腦裝置3的運行過程中實現高速、自動地完成程式或資料的存取。所述儲存器31包括唯讀記憶體(Read-Only Memory,ROM)、可程式設計唯讀儲存器(Programmable Read-Only Memory,PROM)、可抹除可程式設計唯讀儲存器(Erasable Programmable Read-Only Memory,EPROM)、一次可程式設計唯讀儲存器(One-time Programmable Read-Only Memory,OTPROM)、電子抹除式可複寫唯讀記憶體(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、唯讀光碟(Compact Disc Read-Only Memory,CD-ROM)或其他光碟儲存器、磁碟儲存器、磁帶儲存器、或者任何其他能夠用於攜帶或儲存資料的電腦可讀的儲存介質。
In some embodiments, the storage 31 is used to store program codes and various data, such as the
在一些實施例中,所述至少一個處理器32可以由積體電路組成,例如可以由單個封裝的積體電路所組成,也可以是由多個相同功能或不同功能封裝的積體電路所組成,包括一個或者多個中央處理器(Central Processing unit,CPU)、微處理器、數位訊號處理晶片、圖形處理器及各種控制晶片的組合等。所述至少一個處理器32是所述電腦裝置3的控制核心(Control Unit),利用各種介面和線路連接整個電腦裝置3的各個部件, 透過運行或執行儲存在所述儲存器31內的程式或者模組,以及調用儲存在所述儲存器31內的資料,以執行電腦裝置3的各種功能和處理資料,例如執行缺陷檢測的功能。 In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, may be composed of a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions , including one or more central processing units (Central Processing Units, CPUs), microprocessors, digital signal processing chips, graphics processors and combinations of various control chips. The at least one processor 32 is the control core (Control Unit) of the computer device 3, and uses various interfaces and lines to connect the various components of the entire computer device 3, By running or executing the programs or modules stored in the storage 31 and calling the data stored in the storage 31, various functions of the computer device 3 and processing data are performed, such as the function of performing defect detection.
儘管未示出,所述電腦裝置3還可以包括給各個部件供電的電源(比如電池),優選的,電源可以透過電源管理裝置與所述至少一個處理器32邏輯相連,從而透過電源管理裝置實現管理充電、放電、以及功耗管理等功能。電源還可以包括一個或一個以上的直流或交流電源、再充電裝置、電源故障檢測電路、電源轉換器或者逆變器、電源狀態指示器等任意元件。所述電腦裝置3還可以包括多種感測器、藍牙模組、Wi-Fi模組等,在此不再贅述。 Although not shown, the computer device 3 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 32 through the power management device, so as to realize the realization through the power management device. Manage charging, discharging, and power management functions. The power supply may also include one or more of a DC or AC power source, a recharging device, a power failure detection circuit, a power converter or inverter, a power supply status indicator, or any other element. The computer device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
應該瞭解,所述實施例僅為說明之用,在專利申請範圍上並不受此結構的限制。 It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
上述以軟體功能模組的形式實現的集成的單元,可以儲存在一個電腦可讀取儲存介質中。上述軟體功能模組儲存在一個儲存介質中,包括若干指令用以使得一台電腦裝置(可以是伺服器、個人電腦等)或處理器(processor)執行本申請各個實施例所述方法的部分。 The above-mentioned integrated units implemented in the form of software function modules can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a server, a personal computer, etc.) or a processor (processor) to execute parts of the methods described in the various embodiments of the present application.
在進一步的實施例中,結合圖3,所述至少一個處理器32可執行所述電腦裝置3的作業系統以及安裝的各類應用程式(如所述的缺陷檢測系統30)、程式碼等,例如,上述的各個模組。 In a further embodiment, referring to FIG. 3 , the at least one processor 32 can execute the operating system of the computer device 3 and various installed applications (such as the defect detection system 30 ), program codes, etc., For example, the above-mentioned modules.
所述儲存器31中儲存有程式碼,且所述至少一個處理器32可調用所述儲存器31中儲存的程式碼以執行相關的功能。例如,圖2中所述的各個模組是儲存在所述儲存器31中的程式碼,並由所述至少一個處理器32所執行,從而實現所述各個模組的功能以達到缺陷檢測的目的。 The storage 31 stores program codes, and the at least one processor 32 can call the program codes stored in the storage 31 to execute related functions. For example, each module described in FIG. 2 is a program code stored in the storage 31 and executed by the at least one processor 32, so as to realize the function of each module to achieve defect detection. Purpose.
在本申請的一個實施例中,所述儲存器31儲存一個或多個指令(即至少一個指令),所述至少一個指令被所述至少一個處理器32所執行以實現圖1所示的缺陷檢測的目的。 In one embodiment of the present application, the storage 31 stores one or more instructions (ie, at least one instruction), and the at least one instruction is executed by the at least one processor 32 to implement the defect shown in FIG. 1 . purpose of detection.
在本申請所提供的幾個實施例中,應該理解到,所揭露的裝置和方法,可以透過其它的方式實現。例如,以上所描述的裝置實施例僅僅是示意性的,例如,所述模組的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式。 In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and other division methods may be used in actual implementation.
所述作為分離部件說明的模組可以是或者也可以不是物理上分開的,作為模組顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部模組來實現本實施例方案的目的。 The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they can be located in one place or distributed to multiple networks. on the unit. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申請各個實施例中的各功能模組可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用硬體加軟體功能模組的形式實現。 In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
對於本領域技術人員而言,顯然本申請不限於上述示範性實施例的細節,而且在不背離本申請的精神或基本特徵的情況下,能夠以其他的具體形式實現本申請。因此,無論從哪一點來看,均應將實施例看作是示範性的,而且是非限制性的,本申請的範圍由所附請求項而不是上述說明限定,因此旨在將落在請求項的等同要件的含義和範圍內的所有變化涵括在本申請內。不應將請求項中的任何附圖標記視為限制所涉及的請求項。此外,顯然“包括”一詞不排除其他單元或,單數不排除複數。裝置請求項中陳述的多個單元或裝置也可以由一個單元或裝置透過軟體或者硬體來實現。第一,第二等詞語用來表示名稱,而並不表示任何特定的順序。 It will be apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Accordingly, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in this application. Any reference sign in a claim should not be construed as limiting the claim to which it relates. Furthermore, it is clear that the word "comprising" does not exclude other units or, and the singular does not exclude the plural. Multiple units or means stated in the device claim may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names and do not denote any particular order.
最後所應說明的是,以上實施例僅用以說明本申請的技術方案而非限制,儘管參照以上較佳實施例對本申請進行了詳細說明,本領域的普通技術人員應當理解,可以對本申請的技術方案進行修改或等同替換,而不脫離本申請技術方案的精神和範圍。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limitations. Although the present application has been described in detail with reference to the above preferred embodiments, those of ordinary skill in the art should The technical solutions can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.
S1~S7:步驟 S1~S7: Steps
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110118306A TWI771010B (en) | 2021-05-20 | 2021-05-20 | Defect detection method, computer device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110118306A TWI771010B (en) | 2021-05-20 | 2021-05-20 | Defect detection method, computer device, and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI771010B true TWI771010B (en) | 2022-07-11 |
TW202246766A TW202246766A (en) | 2022-12-01 |
Family
ID=83439354
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110118306A TWI771010B (en) | 2021-05-20 | 2021-05-20 | Defect detection method, computer device, and storage medium |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI771010B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201946181A (en) * | 2018-03-21 | 2019-12-01 | 美商克萊譚克公司 | Training a machine learning model with synthetic images |
WO2021046951A1 (en) * | 2019-09-09 | 2021-03-18 | 安徽继远软件有限公司 | Image identification method, system, and storage medium |
US20210110525A1 (en) * | 2019-01-15 | 2021-04-15 | International Business Machines Corporation | Product defect detection |
TW202119288A (en) * | 2019-11-11 | 2021-05-16 | 大陸商深圳市商湯科技有限公司 | Image classification model training method, image processing method, data classification model training method, data processing method, computer device, and storage medium |
-
2021
- 2021-05-20 TW TW110118306A patent/TWI771010B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201946181A (en) * | 2018-03-21 | 2019-12-01 | 美商克萊譚克公司 | Training a machine learning model with synthetic images |
US20210110525A1 (en) * | 2019-01-15 | 2021-04-15 | International Business Machines Corporation | Product defect detection |
WO2021046951A1 (en) * | 2019-09-09 | 2021-03-18 | 安徽继远软件有限公司 | Image identification method, system, and storage medium |
TW202119288A (en) * | 2019-11-11 | 2021-05-16 | 大陸商深圳市商湯科技有限公司 | Image classification model training method, image processing method, data classification model training method, data processing method, computer device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
TW202246766A (en) | 2022-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109949305B (en) | Product surface defect detection method and device and computer equipment | |
CN115456929A (en) | Defect detection method, computer device and storage medium | |
CN109613002B (en) | Glass defect detection method and device and storage medium | |
US11341626B2 (en) | Method and apparatus for outputting information | |
WO2021093448A1 (en) | Image processing method and apparatus, server, medical image processing device and storage medium | |
JP6868119B2 (en) | Holographic anti-counterfeit code inspection method and equipment | |
US11715190B2 (en) | Inspection system, image discrimination system, discrimination system, discriminator generation system, and learning data generation device | |
TW202036353A (en) | Solder paste printing quality detecting method, data processing device and computer storage medium | |
US20230214989A1 (en) | Defect detection method, electronic device and readable storage medium | |
CN117152152B (en) | Production management system and method for detection kit | |
WO2024002187A1 (en) | Defect detection method, defect detection device, and storage medium | |
JP2021515885A (en) | Methods, devices, systems and programs for setting lighting conditions and storage media | |
WO2024066035A1 (en) | Defect detection method and system based on battery surface image, and related device | |
CN117173172B (en) | Machine vision-based silica gel molding effect detection method and system | |
JP7453813B2 (en) | Inspection equipment, inspection methods, programs, learning devices, learning methods, and learned datasets | |
CN117630800A (en) | Fault diagnosis method and system for automatic calibrating device of electric energy meter | |
TWI771010B (en) | Defect detection method, computer device, and storage medium | |
CN116385331A (en) | Flaw detection method, flaw detection system, electronic equipment and medium | |
TWI765589B (en) | Abnormality detection method, computer device, and storage medium | |
TW202226154A (en) | Method for detecting defects of product, computer device and storage medium | |
CN114998180A (en) | Abnormality detection method, computer device, and storage medium | |
US20240013369A1 (en) | Image defect detecting system, generation method of image defect detecting system and non-transitory computer readable medium | |
TW202225674A (en) | Method for detecting defects of product and computer device | |
JP2021135630A (en) | Learning device, image inspection device, learned data set, and learning method | |
JP2022013285A (en) | Machine learning method |