## 1 Introduction  
Quality control of products is very important in manufacturing industries. The traditional manual visual inspection method needs a lot of well-trained workers, is always labor consuming and inefficient, and the standards can be very different because of personal subjectivity. In the past decades, with the development of the optical technique and computer technique, many automatic optical inspection (AOI) solutions [1; 2; 3; 4] were proposed for the surface defect inspection task. Such a contactless inspection method can essentially improve the inspection accuracy and efficiency, providing guidance in production. The labor expenses can also be tremendously reduced. A typical defect inspection system is mainly composed of an imaging system and image processing algorithms. The imaging system should be carefully designed based on the imaging characteristics of the objects' surface, and a charge-coupled device(CCD) or CMOS camera applied to capture the images of objects illuminated by a custom-made light source. The camera can be a line-scan camera or matrix camera, which is determined by the object size, imaging resolution, and imaging efficiency requirements. The dark-field imaging system is often used in optical surface defect inspection systems [4; 5; 6], since the imaging system only receives the scattered light of defects on the smooth optical elements. A bright-field imaging system is also widely used for defect detection because of the sensitivity in high-contrast areas [7; 8]. When the images of the object are obtained, the next step is image processing, which is essentially important for the whole system. The defect detection process mainly includes preprocessing, defect detection, and classification. Image denoising and non-uniformity correction in preprocessing would improve the image quality. Hand-crafted approaches like image filters, morphological operations, and other techniques are utilized to extract the features of defects, and classical machine-vision methods, such as Support Vector Machine(SVM) [9], decision trees [10], and k-Nearest Neighbor(kNN) [11], are applied for defect classification. The automatic detection demand of defects for mobile phone glass is rapidly growing. Different types of defects like a scratch, dent, and discoloration are produced during the glass production process. Many AOI inspection systems have been proposed for the quality inspection of mobile phone glass. [PERSON] proposed an automated inspection system for the surface quality inspection of transparent parts, and the system is versatile and adaptable to different products and part models [1]. [PERSON] proposed an automatic defect inspection system. Here, a plane array CMOS camera was utilized to capture images of the mobile phone cover glass and principal components analysis was utilized for five typical cover glass defects' recognition [12]. Based on the multifractal spectrum, [PERSON] proposed an imbalanced mobile phone screen glass defect classification method, which achieved a 96.61% overall accuracy [13]. With the Industry 4.0 potential transformation from machine dominant manufacturing to digital manufacturing [14], the defect detection task demands higher accuracy. Deep learning based on a deep convolutional neural network achieved a great breakthrough in object recognition and image segmentation tasks [15; 16; 17; 18; 19; 20; 21; 22]. In the classical machine vision inspection method, features extraction of an object is crucial [23], as experienced machine vision engineer designs or selects the suitable features according to a certain manually predefined algorithm based on a priori knowledge. On the contrary, the deep convolutional neural network can automatically learn high-level features by feeding enough positive samples and negative samples with a proper network, and there is no need to design hand-crafted features.