A fine-grained detection method for solar cell production defects

CN117372759BActive Publication Date: 2026-10-27CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311317872.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-12
Publication Date
2026-10-27
Estimated Expiration
2043-10-12

AI Technical Summary

Technical Problem

[0003]然而,在现有的太阳能电池片的缺陷检测方法中,对太阳能电池片缺陷的细粒度检测方面多存在以下问题:1)相似缺陷类别难以区分;2)并未同时考虑到通道、空间和位置三种信息,但这些对于精确、高效的多尺度检测至关重要;3)缺陷和背景间对比度较低,现有的对比度增强算法可能会导致图像在某些地方出现过度增强或放大噪声

Benefits of technology

(1)本发明提供了一种面向太阳能电池生产缺陷的细粒度检测方法,采用步骤S1-S4组合使用,将分层双线性池化金字塔、路径聚合注意力金字塔无缝地融入特征金字塔网络中,能够改善现有技术中相似缺陷类别难以区分的问题,以及多尺度检测问题,进而提高对细粒度检测的准确性。具体的,在步骤S3中,采用分层双线性池化金字塔对特征提取网络得到的每一层特征都添加双线性池化模块,这种机制学习特征提取网络不同级别之间的高阶张量关系,捕获来自不同尺度的缺陷细节特征表示,准确抓取具有判别性的高阶特征信息,改善现有技术中相似缺陷类别难以区分的问题;采用路径聚合注意力金字塔,有效地捕获局部细节和全局上下文,提高特征区分能力;路径聚合注意力金字塔通过自下而上的路径,将特征从底层传输到最高层,并通过注意力使网络在处理低层纹理和高维语义特征过程中更精准把控细粒度特征所在的通道、空间、位置信息,以此改善现有技术中的多尺度检测问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117372759B_ABST
    Figure CN117372759B_ABST
Patent Text Reader

Abstract

The application provides a fine-grained detection method for solar cell production defects, comprising the steps of: S1, obtaining a median filter processed image I MF (x); S2, performing feature extraction on the image I MF (x) by using a Swin Transformer, and outputting N-layer feature maps F l ; S3, constructing a hierarchical bilinear pooling pyramid, converting the extracted multi-layer feature maps F l into a high-order bilinear feature pyramid; constructing a path aggregation attention pyramid, adding an SCC attention mechanism to each layer of feature in the bilinear feature pyramid, and obtaining fine-grained features of defects at different scales; and S4, performing accurate positioning and classification on the fine-grained features of defects by using a detection layer. The application can solve the problems in the prior art in the fine-grained detection of solar cell defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and more specifically to a fine-grained detection method for defects in solar cell manufacturing. Background Technology

[0002] Solar cells are widely used as power generation carriers. However, during the solar cell production process, various factors such as human error, chemical contamination, and improper storage of solar cells in baskets can lead to various defects, including broken grids, microcracks, scratches, and dirt. These defects negatively impact the cell's efficiency and lifespan, and may even threaten the stability of the entire photovoltaic power generation system. Therefore, defect detection of solar cells is particularly important.

[0003] However, existing methods for detecting defects in solar cells often suffer from the following problems in fine-grained defect detection: 1) It is difficult to distinguish between similar defect categories; 2) It does not take into account channel, spatial and location information at the same time, but these are crucial for accurate and efficient multi-scale detection; 3) The contrast between defects and background is low, and existing contrast enhancement algorithms may cause excessive enhancement or amplification of noise in some parts of the image. Summary of the Invention

[0004] The purpose of this invention is to provide a fine-grained detection method for defects in solar cell manufacturing, addressing the problems existing in the fine-grained detection of defects in solar cell wafers in the prior art. The specific technical solution is as follows: A fine-grained detection method for defects in solar cell manufacturing includes: Step S1: Acquire an image of the solar panel, first perform adaptive histogram equalization contrast enhancement on it to obtain multiple adaptive histogram equalization blocks; then perform median filtering on all the adaptive histogram equalization blocks to remove noise and preserve edge information, thereby obtaining the image after median filtering. I MF ( x ); Step S2, using Swin Transformer For images I MF ( x Feature extraction is performed, and the output is... N Layer feature map F l ,in, F l = Backbone ( I MF ( x )), , l ∈{1, 2, ..., N}, B Indicates the first l Feature map of layer F l Batch size, C l Indicates the first l Feature map of layer F l The number of channels, H l Indicates the first l Layer feature map F l height, W l Indicates the first l Layer feature map F l The width; Step S3: Construct a hierarchical bilinear pooling pyramid. Add a bilinear pooling module to each layer of the feature pyramid network to extract multi-layer feature maps. F l It is transformed into a high-order bilinear feature pyramid for learning tensor interactions to improve fine-grained feature recognition of similar defects; Construct a path aggregation attention pyramid, adding features to each layer of the bilinear feature pyramid. SCC Attention mechanism enhances the bottom-up feature transfer in the bilinear feature pyramid, resulting in fine-grained features of defects at different scales. Step S4: Use the detection layer to accurately locate and classify the fine-grained features of the defects.

[0005] Optionally, the adaptive histogram equalization process in step S1 includes: Step S1.1: Set the solar panel image to meet the requirements. ,in, H Represents the height of the solar panel image. W Represents the width of the solar panel image. C The number of channels representing the solar panel image; Segment the solar panel image into M×N There are 10 small blocks, each block being 1000 square meters in size. h×w Each small block uses B ij Indicates; among which, B ij = x [ ih :( i + 1) h , jw :(j + 1) w ], i ∈{0,1,..., M - 1}, j ∈{0,1,..., N - 1}, h For each small block B ij height, w For each small block B ij The width; Step S1.2: For each small block B ij Calculate the corresponding histogram H ij For histograms H ij Perform equalization to obtain the equalized histogram. HE ij ; Step S1.3: If the solar panel image is defined in coordinates ( x , y The pixel value at ) I ( x , y Using a balanced histogram HE ij and interpolation coefficients α ij ( x , y )deal with I ( x , y This yields an image with adaptive histogram equalization. I CLAHE ( x , y It is expressed by equation (1): (1); In equation (1), the interpolation coefficients α ij ( x , y The value is determined based on the pixel value. I ( x , y The small block containing the ) and the surrounding small blocks B ij The distance is determined; the closer the distance, the larger the interpolation coefficient. α ij ( x , y The larger the value, the better.

[0006] Optionally, the process of performing median filtering in step S1 includes: Step S1.4: Transfer the image I CLAHE ( x , y The image is divided into several local regions according to the filter size. The pixel values ​​in each local region are sorted from smallest to largest, and the median pixel value is taken as the output of that local region, resulting in the image after median filtering. I MF ( x The median filtering process is represented by equation (2): I MF ( x ) = MedianFilter ( x ) = MedianFilter { I CLAHE ( x+i -1, y+j -1) | } (2); In equation (2), MedianFilter ( x () indicates the median filtering operation. m Indicates the filter size.

[0007] Optionally, the bilinear pooling module in step S3 adopts... Tensor Sketch The method involves finding a low-dimensional projection function that makes the multi-layer feature map... F l The inner product of eigenvectors in the projected space can approximate the polynomial kernel function in the original space. The specific process includes: We need to find a corresponding number l Layer feature map F l projection function The dimension after inner product calculation is d << That is, it satisfies the inner product expression (3): (3); In equation (3), Indicates the corresponding number l Layer feature map F l projection function and The inner product, The first in the feature pyramid network l Kernel function of the layer.

[0008] Optionally, the process of constructing the hierarchical bilinear pooling pyramid in step S3 includes: Step S3.1: Determine the dimensionality reduction mapping location Two random arrays are generated randomly using a random sampling dimensionality reduction method. and ;in, p k ( l )express p k The elements in the array, which range from {1, 2, ..., C l Evenly extract from}; q k ( l )express q k The elements in the set are drawn uniformly from {+1, -1}; k =1,2; l ∈{0, 1, ..., | C l | - 1};| C l | express C l Length; use p k ( l )and q k ( l The weight determines the first l Layer feature map F l The position of each element in the low-dimensional space; Step S3.2: Mapping to a low-dimensional feature space Define sketch function ,in, , j Used as an index, The first one in the sketch function j One element, t Indicates the index position. p t Indicates in t index position p The value of the array, q t Indicates in t index position q The value of the array; using a sketch function to randomly select the input element. l Layer feature map F lThe positions of each element in the low-dimensional space are rearranged and weighted to obtain low-dimensional features. ; Step S3.3, Definition ;in, , Represents element-wise multiplication; satisfies ; right A bilinear feature pyramid is obtained by using 1×1 convolution.

[0009] Optionally, the process of constructing the path aggregation attention pyramid in step S3 includes: A path aggregation attention pyramid with a bottom-up path aggregation architecture is constructed by using 1×1 convolution on the bilinear feature pyramid.

[0010] Optionally, the method used in step S3 SCC Attention mechanisms include spatial attention, employing Indicates the first l Spatial attention of layers, where Equation (4) is used to represent: (4); In equation (4), σ express sigmoid function; v c Represents the convolution kernel; Represents convolution; P l The first in the path aggregation attention pyramid l Layer features.

[0011] Optionally, the method used in step S3 is... SCC Attention mechanisms also include channel attention, which employs... Indicates the first l Layer channel attention, where, Equation (5) is used to represent: (5); In equation (5), GAP ( P l ) represents global average pooling; ReLU represents the rectified linear unit activation function, used to add nonlinearity; W 1 and W 2 represents the weight matrices of the two fully connected layers, both of which are implemented using 1x1 convolution operations. W 1. Used for dimensionality reduction. W 2 is used to restore the original number of channels; GAP (P l Equation (6) is used to represent: (6); In equation (6), Indicates the first l Layer path aggregation attention pyramid in The pixel value of the location; express P l Index in the height direction; express P l Index in the width direction; express P l Total width; H express P l The total height.

[0012] Optionally, the method used in step S3 is... SCC Attention mechanisms also include coordinate attention, which employs... This represents coordinate attention, and its acquisition process includes: For each layer of feature map P l Global average pooling is performed in the height and width directions respectively. The global average pooling in the height direction is represented by Equation (7), and the global average pooling in the width direction is represented by Equation (8). (7); (8); The results of global average pooling obtained from equations (7) and (8) are concatenated along the channel direction. The concatenated feature map is then processed by equation (9) through one-dimensional convolution, batch layer, and hard loop. sigmoid The activation function is used to process the data, resulting in the processed feature map. (9); In equation (9), σ h Indicates hard sigmoid The activation function is expressed by equation (10): (10); In equation (10), bias Indicates hard sigmoid The offset of the output range of the activation function; scale Indicates hard sigmoid The scaling factor for the output range of the activation function; The processed feature map is split into height and width parts, and then subjected to a 1×1 convolution.F h and F w as well as sigmoid function σ After processing, the final coordinate attention weights are obtained: , ; Will P l Element-wise multiplication with the coordinate attention weights yields the coordinate-attention-enhanced feature map shown in equation (11): (11).

[0013] Optionally, will SCC Spatial attention in attention mechanisms Channel attention and coordinate attention Combining these techniques with bilinear feature pyramids yields fine-grained features of defects at various scales. A l Equation (12) is used to represent A l : (12); In equation (12), α l Indicates the first l Weights of layer-space attention; β l Indicates the first l Weights of layer channel attention; γ l Indicates the first l Weights for layer coordinate attention; Indicates broadcast addition; A l Indicates the first l Fine-grained characteristics of layer defects.

[0014] The application of the technical solution of the present invention has at least the following beneficial effects: (1) This invention provides a fine-grained detection method for defects in solar cell production. Steps S1-S4 are used in combination to seamlessly integrate a hierarchical bilinear pooling pyramid and a path-aggregating attention pyramid into a feature pyramid network. This can improve the problem of difficulty in distinguishing similar defect categories and multi-scale detection in the prior art, thereby improving the accuracy of fine-grained detection. Specifically, in step S3, a hierarchical bilinear pooling pyramid is used to add a bilinear pooling module to each layer of features obtained by the feature extraction network. This mechanism learns the high-order tensor relationship between different levels of the feature extraction network, captures the detailed feature representation of defects from different scales, accurately captures discriminative high-order feature information, and improves the problem of difficulty in distinguishing similar defect categories in the prior art. The path-aggregating attention pyramid is used to effectively capture local details and global context, improving feature discrimination ability. The path-aggregating attention pyramid transmits features from the bottom layer to the top layer through a bottom-up path, and through attention, enables the network to more accurately control the channel, space, and position information of fine-grained features in the process of processing low-level texture and high-dimensional semantic features, thereby improving the multi-scale detection problem in the prior art.

[0015] (2) The adaptive histogram equalization image obtained in step S1 of this invention I CLAHE ( x , y This technology can enhance the contrast between defects and the background, improve the network's ability to resist noise data and distinguish defect features from the background, and alleviate the problem that existing contrast enhancement techniques tend to over-enhance and amplify noise.

[0016] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart illustrating a fine-grained detection method for defects in solar cell production, as described in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.

[0019] Example: See Figure 1 A fine-grained detection method for defects in solar cell manufacturing includes: Step S1: Obtain an image of the solar panel (specifically, the PVEL-AD-2023 dataset obtained from actual industrial manufacturing). First, perform adaptive histogram equalization contrast enhancement on the solar panel to obtain multiple adaptive histogram equalization blocks. Then, perform median filtering on all the adaptive histogram equalization blocks to remove noise and preserve edge information, thereby obtaining the image after median filtering. I MF ( x ); Step S2, using Swin Transformer For images I MF ( x Feature extraction is performed, and the output is... N Layer feature map F l ,in, F l = Backbone ( I MF ( x )), , l ∈{1, 2, ..., N}, B Indicates the first l Feature map of layer F l Batch size, C l Indicates the first l Feature map of layer F l The number of channels, H l Indicates the first l Layer feature map F l height, W l Indicates the first l Layer feature map F l The width; Step S3: Construct a hierarchical bilinear pooling pyramid (abbreviated as...) HCBP Bilinear pooling modules are added to each layer of the feature pyramid network to extract multi-layer feature maps. F l It is transformed into a high-order bilinear feature pyramid for learning tensor interactions to improve fine-grained feature recognition of similar defects; Constructing a path aggregation attention pyramid (abbreviated as...) PAP Add features to each layer of the bilinear feature pyramid. SCC Attention mechanism enhances the bottom-up feature transfer in the bilinear feature pyramid, resulting in fine-grained features of defects at different scales. Step S4, adopting a method based on anchor-free Detection layer TooDHead Accurately locate and classify the fine-grained features of defects, so that the prediction of defect classification and location are aligned, ensuring that the defect is correctly located and correctly classified.

[0020] The adaptive histogram equalization process in step S1 includes: Step S1.1: Set the solar panel image to meet the requirements. ,in, H Represents the height of the solar panel image. W Represents the width of the solar panel image. C The number of channels representing the solar panel image; Segment the solar panel image into M×N There are 10 small blocks, each block being 1000 square meters in size. h×w Each small block uses B ij Indicates; among which, B ij = x [ ih :( i + 1) h , jw :( j + 1) w ], i ∈{0,1,..., M - 1}, j ∈{0,1,..., N - 1}, h For each small block B ij height, w For each small block B ij The width; Step S1.2: For each small block B ij Calculate the corresponding histogram H ij For histograms H ij Perform equalization to obtain the equalized histogram. HE ij ; If adoptedH ij ( k ) represents a histogram H ij After equalization, the equalized histogram is obtained. HE ij ( k );in, ; For each gray level k Calculate the gray level in the histogram to be less than or equal to l The cumulative sum of the number of pixels, divided by the total number of pixels, gives the grayscale level. k The values ​​of the pixels in the equalization histogram; this process maps low-frequency gray values ​​to a wider range and high-frequency gray values ​​to a narrower range, thereby enhancing contrast. Step S1.3: If the solar panel image is defined in coordinates ( x , y The pixel value at ) I ( x , y Using a balanced histogram HE ij and interpolation coefficients α ij ( x , y )deal with I ( x , y This yields an image with adaptive histogram equalization. I CLAHE ( x , y It is expressed by equation (1): (1); In equation (1), the interpolation coefficients α ij ( x , y The value is determined based on the pixel value. I ( x , y The small block containing the ) and the surrounding small blocks B ij The distance is determined; the closer the distance, the larger the interpolation coefficient. α ij ( x , y The larger the value, the more adaptively each pixel value is adjusted according to the pixel values ​​of its surrounding smaller blocks, thus better preserving the local characteristics of the image.

[0021] The process of performing median filtering in step S1 includes: Step S1.4: Transfer the image I CLAHE ( x , y The filter is divided into several local regions according to its size. Assume the filter size is... m×m Then each local region contains m 2 1 pixel; Sort the pixel values ​​within each local region from smallest to largest, and take the middle pixel value as the output of that local region (if...). m If the value is even, then the average of the two middle pixel values ​​is usually taken as the output of that local region, resulting in the image after median filtering. I MF ( x The median filtering process is represented by equation (2): I MF ( x ) = MedianFilter ( x ) = MedianFilter { I CLAHE ( x+i -1, y+j -1) | } (2); In equation (2), MedianFilter ( x () indicates the median filtering operation. m Indicates the filter size.

[0022] During median filtering, the filter window is in the image I CLAHE ( x , y Moving within the image, each movement covers a new local region. I CLAHE ( x , y A specific pixel location in ) x , y ), ( x + i -1, y + j -1) indicates the position of the pixel within the filter window, which means that the median filter adaptively adjusts the pixel value according to the neighbor to ensure local enhancement.

[0023] The bilinear pooling module in step S3 uses Tensor Sketch Method (abbreviated as)TS The method involves finding a low-dimensional projection function that makes the multi-layer feature map... F l The inner product of eigenvectors in the projected space can approximate the polynomial kernel function in the original space. The specific process includes: We need to find a corresponding number l Layer feature map F l projection function The dimension after inner product calculation is d << That is, it satisfies the inner product expression (3): (3); In equation (3), Indicates the corresponding number l Layer feature map F l projection function and The inner product, The first in the feature pyramid network l Kernel function of the layer.

[0024] The process of constructing the hierarchical bilinear pooling pyramid in step S3 includes: Step S3.1: Determine the dimensionality reduction mapping location Two random arrays are generated randomly using a random sampling dimensionality reduction method. and ;in, p k ( l )express p k The elements in the array, which range from {1, 2, ..., C l Evenly extract from}; q k ( l )express q k The elements in the set are drawn uniformly from {+1, -1}; k =1,2; l ∈{0, 1, ..., | C l | - 1};| C l | express C l Length; use p k ( l )and qk ( l The weight determines the first l Layer feature map F l The position of each element in the low-dimensional space; Step S3.2: Mapping to a low-dimensional feature space Define sketch function ,in, , j Used as an index, The first one in the sketch function j One element, t Indicates the index position. p t Indicates in t index position p The value of the array, q t Indicates in t index position q The value of the array; using a sketch function to randomly select the input element. l Layer feature map F l The positions of each element in the low-dimensional space are rearranged and weighted to obtain low-dimensional features. ; Step S3.3, Definition ;in, , Represents element-wise multiplication; satisfies ; Here FFT Fast Fourier Transform and IFFT The inverse Fourier transform converts the convolution operation, which originally needed to be performed in the spatial domain, into element-wise multiplication operations in the frequency domain, and through... IFFT The result of element-wise multiplication is transferred back to the spatial domain. This transforms a calculation that originally required quadratic complexity into a linear one, meaning... O ( nlogn The Fourier transform is performed in a time complexity of 1, compared to performing convolution operations directly in the spatial domain (time complexity of O(n log n)). O ( n 2 This greatly improves computational efficiency; right A bilinear feature pyramid is obtained by using 1×1 convolution.

[0025] In summary, HCBP use TS Methods and FFT This not only reduces computational complexity but also yields low-dimensional bilinear features that can approximate the outer product of the original features. These bilinear features can effectively capture high-order interactions and fine-grained information in images, and improve the model's performance in identifying similar defects at different scales through the pyramid structure.

[0026] The process of constructing the path aggregation attention pyramid in step S3 includes: A path aggregation attention pyramid with a bottom-up path aggregation architecture is constructed by using 1×1 convolution on the bilinear feature pyramid.

[0027] The method used in step S3 SCC Attention mechanisms include spatial attention, employing Indicates the first l Spatial attention of layers, where Equation (4) is used to represent: (4); In equation (4), σ express sigmoid function; v c Represents the convolution kernel; Represents convolution; P l The first in the path aggregation attention pyramid l Layer features.

[0028] The method used in step S3 SCC Attention mechanisms also include channel attention, which employs... Indicates the first l Layer channel attention, where, Equation (5) is used to represent: (5); In equation (5), GAP ( P l ) represents global average pooling; ReLU represents the rectified linear unit activation function, used to add nonlinearity; W 1 and W 2 represents the weight matrices of the two fully connected layers, both of which are implemented using 1x1 convolution operations. W 1. Used for dimensionality reduction. W 2 is used to restore the original number of channels; GAP ( P l Equation (6) is used to represent: (6); In equation (6), Indicates the first l Layer path aggregation attention pyramid in The pixel value of the location; express P l Index in the height direction; express P l Index in the width direction; express P l Total width; H express P l The total height.

[0029] The method used in step S3 SCC Attention mechanisms also include coordinate attention, which employs... This represents coordinate attention, and its acquisition process includes: For each layer of feature map P l Global average pooling is performed in the height and width directions respectively. The global average pooling in the height direction is represented by Equation (7), and the global average pooling in the width direction is represented by Equation (8). (7); (8); The results of global average pooling obtained from equations (7) and (8) are concatenated along the channel direction. The concatenated feature map is then processed by equation (9) through one-dimensional convolution, batch layer, and hard loop. sigmoid The activation function is used to process the data, resulting in the processed feature map. (9); In equation (9), σ h Indicates hard sigmoid The activation function is expressed by equation (10): (10); In equation (10), bias Indicates hard sigmoid The offset of the output range of the activation function; scale Indicates hard sigmoid The scaling factor for the output range of the activation function; The processed feature map is split into height and width parts, and then subjected to a 1×1 convolution. F h and F w as well as sigmoid function σ After processing, the final coordinate attention weights are obtained: , ; Will P l Element-wise multiplication with the coordinate attention weights yields the coordinate-attention-enhanced feature map shown in equation (11): (11).

[0030] Will SCC Spatial attention in attention mechanisms Channel attention and coordinate attention Combining these techniques with bilinear feature pyramids yields fine-grained features of defects at various scales. A l ;in, A l Indicates the first l Fine-grained characteristics of layer defects; Using equation (12) to represent A l : (12); In equation (12), α l Indicates the first l Weights of layer-space attention; β l Indicates the first l Weights of layer channel attention; γ l Indicates the first l Weights for layer coordinate attention; This indicates broadcast addition.

[0031] exist SCC Spatial attention is used in attention mechanisms. Local detail features of defects, such as texture, size, and edges, are captured using channel attention. To capture channel correlations and facilitate the flow of local feature information along a bottom-up path to higher pyramid levels; coordinate attention is employed. Used to better understand the relative position of objects or defects within the entire image; SCC Spatial attention in attention mechanisms Channel attention and coordinate attention Each component can adaptively adjust its contribution based on the task, highlighting defect areas and improving detection performance.

[0032] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A fine-grained detection method for defects in solar cell manufacturing, characterized in that, include: Step S1: Obtain an image of the solar panel, and first perform adaptive histogram equalization and contrast enhancement on it to obtain multiple adaptive histogram equalization blocks; Then, median filtering is applied to all the adaptive histogram equalization blocks to remove noise and preserve edge information, thus obtaining the image after median filtering. I MF ( x ); Step S2, using Swin Transformer For images I MF ( x Feature extraction is performed, and the output is... N Layer feature map F l ,in, F l = Backbone ( I MF ( x )), , l ∈{1, 2, ..., N }, B Indicates the first l Feature map of layer F l Batch size, C l Indicates the first l Feature map of layer F l The number of channels, H l Indicates the first l Layer feature map F l height, W l Indicates the first l Layer feature map F l The width; Step S3: Construct a hierarchical bilinear pooling pyramid. Add a bilinear pooling module to each layer of the feature pyramid network to extract multi-layer feature maps. F l It is transformed into a high-order bilinear feature pyramid for learning tensor interactions to improve fine-grained feature recognition of similar defects; Construct a path aggregation attention pyramid, adding features to each layer of the bilinear feature pyramid. SCC Attention mechanism enhances the bottom-up feature transfer in the bilinear feature pyramid, resulting in fine-grained features of defects at different scales. Step S4: Use the detection layer to accurately locate and classify the fine-grained features of the defects.

2. The fine-grained detection method for defects in solar cell manufacturing according to claim 1, characterized in that, The adaptive histogram equalization process in step S1 includes: Step S1.1: Set the solar panel image to meet the requirements. ,in, H Represents the height of the solar panel image. W Represents the width of the solar panel image. C The number of channels representing the solar panel image; Segment the solar panel image into M×N There are 1 small blocks, each block being 1 unit in size. h×w Each small block uses B ij Indicates; among which, B ij = x [ ih :( i + 1) h , jw :( j + 1) w ], i ∈{0,1,..., M - 1}, j ∈{0,1,..., N -1}, h For each small block B ij height, w For each small block B ij The width; Step S1.2: For each small block B ij Calculate the corresponding histogram H ij For histograms H ij Perform equalization to obtain the equalized histogram. HE ij ; Step S1.3: If the solar panel image is defined in coordinates ( x , y The pixel value at ) I ( x , y Using a balanced histogram HE ij and interpolation coefficients α ij ( x , y )deal with I ( x , y This yields an image with adaptive histogram equalization. I CLAHE ( x , y It is expressed by equation (1): (1); In equation (1), the interpolation coefficients α ij ( x , y The value is determined based on the pixel value. I ( x , y The small block containing the ) and the surrounding small blocks B ij The distance is determined; the closer the distance, the larger the interpolation coefficient. α ij ( x , y The larger the value, the better.

3. The fine-grained detection method for defects in solar cell manufacturing according to claim 2, characterized in that, The process of performing median filtering in step S1 includes: Step S1.4: Transfer the image I CLAHE ( x , y The image is divided into several local regions according to the filter size. The pixel values ​​in each local region are sorted from smallest to largest, and the median pixel value is taken as the output of that local region, resulting in the image after median filtering. I MF ( x The median filtering process is represented by equation (2): I MF ( x ) = MedianFilter ( x ) = MedianFilter { I CLAHE ( x+i -1, y+j -1) | } (2); In equation (2), MedianFilter ( x () indicates the median filtering operation. m Indicates the filter size.

4. The fine-grained detection method for defects in solar cell manufacturing according to claim 1, characterized in that, The bilinear pooling module in step S3 uses Tensor Sketch The method involves finding a low-dimensional projection function that makes the multi-layer feature map... F l The inner product of eigenvectors in the projected space can approximate the polynomial kernel function in the original space. The specific process includes: We need to find a corresponding number l Layer feature map F l projection function The dimension after inner product calculation is d << That is, it satisfies the inner product expression (3): (3); In equation (3), Indicates the corresponding number l Layer feature map F l projection function and The inner product, The first in the feature pyramid network l Kernel function of the layer.

5. The fine-grained detection method for defects in solar cell manufacturing according to any one of claims 1-4, characterized in that, The process of constructing the hierarchical bilinear pooling pyramid in step S3 includes: Step S3.1: Determine the dimensionality reduction mapping location Two random arrays are generated using a random sampling dimensionality reduction method. and ;in, p k ( l )express p k The elements in the array, which range from {1, 2, ..., C l Evenly extract from}; q k ( l )express q k The elements in the set are drawn uniformly from {+1, -1}; k =1,2; l ∈{0, 1, ..., | C l | - 1};| C l | express C l Length; use p k ( l )and q k ( l The weight determines the first l Layer feature map F l The position of each element in the low-dimensional space; Step S3.2: Mapping to a low-dimensional feature space Define sketch function ,in, , j Used as an index, The first one in the sketch function j One element, t Indicates the index position. p t Indicates in t index position p The value of the array, q t Indicates in t index position q The value of the array; using a sketch function to randomly select the input element. l Layer feature map F l The positions of each element in the low-dimensional space are rearranged and weighted to obtain low-dimensional features. ; Step S3.3, Definition ;in, , Represents element-wise multiplication; satisfies ; right A bilinear feature pyramid is obtained by using 1×1 convolution.

6. The fine-grained detection method for defects in solar cell manufacturing according to claim 5, characterized in that, The process of constructing the path aggregation attention pyramid in step S3 includes: A path aggregation attention pyramid with a bottom-up path aggregation architecture is constructed by using 1×1 convolution on the bilinear feature pyramid.

7. The fine-grained detection method for defects in solar cell manufacturing according to claim 6, characterized in that, The method used in step S3 SCC Attention mechanisms include spatial attention, employing Indicates the first l Spatial attention of layers, where Equation (4) is used to represent: (4); In equation (4), σ express sigmoid function; v c Represents the convolution kernel; Represents convolution; P l The first in the path aggregation attention pyramid l Layer features.

8. The fine-grained detection method for defects in solar cell manufacturing according to claim 7, characterized in that, The method used in step S3 SCC Attention mechanisms also include channel attention, employing Indicates the first l Layer channel attention, where, Equation (5) is used to represent: (5); In equation (5), GAP ( P l ) represents global average pooling; ReLU represents the rectified linear unit activation function, used to add nonlinearity; W 1 and W 2 represents the weight matrices of the two fully connected layers, both of which are implemented using 1x1 convolution operations. W 1. Used for dimensionality reduction. W 2 is used to restore the original number of channels; GAP ( P l Equation (6) is used to represent: (6); In equation (6), Indicates the first l Layer path aggregation attention pyramid in The pixel value of the location; express P l Index in the height direction; express P l Index in the width direction; express P l Total width; H express P l The total height.

9. The fine-grained detection method for defects in solar cell manufacturing according to claim 8, characterized in that, The method used in step S3 SCC Attention mechanisms also include coordinate attention, which employs... This represents coordinate attention, and its acquisition process includes: For each layer of feature map P l Global average pooling is performed in the height and width directions respectively. The global average pooling in the height direction is represented by Equation (7), and the global average pooling in the width direction is represented by Equation (8). (7); (8); The results of global average pooling obtained from equations (7) and (8) are concatenated along the channel direction. The concatenated feature map is then processed by equation (9) through one-dimensional convolution, batch layer, and hard loop. sigmoid The activation function is used to process the data, resulting in the processed feature map. (9); In equation (9), σ h Indicates hard sigmoid The activation function is expressed by equation (10): (10); In equation (10), bias Indicates hard sigmoid The offset of the output range of the activation function; scale Indicates hard sigmoid The scaling factor for the output range of the activation function; The processed feature map is split into height and width parts, and then subjected to a 1×1 convolution. F h and F w as well as sigmoid function σ After processing, the final coordinate attention weights are obtained: , ; Will P l Element-wise multiplication with the coordinate attention weights yields the coordinate-attention-enhanced feature map shown in equation (11): (11)。 10. The fine-grained detection method for defects in solar cell manufacturing according to claim 9, characterized in that, Will SCC Spatial attention in attention mechanisms Channel attention and coordinate attention Combining these techniques with bilinear feature pyramids yields fine-grained features of defects at various scales. A l Equation (12) is used to represent A l : (12) In equation (12), α l Indicates the first l Weights of layer-space attention; β l Indicates the first l Weights of layer channel attention; γ l Indicates the first l Weights for layer coordinate attention; Indicates broadcast addition; A l Indicates the first l Fine-grained characteristics of layer defects.

Citation Information

Patent Citations

  • Prediction network based on SCC-RCE prediction unit and gridding PM2.5 concentration prediction method

    CN116630113A

  • Fine-grained image recognition method and apparatus using graph structure represented high-order relation discovery

    US20220382553A1