摘要: | 聚酯膠片是一種人工合成塑膠,可用在多項產品的外包裝上;例如,器材包裝、食品包裝、貨運包裝、藥品包裝、電子元件包裝等,聚酯膠片除了多元化應用之外,也需要兼顧產品品質,傳統上聚酯膠片在生產過程是使用人眼觀察檢查,但是聚酯膠片生產過程是一直持續移動前進的,對於移動的生產過程使用人工檢查上產生了很多不確定因素;例如,眼睛疲勞、新人不熟悉、移動中判斷瑕疵大小困難等。在本論文中我們基於卷積神經網路 (convolution neural network, CNN) 提出了一套聚酯膠片的瑕疵分類系統,此系統會先使用原始網路模型,並評估後改進卷積神經網路;例如,縮減模型,擴增模型、增加訓練次數、錯誤分析等,而後再利用SinGAN彌補資料樣本數不足造成資料不平衡的情況,使得系統對於分類聚酯膠片的瑕疵;例如,氣泡、破洞、晶點、蚊蟲、碳化物、噴料、缺料偏薄、積料過厚,能有更好的精確率、召回率、準確率,因此這套系統可以用於產品檢測上,替代人工視覺檢查,保持產品品質及穩定性。 本論文分為五部分:第一部分是使用VGG16、GoogLeNet及DenseNet三個原始網路模型進行訓練,三個模型分類成績最好的會在進行下一步。第二部分是縮減模型,在使用DenseNet為基礎下進行有條件的限制,目的是為了詳細了解聚酯膠片在訓練分類過程中,低階特徵、高階特徵還是模型深度是影響模型準確率的關鍵,結果是最佳化的修改方向。第三部分是擴增模型,針對卷積神經網路加深層數,以改善分類結果。第四部分是用SinGAN生成瑕疵樣本,為了避免在瑕疵樣本數太少的情況下訓練模型會發生過度擬合的情況,以保持高準確率。第五部份是增加訓練次數及錯誤分析,增加模型穩定性,並檢查是否原瑕疵樣本就發生了人工歸類錯誤,以提升分類的精確率、召回率及準確率。 在實驗中,我們蒐集聚酯膠片生產時所產生的瑕疵影像,瑕疵種類共有八類,包含碳化物:581張、氣泡:428張、蚊蟲:32張、噴料:234張、缺料偏薄:98張、破洞:28張、積料過厚:430張及晶點:460張,總共2291張,影像解析度皆為224×224,在未使用SinGAN生成瑕疵樣本且資料增強後,訓練樣本是6414張,測試樣本是2750張,總數是9164張,VGG16準確率為88.84%、GoogLeNet準確率為69.93%、DenseNet準確率為91.38%。而在使用SinGAN生成瑕疵樣本,蚊蟲變成266張且資料增強後,訓練樣本是7070張,測試樣本是3030張,總數是10100張,使用SinGAN後準確率為96.57%,提升了5.19%。而在改進後的DenseNet準確率為100%,比起原始DenseNet準確率提升了8.62%,執行速度每秒處理275張,模型大小是45.5MB。 ;Polyester films is a kind of synthetic plastic that can be used in the outer packaging of many products; for example, equipment packaging, food packaging, freight packaging, pharmaceutical packaging, electronic component packaging, etc. In addition to diversified applications, polyester film also needs to be considered. The quality of the products is traditionally inspected by human eyes during the production process of polyester film. However, the production process of polyester film has been continuously moving forward. There are many uncertain factors in the manual inspection of the mobile production process; for example, eyes Fatigue, unfamiliar newcomers, difficulty in judging the size of flaws while moving, etc. In this research, we propose a polyester films defect classification system based on convolution neural network. This system will first use the original network model and improve the convolutional neural network after evaluation. For example, reduce the model, expand the model, increase the number of training, error analysis, etc., and then use SinGAN to make up for the insufficient number of data samples to cause the imbalance of the data, so that the system has defects in the classification of polyester films; for example, bubble, hole, crystal, mosquito, lack, spray, carbon, and hoard, can have better precision, recall, and accuracy. Therefore, this system can be used for product inspection instead of artificial vision check to maintain product quality and stability. This paper is divided into five parts: The first part is to use the three original network models of VGG16, GoogLeNet and DenseNet for training. The three models with the best classification results will proceed to the next step. The second part is to reduce the model. Conditional restrictions are carried out based on the use of DenseNet. The purpose is to understand in detail in the classification process of polyester films in the convolutional neural network, low-level features, high-level features or model depth affect the model the key to accuracy, the result is the optimal modification direction. The third part is the augmentation model, which deepens the number of layers for the convolutional neural network to improve the classification results. The fourth part is to use SinGAN to generate flawed samples, in order to avoid overfitting of the training model when the number of flawed samples is too small to maintain high accuracy. The fifth part is to increase the number of training and error analysis, increase the stability of the model, and check whether the original defective sample has manual classification errors, so as to improve the accuracy, recall and accuracy of classification. In the experiment, we collected images of defects produced during the production of polyester film. There are eight types of defects, including carbon: 581 sheets, bubble: 428 sheets, mosquito: 32 sheets, spray: 234 sheets, lack: 98 sheets, holes: 28 sheets, hoard: 430 sheets, and crystal: 460 sheets, total is 2291 sheets, and the image resolution is 224×224. After SinGAN is not used to generate defect samples and the data is enhanced, the training sample is 6414 sheets, the test sample is 2750 sheets, total is 9164 sheets, the accuracy rate of VGG16 is 88.84%, the accuracy rate of GoogLeNet is 69.93%, and the accuracy rate of DenseNet is 91.38%. While using SinGAN to generate flawed samples, the mosquito data is enhance to 266 sheets, the training samples are 7070, the test samples are 3030, and the total is 10100. After using SinGAN, the accuracy rate is 96.57%, an increase of 5.19%. The improved DenseNet accuracy rate is 100%, which is 8.62% higher than the original DenseNet accuracy rate. The execution speed is 275 frames per second, and the model size is 45.5MB. |