印刷電路板PCB(Printed circuit board)是將各種電子元件相互連接起來的支撐體,對電子產品是一樣最為重要的東西,只要PCB上有瑕疵,都可能造成電子產品的嚴重缺陷。傳統PCB對於表面上的瑕疵檢測多以人工方式檢查,然而這種傳統的人工檢測不僅耗時,也會因為視覺疲勞及人為的因素導致檢查結果因人而異且錯誤率也高,隨著電腦視覺技術的進步,現今工業開始轉為使用自動光學檢測(AOI, Automated Optical Inspection)技術來對PCB進行瑕疵檢測,但現今大多數AOI是使用傳統的光學檢測演算法,此種演算法容易因為位置或光影導致誤判,本研究是針對AOI判別為不良品的SMD(Surface Mount Device)電容影像,建立一套能夠分辨瑕疵的深度學習模型,對AOI的不良品進行覆判,並觀察在三種模型,分別是EfficientNet-B0、ResNet50V2、及自己建立的簡化模型(Simple_CNN)對於判別上的執行時間,由於應用於工業上,所以執行速度會是一個很大的重點。 最終的實驗結果顯示,在CPU: AMD Ryzen 5 2600X Six-Core Processor 3.60 GHz以及GPU: NVIDIA GeForce GTX 1060 6GB的環境下,使用4290張平均大小為100x100的影像,以3比1的比例,32x32的影像大小進行訓練及測試,在這三種模型上,SMD電容元件在Simple_CNN上,獲得了97%以上的準確率,在EfficientNet-B0上獲得了96%以上的準確率,在ResNet50V2上獲得了94%以上的準確率,測試出平均執行速度最快的為Simple_CNN,總耗時約1.703秒; 平均執行速度其次的為EfficientNet-B0,總耗時約3.756秒,平均執行速度最慢的為ResNet50V2,總耗時約3.952秒。並且使用Simple_CNN對其他影像進行模型的測試,經過測試發現在391張平均大小為2048x1536的金相後製程影像上,224x224的影像大小進行訓練及測試,Simple_CNN獲得了91%的準確率,總耗時約23.08秒。 這代表著對AOI淘汰的SMD電容或是特徵較為簡易的影像進行覆判,使用簡化的模型準確度最高,也能夠大幅度減少執行時間。
Printed circuit board (PCB) is a support that connects various electronic components to each other. It is the most important thing for electronic products. If there are defects on the PCB, it may cause serious defects in electronic products. Traditional PCBs mostly use manual inspection for surface defects. However, this traditional manual inspection is not only time-consuming, but also causes visual fatigue and human factors to cause the inspection results to vary from person to person and the error rate is also high. With the advent of computers, With the advancement of visual technology, today's industry has begun to use Automated Optical Inspection (AOI) technology to detect defects on PCBs. However, most AOI today use traditional optical inspection algorithms, which are prone to defects due to location. Or misjudgment caused by light and shadow. This study is to establish a deep learning model that can distinguish defects based on SMD (Surface Mount Device) capacitive images that are judged as defective products by AOI, re-judge the defective products of AOI, and observe three types of defects. The models are EfficientNet-B0, ResNet50V2, and the simplified model (Simple_CNN) built by ourselves. Regarding the execution time of the discrimination, since it is used in industry, the execution speed will be a big focus. The final experimental results show that in the environment of CPU: AMD Ryzen 5 2600X Six-Core Processor 3.60 GHz and GPU: NVIDIA GeForce GTX 1060 6GB, using 4290 images with an average size of 100x100, with a ratio of 3:1, 32x32 The image size was used for training and testing. On these three models, the SMD capacitive element achieved an accuracy of more than 97% on Simple_CNN, an accuracy of more than 96% on EfficientNet-B0, and an accuracy of 94 on ResNet50V2. % or above, the test showed that the fastest average execution speed is Simple_CNN, which takes about 1.703 seconds in total; the second highest average execution speed is EfficientNet-B0, which takes about 3.756 seconds in total, and the slowest average execution speed is ResNet50V2. The total time is about 3.952 seconds. Simple_CNN was also used to test the model on other images. After testing, it was found that on 391 metallographic post-process images with an average size of 2048x1536, training and testing on an image size of 224x224, Simple_CNN achieved an accuracy of 91% and a total time-consuming About 23.08 seconds. This means re-judging SMD capacitors eliminated by AOI or images with simpler features. Using simplified models has the highest accuracy and can also significantly reduce execution time.