TWI791174B - Optical inspection method for detecting internal threads by using ai deep learning technique - Google Patents

Optical inspection method for detecting internal threads by using ai deep learning technique Download PDF

Info

Publication number
TWI791174B
TWI791174B TW109140528A TW109140528A TWI791174B TW I791174 B TWI791174 B TW I791174B TW 109140528 A TW109140528 A TW 109140528A TW 109140528 A TW109140528 A TW 109140528A TW I791174 B TWI791174 B TW I791174B
Authority
TW
Taiwan
Prior art keywords
thread
image
images
normal
screw
Prior art date
Application number
TW109140528A
Other languages
Chinese (zh)
Other versions
TW202221560A (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 TW109140528A priority Critical patent/TWI791174B/en
Publication of TW202221560A publication Critical patent/TW202221560A/en
Application granted granted Critical
Publication of TWI791174B publication Critical patent/TWI791174B/en

Links

Images

Abstract

An optical inspection method for detecting internal threads by using AI deep learning technique, including: performing an image capturing step to obtain a screw image, performing an image classification step to classify all the obtained screw images into multiple screw reference images and multiple screw abnormal images, performing an image rotation step on the multiple reference screw images and the multiple abnormal screw images to obtain the multiple reference rotation images and the multiple abnormal rotation images respectively, performing an image cropping step and an image optimization step on the multiple reference rotation images and the multiple abnormal rotation images respectively, and then obtaining multiple reference optimized images and multiple abnormal optimized images, performing a neural network training step on the multiple reference optimized images and the multiple abnormal optimized images, and establishing a training model, providing an image of the screw to be identified, and sending the image into the training model for an identification and comparison step, and finally, performing a classification suggestion step, and classifying the image to be identified as normal screw nut misaligned screw nut or defective screw nut based on the result of the identification comparison step.

Description

運用深度學習檢測內螺紋螺牙之光學檢測方法 Optical inspection method for internal thread thread inspection using deep learning

本發明係關於一種光學檢測方法,尤其是一種運用深度學習檢測內螺紋螺牙之光學檢測方法。 The invention relates to an optical detection method, in particular to an optical detection method using deep learning to detect internal thread threads.

隨著科技的進步,一些機械裝置所使用的螺帽越來越精密,而螺帽在製作過程中常會遇到內螺紋產生斜角或缺陷的現象,當這些異常的狀況越多,螺帽生產的品質、良率就越低,而這些異常現象由於位在內螺紋的地方,因此不容易被檢測出來,由其當螺帽尺寸長度較長時,這將造成螺絲與螺帽無法完全螺合,或是產生螺牙間不當咬合的狀況,由其在高精密度的零組件,這屬非常嚴重的瑕疵問題。 With the advancement of science and technology, the nuts used in some mechanical devices are becoming more and more precise, and the nuts often encounter internal thread bevels or defects during the production process. When these abnormal conditions increase, the nut production The lower the quality and yield rate, and these abnormal phenomena are not easy to be detected because they are located in the internal thread, because when the size and length of the nut are longer, this will cause the screw and the nut to not be completely screwed together , or the occurrence of improper engagement between the screw teeth, due to its high-precision components, this is a very serious defect problem.

習知技術中華民國發明專利第1345936號主要判斷導引定位筒內是否有定位銷的存在,藉由磁吸元件可避免傳統螺牙咬合結構造成的頂針歪斜現象,提高定位銷裝配的精準度。 The conventional technology of the Republic of China Invention Patent No. 1345936 is mainly to determine whether there is a positioning pin in the guide and positioning cylinder. The magnetic element can avoid the skewing of the thimble caused by the traditional screw teeth engagement structure, and improve the accuracy of the positioning pin assembly.

習知技術中華民國新型專利第M355371號主要透過放大鏡放大影像擷取單元拍攝到的該內螺牙的影像中,來增加影像的辨識度,且仍由人工辨識,所以無法準確辨識也無法自動化,使得螺紋好壞與否無法得更快速的辨識。 The conventional technology of the Republic of China New Patent No. M355371 mainly uses a magnifying glass to enlarge the image of the internal thread captured by the image capture unit to increase the recognition of the image, and it is still manually recognized, so it cannot be accurately recognized and cannot be automated. It makes it impossible to identify whether the thread is good or bad.

習知技術中華民國申請號099138839透過螺紋鋒反射光的狀態來判斷螺紋鋒是否變形,惟,該習知技術無法準確辨識螺紋的缺陷狀態、斜角等狀況,也無人工智慧使整個辨識系統自動化。 The known technology of the Republic of China Application No. 099138839 judges whether the thread front is deformed through the state of the reflected light of the thread front. However, this conventional technology cannot accurately identify the defect state of the thread, the bevel, etc., and there is no artificial intelligence to automate the entire identification system. .

上述習知技術均未揭示如何解決工廠端在生產製造螺絲、螺帽時,螺牙產生缺陷、斜角的問題,因此有必要加以改良。 None of the above-mentioned conventional technologies discloses how to solve the problem of defects and bevels in the screw teeth when the factory manufactures screws and nuts, so it is necessary to improve them.

本發明之一目的在提供一種運用深度學習檢測內螺紋螺牙之光學檢測方法,透過影像辨識來檢測螺牙的紋路狀態。 One purpose of the present invention is to provide an optical detection method using deep learning to detect internal thread threads, and to detect the state of the thread pattern of the thread through image recognition.

本發明之另一目的在提供一種運用深度學習檢測內螺紋螺牙之光學檢測方法,透過旋轉螺牙影像來增加辨識演算法的學習效率,提高辨識準確度。 Another object of the present invention is to provide an optical detection method using deep learning to detect internal thread threads, which increases the learning efficiency of the recognition algorithm and improves the recognition accuracy by rotating the thread image.

為達成上述及其他目的,本發明之一種運用深度學習檢測內螺紋螺牙之光學檢測方法,包含:一光照取像步驟,將螺帽由螺孔正上方向下進行光照取得一螺牙光照影像;一影像分類步驟,將所有取得之該螺牙光照影像分類成複數螺牙參考影像及複數螺牙異常影像;將該複數參考螺牙影像及複數異常螺牙影像進行一影像旋轉步驟,該影像旋轉步驟係將每一影像進行0~360度的角度旋轉並擷取影像,分別取得複數參考旋轉像及複數異常旋轉影像;分別將該複數參考旋轉影像及該複數異常旋轉影像進行一影像裁切步驟及一影像優化步驟,並得到複數參考優化影像及複數異常優化影像;將該複數參考優化影像及該複數異常優化影像進行一神經網路訓練步驟,並建立一訓練模型;提供一欲辨識螺 牙影像,將該欲辨識螺牙影像送入該訓練模型進行一辨識比對步驟;及執行一分類建議步驟,將該欲辨識螺牙影像依據該辨識比對步驟結果分類為正常螺牙、缺陷螺牙或斜角螺牙。 In order to achieve the above and other objectives, an optical detection method of the present invention that uses deep learning to detect internal thread screws includes: an illumination imaging step, illuminating the nut from directly above the screw hole to obtain an illumination image of the screw teeth ; an image classification step, classifying all obtained screw tooth illumination images into a plurality of screw tooth reference images and a plurality of screw tooth abnormal images; performing an image rotation step on the plurality of reference screw tooth images and a plurality of abnormal screw tooth images, the image The rotation step is to rotate each image at an angle of 0 to 360 degrees and capture the image, respectively obtain a plurality of reference rotation images and a plurality of abnormal rotation images; perform an image cropping on the plurality of reference rotation images and the plurality of abnormal rotation images respectively step and an image optimization step, and obtain plural reference optimized images and plural abnormal optimized images; perform a neural network training step on the plural reference optimized images and the plural abnormal optimized images, and establish a training model; provide a screw to be identified tooth image, sending the image of the thread to be identified into the training model for an identification and comparison step; and performing a classification suggestion step, classifying the image of the thread to be identified as normal thread and defect according to the result of the identification and comparison step Threaded or beveled thread.

在本發明的一些實施例中,其中,該複數螺紋參考影像為正常螺牙影像,該複數螺紋異常影像為斜牙螺牙影像或缺陷螺牙影像。 In some embodiments of the present invention, the plurality of thread reference images are normal thread images, and the plurality of abnormal thread images are oblique thread images or defective thread images.

在本發明的一些實施例中,其中,在該影像旋轉步驟中,每一影像進行3~5次旋轉。 In some embodiments of the present invention, in the image rotating step, each image is rotated 3-5 times.

在本發明的一些實施例中,其中,其中,在該影像旋轉步驟中,每一影像進行3~5次等角度旋轉並擷取影像,且角度和為360度。 In some embodiments of the present invention, wherein, in the image rotation step, each image is rotated at equal angles for 3-5 times and the image is captured, and the sum of the angles is 360 degrees.

在本發明的一些實施例中,其中,該影像優化步驟係將影像進行灰階處理。 In some embodiments of the present invention, the image optimization step is to perform gray scale processing on the image.

在本發明的一些實施例中,其中,該辨識比對步驟設有一辨識標準範圍值,該辨識標準範圍介於-1~1,其中,該正常螺牙之辨識標準範圍值為大於0.75及小於或等於1,該斜角螺牙之辨識標準範圍值為大於0.5及小於或等於0.75,該缺陷螺牙之辨識標準範圍值為大於或等於-1及小於或等於0.5。 In some embodiments of the present invention, the identification comparison step is provided with an identification standard range value, the identification standard range is between -1~1, wherein, the identification standard range value of the normal screw thread is greater than 0.75 and less than or equal to 1, the identification standard range value of the beveled thread is greater than 0.5 and less than or equal to 0.75, and the identification standard range value of the defective thread is greater than or equal to -1 and less than or equal to 0.5.

S0:光照取像步驟 S0: Illuminated imaging step

S1:影像分類步驟 S1: Image classification step

S2:影像旋轉步驟 S2: Image rotation step

S3:影像裁切步驟 S3: Image cropping step

S4:影像優化步驟 S4: Image optimization steps

S5:神經網路訓練步驟 S5: Neural Network Training Steps

S6:辨識比對步驟 S6: Identification and comparison steps

S7:分類建議步驟 S7: Classification Proposal Step

圖1為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之一實施例流程圖;圖2為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之正常螺牙與斜角螺牙比較圖; 圖3為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之正常螺牙與缺陷螺牙比較圖;圖4為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之正常螺牙與斜角螺牙測面透視圖。 Figure 1 is a flow chart of an embodiment of the optical detection method of the present invention using deep learning to detect internal thread threads; Figure 2 is the normal thread and bevel angle of the present invention's optical detection method using deep learning to detect internal thread threads Screw tooth comparison chart; Fig. 3 is a comparison diagram of normal thread and defective thread of the optical detection method using deep learning to detect internal thread threads of the present invention; Fig. 4 is a normal thread of the present invention using deep learning to detect optical detection method of internal thread threads Perspective view of teeth and bevel screw teeth.

圖1為本發明之本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之一實施例流程圖,請參考圖1。本發明之一種運用深度學習檢測內螺紋螺牙之光學檢測方法說明如下。一光照取像步驟S0,將螺帽由螺孔正上方向下進行光照取得一螺牙光照影像。該光照取像步驟S0係將欲分類之螺帽進行光照後擷取影像,此步驟可以取得正常、斜角及缺陷的三種螺牙狀態的影像樣本,當光線由螺孔正上方向下照射時,透過影像拍攝可以取得類似同心圓的螺牙紋路影像。 FIG. 1 is a flowchart of an embodiment of the optical detection method of the present invention using deep learning to detect internal thread threads, please refer to FIG. 1 . An optical detection method of the present invention using deep learning to detect internal thread threads is described as follows. An illumination imaging step S0 , illuminating the nut from directly above the screw hole to obtain an illumination image of the screw teeth. The illumination imaging step S0 is to capture the image after illuminating the nut to be classified. This step can obtain image samples of three screw tooth states: normal, beveled, and defective. When the light is irradiated from the top to the bottom of the screw hole , the image of the thread pattern similar to concentric circles can be obtained through image shooting.

一影像分類步驟S1,將所有取得之該螺牙光照影像分類成複數螺牙參考影像及複數螺牙異常影像,以作為後續一神經網路訓練步驟S5的神經網路學習時的訓練資料。較佳地,在該影像分類步驟S1中,該複數螺牙參考影像係屬於正常螺牙影像,而該複數螺牙異常影像則另分成斜角參考螺牙影像及缺陷參考螺牙影像,在本發明中,將正常參考螺牙影像與斜角參考螺牙影像分成一組,及將正常參考螺牙影像與缺陷參考螺牙影像分成一組。 An image classification step S1 , classifying all the acquired screw tooth illumination images into a plurality of screw tooth reference images and a plurality of screw tooth abnormal images, which are used as training data for neural network learning in a subsequent neural network training step S5 . Preferably, in the image classification step S1, the plurality of thread reference images belong to normal thread images, and the plurality of abnormal thread images are further divided into oblique reference thread images and defect reference thread images. In the invention, the normal reference thread image and the oblique reference thread image are divided into one group, and the normal reference thread image and the defective reference thread image are divided into one group.

接著,將該複數螺牙參考影像及複數螺牙異常影像進行一影像旋轉步驟S2,該影像旋轉步驟S2係將每一影像進行0~360度的角度旋轉並擷取影像,分別取得複數參考旋轉影像及複數異常旋轉影像,其中,該影像旋轉步驟S2 係先將每一影像進行座標定位,然後依據需求將每一影像進行角度旋轉,例如旋轉0度之影像表示乃原始影像,旋轉90度表示影像逆時針轉角90度,透過旋轉影像角度可以增加樣本數,以及增加後續神經網路學習的精準度。 Next, an image rotation step S2 is performed on the plurality of screw reference images and the plurality of abnormal screw images. In the image rotation step S2, each image is rotated at an angle of 0 to 360 degrees and the image is captured to obtain the plurality of reference rotations respectively. An image and a plurality of abnormally rotated images, wherein the image is rotated in step S2 The system first coordinates and locates each image, and then rotates each image according to the requirements. For example, an image rotated by 0 degrees means that it is the original image, and a rotation of 90 degrees means that the image is rotated 90 degrees counterclockwise. By rotating the image angle, you can increase the number of samples number, and increase the accuracy of subsequent neural network learning.

接著,分別將該複數參考旋轉影像及該複數異常旋轉影像進行一影像裁切步驟S3及一影像優化步驟S4,並得到複數參考優化影像及複數異常優化影像,該影像裁切步驟S3可以刪除不必要的影像區塊,較佳地,該影像優化步驟S4係將影像進行灰階處理,可以提高特徵值,有助於後續神經學習及辨識判斷的效率。 Then, the plurality of reference rotation images and the plurality of abnormal rotation images are respectively subjected to an image cropping step S3 and an image optimization step S4, and a plurality of reference optimized images and a plurality of abnormal optimized images are obtained. The image cropping step S3 can delete Necessary image blocks, preferably, the image optimization step S4 is to process the image in grayscale, which can improve the feature value and facilitate the efficiency of subsequent neural learning and identification and judgment.

將該複數參考優化影像及該複數異常優化影像進行一神經網路訓練步驟S5,並建立一訓練模型,在本發明中,該神經網路訓練步驟S5係利用卷積神經網路深度學習的結構主要由卷積層(Convolutional)、池化層(Pooling)及完全連接層(Fully-connected)組成,本發明不再贅述,該訓練模型是一正常螺牙與斜角螺牙的訓練模型資料庫及一正常螺牙與缺陷螺牙的訓練模型資料庫。 The complex number of reference optimization images and the plurality of abnormal optimization images are subjected to a neural network training step S5, and a training model is established. In the present invention, the neural network training step S5 utilizes the deep learning structure of the convolutional neural network It mainly consists of a convolutional layer (Convolutional), a pooling layer (Pooling) and a fully connected layer (Fully-connected). A training model database of normal screw teeth and defective screw teeth.

圖2為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之正常螺牙與斜角螺牙比較圖圖3為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之正常螺牙與缺陷螺牙比較圖,請參考圖2及圖3,其中圖2(a)為斜角螺牙,圖3(a)為缺陷螺牙。提供一欲辨識螺牙影像,將該欲辨識螺牙影像送入該訓練模型進行一辨識比對步驟S6,在該辨識比對步驟S6中,係將該欲辨識的螺帽進行該光照取像步驟,取得該欲辨識螺牙影像並送入該訓練模型中進行影像辨識,其中,該辨識比對步驟S6中係先辨識是否為斜角螺牙,若非斜角螺牙,則再辨識是否為正常螺牙或是缺陷螺牙,若為正常螺牙,則辨識確認為正常螺牙。由圖2(a)可看出斜角螺帽的螺牙螺紋呈非同心圓的形狀。 Figure 2 is a comparison of the normal thread and the beveled thread of the optical detection method using deep learning to detect internal thread threads of the present invention. Figure 3 is the normal thread of the present invention using deep learning to detect the optical detection method of internal thread threads Please refer to Figure 2 and Figure 3 for the comparison between thread and defective thread, in which Figure 2(a) is a beveled thread, and Figure 3(a) is a defective thread. Provide an image of the screw teeth to be identified, and send the image of the screw teeth to be identified into the training model to perform a recognition comparison step S6. In the identification and comparison step S6, the image of the nut to be identified is taken by the light Step 1: Obtain the image of the thread to be identified and send it into the training model for image recognition. In the identification comparison step S6, first identify whether it is a beveled thread, and if it is not a beveled thread, then identify whether it is Normal thread or defective thread, if it is a normal thread, it will be recognized as a normal thread. It can be seen from Figure 2(a) that the screw thread of the bevel nut is in the shape of a non-concentric circle.

圖4為本發明之運用深度學習檢測內螺紋螺牙之光學檢測方法之正常螺牙與斜角螺牙測面透視圖,請參考圖4。由圖4(a)可很明顯可看出斜角螺帽中心線與正常螺帽中心線呈現一夾角。 Fig. 4 is a perspective view of the normal thread and beveled thread of the optical inspection method of the present invention using deep learning to detect internal thread threads, please refer to Fig. 4 . From Figure 4(a), it can be clearly seen that the centerline of the beveled nut presents an included angle with the centerline of the normal nut.

執行一分類建議步驟S7,將該欲辨識螺牙影像依據該辨識比對步驟S6結果分類為正常螺牙、斜角螺牙或缺陷螺牙,該分類建議步驟S7係根據該辨識比對步驟S6中之結果輸出一結果報告,該結果報告包含每一欲辨識螺帽的分類結果統計資料。 Executing a classification suggestion step S7, classifying the image of the thread to be identified as normal thread, beveled thread or defective thread according to the result of the identification and comparison step S6, the classification suggestion step S7 is based on the identification and comparison step S6 The result in output a result report, the result report contains the statistical data of classification results for each nut to be identified.

較佳地,在該影像旋轉步驟中,每一影像進行3~5次旋轉,例如旋轉3,旋轉的次數及效率在3~5次時,對於該神經網路訓練步驟S5中會有較佳的訓練效果。 Preferably, in the image rotation step, each image is rotated 3 to 5 times, such as 3 rotations, and when the number of rotations and efficiency are 3 to 5 times, it will be better for the neural network training step S5. training effect.

較佳地,在該影像旋轉步驟中,每一影像進行3~5次等角度旋轉並擷取影像,且角度和為360度,例如:當旋轉3次,表示從0度、90度、180度及270各擷取一張影像,此時對於該神經網路訓練步驟S5中會有較佳的訓練效果。 Preferably, in the image rotation step, each image is rotated 3 to 5 times at equal angles and the image is captured, and the sum of the angles is 360 degrees. One image is captured at 270 degrees and 270 degrees, and at this time, there will be a better training effect for the neural network training step S5.

較佳地,其中,該複數參考旋轉影像及該複數異常旋轉影像的數量相同,其中,正常參考螺牙影像與斜角參考螺牙影像數量相同時,或是將正常參考螺牙影像與缺陷參考螺牙影像數量相同時,在該神經網路訓練步驟S5中會有較佳的有效訓練結果。 Preferably, the number of the plurality of reference rotation images and the plurality of abnormal rotation images are the same, wherein, when the number of normal reference thread images and bevel reference thread images are the same, or the normal reference thread images and defect reference images When the number of thread images is the same, there will be a better effective training result in the neural network training step S5.

較佳地,該辨識比對步驟S6設有一辨識標準範圍值,該辨識標準範圍介於-1~1,其中,該正常螺牙之辨識標準範圍值為大於0.75及小於或等於1,該斜角螺牙之辨識標準範圍值為大於0.5及小於或等於0.75,該缺陷螺牙之辨識標準範圍值為大於或等於-1及小於或等於0.5,該辨識標準範圍係指該欲辨識螺牙影像在該辨識比對步驟S6中與該訓練模型的相似度比對值範圍,當相似度比 對值為大於0.75及小於或等於1時,則判定為正常螺牙,當相似度比對值為大於0.5及小於或等於0.75時,則判定為斜角螺牙,當相似度比對值為大於或等於-1及小於或等於0.5時,則判定為該缺陷螺牙。 Preferably, the identification comparison step S6 is provided with an identification standard range value, the identification standard range is between -1~1, wherein, the identification standard range value of the normal screw thread is greater than 0.75 and less than or equal to 1, the skew The identification standard range of angular screw teeth is greater than 0.5 and less than or equal to 0.75, and the identification standard range value of the defective screw tooth is greater than or equal to -1 and less than or equal to 0.5. The identification standard range refers to the image of the screw tooth to be identified In this identification comparison step S6, compare the value range with the similarity of the training model, when the similarity ratio When the pair value is greater than 0.75 and less than or equal to 1, it is judged as a normal thread; when the comparison value of the similarity is greater than 0.5 and less than or equal to 0.75, it is judged as a beveled thread; when the comparison value of the similarity is When it is greater than or equal to -1 and less than or equal to 0.5, it is judged as the defective thread.

本發明的精神在於,透過旋轉影像擷取各角度的影像作為神經網路學習訓練樣本,以及將正常參考螺牙影像與斜角參考螺牙影像分成一組,及將正常參考螺牙影像與缺陷參考螺牙影像分成一組,有助於提高辨識精準度。 The spirit of the present invention is to capture images of various angles by rotating the images as neural network learning training samples, and divide the normal reference thread image and the oblique reference thread image into one group, and separate the normal reference thread image and the defect The reference thread images are divided into one group, which helps to improve the recognition accuracy.

以上所述之實施例僅係為說明本發明之技術思想及特徵,其目的在使在本技術領域具有通常知識者均能了解本發明之內容並據以實施,當不能以此限定本發明之專利範圍,凡依本發明之精神及說明書內容所作之均等變化或修飾,皆應涵蓋於本發明專利範圍內。 The above-mentioned embodiments are only to illustrate the technical ideas and characteristics of the present invention, and its purpose is to enable those with ordinary knowledge in the technical field to understand the content of the present invention and implement it accordingly, and should not limit the scope of the present invention. The scope of the patent, all equivalent changes or modifications made in accordance with the spirit of the present invention and the content of the description shall be covered within the scope of the patent of the present invention.

S0:光照取像步驟 S0: Illuminated imaging step

S1:影像分類步驟 S1: Image classification step

S2:影像旋轉步驟 S2: Image rotation step

S3:影像裁切步驟 S3: Image cropping step

S4:影像優化步驟 S4: Image optimization steps

S5:神經網路訓練步驟 S5: Neural Network Training Steps

S6:辨識比對步驟 S6: Identification and comparison steps

S7:分類建議步驟 S7: Classification Proposal Step

Claims (3)

一種運用深度學習檢測內螺紋螺牙之光學檢測方法,包含:一光照取像步驟(S0),將螺帽由螺孔正上方向下進行光照取得一螺牙光照影像,取得正常、斜角及缺陷的三種螺牙狀態的影像樣本;一影像分類步驟(S1),將所有取得之該螺牙光照影像分類成複數螺牙參考影像及複數螺牙異常影像,該複數螺牙參考影像包含一正常參考螺牙影像,該複數螺牙異常影像包含一斜角參考螺牙影像及一缺陷參考螺牙影像,再將該正常參考螺牙影像與該斜角參考螺牙影像分成一組,及將該正常參考螺牙影像與該缺陷參考螺牙影像分成一組,以作為後續一神經網路訓練步驟(S5)的訓練資料;將該複數螺牙參考影像及複數螺牙異常影像進行一影像旋轉步驟(S2),該影像旋轉步驟係將每一影像進行3~5次等角度旋轉並擷取影像,且角度和為360度,分別取得複數參考旋轉影像及複數異常旋轉影像,其中,該複數參考旋轉影像及該複數異常旋轉影像的數量相同;分別將該複數參考旋轉影像及該複數異常旋轉影像進行一影像裁切步驟(S3)及一影像優化步驟(S4),並得到複數參考優化影像及複數異常優化影像;將該複數參考優化影像及該複數異常優化影像進行該神經網路訓練步驟(S5),並建立一訓練模型,該訓練模型包含一正常螺牙與斜角螺牙的訓練模型資料庫,及一正常螺牙與缺陷螺牙的訓練模型資料庫;提供一欲辨識螺牙影像,將該欲辨識螺牙影像送入該訓練模型進行一辨識比對步驟(S6),先藉由該正常螺牙與斜角螺牙的訓練模型資料庫辨識是否為斜角螺牙, 若非斜角螺牙則再藉由該正常螺牙與缺陷螺牙的訓練模型資料庫辨識是否為正常螺牙或是缺陷螺牙,若為正常螺牙則辨識確認為正常螺牙;及執行一分類建議步驟(S7),將該欲辨識螺牙影像依據該辨識比對步驟(S6)結果分類為正常螺牙、缺陷螺牙或斜角螺牙。 An optical detection method using deep learning to detect internal thread screws, including: an illumination imaging step (S0), illuminating the nut from directly above the screw hole to obtain an illumination image of the screw teeth, and obtaining normal, bevel and Image samples of the three kinds of thread states of defects; an image classification step (S1), classifying all obtained light images of the thread into plural thread reference images and plural thread abnormal images, the plural thread reference images including a normal The reference thread images, the plurality of abnormal thread images include a beveled reference thread image and a defective reference thread image, and then the normal reference thread image and the beveled reference thread image are divided into one group, and the The normal reference thread image and the defective reference thread image are divided into a group as training data for a subsequent neural network training step (S5); an image rotation step is performed on the plurality of thread reference images and the plurality of abnormal thread images (S2), the image rotation step is to rotate each image 3 to 5 times at an equal angle and capture the image, and the sum of the angles is 360 degrees, respectively obtain a plurality of reference rotation images and a plurality of abnormal rotation images, wherein the plurality of reference The numbers of the rotated image and the plurality of abnormally rotated images are the same; the plurality of reference rotated images and the plurality of abnormally rotated images are respectively subjected to an image cropping step (S3) and an image optimization step (S4), and a plurality of reference optimized images and Plural anomaly optimization images; the neural network training step (S5) is performed on the plurality of reference optimization images and the plurality of anomaly optimization images, and a training model is established, the training model includes a training model of normal screw teeth and beveled screw teeth Database, and a training model database of normal screw teeth and defective screw teeth; provide a screw tooth image to be identified, send the image of screw teeth to be identified into the training model for an identification comparison step (S6), first borrow From the training model database of the normal thread and beveled thread, identify whether it is a beveled thread, If it is not a beveled thread, then use the training model database of the normal thread and defective thread to identify whether it is a normal thread or a defective thread, and if it is a normal thread, then identify and confirm that it is a normal thread; and perform a In the classification suggestion step (S7), the image of the thread to be identified is classified as a normal thread, a defective thread or a beveled thread according to the result of the identification and comparison step (S6). 如請求項1所述之一種運用深度學習檢測內螺紋螺牙之光學檢測方法,其中,該影像優化步驟(S4)係將影像進行灰階處理。 According to claim 1, an optical detection method using deep learning to detect internal thread threads, wherein the image optimization step (S4) is to perform grayscale processing on the image. 如請求項1所述之一種運用深度學習檢測內螺紋螺牙之光學檢測方法,其中,該辨識比對步驟(S6)設有一辨識標準範圍值,該辨識標準範圍介於-1~1,其中,該正常螺牙之辨識標準範圍值為大於0.75及小於或等於1,該斜角螺牙之辨識標準範圍值為大於0.5及小於或等於0.75,該缺陷螺牙之辨識標準範圍值為大於或等於-1及小於或等於0.5。 An optical detection method using deep learning to detect internal thread threads as described in claim 1, wherein the identification and comparison step (S6) is provided with an identification standard range value, and the identification standard range is between -1~1, wherein , the identification standard range value of the normal thread is greater than 0.75 and less than or equal to 1, the identification standard range value of the beveled thread is greater than 0.5 and less than or equal to 0.75, the identification standard range value of the defective thread is greater than or Equal to -1 and less than or equal to 0.5.
TW109140528A 2020-11-19 2020-11-19 Optical inspection method for detecting internal threads by using ai deep learning technique TWI791174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109140528A TWI791174B (en) 2020-11-19 2020-11-19 Optical inspection method for detecting internal threads by using ai deep learning technique

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109140528A TWI791174B (en) 2020-11-19 2020-11-19 Optical inspection method for detecting internal threads by using ai deep learning technique

Publications (2)

Publication Number Publication Date
TW202221560A TW202221560A (en) 2022-06-01
TWI791174B true TWI791174B (en) 2023-02-01

Family

ID=83062447

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109140528A TWI791174B (en) 2020-11-19 2020-11-19 Optical inspection method for detecting internal threads by using ai deep learning technique

Country Status (1)

Country Link
TW (1) TWI791174B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM355371U (en) * 2008-09-04 2009-04-21 Knight Vision Pte Ltd Detection device for inner thread of nut
EP3640002A1 (en) * 2017-06-13 2020-04-22 The Japan Steel Works, Ltd. Screw shape estimation apparatus, screw shape estimation method, and screw shape estimation program
TW202037906A (en) * 2019-01-10 2020-10-16 美商蘭姆研究公司 Defect classification and source analysis for semiconductor equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM355371U (en) * 2008-09-04 2009-04-21 Knight Vision Pte Ltd Detection device for inner thread of nut
EP3640002A1 (en) * 2017-06-13 2020-04-22 The Japan Steel Works, Ltd. Screw shape estimation apparatus, screw shape estimation method, and screw shape estimation program
TW202037906A (en) * 2019-01-10 2020-10-16 美商蘭姆研究公司 Defect classification and source analysis for semiconductor equipment

Also Published As

Publication number Publication date
TW202221560A (en) 2022-06-01

Similar Documents

Publication Publication Date Title
JP6598162B2 (en) Visual identification method of multi-type BGA chip based on linear clustering
JP6922539B2 (en) Surface defect determination method and surface defect inspection device
CN115351598A (en) Numerical control machine tool bearing detection method
CN109840900B (en) Fault online detection system and detection method applied to intelligent manufacturing workshop
CN111667455A (en) AI detection method for various defects of brush
CN109829911B (en) PCB surface detection method based on contour out-of-tolerance algorithm
TW202141027A (en) Method and system for classifying defects in wafer using wafer-defect images, based on deep learning
JP2021515885A (en) Methods, devices, systems and programs for setting lighting conditions and storage media
TW201930908A (en) Board defect filtering method and device thereof and computer-readabel recording medium
TW202139133A (en) Examination of a semiconductor specimen
TW201909010A (en) Design and layout-based fast online defect diagnosis, classification and sampling method and system
CN115866502A (en) Microphone part surface defect online detection process
Kähler et al. Anomaly detection for industrial surface inspection: Application in maintenance of aircraft components
TWI791174B (en) Optical inspection method for detecting internal threads by using ai deep learning technique
CN106501278B (en) Surface of the light tube defect classification method and system based on invariable rotary textural characteristics
CN115597494B (en) Precision detection method and system for prefabricated part preformed hole based on point cloud
CN111192261A (en) Method for identifying lens defect types
CN114693652B (en) Fabric Defect Detection Method Based on Gaussian Mixture Model
TWI777307B (en) Method, computer program, and computer readable medium of using electroluminescence images to identify defect of solar cell based on deep learning technology
KR20190119801A (en) Vehicle Headlight Alignment Calibration and Classification, Inspection of Vehicle Headlight Defects
Lin et al. X-ray imaging inspection system for blind holes in the intermediate layer of printed circuit boards with neural network identification
TWI745946B (en) A golf ball computer inspection system and automatic optic inspection apparatus
CN112465784B (en) Metro clamp appearance abnormality detection method
CN117876376B (en) High-speed multifunctional connector quality visual detection method
TWI802873B (en) Defect detection method and system for transparent substrate film