Method and device for identifying surface defects of aerogel felt
Through the combination of deep convolutional neural network model and HOG feature vectors, the problem of surface defect detection of aerogel felt is solved, efficient and accurate defect recognition is achieved, the quality and performance of the material are improved, and it is suitable for aerospace and high-temperature insulation.
Patent Information
- Application Number
- CN202510740003.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The prior art is difficult to effectively detect and identify defects on the surface of aerogel felt, which affects its performance and quality, especially in application scenarios such as high-temperature insulation and aerospace, resulting in the material being unable to meet specific requirements.
The deep convolutional neural network model is used to combine the HOG feature vector and anchor-free bounding box prediction method to identify defects on the surface of aerogel wool felt, including pits, stains, floating glue and indentations, through multi-scale feature extraction and feature fusion.
It improves the efficiency and accuracy of surface defect detection of aerogel felt, and ensures that the quality and performance of the material meet the needs of high-demand application scenarios.
Smart Images

Figure CN120259637B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of aerogel preparation, and in particular to a method and device for identifying surface defects of aerogel felt. Background Art
[0002] As a high-performance nanomaterial, aerogel is widely used in aerospace, building insulation, electronic devices and other fields due to its unique structural properties, such as low density, high porosity, and low thermal conductivity. However, defects on the surface of aerogel felt may have a significant impact on its performance, such as reduced thermal insulation performance and reduced durability. In application scenarios such as high-temperature insulation or aerospace, which have extremely high requirements for material performance, the surface quality of aerogel felt is crucial, and any defects may cause it to fail to meet specific requirements. In order to give full play to the performance advantages of aerogel felt, surface defects must be strictly controlled during the production process, and effective measures must be taken to solve problems such as powder loss. Therefore, the detection of surface defects on aerogel felt is of great significance. Through visual inspection methods, real-time defect detection of aerogel felt during the transmission process can be performed, thereby helping to improve product quality and production efficiency. Summary of the Invention
[0003] In view of this, the present application provides a method and device for identifying surface defects of aerogel felt, which can improve the detection efficiency and accuracy of surface defects of aerogel felt.
[0004] Specifically, this application is implemented through the following technical solutions:
[0005] In a first aspect, the present application provides a method for identifying surface defects of an aerogel felt, the method comprising:
[0006] Acquire image data of the aerogel felt surface after pretreatment, and extract the HOG feature vector of the image data;
[0007] Annotating the preprocessed image data, building a deep convolutional neural network model for aerogel felt defect recognition, and training the deep convolutional neural network model with the annotated data;
[0008] The deep convolutional neural network model includes a CSPDarknet53, a spatial pyramid pooling module, and a path aggregation network module connected in sequence;
[0009] The CSPDarknet53 takes image data as input and outputs a multi-scale feature map of the image data; the spatial pyramid pooling module performs a multi-scale pooling operation on the feature map output by the CSPDarknet53, and outputs the pooling result to the path aggregation network module; the path aggregation network module receives the multi-scale feature map output by the spatial pyramid pooling module and the CSPDarknet53, performs feature fusion and enhancement processing, and outputs the fused feature map; the detection head of the deep convolutional neural network model adopts an anchor-free bounding box prediction method, is connected to the path aggregation network module, takes the fused feature map as input, and outputs the predicted defect location and category information;
[0010] Inputting the HOG feature vector into a pre-trained SVM classifier, and using the SVM classifier to filter out a first image, where the first image is an image of defects on the surface of the aerogel felt;
[0011] The first image is input into the deep convolutional neural network model, and defect location and category information are output.
[0012] The second aspect of the present application provides an aerogel felt surface defect recognition device, which includes an extraction module, a training module, a screening module, and a recognition module.
[0013] The extraction module is used to obtain image data of the aerogel felt surface after pretreatment and extract the HOG feature vector of the image data;
[0014] The training module is used to annotate the preprocessed image data, build a deep convolutional neural network model for aerogel felt defect recognition, and train the deep convolutional neural network model with the annotated data;
[0015] The deep convolutional neural network model includes a CSPDarknet53, a spatial pyramid pooling module, and a path aggregation network module connected in sequence;
[0016] The CSPDarknet53 takes image data as input and outputs a multi-scale feature map of the image data; the spatial pyramid pooling module performs a multi-scale pooling operation on the feature map output by the CSPDarknet53, and outputs the pooling result to the path aggregation network module; the path aggregation network module receives the multi-scale feature map output by the spatial pyramid pooling module and the CSPDarknet53, performs feature fusion and enhancement processing, and outputs the fused feature map; the detection head of the deep convolutional neural network model adopts an anchor-free bounding box prediction method, is connected to the path aggregation network module, takes the fused feature map as input, and outputs the predicted defect location and category information;
[0017] The screening module is used to input the HOG feature vector into a pre-trained SVM classifier, and use the SVM classifier to screen out a first image, where the first image is an image of defects on the surface of the aerogel felt;
[0018] The recognition module is used to input the first image into the deep convolutional neural network model and output defect location and category information.
[0019] The aerogel felt surface defect recognition method and device provided in this application improves the feature extraction process and integrates HOG features and multi-scale features. HOG feature vectors are selected to accurately capture the local shape and texture characteristics of defects such as pits, stains, floating glue, and indentations on the aerogel felt surface, that is, HOG features are used to capture changing, local features. Multi-scale feature extraction is performed using CSPDarknet53, a deep convolutional neural network model, to capture features at different scales on the aerogel felt surface, effectively extracting both subtle texture changes and larger defect outlines. This extracts information from images at different scales. The spatial pyramid pooling module further integrates multi-scale features to enhance adaptability to defects of different sizes. Defects of different sizes appear at different feature scales in the image. The spatial pyramid pooling module divides the feature map into sub-regions of different scales and performs a maximum pooling operation to extract the most significant feature information at different scales. After these different scale feature information is integrated, the model can simultaneously focus on local details and macro features in the image. The path aggregation network module builds a bridge of communication between features at different levels through up and down sampling operations, realizes the two-way fusion and enhancement of semantic information and detail features, and further improves the model's ability to recognize complex defects. Among them, semantic information mainly refers to the higher-level and more abstract features in the image, which includes the overall understanding and cognition of the image content. In the recognition of surface defects of aerogel felt, semantic information can be understood as an abstract description of the defect category. For example, by analyzing the image features, it can be determined whether the defect is a pit, a stain or other types. The detail features refer to the specific and subtle information in the image, such as the texture and color changes of the defect edge. In the feature extraction process, the method provided by the present invention obtains feature information of multiple scales and different granularities by fusing the HOG local strong change features and the CSPDarknet53 multi-scale features, thereby improving the accuracy of feature extraction.
[0020] Furthermore, the detection head provided by the present invention adopts an anchor-free bounding box prediction method, which abandons the tediousness and disadvantages of traditional anchor point setting, and directly accurately locates the defect position and category from the feature map, significantly improving detection efficiency and accuracy.
[0021] Finally, on the basis of accurate feature extraction, the method provided by the present invention first performs a coarse classification of the feature information, that is, introduces the SVM classifier. In the face of a large number of aerogel felt images, it can quickly screen out images that may have defects, greatly reducing the processing burden of the deep convolutional neural network model and improving the operating efficiency of the entire system; after the coarse classification, the suspected defective images are accurately detected, thereby improving the efficiency of defect recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Flowchart of Example 1 of the aerogel felt surface defect identification method provided in this application;
[0023] Figure 2 This is a schematic structural diagram of the aerogel felt surface defect detection system shown in this application;
[0024] Figure 3 This is a schematic diagram of the image defect categories on the surface of aerogel felt shown in this application;
[0025] Figure 4 This is a data transmission architecture diagram of the aerogel felt surface defect detection system shown in this application;
[0026] Figure 5 This is a schematic structural diagram of Example 2 of the aerogel felt surface defect device provided in this application. DETAILED DESCRIPTION
[0027] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this application.
[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a," "the," and "the" used in this application are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0029] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0030] Specific embodiments are given below to introduce the technical solutions of the present application in detail.
[0031] Example 1:
[0032] Figure 1 This is a flow chart of Example 1 of the method for identifying surface defects of aerogel felt provided in this application. Figure 1 The method provided in this embodiment may include:
[0033] S101, obtaining image data of the aerogel felt surface after pretreatment, and extracting the HOG feature vector of the image data.
[0034] It should be noted that aerogel felt surface defect detection system can be built to obtain aerogel felt surface image data. Specifically, before obtaining the image data of the aerogel felt surface after pretreatment, the system includes: calculating the layout position of each camera in the multiple cameras based on the conveyor belt position, so that the maximum shooting composition of the three-dimensional space covers all angles of the aerogel product conveyed on the conveyor belt; setting the aerogel product conveyor belt speed based on the acquisition time and image line spacing error requirements of the multiple cameras; using the multiple cameras to capture images of the aerogel product at various angles; and using photometric stereo vision technology to fuse multiple images exposed at multiple angles into a complete defect image.
[0035] As an optional embodiment, fusing the multiple captured images into a complete defect image specifically includes: establishing a spatial coordinate system with the starting point of the conveyor belt as the origin; determining the first spatial coordinate of the aerogel product and the acquisition angle of each camera at the time of image acquisition; determining the imaging area of each camera at the first spatial coordinate according to the light propagation path when each camera is rotated at the acquisition angle, and the imaging area is the area where the camera captures the aerogel product; determining the overlapping shooting area of the aerogel product according to the imaging area of each camera; identifying the landmark image features in the overlapping shooting area; sorting the multiple images based on the landmark image features and the coordinate positions of each camera; and fusing the sorted images according to the boundary features of the overlapping shooting area. Specifically, the overlapping shooting area refers to the area on the aerogel product, which will be repeatedly photographed by multiple cameras. At this time, this area on the aerogel product is first located, and then the landmark features of this area are identified, and then the adjacent relationship between multiple images is quickly found, that is, images with the same landmark features are adjacent, and the order relationship between adjacent images is determined based on the position of the landmark features in the image. Furthermore, the order of the images taken by the camera is determined according to the location of the camera, and then the order between the multiple images taken in a camera is determined according to the landmark features. Among the multiple images taken by each camera, the head and tail images of the sorting are determined according to the landmark features. The internal order between the multiple images taken by a camera is determined according to the rotation angle and shooting time of the camera. After the sorting is completed, the image fusion between the cameras quickly locates the fusion area of the two images through the border features of the overlapping shooting area, that is, the tail image of the previous group of images and the head image of the next group of images. Each group is multiple images taken by a camera.
[0036] Using a given image fusion method, the overlapping areas of interest are precisely located and their signature features are identified, ensuring the complete stitching of aerogel felt images taken from multiple angles. In actual production, aerogel felt surfaces exhibit a variety of surface defects, making it difficult for a single image to fully capture them. For example, a tiny crack may only partially appear in a single image, but the fused image fully captures it, providing comprehensive information for subsequent defect detection and preventing misidentification or omission of defects due to missing information. Aerogel felt continuously moves on a conveyor belt. Incorrect image sorting can lead to erroneous defect location, compromising subsequent analysis. Accurately sorting and fusion of the images provides a true representation of the surface condition of the aerogel felt, providing a reliable basis for defect location and analysis, and improving the accuracy of defect detection. Furthermore, aerogel felt production conditions are complex and variable, with variations in lighting, camera position, and other factors. This fusion method, by establishing a coordinate system and determining the imaging and overlapping areas, effectively integrates images captured under diverse conditions, demonstrating strong adaptability. Accurate image fusion ensures stable and reliable defect detection, regardless of uneven lighting or slight deviations in camera position.
[0037] Figure 2 This is a schematic diagram of the structure of the aerogel felt surface defect detection system shown in this application, please refer to Figure 2 , a high-resolution ordinary industrial lens is used above the conveyor belt, and a multi-angle light source combination (such as oblique 45°, 90°, and 135° directions) is configured to achieve multiple exposures to avoid the loss of defect area or incomplete defect information due to single-angle exposure. Among them, the camera layout uses a line scan camera (single field of view 550mm), and 3 cameras are arranged along the width of the felt to cover the full width of 1500mm. For directional defects (such as scratches and pressure points), the multi-angle light source combination can ensure that defects in different directions appear in at least one image. Therefore, photometric stereo vision technology is used to fuse multiple images exposed at multiple angles into a complete defect image for subsequent detection. After the camera is deployed on the aerogel product conveyor belt, the aerogel product conveyor belt speed range, camera acquisition interval time, and image line interval error requirements are set to complete the deployment of the aerogel felt defect detection system. Among them, the conveyor belt speed range should be 300-2000mm / s; the maximum acquisition interval time of the camera is 50μs; the image line interval error should be within 0.1mm (no omissions should be ensured at the highest operating speed of the felt), and the data collected in each frame of the image includes the felt texture, boundaries, lighting characteristics and potential defects.
[0038] The deployed aerogel felt defect detection system can obtain aerogel felt surface image data. In order to further improve the image quality, highlight the image features, and facilitate subsequent processing, the obtained image data is first preprocessed. Specifically, the preprocessing may include grayscale processing, Gaussian blur, edge enhancement, and adaptive histogram equalization. The preprocessing process includes: based on the collected aerogel felt surface image data, using the weighted average method to convert the red, green, and blue components into grayscale values to obtain a grayscale image; applying Gaussian blur technology to smooth the grayscale image to obtain a denoised image; using the Sobel operator to perform edge detection on the denoised image, obtaining a gradient amplitude image by calculating the brightness gradient of the denoised image, and using the gradient amplitude image as the original image channel for edge enhancement to obtain an edge enhanced image; using the CLAHE algorithm to divide the edge enhanced image into multiple non-overlapping sub-blocks, and performing histogram equalization on each sub-block independently according to the pixel value of the original image, the total number of pixels of the non-overlapping sub-blocks, the grayscale level, and the cumulative distribution function of the histogram.
[0039] The grayscale processing includes: converting the red, green, and blue components into grayscale values using a weighted average method based on the collected image data. It should be noted that the purpose of grayscale is to simplify the image data, eliminate color information, and retain only brightness information, so that subsequent algorithms can focus more on the brightness changes and structural features of the image, thereby reducing the complexity of subsequent processing. Specifically, the grayscale pixel value range is 0 to 255. Grayscale is achieved by the weighted average method, and the specific formula is as follows:
[0040] ;
[0041] Where R, G, and B represent the red, green, and blue components of a pixel, respectively, and Igray represents the grayscale value. This weighting method simulates the human eye's sensitivity to different colors, with green being the most sensitive and blue being the least sensitive.
[0042] The Gaussian blur includes: applying Gaussian blur technology to smooth the grayscale image, wherein each pixel value of the grayscale image is replaced by the weighted average of the pixels in the specified area, and the weight is determined by the Gaussian kernel. It should be noted that Gaussian blur is an effective noise suppression technology, which helps to reduce the risk of false detection caused by noise in the subsequent edge detection process by reducing image noise and details. Through Gaussian blur, the edges of the image become smoother, and the high-frequency noise components in the image are reduced, providing a clearer image foundation for accurate edge detection. Specifically, in this processing process, the weight is determined by the Gaussian kernel, and the weight of the center pixel is the largest, and the weight gradually decreases as the distance from the center pixel increases. The new value of each pixel is the weighted average of the values of the pixels around it, thereby achieving image smoothing. The specific formula is as follows:
[0043] ;
[0044] in, The original image is The pixel value at the location. is the Gaussian kernel. k is the kernel radius, which indicates the size of the kernel and determines the intensity of the blurring effect. Larger kernels result in stronger blurring effects. K is usually an odd number, such as 3x3, 5x5, etc., to ensure that there is a central point. Represents the new value of the pixel at position after Gaussian blurring. This value is the weighted average of the pixel values in its neighborhood, and the weight is determined by the Gaussian kernel.
[0045] The Gaussian kernel construction formula is as follows:
[0046] ;
[0047] Where x and y are coordinates, is the standard deviation, which determines the smoothness of the Gaussian kernel. The larger the value, the stronger the blur effect. When implementing this function, you can use the OpenCV library to automatically calculate the appropriate value. value.
[0048] The edge enhancement includes: using the Sobel operator to perform edge detection on the denoised image after Gaussian blur, highlighting the edge information by calculating the image brightness gradient, and using the gradient amplitude image as the original image channel for edge enhancement. It should be noted that the Sobel operator is a discrete differential operator used to calculate the approximate gradient of the image grayscale function to highlight the edge information in the image. Since Gaussian blur has reduced the noise, the Sobel operator can extract the edge information of the image on a relatively clean basis, which is directly related to the accurate extraction of subsequent image features. Specifically, the Sobel operator is used to calculate the gradient of the image brightness to highlight the edge information, that is, the boundary is determined by comparing the color changes around the pixel point. The Sobel operator gradient calculation formula is as follows:
[0049] ;
[0050] ;
[0051] in, 、 It is the filter kernel in both horizontal and vertical directions. The image is The pixel value at the location. , Refers to the gradient of the image in the horizontal and vertical directions. Based on this, the gradient amplitude is calculated as follows:
[0052] ;
[0053] Here, G is the gradient magnitude, representing edge strength, and Gx and Gy are the horizontal and vertical gradients, respectively. A gradient magnitude image is a grayscale image, where the grayscale value of each pixel represents the edge strength at that point. In this image, areas with stronger edges have higher grayscale values, while non-edge areas have lower grayscale values. To combine edge information with the denoised image information obtained by Gaussian blurring, the gradient magnitude image is used as a channel (usually the luminance channel) of the original image to enhance edge information. For example, the gradient magnitude is directly superimposed on the original image to enhance the visual effect of edges.
[0054] The adaptive histogram equalization includes: applying the CLAHE algorithm to the edge-enhanced image, dividing the image into multiple non-overlapping sub-blocks, and independently performing histogram equalization on each sub-block based on the pixel value of the original image, the total number of pixels of the sub-block, the number of grayscale levels and the cumulative distribution function of the histogram. It should be noted that CLAHE is a local contrast enhancement technology that is particularly suitable for enhancing the local contrast of an image, especially in the dark areas of the image. CLAHE makes edges and textures clearer by enhancing details, and also helps to further reduce the impact of uneven lighting in the image. Specifically, CLAHE divides the image into multiple small non-overlapping sub-blocks, and independently performs histogram equalization on each sub-block, while limiting the degree of contrast enhancement to avoid noise amplification. The formula for histogram equalization is:
[0055] ;
[0056] in, is the enhanced pixel value; I(x, y) is the pixel value of the original image; is the total number of pixels in the sub-block; L is the number of gray levels (usually 256); CDF is the cumulative distribution function of the histogram.
[0057] Specifically, the minimum CDF value of the entire image is subtracted from the CDF function of the input pixel, which is the brightness difference between the current pixel and the darkest point in the entire image. The result is normalized and mapped to the grayscale range of [0, L-1] to achieve balanced adjustment for the current pixel. CLAHE also performs histogram cropping to limit the frequency of each grayscale level, thereby enhancing image contrast.
[0058] In combination with the above description, the image data after pretreatment of the aerogel felt surface is obtained, and feature extraction is performed to obtain a HOG feature vector, including: dividing the preprocessed image into cells, calculating the gradient amplitude of each cell, and calculating the gradient direction based on the gradient ratio of the vertical direction and the horizontal direction in the gradient amplitude; converting the gradient direction into multiple direction intervals, and constructing a first feature vector for each direction interval; weightedly adding the gradient amplitude of each cell to the first feature vector in the corresponding direction interval to obtain a second feature vector; normalizing multiple cells, and fusing each of the second feature vectors to form a third feature vector; connecting all third feature vectors into a long vector as the final HOG feature vector.
[0059] In practice, because defects (such as stains and indentations) often manifest as abnormal gradient distributions, their characteristics are significantly different from those of blank areas. Therefore, the HOG algorithm is used to extract local texture features of the image to minimize the amount of computation. The HOG algorithm divides the image into small cells (such as 8×8 pixels) and calculates the gradient magnitude in each cell. Based on this, the gradient direction is calculated, that is, the direction of the edge or texture at each pixel:
[0060] ;
[0061] Here, Gx and Gy are the horizontal and vertical gradients, respectively. Because the gradient direction is continuous (e.g., from 0° to 180°), direct processing increases computational complexity. Therefore, it is divided into several directional intervals (e.g., 9 directional intervals, each covering 20°). A feature vector is constructed for each cell (e.g., if divided into 9 directional intervals, the feature vector has 9 dimensions). The gradient magnitude (G) of the pixels within the unit cell is weighted and accumulated to the corresponding directional interval to obtain the corresponding feature vector. Multiple cells are normalized and fused into a single feature vector (with the same number of dimensions). All feature vectors are then concatenated into a long vector, which serves as the final HOG feature vector (with a modified number of dimensions).
[0062] S102: annotating the preprocessed image data, building a deep convolutional neural network model for aerogel felt defect recognition, and training the deep convolutional neural network model with the annotated data.
[0063] Among them, the deep convolutional neural network model includes CSPDarknet53, a spatial pyramid pooling module and a path aggregation network module connected in sequence; the CSPDarknet53 takes image data as input and outputs a multi-scale feature map of the image data; the spatial pyramid pooling module performs a multi-scale pooling operation on the feature map output by CSPDarknet53, and outputs the pooling result to the path aggregation network module; the path aggregation network module receives the multi-scale feature map output by the spatial pyramid pooling module and the CSPDarknet53, performs feature fusion and enhancement processing, and outputs the fused feature map; the detection head of the deep convolutional neural network model adopts an anchor-free bounding box prediction method, is connected to the path aggregation network module, takes the fused feature map as input, and outputs the predicted defect location and category information.
[0064] It should be noted that the HOG feature vectors and the corresponding labels form the training set and the test set. The labels are divided into positive samples and negative samples. The positive sample is marked as 1, indicating that there are defects in the surface image of the aerogel felt. For example, the aerogel felt in the image has cracks, holes, damage, pits, stains, floating glue, indentations, etc. When training and testing the model, these positive samples serve as examples of "defects" that the model needs to recognize, allowing the model to learn the characteristics of defective aerogel felt images. The negative sample is marked as 0, indicating that there are no defects in the surface image of the aerogel felt, that is, the surface of the aerogel felt in the image is smooth and has no visible problems. Negative samples are used to tell the model that such images are normal, defect-free samples, so that the model can distinguish between normal images and defective images.
[0065] In addition, since the result of SVM is to determine whether the image has defects, and the output result of the trained neural network model is the defect location and type, when constructing the training set and test set, in addition to identifying the presence or absence of defects, for samples with defects (positive samples), specific defect information should also be identified, such as whether the defect is a crack, pit or other type, so that the neural network model can learn the characteristic patterns corresponding to different defect types during the training process, and then in actual applications, it can not only accurately determine whether a new image has defects, but also accurately determine the location and category of the defects.
[0066] Figure 3 This is a schematic diagram of the image defect categories on the surface of aerogel felt shown in this application. Please refer to Figure 3 The defect categories shown in this application include pits, stains, floating glue, indentations, etc.
[0067] After labeling the preprocessed image data, the training images are scaled and normalized to make them suitable for network input. The labeled data is processed and converted into a format understandable by the model. Data augmentation techniques, such as rotation, flipping, and cropping, are also applied to improve the model's generalization capabilities.
[0068] Combined with the above description, it should be noted that the operation steps of CSPDarknet53 include:
[0069] (1) The preprocessed aerogel felt surface image feature map is used as input to obtain a multi-scale feature map.
[0070] It should be noted that deep convolutional layers and lightweight convolutional layers can be used to obtain multi-scale feature maps. The deep convolutional layers mine abstract features in the image through multi-layer convolution operations, while the lightweight convolutional layers reduce the computational cost while ensuring feature extraction capabilities.
[0071] (2) The local texture and edge feature information contained in the HOG feature vector is integrated into the multi-scale feature map according to a pre-set fusion rule to form a first fused feature map.
[0072] It should be noted that the fusion rules can be determined according to the importance of different features and position information. For example, for the texture information at a specific position, it is added to the feature map at the corresponding position, and different weights are assigned according to the prominence of the feature to enhance the feature map's ability to represent local details.
[0073] (3) Perform a split operation on the first fused feature map to obtain multiple sub-feature sets.
[0074] Specifically, the splitting can be performed based on factors such as the scale, semantic level or spatial position of the feature.
[0075] As an optional embodiment, the object borders in the aerogel felt surface image are identified, and the object borders are the boundaries of all objects in the image; a first splitting method of the feature map is determined according to the object borders, and the feature map is split according to the first splitting method to obtain a first feature set, and the feature map within a boundary is split into a complete sub-block, and the boundaries of several objects are split into several complete sub-blocks; the minimum scale for splitting each first sub-feature is determined according to the semantic meaning of each first sub-feature; the average of the minimum scales between the first sub-features with semantic similarity greater than a threshold is used as the target splitting scale with semantic similarity greater than the threshold, and the splitting gap of each first sub-feature is determined according to the target splitting scale, and the splitting gap is the gap between the current scale of the first sub-feature and the target splitting scale; the first sub-feature is split according to the semantic level of the first sub-feature and the splitting gap, and each first sub-feature is split to obtain a group of second sub-features, and the set consisting of each group of second sub-features is used as the result of feature map splitting to obtain multiple sub-feature sets.
[0076] (4) Recombining the split sub-feature sets to obtain recombined multi-scale feature information and obtain a recombined multi-scale feature map.
[0077] Specifically, the sub-feature sets after splitting are reassembled and recombined through a parallel processing architecture to obtain recombined multi-scale feature information. The parallel processing method can accelerate feature fusion and information integration, and improve the richness and diversity of feature representation.
[0078] The operation steps of the spatial pyramid pooling module in aerogel felt surface defect recognition include:
[0079] (1) Receive the reorganized multi-scale feature map output from CSPDarknet53, divide the reorganized multi-scale feature map into multiple sub-regions of different scales, and perform maximum pooling operations on the sub-regions of each scale.
[0080] The spatial pyramid pooling module is connected to CSPDarknet53 and can receive the feature map output by CSPDarknet53.
[0081] It should be noted that these sub-regions cover different sizes and resolutions, covering everything from local details to more macroscopic information. Max pooling is performed on each sub-region at each scale to extract the most significant features at each scale while preserving key information in the local features to avoid information loss.
[0082] (2) The pooled results of sub-regions of different scales are combined according to the pre-set splicing rules.
[0083] It should be noted that the splicing rule can determine the order and weight according to the importance of different scales and task requirements to form a comprehensive feature vector. This feature vector integrates feature information at multiple scales and provides a more comprehensive information basis for subsequent feature processing.
[0084] The operation steps of the path aggregation network module in the aerogel felt surface defect identification include:
[0085] (1) Receive the feature map output from the spatial pyramid pooling module and the reorganized multi-scale feature map of CSPDarknet53.
[0086] (2) The feature map of the first range layer is enlarged by an upsampling operation, and the abstract semantic feature information of the first range layer is fused with the feature map of the second range layer according to a predetermined fusion rule to obtain a first fusion result; the first range layer is at a deeper position than the second range layer in the convolutional neural network.
[0087] It should be noted that the first range layer feature map can be a high-level feature map, and the second range layer feature map can be a low-level feature map. Specifically, the high-level feature map is enlarged through upsampling to match the size of the low-level feature map. The high-level abstract semantic feature information is then fused with the low-level feature map according to a predetermined fusion rule. The fusion process can use a weighted addition method, assigning different weights based on the importance of the feature map, so that the low-level feature map can incorporate more semantic information.
[0088] (3) The feature map of the second range layer is reduced by a downsampling operation, and the detail features of the second range layer are added to the feature map of the first range layer according to a predetermined fusion rule to obtain a second fusion result.
[0089] The low-level feature map is reduced in size through downsampling operations to match the size of the high-level feature map. The low-level detail features are added to the high-level feature map according to predetermined fusion rules to enhance the high-level feature map's ability to perceive local details. The fusion method can be element-level addition or splicing, and the weights are adjusted according to task requirements.
[0090] (4) Based on multiple interactions and fusion operations of the first fusion result and the second fusion result, feature enhancement of the final fused feature map is achieved.
[0091] Through multiple top-down and bottom-up information interactions and fusion operations, effective fusion and supplementation of features are achieved. The convolution operation is used to enhance the features of the fused feature map, highlight important features, suppress irrelevant information, and finally output the fused feature map.
[0092] It's also worth noting that the detection head uses an anchor-free bounding box prediction method, connected to a path aggregation network module, and uses the fused feature maps output by the path aggregation network as input. This method performs object detection directly based on extracted features, avoiding the complexity of traditional anchor point settings and improving detection efficiency and accuracy.
[0093] Specifically, the detection head is connected to the path aggregation network module. After performing feature fusion and enhancement, the path aggregation network module outputs the fused feature maps and transmits them to the detection head. The detection head receives these fused feature maps and performs the specific operation of object detection on them.
[0094] The detection head is composed of multiple convolutional layers. Specifically, the detection head divides the feature map into multiple "grid points" and uses convolutional layers to predict information such as the "bounding box center point," "width," "height," "confidence," and "category" at each location.
[0095] In implementation, a convolutional layer predicts the offset (Δx, Δy) of the center point relative to the current grid point at each grid point. To ensure the offset is between 0 and 1, it is normalized using a sigmoid activation function. The normalized offset is then added to the grid point coordinates to obtain the bounding box center coordinates using the following formula: x = grid_x + Δx, y = grid_y + Δy, where grid_x and grid_y are the grid point coordinates, and x and y are the bounding box center coordinates. Since each grid point can calculate a bounding box center coordinate, a convolutional layer is used to predict the confidence level of each grid point. Finally, non-maximum suppression (NMS) and threshold filtering are used to select high-confidence coordinates as the final output.
[0096] Another set of convolutional layers is used to predict the logarithmic values of the width and height of the bounding box at each grid point, log(w) and log(h). To obtain the actual width and height, these logarithmic values are denormalized using an exponential function, i.e. w=e log(w) , h=e log(h) . Also relying on confidence prediction, the width and height with high confidence are selected as output.
[0097] Furthermore, the convolutional layer outputs the probability distribution of each bounding box belonging to each category. To convert the output into a probability value, the Softmax activation function is applied to the category prediction results. Finally, based on the confidence prediction, the category with the highest confidence is selected as the output.
[0098] Finally, the predicted bounding box center point, width, height, confidence, category and other data are compared with the real data and the loss function is calculated to optimize the training effect of the detection head. Specifically, the following three types of loss functions are used:
[0099] Bounding box regression loss: Calculate the difference between the predicted bounding box and the true bounding box, usually using IoU loss or GIoU loss.
[0100] Classification loss: Calculates the cross entropy loss between the predicted class probabilities and the true class labels.
[0101] Confidence loss: Calculates the binary cross entropy loss between the predicted confidence and the true object / background labels.
[0102] The calculated values of the three types of loss functions above represent the quality of the prediction results. To minimize the loss function, that is, to achieve the best prediction results, the SGD (Stochastic Gradient Descent) optimizer is used for parameter optimization. SGD calculates gradients by randomly selecting small batches of data, and then updates model parameters. It has the characteristics of fast convergence and high computational efficiency. It should be noted that after improving the above model based on the YOLOv9 architecture, it also includes model training and evaluation. Specifically, the training and evaluation adjustments of the deep convolutional neural network model based on aerogel felt defect recognition include:
[0103] (1) Set the hyperparameters required for training, select a composite loss function including classification loss, localization loss, and confidence loss, and an optimizer for optimizing the neural network model parameters.
[0104] It's important to note that the hyperparameters required for training include the learning rate, batch size, and training epochs. The learning rate can be dynamically adjusted based on the training stage and model convergence. The batch size should be appropriately selected based on hardware resources and data volume, and the training epochs should be determined based on training convergence and performance metrics. For example, the initial learning rate is set to 0.01; the learning rate scheduler uses CosineDecay to gradually decay the learning rate; the batch size is 32; the training epochs are set to 300; and the weight decay is 0.0005.
[0105] Select an appropriate loss function, such as a composite loss function that includes classification loss, localization loss, and confidence loss, to comprehensively consider the accuracy of defect category and location prediction. Specifically, Binary Cross-Entropy Loss is used for classification, CIoU Loss is used for localization, and Focal Loss is used for confidence. Stochastic Gradient Descent (SGD) or Adam is used as the optimizer to optimize the neural network parameters. By calculating gradients and updating parameters, the model gradually converges. Metrics used include mAP, Recall, and Precision.
[0106] (2) Divide the labeled image data into a training set, a validation set, and a test set, input the training set data into the constructed deep convolutional neural network model, calculate the loss function during the training process, and update the parameters of the deep convolutional neural network model according to the optimizer strategy; use the validation set to evaluate the trained deep convolutional neural network model, and adjust the hyperparameters and model structure according to the evaluation results.
[0107] For example, the training set accounts for 80% of the total data, the validation set accounts for 10%, and the test set accounts for 10%. Use the validation set to evaluate the trained model and adjust hyperparameters and model structure based on the evaluation results. Use evaluation metrics such as accuracy, recall, and F1 score to assess the model's ability to detect and classify different types of defects. If the evaluation results do not meet expectations, adjust hyperparameters (such as the learning rate or batch size) or fine-tune the model structure, such as adjusting the convolutional layer parameters of CSPDarknet53, the pooling scale of the spatial pyramid pooling module, and the fusion rules of the path aggregation network module. Repeat the model training and validation evaluation process until the model performance on the validation set reaches satisfactory indicators, ensuring good generalization ability of the model.
[0108] (3) When the deep convolutional neural network model achieves the specified performance on the validation set, the test set is used to perform a final performance evaluation on the deep convolutional neural network model that achieves the specified performance.
[0109] Once the model achieves satisfactory performance on the validation set, the test set is used for a final performance evaluation of the trained model. The test set data is fed into the model, and various performance metrics on the test set, such as accuracy, recall, F1 score, and mean average precision (mAP), are calculated to comprehensively evaluate the model's performance on unseen data and verify its ability to accurately detect and classify surface defects in aerogel felt.
[0110] S103 , inputting the HOG feature vector into a pre-trained SVM classifier, and using the SVM classifier to filter out a first image, where the first image is an image showing defects on the surface of the aerogel felt.
[0111] It should be noted that HOG feature vectors are highly capable of describing the local shape and texture of objects in an image, and are particularly effective at expressing features such as edges and contours on aerogel felt surfaces. By calculating the gradient information of an image, HOG can highlight detailed variations in the aerogel felt surface, which are often closely associated with the presence of defects. Support Vector Machine (SVM) is a classic machine learning classification algorithm that performs well in binary classification problems. It accurately separates data points from different categories by finding an optimal hyperplane. For the surface defect detection problem of aerogel felt, images with defects and those without defects are treated as two distinct categories. The SVM classifier can learn the boundary between these two categories based on the differences in the HOG feature vectors, thereby accurately determining whether an image contains defects. Furthermore, SVM has excellent generalization capabilities, effectively learning the inherent patterns of data even with limited training data, and achieving good classification results even on unknown test data. This ensures that SVM classifiers trained with HOG feature vectors maintain a certain level of accuracy and stability across aerogel felt images collected from different batches and under different environments, demonstrating strong adaptability.
[0112] Throughout the aerogel felt surface defect recognition process, the use of an SVM classifier based on HOG feature vectors allows for rapid initial processing of large numbers of images. This allows for the selection of clearly defect-free images, reducing the number of images that must be processed by the subsequent deep convolutional neural network model and improving the efficiency of the entire defect recognition system. Furthermore, the SVM classifier's results can serve as auxiliary information, providing a reference for subsequent deep convolutional neural network models.
[0113] Specifically, the process of pre-training the SVM classifier includes:
[0114] (1) Combine the HOG feature vectors with the corresponding labels to construct training sets and test sets.
[0115] It should be noted that the HOG feature vectors are extracted from the surface images of the aerogel felt, and they contain the local shape and texture information of these images. In order for the SVM classifier to learn how to distinguish between defective and non-defective images, we need to assign labels to these feature vectors. Positive samples (images with defects) are labeled as 1, and negative samples (images without defects) are labeled as 0. These labeled HOG feature vectors are divided into training sets and test sets, usually according to a certain ratio, such as 70% of the data as a training set and 30% of the data as a test set. The training set is used to train the SVM classifier, allowing it to learn how to determine whether an image has defects based on the HOG features; the test set is used to evaluate the performance of the trained classifier on unseen data.
[0116] (2) Select kernel function and regularization parameters to train SVM classifier.
[0117] It's important to note that the kernel function maps data from a low-dimensional space to a high-dimensional space, making data that is linearly inseparable in the low-dimensional space linearly separable in the high-dimensional space. Common kernel functions include linear kernels, polynomial kernels, and radial basis functions (RBFs). Choosing a different kernel function can affect the performance of the SVM classifier. The regularization parameter C is used to balance the model's complexity and the degree of fit to the training data. During training, an appropriate value of C should be selected based on the data characteristics and experimental results to avoid overfitting or underfitting.
[0118] (3) Calculate the classification accuracy of the training set and the test set, and adjust the parameters of the HOG feature and the SVM parameters based on the training results.
[0119] During the training process, the data of the training set is input into the SVM classifier for training, and then the data of the test set is used for testing, and the classification accuracy (which is the ratio of the number of correctly classified samples to the total number of samples) is calculated. By calculating the classification accuracy, the performance of the model on the training set and the test set can be evaluated to understand whether the model is overfitting or underfitting the data.
[0120] HOG feature parameters include window size, block size, cell size, and the number of gradient bins. If the model performs poorly based on the classification accuracy, you can adjust these parameters. For example, changing the window size may affect the feature extraction range, thereby changing the extracted feature information and, in turn, affecting classifier performance. In addition to the regularization parameter C, you can also adjust the kernel function parameters to optimize the performance of the SVM classifier.
[0121] (4) Use the SVM classifier to perform classification prediction. If the current image is determined to be defect-free, the HOG algorithm is repeatedly used to extract features and input them into the SVM classifier. If it is determined that there are defects, the image is input into the trained deep convolutional neural network model.
[0122] A trained SVM classifier is used to predict the classification of new images. For each input image, the HOG algorithm is first used to extract its feature vector, which is then fed into the SVM classifier. If the SVM classifier determines that the image is defect-free (predicted label is 0), further in-depth analysis is not required. To ensure the accuracy of the results, the HOG algorithm is repeatedly used to extract features and feed them into the SVM classifier. This process ensures that any misjudgments are not caused by accidental errors in feature extraction.
[0123] If the SVM classifier determines that the image has a defect (the predicted label is 1), the image is input into the trained deep convolutional neural network model. This is because the deep convolutional neural network model can more accurately locate and classify the location and category of the defect and provide more detailed information, such as determining the location and category of the defect (such as pits, stains, floating glue, indentation, etc.), rather than just judging whether there is a defect.
[0124] S104: Input the first image into the deep convolutional neural network model, and output defect location and category information.
[0125] It should be noted that the inputting of the screened defective images into the deep convolutional neural network model and the output of defect location and category information includes:
[0126] (1) The defective aerogel felt image data screened out by the SVM classifier is input into the trained deep convolutional neural network model based on aerogel felt defect optimization.
[0127] After filtering with the SVM classifier, we've identified aerogel felt images likely to contain defects. These images contain a variety of information about the aerogel felt surface, but the specific location and type of the defects remain unclear. These images are then fed into a deep convolutional neural network model to further leverage its powerful feature extraction and classification capabilities to pinpoint the location and type of defects.
[0128] (2) Based on the CSPDarknet53, spatial pyramid pooling module and path aggregation network module contained in the deep convolutional neural network model, multi-scale feature extraction, multi-scale feature fusion and fusion and enhancement operations between features at different levels are performed on the input image in sequence.
[0129] For details about each module, please refer to the above description and will not be repeated here.
[0130] (3) Using the anchor-free bounding box prediction method adopted by the detection head, the specific position of the defect in the image on the surface of the aerogel felt is located based on the feature information obtained by analysis, and the area where the defect is located is presented in the form of a bounding box.
[0131] It should be noted that the anchor-free bounding box prediction method is the method used by the detection head of the deep convolutional neural network model. It directly predicts the bounding box location of the defect based on the comprehensive feature map output by the path aggregation network module. Traditional anchor-based methods require pre-setting anchors of different sizes and shapes, while the anchor-free bounding box prediction method avoids this complex process and directly learns the location information of the defect from the feature map. For example, it can determine the location of the defect on the surface of the aerogel felt based on the feature intensity and distribution of certain areas in the feature map, and mark the area where the defect is located with a bounding box (usually a rectangular area represented by the upper left corner coordinates and the lower right corner coordinates), intuitively showing the location of the defect in the image.
[0132] (4) Based on the characteristic patterns of different defect categories learned by the deep convolutional neural network model, the category to which the defect in the input image belongs is determined.
[0133] During training, the deep convolutional neural network model learns the characteristic patterns of different defect categories (such as pits, stains, adhesive smears, and indentations). When fed an image containing a defect, the model compares the defect with the learned characteristic patterns of different categories based on the resulting feature map to determine which category the defect belongs to. This is accomplished through the classifier in the model, which can be a fully connected layer or other form. Based on the information in the feature map, the classifier outputs the probability of the defect belonging to each category, ultimately determining the most likely category for the defect.
[0134] (5) Integrate and output the determined defect location information and the determined defect category information.
[0135] The defect location information (bounding box coordinates) obtained by the anchor-free bounding box prediction method is integrated with the defect category information determined by the classifier. This allows the information of an aerogel felt image with defects to be presented in a clear and unambiguous manner. For example, the output result may be: there is a pit in the area from (x1, y1) to (x2, y2) in the image, and there is a stain in the area from (x3, y3) to (x4, y4).
[0136] Figure 4 For the data transmission architecture diagram of the aerogel felt surface defect detection system shown in this application, please refer to Figure 4 The camera captures images and transmits them to an edge computing device, an AI machine (SX20). This device integrates a PLC control terminal and a Linux system platform. The conveyor and winder are controlled by the PLC layer. Image processing, the HOG algorithm and classifier, and the defect annotation model are all deployed on this device's Linux system platform. The line scan camera transmits image information to the Linux layer using the RTSP protocol. Conveyor and winder control parameters are transmitted from the PLC layer to the Linux layer using the TCP protocol.
[0137] The image processing algorithm uses data transmitted via the RTSP protocol for preliminary processing and sends it to the HOG algorithm and classifier for screening. Once defects are found, they are transmitted to the annotation model for defect annotation and identification. The model results are combined with the conveyor belt and winder operating speeds, image acquisition time, and the start time of the current batch of products to calculate the location of the defect.
[0138] It should be noted that the automatic identification and classification of images with defects screened out, and the output of defect location and category information, include: inputting the screened suspected defect image data into a deep convolutional neural network model; calculating the defect location based on the on-site conveyor speed and camera image acquisition time when the surface defect detection system is deployed; outputting the defect location and defect category based on the defect category and calculated defect location already marked by the defect annotation model, and storing the defect location information together with the defect category. Specifically, the calculation method is as follows:
[0139] Defect location (L) = conveyor belt speed (V) × (defect detection time (T) - model calculation time (t_model));
[0140] For example, the conveyor belt running speed (V): 2m / s, the model calculation time (t_model): 0.2 seconds, the start time of the current batch of products (T_start): 10:00:00, the defect detection time (T_detect): 10:00:05, then the defect detection time difference (T): T=T_detect-T_start=5 seconds; the correction time difference (T_corrected): T_corrected=T-t_model=5-0.2=4.8 seconds; the defect position (L): L=V×T_corrected=2×4.8=9.6 meters, that is, the position of the felt defect is at 9.6 meters. At this time, the defect position information is further stored in the Mysql database together with the defect category.
[0141] The method provided in this embodiment, in the image data acquisition and preprocessing stage, the carefully deployed aerogel felt surface defect detection system fully utilizes the advantages of multiple cameras multi-angle exposure and photometric stereo vision technology, successfully obtains comprehensive and accurate image data, and effectively avoids the problem of missing defect information caused by single-angle exposure. A series of preprocessing operations such as grayscale processing, Gaussian blur, edge enhancement and adaptive histogram equalization significantly improve the image quality and highlight the defect characteristics. The deep convolutional neural network model continues to evolve in the rigorous training and evaluation adjustment process. Reasonable hyperparameters and carefully selected composite loss functions including classification loss, positioning loss, and confidence loss guide the model to move steadily towards the direction of accurately identifying defects. During the training process, the hyperparameters and model structure are flexibly adjusted according to the evaluation results of the validation set to ensure that the model has excellent generalization ability, can stably function in complex and changeable actual production environments, and accurately identify various defects. In addition, the HOG feature vector provides highly discriminative information for the SVM classifier due to its powerful expression ability of local texture and edge features of the image. The SVM classifier, with its excellent performance in binary classification and good generalization capabilities, quickly screens out defective images, significantly reducing detection time and improving the efficiency of the entire system. After inputting the screened defective images into the deep convolutional neural network model, the close collaboration of its internal modules and advanced detection head technology enables precise output of defect location and classification information, providing a detailed and accurate basis for quality control of aerogel felt.
[0142] Example 2:
[0143] Corresponding to the aforementioned embodiment of a method for treating surface defects of aerogel felt, the present application also provides an embodiment of a device for treating surface defects of aerogel felt.
[0144] Figure 5 This is a schematic diagram of the structure of the second embodiment of the aerogel felt surface defect device provided by this application. Figure 5 The device provided in this embodiment includes an extraction module 510, a training module 520, a screening module 530 and a recognition module 540.
[0145] The extraction module 510 is used to obtain image data of the aerogel felt surface after pretreatment and extract the HOG feature vector of the image data;
[0146] The training module 520 is used to annotate the preprocessed image data, build a deep convolutional neural network model for aerogel felt defect recognition, and train the deep convolutional neural network model with the annotated data;
[0147] The deep convolutional neural network model includes a CSPDarknet53, a spatial pyramid pooling module, and a path aggregation network module connected in sequence;
[0148] The CSPDarknet53 takes image data as input and outputs a multi-scale feature map of the image data; the spatial pyramid pooling module performs a multi-scale pooling operation on the feature map output by the CSPDarknet53, and outputs the pooling result to the path aggregation network module; the path aggregation network module receives the multi-scale feature map output by the spatial pyramid pooling module and the CSPDarknet53, performs feature fusion and enhancement processing, and outputs the fused feature map; the detection head of the deep convolutional neural network model adopts an anchor-free bounding box prediction method, is connected to the path aggregation network module, takes the fused feature map as input, and outputs the predicted defect location and category information;
[0149] The screening module 530 is configured to input the HOG feature vector into a pre-trained SVM classifier and use the SVM classifier to screen out a first image, where the first image is an image of the aerogel felt surface with defects;
[0150] The recognition module 540 is used to input the first image into the deep convolutional neural network model and output defect location and category information.
[0151] The device of this embodiment can be used to perform Figure 1 The steps, specific implementation principles and implementation processes of the method embodiment shown are similar and will not be repeated here.
[0152] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0153] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0154] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for identifying surface defects of aerogel felt, characterized in that: The method comprises: Acquire image data of the aerogel felt surface after pretreatment, and extract the HOG feature vector of the image data; Annotating the preprocessed image data, building a deep convolutional neural network model for aerogel felt defect recognition, and training the deep convolutional neural network model with the annotated data; The deep convolutional neural network model includes a CSPDarknet53, a spatial pyramid pooling module, and a path aggregation network module connected in sequence; The CSPDarknet53 takes image data as input and outputs a multi-scale feature map of the image data; the spatial pyramid pooling module performs a multi-scale pooling operation on the feature map output by the CSPDarknet53, and outputs the pooling result to the path aggregation network module; the path aggregation network module receives the multi-scale feature map output by the spatial pyramid pooling module and the CSPDarknet53, performs feature fusion and enhancement processing, and outputs the fused feature map; the detection head of the deep convolutional neural network model adopts an anchor-free bounding box prediction method, is connected to the path aggregation network module, takes the fused feature map as input, and outputs the predicted defect location and category information; Inputting the HOG feature vector into a pre-trained SVM classifier, and using the SVM classifier to filter out a first image, where the first image is an image of defects on the surface of the aerogel felt; Inputting the first image into the deep convolutional neural network model and outputting defect location and category information; The process of pre-training the SVM classifier includes: Combine the HOG feature vectors with the corresponding labels to construct training and test sets; Select kernel function and regularization parameters to train SVM classifier; Calculate the classification accuracy of the training set and the test set, and adjust the parameters of the HOG feature and the SVM parameters based on the training results; The SVM classifier is used for classification prediction. If the current image is determined to be defect-free, the HOG algorithm is repeatedly used to extract features and input them into the SVM classifier; if it is determined that there are defects, the image is input into the trained deep convolutional neural network model.
2. The method according to claim 1, characterized in that Training and evaluation of a deep convolutional neural network model for defect recognition in aerogel felt, including: Set the hyperparameters required for training, select a composite loss function including classification loss, localization loss, and confidence loss, and an optimizer for optimizing the neural network model parameters; Divide the labeled image data into a training set, a validation set, and a test set, input the training set data into the constructed deep convolutional neural network model, calculate the loss function during the training process, and update the parameters of the deep convolutional neural network model according to the optimizer strategy; use the validation set to evaluate the trained deep convolutional neural network model, and adjust the hyperparameters and model structure based on the evaluation results; When the deep convolutional neural network model achieves the specified performance on the validation set, the test set is used to perform a final performance evaluation on the deep convolutional neural network model that achieves the specified performance.
3. The method according to claim 1, characterized in that The operation steps of CSPDarknet53 include: The pre-processed aerogel felt surface image feature map is used as input to obtain a multi-scale feature map; Integrating the local texture and edge feature information contained in the HOG feature vector into the multi-scale feature map according to a pre-set fusion rule to form a first fused feature map; Performing a splitting operation on the first fused feature map to obtain multiple sub-feature sets; The split sub-feature sets are reorganized to obtain reorganized multi-scale feature information and obtain a reorganized multi-scale feature map.
4. The method according to claim 1, wherein The operation steps of the spatial pyramid pooling module in aerogel felt surface defect recognition include: Receive the reconstructed multi-scale feature map output from CSPDarknet53, divide the reconstructed multi-scale feature map into multiple sub-regions of different scales, and perform maximum pooling operations on the sub-regions of each scale; The pooling results of sub-regions of different scales are combined according to the pre-set splicing rules.
5. The method according to claim 1, characterized in that The operation steps of the path aggregation network module in the aerogel felt surface defect identification include: Receive the feature map output from the spatial pyramid pooling module and the reconstructed multi-scale feature map of CSPDarknet53; A first range layer feature map is amplified by an upsampling operation, and abstract semantic feature information of the first range layer is fused with the feature map of the second range layer according to a predetermined fusion rule to obtain a first fusion result; the first range layer is located deeper than the second range layer in the convolutional neural network; The second range layer feature map is reduced by a downsampling operation, and the detail features of the second range layer are added to the first range layer feature map according to a predetermined fusion rule to obtain a second fusion result; According to multiple interactions and fusion operations of the first fusion result and the second fusion result, feature enhancement of the final fused feature map is achieved.
6. The method according to claim 1, characterized in that The pre-processing includes grayscale processing, Gaussian blur, edge enhancement and adaptive histogram equalization; The pre-treatment process includes: Based on the collected aerogel felt surface image data, the red, green, and blue components are converted into grayscale values using the weighted average method to obtain a grayscale image. Applying Gaussian blur technology to smooth the grayscale image to obtain a denoised image; Performing edge detection on the denoised image using a Sobel operator, obtaining a gradient magnitude image by calculating the brightness gradient of the denoised image, and performing edge enhancement on the gradient magnitude image as an original image channel to obtain an edge-enhanced image; The edge-enhanced image is divided into multiple non-overlapping sub-blocks by the CLAHE algorithm, and histogram equalization is performed independently on each sub-block based on the pixel value of the original image, the total number of pixels in the non-overlapping sub-blocks, the grayscale level and the cumulative distribution function of the histogram.
7. The method according to claim 1, characterized in that Before obtaining the image data of the aerogel felt surface after pretreatment, the method includes: Calculating the arrangement position of each camera among the plurality of cameras according to the position of the conveyor belt, wherein the maximum shooting composition of the three-dimensional space of each camera covers all angles of the aerogel product conveyed on the conveyor belt; Setting the aerogel product conveyor belt speed according to the acquisition time and image line interval error requirements of the multiple cameras; Taking images of the aerogel product at various angles based on the multiple cameras; Photometric stereo vision technology is used to fuse multiple images exposed at multiple angles into a complete defect image.
8. The method according to claim 1, characterized in that The method of obtaining image data of the aerogel felt surface after pretreatment and performing feature extraction to obtain a HOG feature vector includes: Divide the preprocessed image into cells, calculate the gradient magnitude of each cell, and calculate the gradient direction based on the ratio of the vertical and horizontal gradients in the gradient magnitude; Converting the gradient direction into a plurality of direction intervals, and constructing a first eigenvector for each direction interval; The gradient amplitude of each cell is weighted and accumulated to the first eigenvector in the corresponding direction interval to obtain the second eigenvector; performing normalization processing on the plurality of cells, and fusing each of the second eigenvectors to form a third eigenvector; Concatenate all third eigenvectors into a long vector as the final HOG feature vector.
9. An aerogel felt surface defect identification device, characterized in that: The device includes an extraction module, a training module, a screening module and a recognition module. The extraction module is used to obtain image data of the aerogel felt surface after pretreatment and extract the HOG feature vector of the image data; The training module is used to annotate the preprocessed image data, build a deep convolutional neural network model for aerogel felt defect recognition, and train the deep convolutional neural network model with the annotated data; The deep convolutional neural network model includes a CSPDarknet53, a spatial pyramid pooling module, and a path aggregation network module connected in sequence; The CSPDarknet53 takes image data as input and outputs a multi-scale feature map of the image data; the spatial pyramid pooling module performs a multi-scale pooling operation on the feature map output by the CSPDarknet53, and outputs the pooling result to the path aggregation network module; the path aggregation network module receives the multi-scale feature map output by the spatial pyramid pooling module and the CSPDarknet53, performs feature fusion and enhancement processing, and outputs the fused feature map; the detection head of the deep convolutional neural network model adopts an anchor-free bounding box prediction method, is connected to the path aggregation network module, takes the fused feature map as input, and outputs the predicted defect location and category information; The screening module is used to input the HOG feature vector into a pre-trained SVM classifier, and use the SVM classifier to screen out a first image, where the first image is an image of defects on the surface of the aerogel felt; The recognition module is configured to input the first image into the deep convolutional neural network model and output defect location and category information; The process of pre-training the SVM classifier includes: Combine the HOG feature vectors with the corresponding labels to construct training and test sets; Select kernel function and regularization parameters to train SVM classifier; Calculate the classification accuracy of the training set and the test set, and adjust the parameters of the HOG feature and the SVM parameters based on the training results; The SVM classifier is used for classification prediction. If the current image is determined to be defect-free, the HOG algorithm is repeatedly used to extract features and input them into the SVM classifier; if it is determined that there are defects, the image is input into the trained deep convolutional neural network model.
Citation Information
Patent Citations
Visual-based appearance defect detection method for an earphone silica gel gasket
CN113989196A
YOLOv4-based battery piece defect detection method and system
CN114943830A