A photovoltaic panel factory delivery detection method for industrial production line

By combining image preprocessing and unsupervised reconstruction networks with dynamic thresholding, a two-level detection architecture is developed to address the issues of high computational resource consumption and poor environmental adaptability in photovoltaic panel factory inspection, achieving efficient and robust defect identification.

CN122134643APending Publication Date: 2026-06-02CHINA MACHINERY DIGITAL TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MACHINERY DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-02-04
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing photovoltaic panel factory inspection technologies rely on a large number of labeled samples, consume a lot of computational resources, and fixed judgment thresholds are difficult to adapt to environmental drift. Complex background textures cause interference, resulting in poor robustness in identifying minor defects.

Method used

An image preprocessing module is used for background suppression and denoising. An unsupervised reconstruction network is used for preliminary screening. A variational autoencoder is used to calculate the reconstruction error value and compare it with the dynamic judgment threshold. A multi-scale noise suppression network module is used to enhance the defect recognition capability. A two-level detection architecture is set up to reduce the computational load and false detection rate.

Benefits of technology

It enables rapid filtering of normal samples under unsupervised conditions, reduces computational load, improves detection efficiency, adaptively adjusts the judgment threshold, enhances the ability to identify defects in complex backgrounds, and reduces the false detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134643A_ABST
    Figure CN122134643A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image analysis, and discloses an industrial production line-oriented photovoltaic panel factory delivery detection method, which comprises the following steps: collecting a photovoltaic panel image by using an image acquisition module and performing background suppression and denoising processing; reconstructing the image by using an unsupervised reconstruction network and calculating an error, and comparing the error with a dynamic determination threshold value based on historical statistical data; if the error is lower than the threshold value, it is determined to be normal, otherwise, a target detection network comprising a multi-scale noise suppression network module is used for defect identification and positioning. Through a two-stage structure combining unsupervised anomaly screening and supervised defect detection, cooperating with dynamic threshold value self-adaptive updating and multi-scale feature enhancement technology, the application realizes rapid filtering of normal samples and high-precision detection of defect samples, reduces the dependence on labeled data, and improves the detection efficiency and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, specifically to a method for factory inspection of photovoltaic panels for industrial production lines. Background Technology

[0002] Photovoltaic modules are prone to internal damage such as microcracks, broken grids, or poor soldering during lamination, framing, and transmission processes. These damages can affect the module's power generation and lifespan. Electroluminescence imaging technology, utilizing the principle of radiative recombination of charge carriers, can reveal internal structures invisible to the naked eye and serves as a means of quality control for photovoltaic modules before they leave the factory.

[0003] Existing automated inspection solutions for photovoltaic panels largely rely on deep neural network models based on supervised learning. These algorithms require a large number of precisely labeled defect samples during the training phase. In industrial production, the proportion of qualified products far exceeds that of defective products, making it difficult to obtain defect samples and resulting in an imbalance between positive and negative samples. Manually labeling defect data is time-consuming, and the uneven distribution of samples limits the model's accuracy in identifying rare defect categories. Furthermore, performing highly complex full-scale defect identification calculations on every photovoltaic panel that comes off the production line consumes significant computing resources. As production capacity increases, the performance bottleneck of the computing hardware will limit inspection efficiency.

[0004] Currently, during the factory inspection of photovoltaic panels for industrial production lines, the intensity of near-infrared light source radiation in the inspection equipment decreases over time, and changes in ambient temperature cause fluctuations in thermal noise of the photosensitive elements, leading to drift in the statistical distribution characteristics of the acquired images. Existing technologies often use preset fixed threshold values ​​to distinguish between normal and defective products. When the image feature distribution changes, the fixed thresholds cannot adapt to the new data distribution, resulting in false alarms or missed detections. Photovoltaic panel electroluminescent images contain polycrystalline silicon grain boundary textures and speckle noise; these background interferences are similar to microcracks in terms of grayscale and shape characteristics. Conventional algorithms struggle to extract defect features against complex backgrounds and are prone to misclassifying background textures as defects.

[0005] Therefore, the purpose of this invention is to provide a method for testing photovoltaic panels before they leave the factory for industrial production lines, in order to overcome the shortcomings of the prior art. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a photovoltaic panel factory inspection method for industrial production lines. It solves the problems of existing photovoltaic module defect detection technologies, such as heavy reliance on a large number of labeled samples, high computational resource consumption for full-scale detection, difficulty in adapting to imaging environment drift due to fixed judgment thresholds, and poor robustness in identifying minute defects due to interference from complex background textures.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a photovoltaic panel factory inspection method for industrial production lines, applied to a photovoltaic panel factory inspection system for industrial production lines. The photovoltaic panel factory inspection system includes an image acquisition module and a data processing host. The data processing host integrates an image preprocessing module, an anomaly screening module, and a defect detection module. The method includes the following steps: The image acquisition module acquires images of the photovoltaic panel; The image preprocessing module performs background suppression and noise reduction on the photovoltaic panel image to obtain a preprocessed image; The anomaly screening module uses an unsupervised reconstruction network to reconstruct the preprocessed image and calculates the reconstruction error value between the preprocessed image and the reconstructed image. The anomaly screening module compares the reconstruction error value with a dynamic judgment threshold based on historical statistical data. When the reconstruction error value is lower than the dynamic determination threshold, the photovoltaic panel is determined to be a normal sample and the detection process is terminated. When the reconstruction error value is higher than or equal to the dynamic judgment threshold, the photovoltaic panel is determined to be a suspected abnormal sample, and the target detection network in the defect detection module is used to identify and locate defects in the preprocessed image, and the detection result is output.

[0008] Preferably, the image preprocessing module performs background suppression and denoising processing on the photovoltaic panel image, including: calculating the gradient magnitude of the photovoltaic panel image in the horizontal and vertical directions using a convolution operator; comparing the gradient magnitude with an edge determination threshold to generate a binarized edge image; performing a morphological closing operation including dilation and erosion on the binarized edge image to repair edge breaks and form a continuous and closed geometric contour; searching for connected regions in the binarized edge image based on the closed geometric contour, determining the connected region with the largest pixel area value as the photovoltaic panel region, and obtaining the minimum bounding rectangle of the photovoltaic panel region; and cropping the photovoltaic panel image according to the coordinate parameters of the minimum bounding rectangle to obtain a region of interest image.

[0009] Preferably, the image preprocessing module performs background suppression and denoising processing on the photovoltaic panel image. After obtaining the region of interest image, it further includes: performing median filtering on the region of interest image, specifically including: selecting a neighborhood window centered on the target pixel, calculating the median of the gray values ​​of all pixels within the neighborhood window, and replacing the original gray value with the median when the absolute difference between the original gray value of the target pixel and the median exceeds a noise threshold; performing adaptive histogram equalization on the image after median filtering, specifically including: dividing the image into multiple non-overlapping rectangular sub-blocks, calculating a gray-level transformation function based on the cumulative distribution function for each rectangular sub-block, and using a bilinear interpolation algorithm to smooth the transition of pixel gray values ​​at the boundaries of the rectangular sub-blocks, and outputting the preprocessed image.

[0010] Preferably, the unsupervised reconstruction network is a variational autoencoder, which includes an encoder, a reparameterization layer, and a decoder. The encoder maps the preprocessed image to a mean vector and a log-variance vector in the latent space. The reparameterization layer introduces auxiliary noise variables that follow a standard normal distribution and generates latent variables based on the mean vector and the log-variance vector. The decoder receives the latent variables and restores them to the reconstructed image with the same size as the preprocessed image. The variational autoencoder is trained by minimizing a total loss function, which consists of a reconstruction loss term used to quantify the difference between the preprocessed image and the reconstructed image, and a relative entropy loss term used to measure the difference between the latent space distribution and the standard normal distribution.

[0011] Preferably, the dynamic judgment threshold based on historical statistical data is calculated through the following steps: maintaining a first-in-first-out historical error queue, the historical error queue storing the reconstruction error values ​​of a preset number of recently consecutively judged normal samples; calculating the statistical mean and statistical standard deviation of all reconstruction error values ​​in the historical error queue; and determining the sum of the statistical mean and the weighted statistical standard deviation as the dynamic judgment threshold, wherein the weighting coefficient of the statistical standard deviation is a sensitivity coefficient.

[0012] Preferably, after performing the step of comparing the reconstruction error value with the dynamic judgment threshold based on historical statistical data, the method further includes: if the photovoltaic panel is determined to be a normal sample, pushing the reconstruction error value to the tail of the historical error queue, and removing the oldest data stored at the head of the historical error queue; if the photovoltaic panel is determined to be a suspected abnormal sample, not updating the historical error queue.

[0013] Preferably, the target detection network in the defect detection module includes a backbone feature extraction network, a multi-scale noise suppression network module, a neck feature fusion network, and a decoupled detection head; the backbone feature extraction network is used to generate feature maps of different scales, wherein the output of the large-scale feature map is connected to the multi-scale noise suppression network module; the multi-scale noise suppression network module is used to perform channel-dimensional attention weighting and spatial-dimensional denoising filtering on the large-scale feature map; the neck feature fusion network is used to perform bidirectional feature fusion on the feature maps of different scales; the decoupled detection head is used to predict the defect category score and bounding box coordinates of the fused feature map through two independent convolutional branches.

[0014] Preferably, the multi-scale noise suppression network module receives the input feature tensor from the backbone feature extraction network. The multi-scale noise suppression network module includes a multi-branch feature extraction unit, a cross-channel feature fusion unit, and a noise suppression gating unit. The multi-branch feature extraction unit contains three parallel dilated convolution branches, each using a different dilation rate to perform convolution operations on the input feature tensor. The cross-channel feature fusion unit concatenates the output features of the three dilated convolution branches along the channel dimension to form a multi-scale aggregated feature map. The noise suppression gating unit performs global average pooling and global max pooling on the multi-scale aggregated feature map to generate a spatial attention map, and maps the spatial attention map to a noise suppression weight matrix using an activation function. The multi-scale noise suppression network module uses the noise suppression weight matrix to perform element-wise multiplication on the multi-scale aggregated feature map, and fuses the result of the multiplication with the input feature tensor through a residual connection structure.

[0015] Preferably, the object detection network uses a weighted total loss function for parameter optimization during training. The weighted total loss function includes: a complete intersection-union (CIU) loss function, used to measure the fit between the predicted bounding box and the real bounding box from three geometric dimensions: overlap area, center point distance, and aspect ratio; a zoom loss function, used to calculate the category classification loss, using the CIU-aware classification score to weight the training samples; and a distributed focus loss function, used to transform the bounding box regression problem into a probability distribution problem of predicting boundary distance, causing the probability distribution predicted by the network to concentrate on discrete values ​​near the target value.

[0016] Preferably, the step of acquiring an image of the photovoltaic panel using the image acquisition module includes: when the guiding edge of the photovoltaic panel is detected to be blocking the detection beam, a rising edge level signal is generated as an external hard trigger signal; the DC regulated power supply device responds to the external hard trigger signal by applying a positive bias voltage to the photovoltaic panel, thereby exciting near-infrared light; the industrial camera using a global shutter exposure mode responds to the external hard trigger signal by opening the photosensitive element for exposure after a preset delay time, acquiring the near-infrared light excited by the positive bias voltage, and generating an image of the photovoltaic panel through a near-infrared imaging lens equipped with a filter for visible light bands.

[0017] This invention provides a method for factory testing of photovoltaic panels for industrial production lines. It has the following beneficial effects: 1. This invention uses a two-stage serial detection architecture consisting of an anomaly screening module and a defect detection module. It utilizes an unsupervised reconstruction network to perform preliminary reconstruction judgment on photovoltaic panel images. Only suspected abnormal samples with reconstruction errors exceeding a dynamic threshold are input to the defect detection module. This hierarchical processing method can quickly filter a large number of normal samples under unsupervised conditions, reducing the dependence on large-scale defect annotation data, while also reducing the overall computational load of the system and improving detection efficiency.

[0018] 2. This invention establishes a dynamic judgment threshold update mechanism based on sliding window statistics, maintains a historical error queue, and calculates the statistical mean and standard deviation of normal sample reconstruction errors in real time. This enables the judgment threshold to adaptively adjust to the image statistical feature drift caused by changes in the production environment, light source aging, or product batch differences. This solves the problem of decreased applicability of fixed thresholds during long-term detection and reduces the false detection rate.

[0019] 3. This invention sets up a multi-scale noise suppression network module embedded at the end of the backbone feature extraction network, uses parallel multi-branch dilated convolution to extract multi-scale spatial features, and combines channel and spatial attention mechanisms to generate a noise suppression weight matrix, which can perform weighted processing on feature maps. While suppressing the interference of background texture and speckle noise in electroluminescent images, it enhances the ability to capture features of defects of different sizes and improves the robustness of the detection model. Attached Figure Description

[0020] Figure 1 This is a flowchart of the photovoltaic panel factory testing method of the present invention; Figure 2 This is a hardware and logic architecture diagram of the detection system of the present invention; Figure 3 This is a simulation diagram of the dynamic threshold determination process of the anomaly screening module of the present invention; Figure 4 This is a schematic diagram of the training convergence curve of the composite loss function of the defect detection module of the present invention.

[0021] Among them, 10 is the image acquisition module; 11 is the industrial camera; 12 is the imaging lens; 20 is the data processing host; 30 is the image preprocessing module; 40 is the anomaly screening module; and 50 is the defect detection module. Detailed Implementation

[0022] The technical solutions in 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] See attached document Figure 1 This invention provides a photovoltaic panel factory inspection method for industrial production lines, which is applied to the photovoltaic panel factory inspection system of industrial production lines.

[0024] See attached document Figure 2 The photovoltaic panel outgoing inspection system for industrial production lines includes an image acquisition module 10 and a data processing host 20 at the hardware level. At the logical function level, the data processing host 20 integrates an image preprocessing module 30, an anomaly screening module 40, and a defect detection module 50. These modules reside in the memory of the data processing host 20 and are executed by its processor.

[0025] The image acquisition module 10 is installed above the inspection station on the photovoltaic module production line. The image acquisition module 10 includes an industrial camera 11 with a resolution greater than 5 megapixels, an imaging lens 12 adapted to the near-infrared band, and a DC regulated power supply for exciting the photovoltaic panel to produce an electroluminescent effect. The industrial camera 11 establishes a communication connection with the data processing host 20 via a USB 3.0 or GigEVision data interface. The image acquisition module 10 is also electrically connected to a photoelectric position sensor, which is located on the side of the conveyor belt at the inspection station.

[0026] During the initial stage of the inspection process, the photoelectric position sensor detects that the photovoltaic panel has arrived at the inspection station and outputs a trigger signal. The trigger signal synchronously controls the DC regulated power supply to power the photovoltaic panel and controls the industrial camera 11 to perform the exposure operation. The industrial camera 11 generates a raw photovoltaic panel EL image and transmits the data stream of the raw photovoltaic panel EL image to the data processing host 20.

[0027] The image preprocessing module 30 in the data processing host 20 receives the original photovoltaic panel EL image. Since the original photovoltaic panel EL image contains background areas, imaging speckle noise, and uneven brightness distribution, the image preprocessing module 30 sequentially performs edge contour extraction and cropping, median filtering for noise reduction, and adaptive histogram equalization on the original photovoltaic panel EL image to generate a preprocessed image with uniform resolution and grayscale distribution. The image preprocessing operation reduces the interference of environmental factors on subsequent feature extraction.

[0028] Subsequently, the preprocessed image is input to the anomaly screening module 40. The anomaly screening module 40 is the first-level logical decision unit in the detection process, and it is constructed based on a variational autoencoder network. The anomaly screening module 40 performs encoding and decoding reconstruction operations on the preprocessed image and calculates the reconstruction error value between the preprocessed image and the reconstructed image. The reconstruction error value characterizes the degree of deviation between the preprocessed image and the statistical distribution of normal photovoltaic panel samples.

[0029] The anomaly screening module 40 performs logical branching based on the reconstruction error value. Specifically, the anomaly screening module 40 compares the reconstruction error value with a dynamic judgment threshold. If the reconstruction error value is lower than the dynamic judgment threshold, the system determines that the photovoltaic panel is a normal sample. Under this logical branch, the system outputs a qualified result and terminates the inspection process for the photovoltaic panel, without calling the defect detection module 50.

[0030] If the reconstruction error value is higher than or equal to the dynamic judgment threshold, the system determines that the photovoltaic panel is a suspected abnormal sample. At this time, the anomaly screening module 40 transmits the preprocessed image to the defect detection module 50. The defect detection module 50 is the second-level logical judgment unit in the detection process. The defect detection module 50 is built based on a target detection network containing a multi-scale feature fusion structure. The defect detection module 50 performs convolutional feature extraction on the preprocessed image, identifies the defect categories of cracks, hidden cracks, broken grids, or cold welds, and calculates the bounding box coordinates of the defect region. Finally, the photovoltaic panel factory inspection system outputs the detection results containing the defect category and bounding box coordinates. A photoelectric position sensor monitors the position of photovoltaic panels on the production line conveyor belt in real time. When the guide edge of the photovoltaic panel blocks the detection beam of the photoelectric position sensor, the sensor generates a rising edge signal. The rising edge signal is either TTL level or optocoupler isolated signal, and serves as an external hard trigger signal, transmitted simultaneously to the DC power supply control terminal and the trigger input terminal of the industrial camera 11 via a low-latency I / O cable. The specific selection, installation, and commissioning of the photoelectric position sensor are well-known techniques to those skilled in the art and will not be elaborated upon here.

[0031] The DC power supply responds to an external hard trigger signal, applying a forward bias voltage to the busbars of the photovoltaic panel within a preset delay time. This forward bias voltage drives current into the PN junction inside the photovoltaic panel, causing recombination radiation of non-equilibrium carriers, thereby exciting near-infrared light with a center wavelength of approximately 1150 nm. The intensity distribution of the near-infrared light characterizes the lattice structure and the integrity of the current transport path within the photovoltaic panel. The preset delay time is set to the millisecond level, with the specific value depending on the load response characteristics of the DC power supply, ensuring that imaging is performed only after the current reaches a steady state.

[0032] The industrial camera 11 is configured for both external trigger mode and global shutter exposure mode. Upon receiving an external hard trigger signal, the industrial camera 11 initiates exposure of the photosensitive element after a preset delay time. This preset delay time is set to avoid capturing images with brightness fluctuations during the current rising edge. The global shutter exposure mode controls the simultaneous start and end of exposure for all pixel rows of the photosensitive element, preventing image distortion or motion blur caused by differences in row exposure time due to the photovoltaic panel's movement along the conveyor belt. The industrial camera 11, in conjunction with a near-infrared imaging lens 12 that filters out visible light, allows only near-infrared light to enter the photosensitive element, thereby generating the original photovoltaic panel EL image.

[0033] The industrial camera 11 transmits the raw photovoltaic panel EL image data it acquires to the memory buffer of the data processing host 20 via a GigEVision or USB 3.0 data interface. After the image data transmission is completed, when the photoelectric position sensor detects that the photovoltaic panel has left the detection area, the DC power supply cuts off the forward bias voltage output, the system resets, and enters the waiting state for the next detection cycle. To extract the region of interest (ROI) of the photovoltaic panel from the raw photovoltaic panel EL image containing background clutter, the image preprocessing module 30 performs an edge gradient-based ROI extraction and background suppression process. The image preprocessing module 30 first performs a convolution operation on the raw photovoltaic panel EL image using the Sobel operator to extract the grayscale variation features in the horizontal and vertical directions. The image preprocessing module 30 then utilizes horizontal convolution kernels... and vertical convolution kernel For each pixel of the original photovoltaic panel EL image Perform convolution. Horizontal convolution kernel. and vertical convolution kernel The matrix expression is defined as follows: ; Among them, the horizontal convolution kernel Vertical convolution kernels are used to respond to vertical edge features. Used to respond to horizontal edge features.

[0034] Based on horizontal convolution kernel and vertical convolution kernel Based on the calculation results, the image preprocessing module 30 calculates the pixel points. gradient magnitude Gradient magnitude The calculation formula is as follows: ; in, This indicates the original photovoltaic panel EL image at the pixel level. grayscale value at that location This represents the convolution operator. It obtains the gradient magnitude. Then, the image preprocessing module 30 will calculate the gradient magnitude. The value is compared with a preset edge detection threshold. The edge detection threshold can be adaptively obtained using the maximum inter-class variance method or set as a preset empirical constant. If the gradient magnitude... If the value is greater than the edge detection threshold, then the pixel is... Marked as foreground edge points; if gradient magnitude If the value is less than or equal to the edge detection threshold, then the pixel is... Marked as background points. Binarization operation generates a binarized edge image.

[0035] Because photovoltaic panels are prone to localized physical damage or edge breaks due to insufficient imaging illumination, the outline of the photovoltaic panel in the binarized edge image tends to appear non-closed. The image preprocessing module 30 performs morphological closing operations on the binarized edge image. The morphological closing operation includes a cascaded process of dilation followed by erosion. The image preprocessing module 30 uses a rectangular structuring element of a preset size to dilate the binarized edge image, connecting broken edge fragments and filling small holes. The size of the rectangular structuring element is set to 5×5 pixels or 7×7 pixels. Subsequently, the image preprocessing module 30 uses the same rectangular structuring element to erode the dilated image, restoring the original size of the outline. The morphological closing operation results in a continuous and closed geometric outline at the edge of the photovoltaic panel.

[0036] The image preprocessing module 30 performs a contour search algorithm on the image after morphological closing operations to retrieve all closed connected regions in the image. The image preprocessing module 30 calculates the pixel area of ​​each connected region and identifies the connected region with the largest pixel area as the photovoltaic panel region. The image preprocessing module 30 obtains the minimum bounding rectangle of the photovoltaic panel region and records the coordinate parameters of the minimum bounding rectangle. .in, and Let x and y be the coordinates of the top-left corner of the smallest bounding rectangle. and The width and height are defined for the minimum bounding rectangle. Finally, the image preprocessing module 30 determines the width and height based on the coordinate parameters. The original photovoltaic panel EL image is cropped to remove the background area outside the minimum bounding rectangle, outputting an ROI image containing only the photovoltaic panel itself. After acquiring the ROI image, the image preprocessing module 30 performs image enhancement and denoising procedures. Due to electromagnetic interference in the industrial environment and thermal noise from the photosensitive element itself, discrete impulse noise exists in the ROI image. Furthermore, limited by the distribution characteristics of the near-infrared light source, the ROI image exhibits low overall contrast and uneven local brightness. The image preprocessing module 30 sequentially performs noise suppression based on median filtering and contrast enhancement based on adaptive histogram equalization.

[0037] Image preprocessing module 30 uses a median filtering algorithm to perform traversal processing on the ROI image. For any pixel in the ROI image... The image preprocessing module 30 selects pixels. Centered neighborhood window Neighborhood window To cover pixels A square region within a preset area, with the square region size set to 3×3 pixels or 5×5 pixels. Image preprocessing module 30 statistical neighborhood window. Find the grayscale values ​​of all pixels within the range, and calculate the median of all grayscale values. Median The calculation formula is expressed as follows: ; in, Indicates the ROI image in coordinates The original grayscale value at that location, For neighborhood windows The set of pixel coordinates covered This represents the median operator.

[0038] To remove high-amplitude impulse noise while preserving the grid line texture details of the photovoltaic panel, the image preprocessing module 30 employs a conditional replacement strategy based on a difference threshold. The image preprocessing module 30 calculates the original grayscale values. With median The absolute difference between them. Only when the absolute difference exceeds a preset noise threshold. At that time, the image preprocessing module 30 determines the pixel points. Noise is removed and numerical values ​​are replaced. The image after denoising. The output logic is as follows: ; in, Noise threshold, noise threshold The value is 5% to 10% of the global grayscale range of the ROI image.

[0039] After denoising, the image preprocessing module 30 performs adaptive histogram equalization on the denoised image. Adaptive histogram equalization divides the denoised image into multiple non-overlapping rectangular sub-blocks and calculates the grayscale transformation function independently for each sub-block. For any given rectangular sub-block, let the total number of pixels within the sub-block be... The total number of gray levels is L. The image preprocessing module 30 counts the number of gray levels within the rectangular sub-block. grayscale Number of times And calculate the first grayscale probability density The calculation formula is: ; Image preprocessing module 30 constructs a gray-level mapping relationship based on the cumulative distribution function. For input gray levels... The transformed output grayscale Determined by the following formula: ; in, This is the grayscale transformation function. For summation index variables, Indicates the first grayscale The cumulative probability. To eliminate boundary artifacts between adjacent rectangular sub-blocks, the image preprocessing module 30 uses a bilinear interpolation algorithm to smooth the grayscale transition of pixels located at the boundaries of the rectangular sub-blocks. After adaptive histogram equalization, the image preprocessing module 30 outputs a preprocessed image and transmits it to the anomaly screening module 40.

[0040] The core processing unit of the anomaly screening module 40 is a variational autoencoder. A variational autoencoder is a deep neural network based on a generative model. Its network architecture includes an encoder, a reparameterization layer, and a decoder. The variational autoencoder is configured to be trained using only normal photovoltaic panel samples, thereby learning the latent distribution patterns of normal samples.

[0041] The encoder receives a preprocessed image from the image preprocessing module 30. The encoder consists of 4 to 6 cascaded downsampling convolutional blocks. Each downsampling convolutional block sequentially contains a convolutional layer, a batch normalization layer, and an activation layer. The convolutional layers use 3×3 or 5×5 convolutional kernels to extract image features, with a stride of 2 and downsampling operations performed. As the network depth increases, the number of channels in the feature map increases layer by layer according to the pattern 32, 64, 128, 256, 512, while the spatial size of the feature map halves layer by layer. At the end of the encoder, a global average pooling layer or a flattening layer is set, followed by two parallel fully connected layers. These two fully connected layers map the extracted deep features to two distribution parameter vectors in the latent space: the mean vector and the mean vector. Sum of logarithmic variance vector The latent space is set to have 128 or 256 dimensions. Mean vector. The log-variance vector represents the central location of the potential distribution. Characterizes the degree of dispersion of the potential distribution.

[0042] To achieve gradient backpropagation while preserving the continuity of the latent space, the variational autoencoder incorporates a reparameterization layer between the encoder and decoder. This reparameterization layer performs a reparameterization trick, introducing an auxiliary noise variable that follows a standard normal distribution. And based on the mean vector Sum of logarithmic variance vector Generate latent variables For the first hidden space Each component is calculated using the following formula: ; in, Latent variables The One portion, Mean vector The One portion, The first of the logarithmic variance vectors One portion, Auxiliary noise variables The Each component, auxiliary noise variable Follows a standard normal distribution The reparameterization technique makes the sampling operation differentiable, allowing the error gradient to flow through the reparameterization layer and be passed to the encoder.

[0043] The decoder receives the latent variables generated by the reparameterization layer as input. The decoder's network structure is inversely symmetrical to the encoder's. The decoder first passes the latent variables through a fully connected layer... Map back to the feature map tensor restored by the reshaping operation. Subsequently, the decoder uses 4 to 6 cascaded upsampling convolutional blocks to enlarge the size of the feature map. Each upsampling convolutional block contains a transposed convolutional layer or an upsampling and convolutional combination layer, and the number of channels of the feature map decreases layer by layer. The output layer of the decoder uses the Sigmoid activation function to constrain the output values within the normalized pixel value range [0,1], generating a reconstructed image with the same size as the preprocessed image . The reconstructed image is the result of the variational autoencoder reconstructing the preprocessed image according to the learned normal sample distribution.

[0044] To enable the anomaly screening module 40 to have the ability to recognize the texture features of normal photovoltaic panels and distinguish abnormal defects, the anomaly screening module 40 executes a normal sample pattern learning process based on unsupervised learning. The normal sample pattern learning process utilizes the parallel computing power of the graphics processor to only retrieve the EL images of normal photovoltaic panels marked as qualified products to construct a training dataset. The anomaly screening module 40 iteratively updates the network weight parameters of the variational autoencoder through the backpropagation algorithm to minimize the total loss function. The total loss function consists of a reconstruction loss term and a relative entropy loss term. The reconstruction loss term is used to quantify the difference in pixel intensity between the input image and the reconstructed image output by the decoder, prompting the decoder to restore the visual details of the input image. The relative entropy loss term is used to measure the difference between the latent distribution output by the encoder and the preset standard normal distribution, acting as a regularization constraint to force the data distribution in the latent space to remain continuous and smooth.

[0045] For each input image sample, the total loss function is calculated as follows: ; where, represents the normalized gray value of the th pixel in the input image sample, represents the reconstructed gray value of the corresponding th pixel in the reconstructed image. represents the total number of pixels contained in the input image sample. is the th component of the mean vector , is the th component of the log variance vector . represents the total number of dimensions of the latent space. is a balance coefficient used to adjust the weight ratio of the reconstruction loss term and the relative entropy loss term. The balance coefficient The value range is set to 0.001 to 0.005 to ensure that the model prioritizes the quality of image reconstruction while learning the latent distribution.

[0046] During training iterations, the data processing host 20 uses the Adam optimizer to update the network weight parameters of the variational autoencoder. The initial learning rate of the Adam optimizer is set to 1×10⁻⁶. 4 The exponential decay rate estimated by the first moment The exponential decay rate is set to 0.9 for the second moment estimation. The value is set to 0.999. The data processing host 20 divides the training dataset into several batches, with each batch containing either 32 or 64 samples. The training process continues until the total loss function is achieved. The variation amplitude within 10 consecutive training cycles is less than the preset convergence threshold. The convergence threshold indicates that the anomaly screening module 40 has mastered the characteristic distribution pattern of normal photovoltaic panels. At this point, the data processing host 20 solidifies the network weight parameters of the variational autoencoder for subsequent online detection and inference.

[0047] After completing the normal sample pattern learning, the anomaly screening module 40 executes the online inference process. The anomaly screening module 40 uses the trained variational autoencoder to reconstruct the preprocessed image input in real time, and determines whether the current photovoltaic panel is a suspected anomaly based on the comparison result of the reconstruction error and the adaptive dynamic threshold. The anomaly screening module 40 first inputs the preprocessed image into the variational autoencoder to obtain the corresponding reconstructed image. Since the variational autoencoder only learns the texture distribution of normal photovoltaic panels, when an image of an abnormal photovoltaic panel containing defects is input, the variational autoencoder cannot restore the pixel features of the defective area, resulting in a difference between the reconstructed image and the preprocessed image.

[0048] The anomaly screening module 40 calculates the reconstruction error value between the preprocessed image and the reconstructed image. Reconstruction error value This quantifies the degree to which the current photovoltaic panel sample deviates from the normal distribution. Reconstruction error value. The calculation formula is as follows: ; in, Indicates the first image in the preprocessed image The normalized grayscale value of each pixel. Indicates the corresponding number in the reconstructed image The reconstructed grayscale value of each pixel. This indicates the total number of pixels contained in the preprocessed image.

[0049] To accommodate background texture drift caused by batch changes, light source aging, or slight environmental variations in photovoltaic production lines, the anomaly screening module 40 employs a dynamic judgment threshold based on sliding window statistics. The anomaly screening module 40 maintains a first-in, first-out historical error queue in memory. The historical error queue stores the most recently consecutive judgments. The reconstruction error value of a normal sample. The sliding window length is set to 50 to 100. At the initial stage of system startup, the anomaly screening module 40 pre-reads a set of manually confirmed normal photovoltaic panel images to calculate the reconstruction error and fill the historical error queue to complete the initialization.

[0050] The anomaly screening module 40 calculates the statistical mean in real time based on the data in the historical error queue. and statistical standard deviation Based on statistical mean and statistical standard deviation Dynamically determine threshold The update formula is defined as follows: ; in, It is the arithmetic mean of all reconstruction error values ​​in the historical error queue. The standard deviation of all reconstructed error values ​​in the historical error queue. This is the sensitivity coefficient, used to adjust the stringency of abnormality screening. Sensitivity coefficient The value range is set to 3.0 to 5.0, which corresponds to the statistical range of 3. The guidelines ensure that the false alarm rate is kept low under the assumption of normal distribution.

[0051] The anomaly screening module 40 will use the currently calculated reconstruction error value With dynamic judgment threshold Perform a numerical comparison. If the reconstruction error value... Less than or equal to the dynamic judgment threshold The anomaly screening module 40 determines that the current photovoltaic panel is a normal sample. In this case, the anomaly screening module 40 outputs a qualified signal and reconstructs the error value. Push the data to the end of the historical error queue, and at the same time remove the oldest data from the head of the historical error queue to achieve dynamic updating of the threshold benchmark.

[0052] If the reconstruction error value Greater than the dynamic judgment threshold The anomaly screening module 40 determines that the current photovoltaic panel is a suspected anomaly sample. In this case, to avoid the statistical characteristics of the anomaly sample affecting the dynamic judgment threshold... To ensure the accuracy of the calculation, the anomaly screening module 40 does not update the historical error queue. The anomaly screening module 40 marks the preprocessed image as an object to be further detected and transmits the preprocessed image to the defect detection module 50 for specific defect category location and identification.

[0053] The defect detection module 50 employs a YOLOv8 convolutional neural network architecture based on an improved multi-scale noise suppression network. This improved YOLOv8 architecture is configured to receive suspected anomaly images from the anomaly screening module 40 and output defect category labels and localization bounding boxes. The improved YOLOv8 architecture mainly consists of a backbone feature extraction network, a multi-scale noise suppression network module, a neck feature fusion network, and a decoupled detection head.

[0054] The backbone feature extraction network is built on the CSPDarknet architecture and is used to extract multi-level spatial features from suspected anomalous images. The backbone feature extraction network contains several convolutional units and C2f cross-stage local connectivity modules. The suspected anomalous image undergoes layer-by-layer convolution and downsampling operations in the backbone feature extraction network to generate three feature maps at different scales: small-scale feature map P3, medium-scale feature map P4, and large-scale feature map P5. The small-scale feature map P3 corresponds to an 8x downsampling factor and is used to detect tiny microcracks; the medium-scale feature map P4 corresponds to a 16x downsampling factor; and the large-scale feature map P5 corresponds to a 32x downsampling factor and is used to detect large-area broken grids or black spots.

[0055] To address the insufficient feature extraction capability of the original YOLOv8 network when processing high-noise EL images, a multi-scale noise suppression network module was embedded at the end of the backbone feature extraction network, specifically replacing the original C2f cross-stage local connection module at the output of the large-scale feature map P5. The multi-scale noise suppression network module is configured to perform channel-dimensional attention weighting and spatial-dimensional denoising filtering on the large-scale feature map P5, thereby enhancing the saliency of defect features and suppressing background texture noise. The feature map processed by the multi-scale noise suppression network module is then fed into the neck feature fusion network.

[0056] The neck feature fusion network employs a structure combining a path aggregation network and a feature pyramid network. It performs bidirectional feature fusion on small-scale feature map P3, medium-scale feature map P4, and enhanced large-scale feature map P5 through a top-down upsampling path and a bottom-up convolutional path. This bidirectional feature fusion operation concatenates the semantic information of high-level features with the localization details of low-level features, generating a fused feature pyramid rich in contextual information.

[0057] The decoupled detection head is connected to the output of the neck feature fusion network. The decoupled detection head employs an anchorless mechanism and structurally separates the classification and regression tasks. For each scale of the fused feature map, the decoupled detection head predicts the defect category score and bounding box coordinates through two independent convolutional branches. During network training, the system uses a weighted total loss function. Optimize network parameters. Weighted total loss function. The calculation formula is defined as follows: ; in, The full intersection-union loss function is used to measure the accuracy of the overlap between the predicted bounding box and the ground truth bounding box. This is the zoom loss function, used to optimize the classification accuracy of defect categories; This is the distributed focus loss function, used to optimize the regression stability of the bounding box. These are the weighting coefficients for the bounding box regression loss. These are the classification loss weight coefficients. These are the weighting coefficients for the focus loss. In this embodiment, they are the weighting coefficients for the bounding box regression loss. Set to 7.5, the classification loss weight coefficient Set to 0.5, the distribution focus loss weighting coefficient Set to 1.5. The improved YOLOv8 convolutional neural network architecture minimizes the weighted total loss function. This enables the detection of various defects in the EL images of photovoltaic panels.

[0058] The multi-scale noise suppression network module is configured to enhance the feature capture capability for defects in photovoltaic panels of different sizes and suppress background texture noise generated by polycrystalline silicon grain boundaries or cell grid lines. The multi-scale noise suppression network module mainly consists of a multi-branch feature extraction unit, a cross-channel feature fusion unit, and a noise suppression gating unit. The multi-scale noise suppression network module receives input feature tensors from the backbone feature extraction network. It outputs the enhanced output feature tensor. .

[0059] The multi-branch feature extraction unit contains three parallel dilated convolution branches. This is to ensure that the spatial size of the output feature map of each branch is consistent with the input feature tensor. To maintain consistency, each dilated convolution branch employs the same padding strategy. Each dilated convolution branch first utilizes a 1×1 convolutional layer on the input feature tensor. Channel dimensionality reduction is performed to compress the number of channels into an input feature tensor. One-quarter of the total number of channels is used to reduce the number of computational parameters. The three dilated convolution branches are configured with different dilation rates. The first branch uses a dilation rate of 1. The convolutional kernel is used to extract local, minute defect features; the second branch uses a void ratio of 3. The convolutional kernel is used to extract medium-scale defect features; the third branch uses a void ratio of 5. Convolutional kernels are used to capture large-area defect features and contextual background information. Assume the... The output features of each dilated convolution branch are Output features The calculation formula is defined as follows: ; in, This represents a 1×1 convolution operation. This indicates batch normalization processing. This indicates a modified linear unit activation function. Indicates the void ratio of Dilated convolution operation. In this embodiment, the branch index... The values ​​of 1, 2, and 3 correspond to void ratios of d1=1, d2=3, and d3=5, respectively.

[0060] The cross-channel feature fusion unit combines the output features of the three dilated convolution branches. , , The data is stitched together along the channel dimension to form a multi-scale aggregated feature map. The noise suppression gating unit is configured to aggregate feature maps at multiple scales. Perform spatial attention weighting operations. The noise suppression gating unit aggregates feature maps at multiple scales along the channel axis. Perform global average pooling and global max pooling to generate average feature descriptors that describe spatial background information. and the largest feature descriptor describing significant defect information .

[0061] The noise suppression gating unit will average the feature descriptor and the largest feature descriptor Spatial stitching is performed, and the number of channels is compressed to 1 using a 7×7 convolutional layer to generate a spatial attention map. A noise suppression gating unit uses a sigmoid activation function to map the spatial attention map into a noise suppression weight matrix with values ​​ranging from [0,1]. Noise suppression weight matrix The calculation formula is as follows: ; in, This indicates a splicing operation along the channel dimension. Indicates the kernel size as Convolution operation, This represents the Sigmoid activation function. Noise suppression weight matrix. The high-value regions in the graph correspond to the salient areas where defects are located, while the low-value regions correspond to the background texture areas that need to be suppressed.

[0062] The multi-scale noise suppression network module utilizes a noise suppression weight matrix. Multi-scale aggregated feature maps Element-wise multiplication is performed to filter out background noise. The multi-scale noise suppression network module introduces a residual connection structure, which combines the weighted features with the input feature tensor. Perform fusion. Output feature tensor. The calculation formula is as follows: ; in, The element-wise multiplication operator is the symbol at the end of the formula. This indicates the method used to restore the number of channels to the value of the input feature tensor. Consistent Convolution operation. The multi-scale noise suppression network module, through the above structure, enhances the saliency of defect features while reducing the false detection rate caused by the complex background texture of photovoltaic panels.

[0063] During the network training of the defect detection module 50, the system constructs a composite loss function system including bounding box regression loss, category classification loss, and distribution focus loss to quantify the difference between the predicted results and the true annotations and guide backpropagation updates. The bounding box regression loss adopts the full intersection-union loss function. The fit between the predicted bounding box and the ground truth bounding box is measured using three geometric dimensions: overlap area, center point distance, and aspect ratio. Assume the center coordinates of the predicted bounding box are... The center coordinates of the true bounding box are Complete intersection-union loss function The calculation formula is as follows: ; in, This represents the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box. This represents the function for calculating Euclidean distance; It represents the diagonal length of the smallest bounding rectangle that can simultaneously contain both the predicted bounding box and the ground truth bounding box; The aspect ratio is a weighted parameter. A parameter used to measure aspect ratio consistency; aspect ratio weighting parameter The calculation formula is: ; Parameters for measuring aspect ratio consistency The calculation formula is: ; in, A parameter for measuring aspect ratio consistency, Pi It is the arctangent function. and These are the width and height of the actual bounding box, respectively. and These represent the width and height of the predicted bounding box, respectively.

[0064] To address the extreme imbalance between positive and negative samples in photovoltaic panel defect detection, the system employs a zoom loss function. Calculate the classification loss. Zoom loss function. By using the intersection-union ratio (IoU) to weight training samples based on perceived classification scores, the dominant role of a large number of simple negative samples in gradient descent is reduced. For any training sample, the zoom loss function... The calculation formula is defined as follows: ; in, The category score predicted by the network. The target intersection-union score. The target intersection-union score when the training samples are positive samples. The value assigned is the actual intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box; when the training samples are negative samples, the target IU score is... The value is assigned to 0. The balance coefficient is set to 0.75 in this embodiment. The focusing parameter is set to 2.0 in this embodiment.

[0065] The system introduces a distributed focus loss function. To address the issues of ambiguous bounding box boundaries and uncertain labeling, a distributed focus loss function is used. The bounding box regression problem is transformed into a problem of predicting the probability distribution of boundary distances. The network predicts the true boundary distances. Falling on the preset discrete value The probability is Falling on the preset discrete value The probability is And satisfy Distributed focus loss function The calculation formula is as follows: ; Distributed focus loss function The probability distribution that causes the network predictions to concentrate on the target value The robustness of bounding box localization is improved at two nearby discrete values. The system obtains the total loss value used for gradient backpropagation by weighted summing of the bounding box regression loss, class classification loss, and distribution focus loss.

[0066] Specific application examples: To further verify the effectiveness of this invention in solving problems such as strong background noise interference in electroluminescent images, low contrast of minute defects, and difficulty in balancing detection speed and accuracy in large-scale industrial production environments of photovoltaic modules, this embodiment constructs an application scenario for the inspection of an automated production line for monocrystalline silicon photovoltaic panels with a daily output of 5000 pieces, and combines it with the attached... Figure 3 With appendix Figure 4 The data results shown are explained in detail.

[0067] In this application scenario, the photovoltaic panel factory inspection system is deployed at a key quality control node after the lamination process. The hardware configuration is as follows: the industrial camera 11 in the image acquisition module 10 uses a Sony IMX250 sensor with a resolution of 2448×2048, paired with a 16mm focal length imaging lens 12, and is installed at a height of 1.2 meters. The data processing host 20 is equipped with an NVIDIA RTX4090 GPU, used for inference calculations of the deep learning model.

[0068] After the detection process is started, the production line conveyor belt runs at a speed of 0.5 m / s. When photovoltaic panel number 3850 triggers the photoelectric sensor, the image acquisition module 10 acquires the raw EL image after a 50ms delay. The image preprocessing module 30 immediately performs morphological closing operation and adaptive histogram equalization on the image, which takes about 15ms, and outputs the denoised ROI image.

[0069] Subsequently, the ROI image enters the anomaly screening module 40. The operating status and logical judgment process of the anomaly screening module 40 are as follows: Figure 2 As shown. Figure 3 This demonstrates the dynamic monitoring of reconstruction errors for 100 samples (serial numbers 3800 to 3900) during continuous production. (Refer to...) Figure 3 The dark gray bar chart represents the reconstruction error value calculated after each sample is reconstructed by the variational autoencoder. The black dashed line represents the dynamic judgment threshold that is updated in real time based on the statistical characteristics of 50 historical samples. .

[0070] Within the serial number range of 3800 to 3849, the quality of the photovoltaic panels remained stable, with a reconstruction error value of [missing value]. It fluctuates in the low range of 0.15 to 0.25, and is consistently below the dynamic judgment threshold of approximately 0.35. At this stage, the anomaly screening module 40 determines the sample to be normal and directly outputs a qualified signal, without activating the subsequent defect detection network, thus saving computing resources. When sample number 3850 (i.e., the object of interest in this embodiment) arrives, due to the presence of microscopic cracks invisible to the naked eye inside the sample, the variational autoencoder cannot reconstruct the crack features based on the normal sample distribution pattern, resulting in a reconstruction error value. It spiked instantly to 0.82. At this moment, If the value exceeds the current dynamic judgment threshold of 0.36, the anomaly screening module 40 immediately marks the sample as a suspected anomaly and routes the image data to the defect detection module 50. (Observation) Figure 3 It can also be observed that after sample number 3850, the dynamic judgment threshold curve did not fluctuate drastically due to the interference of high error values, proving that the system's strategy of not updating the historical queue for abnormal samples ensures the stability of the detection benchmark and avoids subsequent missed detections due to outliers contaminating the statistical distribution.

[0071] Upon receiving a suspected abnormal image, the defect detection module 50 initiates a detection process based on an improved YOLOv8. To verify the training effectiveness of the multi-scale noise suppression network and composite loss function in the defect detection module 50, this embodiment records the loss convergence during model training, such as... Figure 4 As shown. Figure 4 The graph shows the trend of loss reduction over 200 training epochs. The solid line represents the weighted total loss, the dashed line represents the bounding box regression loss, and the dashed line represents the classification loss.

[0072] from Figure 4 Analysis of the data curves shows that in the initial training phase (the first 50 training epochs), thanks to the Distributed Focus Loss (DFL) introduced in the defect detection module, the total loss value rapidly decreased from 7.2 to around 1.6, indicating that the model quickly learned the approximate location of defects. As training entered the fine-tuning phase (epochs 50 to 150), the curves showed a smooth convergence trend, without significant oscillations or gradient explosion. Ultimately, the bounding box regression loss stabilized below 0.02, and the classification loss stabilized around 0.01. This indicates that the model can accurately fit the geometric boundaries of defects and distinguish between hidden cracks and grain boundary noise.

[0073] Based on the trained model, the defect detection module 50 performs inference on sample number 3850. Since the multi-scale noise suppression network module filters out the interference of uneven texture on the silicon surface, the detection head successfully identifies a hidden crack defect with an aspect ratio of 1:5 at image coordinates (1024, 850) with a confidence level of 0.96.

[0074] In summary, this embodiment successfully and accurately screened out sudden anomalies from 100 consecutive samples through the dynamic threshold mechanism of the anomaly screening module 40, and achieved precise location of microcracks through the optimized network architecture of the defect detection module 50. In a stress test with a daily production capacity of 5000 units, the photovoltaic panel factory inspection system achieved a comprehensive detection rate of 99.8%, while controlling the average inspection time per panel to within 120ms, fully meeting the high-cycle requirements of the photovoltaic production line.

Claims

1. A method for factory testing of photovoltaic panels for industrial production lines, characterized in that, Includes the following steps: Images of the photovoltaic panel are acquired using the image acquisition module (10); The photovoltaic panel image is subjected to background suppression and noise reduction processing by the image preprocessing module (30) to obtain a preprocessed image; The anomaly screening module (40) uses an unsupervised reconstruction network to reconstruct the preprocessed image and calculates the reconstruction error value between the preprocessed image and the reconstructed image; The anomaly screening module (40) compares the reconstruction error value with a dynamic judgment threshold based on historical statistical data; When the reconstruction error value is lower than the dynamic determination threshold, the photovoltaic panel is determined to be a normal sample and the detection process is terminated. When the reconstruction error value is higher than or equal to the dynamic judgment threshold, the photovoltaic panel is determined to be a suspected abnormal sample, and the target detection network in the defect detection module (50) is used to identify and locate defects in the preprocessed image, and the detection result is output.

2. The photovoltaic panel factory inspection method for industrial production lines according to claim 1, characterized in that, The image preprocessing module (30) performs background suppression and noise reduction processing on the photovoltaic panel image, including the following steps: The gradient magnitudes of the photovoltaic panel image in the horizontal and vertical directions are calculated using a convolution operator; The gradient magnitude is compared with the edge determination threshold to generate a binarized edge image; A morphological closing operation, including dilation and erosion, is performed on the binarized edge image to repair edge breaks and form a continuous and closed geometric contour. Based on the closed geometric contour, the connected regions in the binarized edge image are retrieved, and the connected region with the largest pixel area value is determined as the photovoltaic panel region, and the minimum bounding rectangle of the photovoltaic panel region is obtained. The region of interest image is obtained by cropping the photovoltaic panel image based on the coordinate parameters of the minimum bounding rectangle.

3. The photovoltaic panel factory inspection method for industrial production lines according to claim 2, characterized in that, The image preprocessing module (30) performs background suppression and noise reduction processing on the photovoltaic panel image. After obtaining the region of interest image, it further includes: The median filtering process is performed on the region of interest image, specifically including: selecting a neighborhood window centered on the target pixel, calculating the median of the gray values ​​of all pixels within the neighborhood window, and replacing the original gray value with the median when the absolute difference between the original gray value of the target pixel and the median exceeds the noise threshold. Adaptive histogram equalization is performed on the image after median filtering. Specifically, the image is divided into multiple non-overlapping rectangular sub-blocks. For each rectangular sub-block, a gray-level transformation function is calculated based on the cumulative distribution function. A bilinear interpolation algorithm is used to smooth the gray-level transition of pixels located at the boundaries of the rectangular sub-blocks, and the preprocessed image is output.

4. The photovoltaic panel factory inspection method for industrial production lines according to claim 1, characterized in that, The unsupervised reconstruction network is a variational autoencoder, which includes an encoder, a reparameterization layer, and a decoder. The encoder is used to map the preprocessed image into a mean vector and a log-variance vector in the latent space; The reparameterization layer introduces an auxiliary noise variable that follows a standard normal distribution, and generates latent variables based on the mean vector and the log-variance vector; The decoder is used to receive the latent variables and restore the latent variables to the reconstructed image with the same size as the preprocessed image; The variational autoencoder is trained by minimizing a total loss function, which consists of a reconstruction loss term used to quantify the difference between the preprocessed image and the reconstructed image, and a relative entropy loss term used to measure the difference between the latent space distribution and the standard normal distribution.

5. The photovoltaic panel factory inspection method for industrial production lines according to claim 1, characterized in that, The dynamic judgment threshold based on historical statistical data is calculated through the following steps: Maintain a first-in-first-out historical error queue, which stores the reconstruction error values ​​of a preset number of recently consecutively determined normal samples; Calculate the statistical mean and statistical standard deviation of all reconstructed error values ​​in the historical error queue; The sum of the statistical mean and the weighted statistical standard deviation is determined as the dynamic judgment threshold, wherein the weighting coefficient of the statistical standard deviation is the sensitivity coefficient.

6. The photovoltaic panel factory inspection method for industrial production lines according to claim 5, characterized in that, After comparing the reconstruction error value with a dynamic judgment threshold based on historical statistical data, the method further includes: If the photovoltaic panel is determined to be a normal sample, the reconstruction error value is pushed to the tail of the historical error queue, and the earliest data stored at the head of the historical error queue is removed. If the photovoltaic panel is determined to be a suspected abnormal sample, the historical error queue will not be updated.

7. The photovoltaic panel factory inspection method for industrial production lines according to claim 1, characterized in that, The target detection network in the defect detection module (50) includes a backbone feature extraction network, a multi-scale noise suppression network module, a neck feature fusion network, and a decoupled detection head; The backbone feature extraction network is used to generate feature maps of different scales, wherein the output of the large-scale feature map is connected to the multi-scale noise suppression network module. The multi-scale noise suppression network module is used to perform channel-dimensional attention weighting and spatial-dimensional denoising filtering on the large-scale feature map. The neck feature fusion network is used to perform bidirectional feature fusion on feature maps of different scales; The decoupled detection head is used to predict the defect category score and bounding box coordinates of the fused feature map through two independent convolutional branches.

8. The photovoltaic panel factory inspection method for industrial production lines according to claim 7, characterized in that, The multi-scale noise suppression network module is configured to receive input feature tensors from the backbone feature extraction network. The multi-scale noise suppression network module includes a multi-branch feature extraction unit, a cross-channel feature fusion unit, and a noise suppression gating unit. The multi-branch feature extraction unit includes three parallel dilated convolution branches, each of which performs convolution operations on the input feature tensor using a different dilation rate. The cross-channel feature fusion unit is used to concatenate the output features of the three dilated convolution branches along the channel dimension to form a multi-scale aggregated feature map. The noise suppression gating unit is used to perform global average pooling and global max pooling on the multi-scale aggregated feature map respectively to generate a spatial attention map, and to map the spatial attention map into a noise suppression weight matrix using an activation function; The multi-scale noise suppression network module uses the noise suppression weight matrix to perform element-wise multiplication on the multi-scale aggregated feature map, and then fuses the result of the multiplication with the input feature tensor through a residual connection structure.

9. A method for factory testing of photovoltaic panels for industrial production lines according to claim 7, characterized in that, The object detection network uses a weighted total loss function for parameter optimization during training. The weighted total loss function includes: The full intersection-over-union loss function is used to measure the fit between the predicted bounding box and the ground truth bounding box from three geometric dimensions: overlap area, center point distance, and aspect ratio. The zoom loss function is used to calculate the category classification loss, and the training samples are weighted using the intersection-over-union (IoU) perceived classification score. The distributed focus loss function is used to transform the bounding box regression problem into a probability distribution problem of predicting boundary distances, causing the probability distribution predicted by the network to focus on discrete values ​​near the target value.

10. The photovoltaic panel factory inspection method for industrial production lines according to claim 1, characterized in that, The steps of acquiring photovoltaic panel images using the image acquisition module (10) include: When the guiding edge of the photovoltaic panel is detected to be blocking the detection beam, a rising edge level signal is generated as an external hard trigger signal; The DC regulated power supply device responds to the external hard trigger signal by applying a forward bias voltage to the photovoltaic panel, thereby exciting near-infrared light; The industrial camera (11) using the global shutter exposure mode responds to the external hard trigger signal, and after a preset delay time, opens the photosensitive element for exposure, collects the near-infrared light excited by the positive bias voltage, and generates the photovoltaic panel image through a near-infrared imaging lens (12) that filters out the visible light band.