Method and system for detecting impurities on a surface of a processed aluminum plate
By using a multi-band light source system and a lightweight deep learning model, the problems of false detection and missed detection of impurities on the surface of aluminum plates under different working conditions and environments have been solved, and the accurate identification and evaluation of various impurities have been achieved.
Patent Information
- Application Number
- CN202510919591.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Existing aluminum plate surface impurity detection technologies are difficult to adapt to different processing conditions and environmental conditions, and are prone to false detections and missed detections, and are difficult to accurately identify multiple impurities.
A multi-band light source system is used to acquire multispectral images. By combining a lightweight deep learning model and a dynamic feature selection method, the accurate identification and evaluation of impurities on the surface of aluminum plates can be achieved.
It enables accurate detection under different processing conditions and environments, improves the accuracy and stability of impurity identification, and reduces the false detection rate.
Smart Images

Figure CN120747629B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of impurity detection technology, and in particular to a method and system for detecting impurities on the surface of processed aluminum plates. Background Technology
[0002] Aluminum sheets, as an important industrial material, are widely used in aerospace, automotive manufacturing, architectural decoration, and electronic device housings. During aluminum sheet processing, various impurities often appear on the surface due to factors such as raw materials, processing techniques, and environmental conditions. These impurities include oil stains, oxides, metal dust, and coating peeling. These impurities not only affect the aesthetics of the aluminum sheet but can also lead to a series of problems such as poor subsequent coating, reduced adhesion strength, and shortened service life. Therefore, it is necessary to inspect the surface of processed aluminum sheets for impurities to avoid using defective sheets in subsequent processing stages, reduce unnecessary process waste, and lower production costs.
[0003] However, existing aluminum plate surface impurity detection technologies typically rely on visual judgment based on worker experience, resulting in low detection efficiency, inconsistent standards, susceptibility to subjective factors, and difficulty in detecting minute impurities. With the development of automation technology, some companies have begun to use machine vision systems for aluminum plate surface inspection. However, these systems use single or fixed-band light sources and ordinary cameras for image acquisition and processing, making it difficult to distinguish between different types of impurities. Furthermore, they are extremely sensitive to external factors such as changes in ambient light and the reflective properties of the aluminum plate surface, which can easily lead to false detections and missed detections in actual production environments, making them unsuitable for different processing conditions and environmental conditions.
[0004] Therefore, finding a method that can accurately identify the diverse impurities on the surface of processed aluminum plates and provide accurate detection under different processing conditions and environments is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] This invention provides a method and system for detecting impurities on the surface of processed aluminum plates, which solves the defects of existing technologies that cannot adapt to different processing conditions and environmental conditions, and are prone to false detection and missed detection, and achieves accurate identification of various impurities.
[0006] This invention provides a method for detecting impurities on the surface of a processed aluminum plate, comprising the following steps:
[0007] S1. Set up a multi-band light source system, use the multi-band light source system to sequentially irradiate the surface of the processed aluminum plate, and collect the reflection images of the surface of the processed aluminum plate at different wavelengths in real time to obtain a multispectral image.
[0008] S2. Preprocess the multispectral image to obtain the processed multispectral image;
[0009] S3. Perform feature extraction on the processed multispectral image to obtain band ratio features and impurity principal component features. Based on the aluminum plate processing conditions, perform dynamic feature selection on the band ratio features and impurity principal component features to obtain impurity features on the aluminum plate surface.
[0010] S4. A lightweight deep learning model is used to perform pixel-level segmentation and classification of the impurity features on the aluminum plate surface to obtain the impurity categories on the aluminum plate surface.
[0011] S5. Use an impurity assessment model to assess the impurity categories on the surface of the aluminum plate, obtain an impurity severity score, and generate an impurity distribution visualization map based on the impurity severity score.
[0012] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate is provided, wherein the multi-band light source system includes an ultraviolet light band, a visible light band, and a near-infrared light band.
[0013] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate, step S3 specifically includes:
[0014] Based on the spectral response characteristics of different impurities on the aluminum plate surface, the ratio characteristics of the ultraviolet band to the blue light band, the ratio characteristics of the near-infrared band to the red light band, and the ratio characteristics of the red light band to the blue light band were calculated to obtain the band ratio characteristics; among them, the spectral response characteristics refer to the sum of the reflection, absorption and scattering characteristics of different materials or substances to incident light in each spectral band.
[0015] An optimized projection matrix for aluminum plate impurities is constructed, and the processed multispectral image is transformed using the optimized projection matrix to obtain the principal component features of the impurities. The optimized projection matrix is used to project the processed multispectral image into a low-dimensional feature space and to confirm the differences between different impurity types.
[0016] Based on the processing parameters of aluminum plate, multi-level dynamic feature selection is performed on the band ratio characteristics and impurity principal component characteristics to obtain the impurity characteristics on the aluminum plate surface.
[0017] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate, wherein the method for constructing the optimized projection matrix of the impurities on the aluminum plate specifically includes:
[0018] Acquire multispectral images and impurity types of historically processed aluminum plate surfaces, and establish a standard sample library based on the multispectral images and impurity types of historically processed aluminum plate surfaces;
[0019] Calculate the intra-class scatter matrix and inter-class scatter matrix according to the impurity type;
[0020] The projection directions of different types of impurities are determined based on the intra-class scatter matrix and the inter-class scatter matrix.
[0021] The first two eigenvectors of the eigenvalues are selected to form the aluminum plate impurity optimization projection matrix.
[0022] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate includes a multi-level dynamic feature selection strategy, a speed-adaptive layered processing strategy, a material-adaptive parameter adjustment mechanism, an environmental condition compensation mechanism, and a dynamic resource allocation strategy.
[0023] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate includes a multi-level dynamic feature selection step, which specifically includes:
[0024] The real-time operating parameters of the aluminum plate production line are obtained, including production line speed, aluminum plate material information, and environmental condition data.
[0025] The production line speed is divided into different ranges by setting a preset speed threshold, and a corresponding feature calculation scheme is configured for each speed range to determine the production line speed characteristics.
[0026] The feature processing parameters are dynamically adjusted based on the optical properties, surface characteristics, and chemical composition of the processed aluminum plate.
[0027] By monitoring ambient temperature and humidity in real time, a mapping relationship between environmental parameters and feature processing parameters is established, and the basic band ratio characteristics are calculated. Based on the basic band ratio characteristics, the resource status of aluminum plate processing, and testing requirements, resources are allocated.
[0028] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate is provided, wherein the lightweight deep learning model adopts the U-Net architecture, and the U-Net architecture includes:
[0029] The encoder includes one convolutional block and two depthwise separable convolutional blocks. Each convolutional block contains two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function.
[0030] The decoder includes three upsampled convolutional blocks, which are connected to the encoder via skip connections;
[0031] The skip connection includes a channel attention module and a spatial attention module.
[0032] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate, step S4 specifically includes:
[0033] The surface impurity characteristics of the aluminum plate are preprocessed to obtain preprocessed feature data;
[0034] The preprocessed feature data is input into a lightweight deep learning model, wherein the encoder extracts features from the preprocessed feature data to obtain encoder features, and the decoder upsamples the preprocessed feature data to obtain decoder features.
[0035] The encoder features are processed sequentially using a channel attention module and a spatial attention module to obtain enhanced encoder features. The enhanced encoder features are then concatenated with the decoder features to obtain fused features.
[0036] The class probability value of each pixel position in the fused feature is normalized, and the class with the highest class probability value is selected as the predicted class of the pixel to obtain the impurity class on the aluminum plate surface.
[0037] Adjacent pixels of the same impurity category are aggregated into impurity regions, and the number of pixels in each impurity region is calculated. The number of pixels is compared with a preset number of pixels, and impurity regions with a number of pixels less than the preset number of pixels are removed to obtain the impurity regions on the aluminum plate surface.
[0038] According to the present invention, a method for detecting impurities on the surface of a processed aluminum plate, step S5 specifically includes:
[0039] Calculate the total area of each impurity type on the aluminum plate surface, determine the original coverage rate based on the total area of each impurity type on the aluminum plate surface and the aluminum plate surface area, and standardize the original coverage rate through linear mapping to obtain the normalized coverage rate;
[0040] Based on the distribution factor determined by the impurity region on the aluminum plate surface, the impurity severity index on the processed aluminum plate surface is determined using the impurity assessment model based on the normalized coverage and the distribution factor; the calculation formula of the impurity assessment model is as follows:
[0041] ;
[0042] ;
[0043] ;
[0044] in, This represents the severity index of impurities on the surface of the processed aluminum plate, where i represents the index of the impurity type and n represents the total number of impurity types. This represents the weight of impurity type i. This represents the normalized coverage of impurity type i. This represents the distribution factor of impurity type i. Indicates the adjustment parameter. Represents the Gini coefficient. Represents the shape factor. Represents the maximum shape factor. Represents the area of impurity type i. Indicates the perimeter of impurity type i;
[0045] The impurity severity index is converted into an impurity severity score through a mapping function, and an impurity distribution visualization map is generated based on the impurity severity score and impurity spatial distribution information. A heat map is used to present the impurity distribution density.
[0046] This invention also provides an impurity detection system for the surface of processed aluminum plates, implementing the impurity detection method described above, including:
[0047] The multispectral image acquisition module is used to set up a multi-band light source system, use the multi-band light source system to sequentially irradiate the surface of the processed aluminum plate, and acquire the reflection images of the surface of the processed aluminum plate at different wavelengths in real time to obtain a multispectral image.
[0048] The preprocessing module is used to preprocess the multispectral image to obtain the processed multispectral image;
[0049] The feature extraction module is used to extract features from the processed multispectral image to obtain band ratio features and impurity principal component features. Based on the aluminum plate processing conditions, dynamic feature selection is performed on the band ratio features and impurity principal component features to obtain impurity features on the aluminum plate surface.
[0050] The impurity classification module is used to perform pixel-level segmentation and classification of the impurity features on the surface of the aluminum plate using a lightweight deep learning model, so as to obtain the impurity category on the surface of the aluminum plate.
[0051] The impurity assessment module is used to assess the impurity categories on the surface of the aluminum plate using an impurity assessment model, obtain an impurity severity score, and generate an impurity distribution visualization map based on the impurity severity score.
[0052] This invention provides a method and system for detecting impurities on the surface of processed aluminum plates. By using a multi-band light source system to acquire multispectral images, the unique spectral response characteristics of different impurities at different wavelengths are captured. The multispectral images are then processed, and through the extraction of band ratio features and principal component features, accurate identification of various impurities is achieved. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 This is a flowchart of a method for detecting impurities on the surface of a processed aluminum plate provided by the present invention;
[0055] Figure 2 This is a structural block diagram of an impurity detection system for the surface of a processed aluminum plate provided by the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0057] like Figure 1 As shown, the present invention provides a method for detecting impurities on the surface of a processed aluminum plate, comprising the following steps:
[0058] S1. Set up a multi-band light source system, use the multi-band light source system to sequentially irradiate the surface of the processed aluminum plate, and collect the reflection images of the surface of the processed aluminum plate at different wavelengths in real time to obtain a multispectral image.
[0059] Understandably, a multi-band light source system is an illumination device that integrates light sources of different wavelengths. It is typically installed above or to the side of the inspection area on an aluminum plate production line to ensure uniform illumination of the aluminum plate surface while avoiding unnecessary reflections or shadows. Multi-band light source systems are usually installed in a ring layout or linear array, located around or at an angle to the multispectral camera, forming a structured illumination system. This installation position and method ensures that the characteristics of impurities on the aluminum plate surface are optimally displayed under different wavelengths of light.
[0060] Specifically, the multi-band light source system includes ultraviolet, visible, and near-infrared light bands. By combining these three bands, the spectral characteristics of different types of impurities on the aluminum plate surface can be comprehensively captured, forming a multi-dimensional feature representation and significantly improving the accuracy and reliability of impurity detection.
[0061] In one embodiment of the present invention, the ultraviolet light segment selects three wavelengths of 275nm, 340nm, and 365nm, mainly for detecting oil stains and organic residues; the visible light segment selects three wavelengths of 450nm, 550nm, and 630nm, used for detecting surface morphology and general impurities; and the near-infrared light segment selects two wavelengths of 780nm and 940nm, mainly used for detecting oxide films and specific metal compounds.
[0062] Understandably, the 275nm wavelength in the ultraviolet light range is highly sensitive to aromatic compounds and can effectively identify oil stains and organic residues containing benzene ring structures; the 340nm wavelength has a good detection effect on many organic solvent residues; and the 365nm wavelength is the ultraviolet wavelength closest to visible light and has a significant response to various light oil stains and human contaminants such as fingerprints.
[0063] In the visible light spectrum, 450nm blue light has a good display effect on surface micro-scratches and uneven morphological features because short wavelength light is more sensitive to micro-structural changes; 550nm green light is the wavelength region most sensitive to the human eye and is suitable for detecting color changes and obvious impurities on the surface of aluminum plates; 630nm red light has a good ability to distinguish certain metal oxides and inorganic contaminants.
[0064] In the near-infrared light region, the 780nm wavelength is located in the near-infrared short-wave region and is sensitive to changes in the thickness of the oxide film on the aluminum surface, effectively distinguishing different degrees of oxidation; the 940nm wavelength has characteristic absorption of water molecules and certain metal oxides, making it suitable for detecting surface lubricant residues and specific metal compound contamination.
[0065] In one embodiment of the present invention, the multi-band light source system adopts a timing control method, in which light sources of different wavelengths irradiate the surface of the aluminum plate in a preset order, and the irradiation time of each wavelength is controlled between 50 and 100 milliseconds, ensuring that the images acquired at different wavelengths have similar signal-to-noise ratios, thus overcoming the problem of large differences in signal intensity at different wavelengths in traditional multispectral systems.
[0066] In one embodiment of the present invention, the image acquisition adopts a line scan mode, and the spectral resolution of the camera is not less than 5nm, and the spatial resolution reaches 50 micrometers / pixel.
[0067] S2. Preprocess the multispectral image to obtain the processed multispectral image.
[0068] Specifically, preprocessing includes dark current correction, flat field correction, spectral calibration, image registration, spatial filtering, and background normalization.
[0069] In one embodiment of the present invention, dark current correction and flat field correction specifically include:
[0070] ;
[0071] in, This represents the corrected multispectral image. This represents the original multispectral image. This represents a dark-field multispectral image. This represents a flat-field multispectral image. This represents the wavelength-dependent transmission coefficient compensation factor. This indicates the wavelength of light.
[0072] In one embodiment of the present invention, spectral calibration is achieved by monitoring changes in the reflectance spectrum of a standard white board and dynamically adjusting calibration parameters. This effectively solves the problems of light source spectral drift and camera response changes during long-term operation. The calculation formula is as follows:
[0073] ;
[0074] in, This indicates the calibrated sample reflectance. Represents sample image, Represents a dark-field image. Represents a whiteboard image. This indicates the calibrated reflectance of a standard whiteboard. This indicates the time- and temperature-dependent correction factors. Indicates time, Indicates temperature.
[0075] In one embodiment of the present invention, image registration is the process of precisely aligning multispectral images acquired at different wavelengths to ensure that the same physical location corresponds to the same pixel coordinates in each band of spectral image. Spatial filtering removes spatial noise and artifacts from the multispectral image, improving the image quality and signal-to-noise ratio of the multispectral image. Background normalization is a key step in eliminating the influence of the non-uniformity of the aluminum plate itself and highlighting impurity features.
[0076] S3. Perform feature extraction on the processed multispectral image to obtain band ratio features and impurity principal component features. Based on the aluminum plate processing conditions, perform dynamic feature selection on the band ratio features and impurity principal component features to obtain the impurity features on the aluminum plate surface.
[0077] This invention forms a dual feature extraction mechanism by calculating the ratio characteristics between specific wavebands and constructing an optimized projection matrix for aluminum plate impurities. This enhances the ability to distinguish similar impurities, reduces the interference of changes in ambient light and the reflective properties of the aluminum plate surface on the detection results, and makes the detection results more stable and reliable.
[0078] Specifically, step S3 includes:
[0079] Based on the spectral response characteristics of different impurities on the aluminum plate surface, the ratio characteristics of the ultraviolet band to the blue light band, the ratio characteristics of the near-infrared band to the red light band, and the ratio characteristics of the red light band to the blue light band were calculated to obtain the band ratio characteristics; among them, the spectral response characteristics refer to the sum of the reflection, absorption and scattering characteristics of different materials or substances to incident light in each spectral band.
[0080] An optimized projection matrix for aluminum plate impurities is constructed, and the processed multispectral image is transformed using the optimized projection matrix to obtain the principal component features of the impurities. The optimized projection matrix is used to project the processed multispectral image into a low-dimensional feature space and to confirm the differences between different impurity types.
[0081] Based on the aluminum plate processing condition parameters, multi-level dynamic feature selection is performed on the band ratio characteristics and impurity principal component characteristics to obtain the impurity characteristics on the aluminum plate surface; the aluminum plate processing condition parameters include production line speed, aluminum plate material type, ambient temperature and humidity, and lighting conditions.
[0082] Understandably, the band ratio reflects the relative relationship between different wavelength spectra. This relative relationship has higher specificity for specific impurity types. The band ratio characteristic can offset part of the influence of the sensor response curve and the system transfer function, thereby improving the stability of the characteristic.
[0083] Due to the complex and variable production environment of aluminum plates, a fixed set of features is insufficient to handle all operating conditions. For example, on high-speed production lines, calculating complex features may lead to processing delays; different aluminum plate materials exhibit significant differences in their response to certain spectral band features. This invention, through dynamic feature selection, can adjust strategies according to actual conditions, maintaining stable detection performance under various conditions. For instance, in high-speed production mode, features with simpler spectral ratios are prioritized; when detecting critical quality control points, all features are used to improve accuracy; for aluminum plates of different materials, feature weights are adjusted to adapt to their spectral characteristics; and when computational resources are limited, feature combinations are optimized to balance accuracy and real-time performance.
[0084] In one embodiment of the present invention, the formula for calculating the ratio characteristic of the ultraviolet band to the blue light band is as follows:
[0085]
[0086] in, Represents pixels Characteristics of the ultraviolet / blue light band ratio, Represents pixels The intensity values of the preprocessed ultraviolet band image. Represents pixels The intensity value of the preprocessed blue light band image;
[0087] In one embodiment of the present invention, the formula for calculating the ratio characteristic of the near-infrared band to the red band is as follows:
[0088]
[0089] in, Represents pixels Characteristics of the near-infrared / red light band ratio. Represents pixels The intensity values of the preprocessed near-infrared band image. Represents pixels The intensity value of the preprocessed red band image;
[0090] In one embodiment of the present invention, the formula for calculating the ratio characteristic of the red light band to the blue light band is as follows:
[0091]
[0092] in, Represents pixels Characteristics of the red / blue light band ratio.
[0093] In one embodiment of the present invention, the method for constructing the aluminum plate impurity optimization projection matrix specifically includes:
[0094] Multispectral images and impurity types of historically processed aluminum plate surfaces are acquired, and a standard sample library D is established based on these images and impurity types. , ,in This represents the multispectral image feature vector of the nth processed aluminum plate surface. This represents the i-th impurity type, and K represents the total number of impurity types;
[0095] Calculate the intra-class scatter matrix and inter-class scatter matrix according to the impurity type;
[0096] The projection directions of different types of impurities are determined based on the intra-class scatter matrix and the inter-class scatter matrix.
[0097] The first two eigenvectors of the eigenvalues are selected to form the aluminum plate impurity optimization projection matrix.
[0098] In one embodiment of the present invention, the multi-level dynamic feature selection includes a velocity-adaptive hierarchical processing strategy, a material-adaptive parameter adjustment mechanism, an environmental condition compensation mechanism, and a dynamic resource allocation strategy, wherein...
[0099] The adaptive layered processing strategy selects features based on the relationship between the production line speed for processing aluminum plates and a preset speed threshold.
[0100] The material adaptive parameter adjustment mechanism dynamically adjusts feature processing parameters based on the material information of the processed aluminum plate.
[0101] The environmental condition compensation mechanism is designed to compensate for the effects of environmental factors on multispectral imaging and feature extraction in real time.
[0102] The dynamic resource allocation is based on the resource status and testing requirements of aluminum plate processing.
[0103] This invention improves stability under different production environments and reduces false detection rates caused by environmental changes by using a multi-level dynamic feature selection mechanism based on aluminum plate processing conditions.
[0104] Furthermore, the steps of multi-level dynamic feature selection specifically include:
[0105] The real-time operating parameters of the aluminum plate production line are obtained, including production line speed, aluminum plate material information, and environmental condition data.
[0106] The production line speed is divided into different ranges by setting a preset speed threshold, and a corresponding feature calculation scheme is configured for each speed range to determine the production line speed characteristics.
[0107] The feature processing parameters are dynamically adjusted based on the optical properties, surface characteristics, and chemical composition of the processed aluminum plate.
[0108] By monitoring ambient temperature and humidity in real time, a mapping relationship between environmental parameters and feature processing parameters is established, and the basic band ratio characteristics are calculated. Based on the basic band ratio characteristics, the resource status of aluminum plate processing, and testing requirements, resources are allocated.
[0109] Specifically, configuring corresponding feature calculation schemes for each speed range includes:
[0110] Set a first preset speed threshold and a second preset speed threshold;
[0111] The production line speed is compared with a first preset speed threshold and a second preset speed threshold to determine a tiered processing strategy. The first preset speed threshold is less than the second preset speed threshold. The tiered strategy includes: when the production line speed is less than the first preset speed threshold, calculating the ratio characteristics of three bands: ultraviolet / blue light, near-infrared / red light, and red light / blue light; when the production line speed is between the first and second preset speed thresholds, retaining the ratio characteristics of the ultraviolet band to the blue light band, the near-infrared band to the red light band, and the red light band to the blue light band; when the production line speed is greater than the second preset speed threshold, only retaining the ratio characteristic of the ultraviolet band to the blue light band.
[0112] Specifically, a detailed description of multi-level dynamic features will be provided using a specific embodiment:
[0113] On an aluminum foil production line, when the production line speed is 1.5 m / s, a full feature processing strategy is applied, simultaneously calculating the ratio features of three bands—UV / blue, near-infrared / red, and red / blue—and two principal component features to provide a comprehensive impurity evaluation. When the speed increases to 3.8 m / s, after evaluation using a benefit function, the UV / blue ratio feature (most sensitive to oil stains), the near-infrared / red ratio feature (most sensitive to oxide films), and the first principal component feature (strongest distinguishing ability) are retained, while the red / blue ratio feature and the second principal component feature are discarded. When the speed further increases to 6.2 m / s, only the simplest two band ratio features—UV / blue and near-infrared / red—are retained, and the principal component features are not calculated at all, ensuring that the data processing speed keeps up with the production line speed.
[0114] In practical applications of testing aluminum plates of different materials, material parameters are dynamically adjusted. For example, for 1060 pure aluminum (aluminum content above 99.6%), its surface smoothness is high and its reflectivity is high, so the discrimination threshold of the band ratio feature is increased by 15% to avoid false detections caused by high reflectivity. For 5052 aluminum-magnesium alloy, its surface micro-roughness is high and its near-infrared reflectivity is significantly different from that of pure aluminum, so the weight of the near-infrared / red light ratio feature is automatically reduced while the weight of the principal component feature is increased. For pre-coated aluminum plates, its surface organic coating strongly absorbs ultraviolet light, so the discrimination parameter of the ultraviolet / blue light ratio feature is adjusted to 50% of the normal value, and the weight of the red / blue light ratio feature is increased.
[0115] In an aluminum foil production workshop, the ambient temperature was monitored during the day (approximately 28°C) and dropped to 18°C at night, while the relative humidity increased from 40% during the day to 75% at night. An environmental condition compensation mechanism was used to adjust feature processing parameters in real time as the environment changed. When the temperature increased from the standard calibration temperature of 25°C to 32°C, the detected ultraviolet light source output intensity decreased by approximately 3%, and the near-infrared camera response increased by approximately 2.5%. The gain coefficient of the ultraviolet band ratio feature was automatically increased by 1.03 and the gain coefficient of the near-infrared band ratio feature was decreased by 0.98 through a temperature compensation function to maintain feature value consistency. When the humidity increased from the standard calibration humidity of 50% to 80%, the detected atmospheric transmittance in the near-infrared 940nm band decreased by approximately 5%. The gain coefficient of this band was automatically increased by 1.05 through a humidity compensation function to ensure that feature extraction was not affected by humidity.
[0116] The implementation of a dynamic resource allocation strategy in the impurity detection system of an aluminum plate production line has yielded significant results. Using a multi-core industrial computer to process multi-camera input, when a new batch of aluminum plate data is received, the system first rapidly calculates the basic band ratio features (low computational complexity) and evaluates the discriminative power of these features. In detecting a batch of 6061 aluminum alloy plates, the discriminative power of the ultraviolet / blue light ratio feature reached 3.5 (greater than the threshold of 3.0), indicating that this feature alone could reliably identify surface oil contaminants. Therefore, other complex features were temporarily omitted, and the freed-up computational resources were used to improve image processing speed and resolution. In the detection of another batch of 7075 high-strength aluminum alloy, the discriminative power of all basic features was low (maximum value 2.2, below the threshold). More computational resources were immediately allocated to calculate principal component features, and the processing priority of these features was increased to ensure accurate identification of complex impurities.
[0117] S4. A lightweight deep learning model is used to perform pixel-level segmentation and classification of the impurity features on the aluminum plate surface to obtain the impurity categories on the aluminum plate surface.
[0118] Specifically, the lightweight deep learning model adopts the U-Net architecture, which includes:
[0119] The encoder includes one convolutional block and two depthwise separable convolutional blocks. Each convolutional block contains two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function.
[0120] The decoder includes three upsampled convolutional blocks, which are connected to the encoder via skip connections;
[0121] The skip connection includes a channel attention module and a spatial attention module.
[0122] This invention achieves efficient pixel-level impurity segmentation and classification by employing a lightweight deep learning model based on the U-Net architecture, effectively fusing feature information at different scales to achieve accurate boundary localization.
[0123] Understandably, skip connections specifically include:
[0124] The output feature map of the coding layer is processed using a channel attention module to enhance the discriminative row information in the channel dimension;
[0125] The spatial attention module is used to process the output feature map processed by the channel attention module to highlight the spatial location information of the impurity region;
[0126] The output feature map of the spatial attention module is concatenated with the output feature map of the decoder.
[0127] In one embodiment of the present invention, step S4 specifically includes:
[0128] The surface impurity characteristics of the aluminum plate are preprocessed to obtain preprocessed feature data;
[0129] The preprocessed feature data is input into a lightweight deep learning model, wherein the encoder extracts features from the preprocessed feature data to obtain encoder features, and the decoder upsamples the preprocessed feature data to obtain decoder features.
[0130] The encoder features are processed sequentially using a channel attention module and a spatial attention module to obtain enhanced encoder features. The enhanced encoder features are then concatenated with the decoder features to obtain fused features.
[0131] The class probability value of each pixel position in the fused feature is normalized, and the class with the highest class probability value is selected as the predicted class of the pixel to obtain the impurity class on the aluminum plate surface.
[0132] Adjacent pixels of the same impurity category are aggregated into impurity regions, and the number of pixels in each impurity region is calculated. The number of pixels is compared with a preset number of pixels, and impurity regions with a number of pixels less than the preset number of pixels are removed to obtain the impurity regions on the aluminum plate surface.
[0133] Understandably, data preprocessing is performed on the surface impurities of aluminum plates, including feature normalization, feature channel organization, and data augmentation. This invention does not impose specific limitations on this.
[0134] S5. Use an impurity assessment model to assess the impurity categories on the surface of the aluminum plate, obtain an impurity severity score, and generate an impurity distribution visualization map based on the impurity severity score.
[0135] Specifically, step S5 includes:
[0136] Calculate the total area of each impurity type on the aluminum plate surface, determine the original coverage rate based on the total area of each impurity type on the aluminum plate surface and the aluminum plate surface area, and standardize the original coverage rate through linear mapping to obtain the normalized coverage rate;
[0137] Based on the distribution factor determined by the impurity region on the aluminum plate surface, the impurity severity index on the processed aluminum plate surface is determined using the impurity assessment model based on the normalized coverage and the distribution factor; wherein the calculation formula of the impurity assessment model is:
[0138] ;
[0139] ;
[0140] ;
[0141] in, This represents the severity index of impurities on the surface of the processed aluminum plate, where i represents the index of the impurity type and n represents the total number of impurity types. This represents the weight of impurity type i. This represents the normalized coverage of impurity type i. This represents the distribution factor of impurity type i. Indicates the adjustment parameter. Represents the Gini coefficient. Represents the shape factor. Represents the maximum shape factor. Represents the area of impurity type i. Indicates the perimeter of impurity type i;
[0142] The impurity severity index is converted into an impurity severity score through a mapping function, and an impurity distribution visualization map is generated based on the impurity severity score and impurity spatial distribution information. A heat map is used to present the impurity distribution density.
[0143] Understandable. The maximum shape factor is set to 1. The base value is 1, indicating that even if the impurities are very uniformly distributed and regularly shaped, their presence still constitutes a certain degree of defect. The more uneven the impurity distribution (…), the lower the defect rate. The larger the size (or the more irregular the shape of the impurities) (smaller) The value will be adjusted accordingly. Adjust the parameter. Adjustments can be made based on the specific quality requirements and impurity characteristics of the aluminum plate. For a perfect circle... =1. For any other shape, since the circle has the smallest circumference for the same area, therefore... It will be relatively large, leading to <1, the more irregular, slender, or tortuous the shape, the better. Compared to It will be bigger, thus The smaller the value, the better. The formula for calculating the shape factor can effectively distinguish between impurities with regular shapes (such as approximately round or square shapes) and impurities with irregular shapes (such as fine scratches or irregular spots).
[0144] The visualization includes a pseudo-color classification map, an impurity density heatmap, and anomaly area marker map. In the pseudo-color classification map, different colors represent different types of impurities, and the color transparency indicates confidence level. The standard color scheme is: oil stains - red, oxide film - blue, metal powder - green, lubricant residue - yellow, and other impurities - purple. The impurity density heatmap uses a gradient from blue (low density) to red (high density) to represent impurity distribution density. The heatmap is generated using a kernel density estimation method, with a Gaussian kernel selected as the kernel function and the bandwidth parameter adaptively adjusted. The anomaly area marker map specifically marks areas with low confidence and severely contaminated areas requiring special attention, using flashing borders or special patterns to draw the operator's attention.
[0145] like Figure 2 As shown, the present invention also provides an impurity detection system for the surface of processed aluminum plates, realizing the impurity detection method described above, including:
[0146] The multispectral image acquisition module is used to set up a multi-band light source system, use the multi-band light source system to sequentially irradiate the surface of the processed aluminum plate, and acquire the reflection images of the surface of the processed aluminum plate at different wavelengths in real time to obtain a multispectral image.
[0147] The preprocessing module is used to preprocess the multispectral image to obtain the processed multispectral image;
[0148] The feature extraction module is used to extract features from the processed multispectral image to obtain band ratio features and impurity principal component features. Based on the aluminum plate processing conditions, dynamic feature selection is performed on the band ratio features and impurity principal component features to obtain impurity features on the aluminum plate surface.
[0149] The impurity classification module is used to perform pixel-level segmentation and classification of the impurity features on the surface of the aluminum plate using a lightweight deep learning model, so as to obtain the impurity category on the surface of the aluminum plate.
[0150] The impurity assessment module is used to assess the impurity categories on the surface of the aluminum plate using an impurity assessment model, obtain an impurity severity score, and generate an impurity distribution visualization map based on the impurity severity score.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting impurities on the surface of a processed aluminum plate, characterized in that, Includes the following steps: S1. Set up a multi-band light source system, use the multi-band light source system to sequentially irradiate the surface of the processed aluminum plate, and collect the reflection images of the surface of the processed aluminum plate at different wavelengths in real time to obtain a multispectral image. The multi-band light source system includes an ultraviolet light band, a visible light band, and a near-infrared light band. S2. Preprocess the multispectral image to obtain the processed multispectral image; S3. Feature extraction is performed on the processed multispectral image to obtain band ratio features and impurity principal component features. Based on the aluminum plate processing conditions, dynamic feature selection is performed on the band ratio features and impurity principal component features to obtain the impurity features on the aluminum plate surface, specifically including: Based on the spectral response characteristics of different impurities on the aluminum plate surface, the ratio characteristics of the ultraviolet band to the blue light band, the ratio characteristics of the near-infrared band to the red light band, and the ratio characteristics of the red light band to the blue light band were calculated to obtain the band ratio characteristics; among them, the spectral response characteristics refer to the sum of the reflection, absorption and scattering characteristics of different materials or substances to incident light in each spectral band. An optimized projection matrix for aluminum plate impurities is constructed, and the processed multispectral image is transformed using the optimized projection matrix to obtain the principal component features of the impurities. The optimized projection matrix is used to project the processed multispectral image into a low-dimensional feature space and to confirm the differences between different impurity types. Based on the aluminum plate processing parameters, multi-level dynamic feature selection is performed on the band ratio characteristics and impurity principal component characteristics to obtain the impurity characteristics on the aluminum plate surface. S4. A lightweight deep learning model is used to perform pixel-level segmentation and classification of the impurity features on the aluminum plate surface to obtain the impurity categories on the aluminum plate surface. S5. Use an impurity assessment model to assess the impurity categories on the surface of the aluminum plate, obtain an impurity severity score, and generate an impurity distribution visualization map based on the impurity severity score.
2. The method for detecting impurities on the surface of a processed aluminum plate according to claim 1, characterized in that, The method for constructing the aluminum plate impurity optimization projection matrix specifically includes: Acquire multispectral images and impurity types of historically processed aluminum plate surfaces, and establish a standard sample library based on the multispectral images and impurity types of historically processed aluminum plate surfaces; Calculate the intra-class scatter matrix and inter-class scatter matrix according to the impurity type; The projection directions of different types of impurities are determined based on the intra-class scatter matrix and the inter-class scatter matrix. The first two eigenvectors of the eigenvalues are selected to form the aluminum plate impurity optimization projection matrix.
3. The method for detecting impurities on the surface of a processed aluminum plate according to claim 2, characterized in that, The multi-level dynamic feature selection includes a velocity-adaptive hierarchical processing strategy, a material-adaptive parameter adjustment mechanism, an environmental condition compensation mechanism, and a dynamic resource allocation strategy.
4. The method for detecting impurities on the surface of a processed aluminum plate according to claim 3, characterized in that, The steps of multi-level dynamic feature selection specifically include: The real-time operating parameters of the aluminum plate production line are obtained, including production line speed, aluminum plate material information, and environmental condition data. The production line speed is divided into different ranges by setting a preset speed threshold, and a corresponding feature calculation scheme is configured for each speed range to determine the production line speed characteristics. The feature processing parameters are dynamically adjusted based on the optical properties, surface characteristics, and chemical composition of the processed aluminum plate. By monitoring ambient temperature and humidity in real time, a mapping relationship between environmental parameters and feature processing parameters is established, and the basic band ratio characteristics are calculated. Based on the basic band ratio characteristics, the resource status of aluminum plate processing, and testing requirements, resources are allocated.
5. The method for detecting impurities on the surface of a processed aluminum plate according to claim 1, characterized in that, The lightweight deep learning model adopts the U-Net architecture, which includes: The encoder includes one convolutional block and two depthwise separable convolutional blocks. Each convolutional block contains two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function. The decoder includes three upsampled convolutional blocks, which are connected to the encoder via skip connections; The skip connection includes a channel attention module and a spatial attention module.
6. The method for detecting impurities on the surface of a processed aluminum plate according to claim 5, characterized in that, Step S4 specifically includes: The surface impurity characteristics of the aluminum plate are preprocessed to obtain preprocessed feature data; The preprocessed feature data is input into a lightweight deep learning model, wherein the encoder extracts features from the preprocessed feature data to obtain encoder features, and the decoder upsamples the preprocessed feature data to obtain decoder features. The encoder features are processed sequentially using a channel attention module and a spatial attention module to obtain enhanced encoder features. The enhanced encoder features are then concatenated with the decoder features to obtain fused features. The class probability value of each pixel position in the fused feature is normalized, and the class with the highest class probability value is selected as the predicted class of the pixel to obtain the impurity class on the aluminum plate surface. Adjacent pixels of the same impurity category are aggregated into impurity regions, and the number of pixels in each impurity region is calculated. The number of pixels is compared with a preset number of pixels, and impurity regions with a number of pixels less than the preset number of pixels are removed to obtain the impurity regions on the aluminum plate surface.
7. The method for detecting impurities on the surface of a processed aluminum plate according to claim 1, characterized in that, Step S5 specifically includes: Calculate the total area of each impurity type on the aluminum plate surface, determine the original coverage rate based on the total area of each impurity type on the aluminum plate surface and the aluminum plate surface area, and standardize the original coverage rate through linear mapping to obtain the normalized coverage rate; Based on the distribution factor determined by the impurity region on the aluminum plate surface, the impurity severity index on the processed aluminum plate surface is determined using the impurity assessment model based on the normalized coverage and the distribution factor; the calculation formula of the impurity assessment model is as follows: ; ; ; in, This represents the severity index of impurities on the surface of the processed aluminum plate, where i represents the index of the impurity type and n represents the total number of impurity types. This represents the weight of impurity type i. This represents the normalized coverage of impurity type i. This represents the distribution factor of impurity type i. Indicates the adjustment parameter. Represents the Gini coefficient. Represents the shape factor. Represents the maximum shape factor. Represents the area of impurity type i. Indicates the perimeter of impurity type i; The impurity severity index is converted into an impurity severity score through a mapping function, and an impurity distribution visualization map is generated based on the impurity severity score and impurity spatial distribution information. A heat map is used to present the impurity distribution density.
8. A system for detecting impurities on the surface of a machined aluminum plate, characterized in that, Implementing the impurity detection method as described in any one of claims 1-7, comprising: A multispectral image acquisition module is used to set up a multi-band light source system, use the multi-band light source system to sequentially irradiate the surface of the processed aluminum plate, and acquire the reflection images of the surface of the processed aluminum plate at different wavelengths in real time to obtain a multispectral image. The multi-band light source system includes an ultraviolet light band, a visible light band, and a near-infrared light band. The preprocessing module is used to preprocess the multispectral image to obtain the processed multispectral image; The feature extraction module is used to extract features from the processed multispectral image to obtain band ratio features and impurity principal component features. Based on the aluminum plate processing conditions, dynamic feature selection is performed on the band ratio features and impurity principal component features to obtain the impurity features on the aluminum plate surface, specifically including: Based on the spectral response characteristics of different impurities on the aluminum plate surface, the ratio characteristics of the ultraviolet band to the blue light band, the ratio characteristics of the near-infrared band to the red light band, and the ratio characteristics of the red light band to the blue light band were calculated to obtain the band ratio characteristics; among them, the spectral response characteristics refer to the sum of the reflection, absorption and scattering characteristics of different materials or substances to incident light in each spectral band. An optimized projection matrix for aluminum plate impurities is constructed, and the processed multispectral image is transformed using the optimized projection matrix to obtain the principal component features of the impurities. The optimized projection matrix is used to project the processed multispectral image into a low-dimensional feature space and to confirm the differences between different impurity types. Based on the aluminum plate processing parameters, multi-level dynamic feature selection is performed on the band ratio characteristics and impurity principal component characteristics to obtain the impurity characteristics on the aluminum plate surface. The impurity classification module is used to perform pixel-level segmentation and classification of the impurity features on the surface of the aluminum plate using a lightweight deep learning model, so as to obtain the impurity category on the surface of the aluminum plate. The impurity assessment module is used to assess the impurity categories on the surface of the aluminum plate using an impurity assessment model, obtain an impurity severity score, and generate an impurity distribution visualization map based on the impurity severity score.
Citation Information
Patent Citations
Workpiece surface defect detection method based on visual identification
CN118898620A
Intelligent detection system for surface quality of copper foil
CN119269507A