摘要: | 印刷電路板 (Printed circuit board, PCB) 是電子元件的支撐體,可廣泛應用在電視、手機、電腦、汽車等電子工業產品。一般檢查印刷電路板是否為良品,會使用自動光學檢查 (automated optical inspection, AOI) 設備進行外觀檢查,但因為印刷電路板產業對良率有極高要求,易受到製程誤差、樣板對位不準確、光學演算法設定過於嚴格等問題而產生過多檢查誤報,需要大量人工進行二次複檢找出真實瑕疵進行確認,導致產能無法有效提高。 在本論文中我們使用結合卷積神經網路 (convolution neural network, CNN) 與自我注意力的 CoAtNet 為基礎,建構一套瑕疵辨識系統。我們在系統中分別加入特徵金字塔網路 (Feature pyramid network, FPN) 模組建構多重解析度,將低階尺度特徵與高階尺度特徵融合,改進小尺度瑕疵辨識不易問題;使用可變形卷積網路 (Deformable convolution network, DCN) 模組取代 CoAtNet 部分卷積運算,透過在卷積採樣點增加偏移量,以強化模型在樣本幾何變換的泛用性;另外我們在影像前處理進行也進行改進,包含:i. 將印刷電路板影像與對應的母板影像經影像處理後進行通道併聯,藉由增加樣本特徵多樣性提升網路的辨識效果;ii. 使用影像強化增強資料的特徵以檢出不明顯瑕疵;iii. 使用資料擴增 (data augmentation) 增加樣本的多樣性避免模型過擬合 (overfitting)。 在實驗中,我們比較各個前處理方法對系統進行的影響,分析瑕疵檢測系統添加改進模組前後的效益,以及比較 SGD、RMSprop、Adam、AdamW 四種最佳化法,與 StepLR、CosinAnnealingLR、ExponentialLR、ReduceLROnPlateau 四種學習策略對模型的效益,最終改進的網路架構在召回率的測試結果達到了 98.5642%,精確率達到了 98.7558%,相較於原版本的網路架構召回率提升了 1.5%,精確率提升了 0.65%,且沒有增加過多推論時間,可以在低漏失的前提下,有效改善 AOI 設備檢查誤報過多導致延誤生產的問題。 ;Printed circuit board is the foundation of electronic components, and could be widely applied in electronic industrial products such as televisions, cell phones, computers, and cars. Generally, the automated optical inspection equipment is used for visual inspection to check whether the printed circuit board is acceptable product. However, printed circuit board industry has extremely high requirements on yield, and is easily affected by manufacturing process error, template alignment error, and strictly optical algorithm setting. It will bring out lots of false alarm, and need large human effort to verify real defects which make it’s inefficient to improve the production capacity. In this paper, we construct a defect recognition system based on CoAtNet, which integrated convolutional neural network and self-attention. We added feature pyramid network to establish multi-resolutions, which can consolidate low-level scale features with high-level scale features to improve the problem of small-scale defect identification. We replaced the partial convolution operation of CoAtNet with deformable convolution network module by increasing the offset at the convolution sampling point in order to enhance the generality of the model in sample geometric transformation. We also improve the image pre-processing, including: i. Concat printed circuit board image with it’s mother board image in the defect classification, which can improve lower scale defect identification; ii. Use image enhancement algorithm to enhance the features of the data to detect inconspicuous defects; iii. Utilize data augmentation to increase sample diversity and avoid model overfitting.. In the experiment, we compared the impact of each pre-processing method on the system, analyzed the benefits of the defect recognition system before and after the integration of each module, and tested the benefits of four optimizers, including SGD、RMSprop、Adam、AdamW, and four learning schedules as StepLR、CosinAnnealingLR、ExponentialLR、ReduceLROnPlateau. The last improved network architectures recall rate reached 98.5642%, and the precision rate achieved 98.7558%. To compare with the original version network architectures, recall rate increased by 1.5% and the precision rate is increased by 0.65% without too much inference time. It could also effectively improve the problem of excessive false positives from automated optical inspection equipment inspections under the low false negatives, and avoid the production delay. |