A float glass defect detection system and detection method based on machine learning

The float glass defect detection system based on machine learning utilizes high-resolution cameras and convolutional neural networks for image preprocessing and feature extraction, solving the problem of inaccurate detection in existing technologies. This enables efficient identification of float glass defects, improving production efficiency and product quality.

CN116542963BActive Publication Date: 2025-10-28WUHAN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310662744.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2025-10-28
Estimated Expiration
2043-06-06

AI Technical Summary

Technical Problem

Existing float glass defect detection systems suffer from inaccurate results due to the double contours formed by light reflected and refracted from the glass surface. These systems are prone to false alarms and have difficulty detecting tiny bubble defects, thus increasing production costs.

Method used

A machine learning-based float glass defect detection system is adopted, including image detection and processing, model design and testing, analysis and comparison system. The system uses a high-resolution camera to capture images, performs image preprocessing by combining a smoothing filter model and an edge enhancement algorithm, uses a convolutional neural network for feature extraction and classification, and optimizes the model structure to improve detection accuracy.

Benefits of technology

It improves the accuracy of float glass defect detection, effectively identifies various types of defects, reduces false alarm rates, and improves product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116542963B_ABST
    Figure CN116542963B_ABST
Patent Text Reader

Abstract

This invention discloses a float glass defect detection system and method based on machine learning, relating to the field of glass inspection technology. It includes an image detection and processing system, a model design and testing system, and an analysis and comparison system. The image detection and processing system collects float glass image data, processes the image data, and extracts detection data. The model design and testing system uses machine learning algorithms to create a model, trains the model using a labeled dataset, and tests the model. The analysis and comparison system displays and compares defect data, ultimately forming a comparison data table. In one or more embodiments of this invention, a combined smoothing filter model is used for image preprocessing. Appropriate filters and parameters are selected based on the float glass. Simultaneously, to enhance the strong feature regions of defect edges, an edge enhancement algorithm is employed to perform edge detection and enhancement on the image, improving the accuracy during model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of glass inspection technology, specifically to a float glass defect detection system and method based on machine learning. Background Technology

[0002] Float glass is a common type of glass product with a wide range of applications. It is divided into colored glass, float silver mirror, float glass for automotive windshields, float glass for various deep processing applications, float glass for scanners, float glass for coating, and float glass for mirror making. Float glass has advantages such as flatness, transparency, high hardness, heat resistance, and corrosion resistance.

[0003] Existing float glass defect detection systems produce inaccurate results because the light reflected and refracted from the glass surface forms two contours. They are also prone to false alarms during the detection process, easily misjudging normal glass surfaces as defects. Furthermore, they are difficult to detect some tiny bubble defects, leading to increased production costs.

[0004] Therefore, we propose a machine learning-based float glass defect detection system and method to address the problems mentioned above. Summary of the Invention

[0005] The purpose of this invention is to provide a float glass defect detection system and method based on machine learning, so as to solve the problems currently found in the market as mentioned in the background.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A machine learning-based float glass defect detection system includes an image detection and processing system, a model design and testing system, and an analysis and comparison system.

[0008] The image detection and processing system is used to collect float glass image data, process the image data, and extract detection data.

[0009] The model design and testing system uses machine learning algorithms to create models, trains the models using labeled datasets, and tests the models.

[0010] The analysis and comparison system is used to display and compare defect data, ultimately forming a comparison data table.

[0011] In one or more embodiments of the present invention, the image detection and processing system includes an image acquisition module, an image preprocessing module, and a feature extraction module;

[0012] The image acquisition module is used to photograph the float glass, acquire image data, and mark the float glass.

[0013] The image preprocessing module is used to preprocess the acquired image data, including image denoising, image enhancement, and image segmentation;

[0014] The feature extraction module is used to extract features from preprocessed images using computer vision techniques.

[0015] In one or more embodiments of the present invention, the model design and testing system includes a model training module and a model testing module;

[0016] The model training module is used to train the data using machine learning algorithms to establish a defect detection model.

[0017] The model testing module is used to input the acquired images into the trained model to perform defect detection and determine whether there are defects on the glass surface.

[0018] In one or more embodiments of the present invention, the analysis and comparison system includes a defect detection and classification module, a defect comparison module, an alarm module, and a result display module;

[0019] The defect detection and classification module is used to extract features of the shape, size, and location of detected defects.

[0020] The defect comparison module is used to re-input the detected defects into the trained model to optimize the model training;

[0021] The alarm module is used to alert the float glass with defects during the inspection process and to calculate the interval time.

[0022] The results display module is used to output the detection and recognition results to the display end, and finally form a comparison data table.

[0023] A detection method for a float glass defect detection system based on machine learning includes the following steps:

[0024] S1. Take pictures of float glass using a high-resolution camera and mark the defects in the collected float glass images in sequence.

[0025] S2. The extracted defect features are preprocessed using a combined smoothing filter model, and an edge enhancement algorithm is used to strengthen the detection of image edges.

[0026] S201. First, the image of the float glass is converted to grayscale, thus converting the color image into a grayscale image.

[0027] S202. Use a Gaussian filter to smooth the grayscale image and remove the main high-frequency noise;

[0028] S203. Use a median filter to smooth the smoothed image and remove the main low-frequency noise.

[0029] S204. Take a weighted average of the outputs of the Gaussian filter and the median filter to obtain the final filtering result;

[0030] S3. Use computer vision technology to extract features from the preprocessed image;

[0031] S301. Divide the image into different regions;

[0032] S302. Extract color, texture, and shape features from each region, and perform image enhancement, normalization, and cropping.

[0033] S303. Select the most representative and discriminative features from the extracted features;

[0034] S4. Use machine learning algorithms to classify the extracted features;

[0035] S401. Design a convolutional neural network model, including convolutional layers, pooling layers, and fully connected layers;

[0036] S402. Train the model using a labeled dataset, and improve the model's accuracy by using the cross-entropy loss function and stochastic gradient descent optimization algorithm.

[0037] S403. Test the model using the test set and classify the defects in detail;

[0038] S5. Integrate the trained model into the float glass inspection system, inspect the float glass sequentially, preprocess the defective glass detected by the model, add it into the model for training, change the hyperparameters, adjust the model structure, and optimize the model.

[0039] S6. During the inspection process, the alarm module will issue an alarm prompt for the detected defective float glass and calculate the interval time. Finally, the integrated float glass defect quantity result will be output to the display terminal to form a comparison data table.

[0040] Compared with the prior art, the beneficial effects of the present invention are:

[0041] In this invention, a combined smoothing filter model is used for image preprocessing. Appropriate filters and parameters are selected based on float glass. At the same time, in order to strengthen the strong feature regions of defect edges, an edge enhancement algorithm is adopted to perform edge detection and enhancement on the image, thereby solving the double contour problem to the greatest extent and improving the accuracy of the training model.

[0042] In this invention, a convolutional neural network is used for float glass defect detection. It has high detection accuracy and can effectively identify various types of defects, thereby improving product quality. When defective float glass is detected, the model is trained again using the defect images. Multiple training sessions are performed on the training set to improve the accuracy of defect detection. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the modules of the float glass defect detection system based on machine learning of the present invention. Detailed Implementation

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0045] Please see Figure 1 This invention provides a float glass defect detection system based on machine learning, including an image detection and processing system, a model design and testing system, and an analysis and comparison system;

[0046] The image detection and processing system is used to collect float glass image data, process the image data, and extract detection data.

[0047] The model design and testing system uses machine learning algorithms to create models, trains the models using labeled datasets, and tests the models.

[0048] The analysis and comparison system is used to display and compare defect data, ultimately forming a comparison data table.

[0049] Specifically, the image detection and processing system includes an image acquisition module, an image preprocessing module, and a feature extraction module;

[0050] The image acquisition module is used to photograph the float glass, acquire image data, and mark the float glass.

[0051] The image preprocessing module is used to preprocess the acquired image data, including image denoising, image enhancement, and image segmentation;

[0052] The feature extraction module is used to extract features from preprocessed images using computer vision techniques.

[0053] The process involves using high-resolution cameras to photograph float glass in existing manufacturing workshops, including both defective and normal float glass.

[0054] Specifically, the model design and testing system includes a model training module and a model testing module;

[0055] The model training module is used to train the data using machine learning algorithms to establish a defect detection model.

[0056] The model testing module is used to input the acquired images into the trained model to perform defect detection and determine whether there are defects on the glass surface.

[0057] Specifically, the analysis and comparison system includes a defect detection and classification module, a defect comparison module, an alarm module, and a result display module;

[0058] The defect detection and classification module is used to extract features of the shape, size, and location of detected defects.

[0059] The defect comparison module is used to re-input the detected defects into the trained model to optimize the model training;

[0060] The alarm module is used to alert the float glass with defects during the inspection process and to calculate the interval time.

[0061] The results display module is used to output the detection and recognition results to the display end, and finally form a comparison data table.

[0062] A detection method for a float glass defect detection system based on machine learning includes the following steps:

[0063] S1. Use a high-resolution camera to photograph the float glass and mark the defects in the collected float glass images in sequence.

[0064] S2. The extracted defect features are preprocessed using a combined smoothing filter model, and an edge enhancement algorithm is used to strengthen the detection of image edges.

[0065] S201. First, the image of the float glass is converted to grayscale, thus converting the color image into a grayscale image.

[0066] S202. Use a Gaussian filter to smooth the grayscale image and remove the main high-frequency noise;

[0067] S203. Use a median filter to smooth the smoothed image and remove the main low-frequency noise.

[0068] S204. Take a weighted average of the outputs of the Gaussian filter and the median filter to obtain the final filtering result;

[0069] S3. Use computer vision technology to extract features from the preprocessed image;

[0070] S301. Divide the image into different regions;

[0071] S302. Extract color, texture, and shape features from each region, and perform image enhancement, normalization, and cropping.

[0072] S303. Select the most representative and discriminative features from the extracted features;

[0073] S4. Use machine learning algorithms to classify the extracted features;

[0074] S401. Design a convolutional neural network model, including convolutional layers, pooling layers, and fully connected layers;

[0075] S402. Train the model using a labeled dataset, and improve the model's accuracy by using the cross-entropy loss function and stochastic gradient descent optimization algorithm.

[0076] S403. Test the model using the test set and classify the defects in detail;

[0077] S5. Integrate the trained model into the float glass inspection system, inspect the float glass sequentially, preprocess the defective glass detected by the model, add it into the model for training, change the hyperparameters, adjust the model structure, and optimize the model.

[0078] S6. During the inspection process, the alarm module will issue an alarm prompt for the detected defective float glass and calculate the interval time. Finally, the integrated float glass defect quantity result will be output to the display terminal to form a comparison data table.

[0079] In step S2, color extraction: the color distribution of each region in the float glass image is extracted using a color histogram algorithm to obtain the main color and color distribution of each region;

[0080] Texture extraction: The texture features of each region in the float glass image are extracted using the local binary mode algorithm to obtain the texture features of each region;

[0081] Shape extraction: The edges of each region in the float glass image are extracted using an edge enhancement algorithm to obtain the shape features of each region;

[0082] Feature extraction: The gray-level co-occurrence matrix algorithm is used to extract the gray-level distribution features of each region in the float glass image, thus obtaining the features of each region;

[0083] Image enhancement: Histogram equalization algorithm is used to enhance float glass images, improving image contrast and clarity;

[0084] Normalization: The feature values ​​of each region in the float glass image are normalized using a normalization algorithm to make the feature values ​​of different regions comparable.

[0085] Cropping: The float glass image is segmented using an image segmentation algorithm to obtain an image of each region.

[0086] As shown above, in step S2, when a smoothing filter is needed for the digital image, and the image size is 512x512 pixels, a combination of a Gaussian filter and a median filter is selected. For the Gaussian filter, a kernel size of 5x5 and a standard deviation of 1.5 are selected. For the median filter, a window size of 3x3 is selected. Then, a test image containing Gaussian noise and salt-and-pepper noise is generated, i.e., a 512x512 random matrix is ​​generated, and then a portion of the pixels are randomly changed to white or black to simulate salt-and-pepper noise. Then, Gaussian filtering is applied to the entire image to simulate Gaussian noise. Finally, the above combined filter is used to process the test image and compared with the original image to evaluate the effect of the filter.

[0087] In step S2, the Sobel operator is used to perform edge detection on the preprocessed image to obtain an edge image. At the same time, the Sobel operator is used to perform edge enhancement processing on the edge image, and edge connection processing is performed on the enhanced edge image to connect broken edges and form complete edge lines. The processed image is then displayed, and the original image and the processed image can be compared.

[0088] In step S5, #convolutional neural network model:

[0089] model = Sequential()

[0090] model.add(Conv2D(32,(3,3),activation='relu',input_shape=(img_width,img_height,3)))

[0091] model.add(MaxPooling2D((2,2)))

[0092] model.add(Conv2D(64,(3,3),activation='relu'))

[0093] model.add(MaxPooling2D((2,2)))

[0094] model.add(Conv2D(128,(3,3),activation='relu'))

[0095] model.add(MaxPooling2D((2,2)))

[0096] model.add(Flatten())

[0097] model.add(Dense(64,activation='relu'))

[0098] model.add(Dense(1,activation='sigmoid'))

[0099] #Compilation Model

[0100] model.compile(loss='binary_crossentropy',

[0101] optimizer=optimizers.RMSprop(lr=1e-4),

[0102] metrics = ['acc'])

[0103] #Training the model

[0104] history=model.fit_generator(train_generator,

[0105] steps_per_epoch=train_steps,epochs=epochs,

[0106] validation_data=val_generator,

[0107] validation_steps = val_steps)

[0108] #Evaluation Model

[0109] test_loss,test_acc=model.evaluate_generator(test_generator,steps=test_steps)

[0110] print('testacc:',test_acc)

[0111] As shown above, the formula for the convolutional layer used is:

[0112] $h_i = f(\sum_{j=1}^{k}w_jx_{i+j-1}+b)$, where $h_i$ represents the output of the convolutional layer, $f$ represents the activation function, $w_j$ represents the weights of the convolutional kernel, $x_{i+j-1}$ represents the $i+j-1$-th element of the input data, and $b$ represents the bias term;

[0113] The formula for the loss function used is:

[0114] $L(y,\hat{y})=-\frac{1}{N}\sum_{i=1}^{N}y_i\log(\hat{y}_i)+(1-y_i)\log(1-\hat{y}_i)$, where $L$ represents the loss function, $y$ represents the true label, $\hat{y}$ represents the label predicted by the model, and $N$ represents the number of samples;

[0115] The formula used for the fully connected layer is:

[0116] $h_i = f(\sum_{j=1}^{n}w_{i,j}x_j+b_i)$, where $h_i$ represents the output of the fully connected layer, $f$ represents the activation function, $w_{i,j}$ represents the $i$-th row and $j$-th column element of the weight matrix, $x_j$ represents the $j$-th element of the input data, and $b_i$ represents the bias term;

[0117] The pooling formula used is:

[0118] $h_i = \max_{j = 1}^{k}x_{i+j-1}$, where $h_i$ represents the output of the pooling layer, $k$ represents the size of the pooling window, and $x_{i+j-1}$ represents the $i+j-1$-th element of the input data;

[0119] In step S2, the formula used in the smoothing filter model is:

[0120] $G(x,y)=\frac{1}{mn}\sum_{i=-a}^{a}\sum_{j=-b}^{b}f(x+i,y+j)$

[0121] Where $G(x,y)$ is the filtered pixel value, $f(x+i,y+j)$ is the pixel value centered at $(x+i,y+j)$, $m$ and $n$ are the size of the filter, and $a$ and $b$ are the radius of the filter.

[0122] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0123] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0124] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0125] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof.

[0126] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0127] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0128] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for detecting defects in float glass based on machine learning, characterized in that: Includes the following steps: S1. Use a high-resolution camera to photograph the float glass and mark the defects in the collected float glass images in sequence. S2. The extracted defect features are preprocessed using a combined smoothing filter model, and edge enhancement algorithms are used to detect the edges of the image. S201. First, the image of the float glass is converted to grayscale, thus converting the color image into a grayscale image. S202. Use a Gaussian filter to smooth the grayscale image and remove the main high-frequency noise; S203. Use a median filter to smooth the smoothed image and remove the main low-frequency noise. S204. Take a weighted average of the outputs of the Gaussian filter and the median filter to obtain the final filtering result; S3. Use computer vision technology to extract features from the preprocessed image; S301. Divide the image into different regions; S302. Extract color, texture, and shape features from each region, and perform image enhancement, normalization, and cropping. S303. Select the most representative and discriminative features from the extracted features; S4. Use machine learning algorithms to classify the extracted features; S401. Design a convolutional neural network model, including convolutional layers, pooling layers, and fully connected layers; S402. Train the model using a labeled dataset, and improve the model's accuracy by using the cross-entropy loss function and stochastic gradient descent optimization algorithm. S403. Test the model using the test set and classify the defects in detail; S5. Integrate the trained model into the float glass inspection system, inspect the float glass sequentially, preprocess the defective glass detected by the model, add it into the model for training, change the hyperparameters, adjust the model structure, and optimize the model. S6. During the inspection process, the alarm module will issue an alarm prompt for the detected defective float glass and calculate the interval time. Finally, the integrated float glass defect quantity result will be output to the display terminal to form a comparison data table.

2. A float glass defect detection system for implementing the float glass defect detection method of claim 1, characterized in that, This includes image detection and processing systems, model design and testing systems, and analysis and comparison systems; The image detection and processing system is used to collect float glass image data, process the image data, and extract detection data. The model design and testing system uses machine learning algorithms to create models, trains the models using labeled datasets, and tests the models. The analysis and comparison system is used to display and compare defect data, ultimately forming a comparison data table.

3. The system according to claim 2, characterized in that: The image detection and processing system includes an image acquisition module, an image preprocessing module, and a feature extraction module; The image acquisition module is used to photograph the float glass, acquire image data, and mark the float glass. The image preprocessing module is used to preprocess the acquired image data, including image denoising, image enhancement, and image segmentation; The feature extraction module is used to extract features from preprocessed images using computer vision techniques.

4. The system according to claim 2, characterized in that: The model design and testing system includes a model training module and a model testing module; The model training module is used to train the data using machine learning algorithms to establish a defect detection model. The model testing module is used to input the acquired images into the trained model to perform defect detection and determine whether there are defects on the glass surface.

5. The system according to claim 2, characterized in that: The analysis and comparison system includes a defect detection and classification module, a defect comparison module, an alarm module, and a result display module; The defect detection and classification module is used to extract features of the shape, size, and location of detected defects. The defect comparison module is used to re-input the detected defects into the trained model to optimize the model training; The alarm module is used to alert the float glass with defects during the inspection process and to calculate the interval time. The results display module is used to output the detection and recognition results to the display end, and finally form a comparison data table.

Citation Information

Patent Citations

  • Glass defect detection method

    CN109668909A

  • Small sample target identification method based on transfer learning

    CN114519803A