Photovoltaic module plate number recognition method, system and device based on image segmentation

CN122510171APending Publication Date: 2026-08-04XINTU (JIAXING) DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINTU (JIAXING) DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-04-23
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0003]针对现有技术未考虑光伏场景的干扰因素,导致光伏组件板块数准确性低的技术问题,本发明提供了基于图像分割的光伏组件板块数识别方法、系统及设备,通过获取多光伏组件图像中光伏组件的组件类型、干扰判定情况以及轮廓掩码,并将关联的组件类型、干扰判定情况、轮廓掩码以及多光伏组件图像中对应的单一光伏组件图像对初始图像分割模型进行训练,从而解决了现有技术未考虑光伏场景的干扰因素,导致光伏组件板块数准确性低的技术问题

Benefits of technology

通过获取多光伏组件图像中光伏组件的组件类型、干扰判定情况以及轮廓掩码,并将关联的组件类型、干扰判定情况、轮廓掩码以及多光伏组件图像中对应的单一光伏组件图像对初始图像分割模型进行训练,从而解决了现有技术未考虑光伏场景的干扰因素,导致光伏组件板块数准确性低的技术问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510171A_ABST
    Figure CN122510171A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, and device for identifying the number of photovoltaic (PV) modules based on image segmentation, belonging to the field of image processing technology. The method includes: acquiring images of multiple PV modules in several PV application scenarios and preprocessing these images; obtaining the module type, interference determination, and contour mask of the PV modules in the multiple PV module images through machine vision image processing; associating the module type, interference determination, and contour mask with corresponding single PV module images in the multiple PV module images, and training an initial image segmentation model constructed using an image segmentation algorithm to obtain a final image segmentation model; inputting the target multiple PV module image into the final image segmentation model to obtain the target contour mask, and using the number of target contour masks as the number of PV module modules. This invention solves the technical problem of low accuracy in counting PV module modules due to prior art failing to consider interference factors in PV scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to a method, system, and device for identifying the number of photovoltaic module panels based on image segmentation. Background Technology

[0002] As the global energy structure shifts towards clean energy, solar photovoltaic (PV) power generation, as an important form of renewable energy utilization, continues to expand its application in residential scenarios. Accurately determining the number of PV modules is crucial for all stages of residential rooftop PV module installation, operation and maintenance, power generation calculation, and insurance claims. Traditional PV module count primarily relies on manual on-site inspections, where staff arrive at the rooftop and count modules visually or using simple tools (such as measuring tapes) to estimate the number. Image segmentation models (such as Mask R-CNN and RetinaNet) possess powerful feature extraction capabilities and scene adaptability, demonstrating excellent performance in various fields such as industrial inspection and building recognition, providing a technological foundation for high-precision PV module segmentation and counting. However, existing conventional segmentation models do not consider interference factors in the PV scene during segmentation, making them susceptible to complex lighting and shading, resulting in blurred module boundary segmentation, missed detections, or false detections, ultimately leading to insufficient accuracy in PV module count. Summary of the Invention

[0003] To address the technical problem of low accuracy in counting photovoltaic modules due to existing technologies failing to consider interference factors in photovoltaic scenarios, this invention provides a photovoltaic module module counting method, system, and device based on image segmentation. By acquiring the module type, interference determination status, and contour mask of photovoltaic modules in multiple photovoltaic module images, and training an initial image segmentation model with the associated module type, interference determination status, contour mask, and the corresponding single photovoltaic module image from the multiple photovoltaic module images, this invention solves the technical problem of low accuracy in counting photovoltaic module modules caused by existing technologies failing to consider interference factors in photovoltaic scenarios.

[0004] To address the aforementioned technical problems, this invention provides a method for identifying the number of photovoltaic module panels based on image segmentation, comprising the following steps: Acquire images of multiple photovoltaic modules in several photovoltaic application scenarios, and preprocess the images of multiple photovoltaic modules; Machine vision image processing is used to obtain the component type, interference determination, and contour mask of photovoltaic modules in multi-photovoltaic module images; The component type, interference determination, and contour mask are associated with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and the initial image segmentation model constructed by the image segmentation algorithm is trained to obtain the final image segmentation model. The target multi-photovoltaic module image is input into the final image segmentation model to obtain the target contour mask, and the number of target contour masks is taken as the number of photovoltaic module panels.

[0005] Preferably, the preprocessing of the multi-photovoltaic module images includes: Images of multiple photovoltaic modules are scaled to a uniform size using a bilinear interpolation algorithm; Illumination correction is performed on images of multiple photovoltaic modules using an adaptive histogram equalization algorithm. Gaussian filtering is used to smooth the images of multiple photovoltaic modules, and median filtering is used to remove noise from the images of multiple photovoltaic modules. The edge enhancement algorithm is used to strengthen the borders of photovoltaic modules in images of multiple photovoltaic modules.

[0006] Preferably, the step of obtaining the photovoltaic module type, interference determination, and contour mask of the photovoltaic modules in the multi-photovoltaic module image through machine vision image processing includes: Texture features and straight edge features in the multi-photovoltaic module image are extracted by feature extraction algorithm. Based on the texture characteristics and straight edge features, the multi-photovoltaic module image is segmented to obtain the single photovoltaic module region, thereby obtaining the contour mask. Interference is determined by analyzing the brightness differences and texture features of a single photovoltaic module area. Based on the interference determination, the single photovoltaic module area is adaptively corrected. The texture features and straight edge features within the single photovoltaic module area are matched with the feature library of standard modules to obtain the module type.

[0007] Preferably, the step of segmenting the multi-photovoltaic module image based on texture characteristics and straight edge features to obtain a single photovoltaic module region includes: The straight edge features are completed according to the arrangement pattern of the component array. Several candidate regions are obtained based on the straight edge features. The texture features of the candidate regions are compared with the standard component feature library to obtain the confidence of the candidate regions. The candidate regions with confidence greater than or equal to the preset confidence are taken as photovoltaic component regions. The borders of the candidate regions with confidence less than the preset confidence are adjusted according to the adjacent photovoltaic component regions of the candidate regions with confidence less than the preset confidence. The adjusted candidate regions are also taken as photovoltaic component regions, thus obtaining a single photovoltaic component region.

[0008] Preferably, the step of obtaining interference determination results by measuring the brightness difference and texture features of a single photovoltaic module region includes: Obtain the grayscale mean and grayscale standard deviation of a single photovoltaic module area, determine the brightness anomaly range based on the grayscale mean and grayscale standard deviation, and determine the interference of a single photovoltaic module area whose grayscale mean is not within the brightness anomaly range and whose texture features match the standard module feature library to a degree greater than or equal to the preset matching degree as illumination anomaly. The texture features of a single photovoltaic module area are matched with the feature library of standard modules, and the interference of a single photovoltaic module area with a matching degree less than the preset matching degree is judged as surface anomaly. A single photovoltaic module area whose average grayscale value is within the abnormal brightness range and whose texture features match the standard component feature library to a degree greater than or equal to the preset matching degree is judged as normal.

[0009] Preferably, the step of adaptively correcting the single photovoltaic module region based on the interference determination, and matching the texture features and straight edge features within the single photovoltaic module region with a standard module feature library to obtain the module type, includes: If the interference is determined to be surface anomaly, the difference region between the interference region that causes the matching degree to be less than the preset matching degree and the single photovoltaic module region is obtained. The texture features in the difference region and the straight edge features of the single photovoltaic module region are matched with the standard module feature library to obtain the module type. If the interference is determined to be abnormal or normal lighting, the texture features and straight edge features within a single photovoltaic module area are matched with the standard module feature library to obtain the module type.

[0010] Preferably, the component type, interference determination, and contour mask are associated with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and the initial image segmentation model constructed by the image segmentation algorithm is trained to obtain the final image segmentation model, including: An initial image segmentation model was constructed using Mask R-CNN; The initial image segmentation model is trained by using the corresponding single photovoltaic module image as input, the module type and interference judgment as classification supervision labels, and the contour mask as segmentation supervision labels.

[0011] Preferably, the step of using the number of target contour masks as the number of photovoltaic module panels includes: Obtain the cross-connection ratio (CBR) among all target contour masks, and obtain the number of CBRs that are greater than the preset CBR. Use the difference between the number of target contour masks and the number of CBRs as the number of photovoltaic module panels.

[0012] By adopting the above technical solution, the present invention has the following advantages: By acquiring the component type, interference determination, and contour mask of photovoltaic modules in multi-photovoltaic module images, and training the initial image segmentation model with the associated component type, interference determination, contour mask, and the corresponding single photovoltaic module image in the multi-photovoltaic module images, the technical problem of low accuracy in counting photovoltaic module panels caused by the existing technology not considering the interference factors of photovoltaic scenarios is solved. By combining texture features and straight edge features to segment images of multiple photovoltaic modules, and completing edge features according to the arrangement pattern of the module array, along with confidence comparison and adjacent region border correction, the completeness and accuracy of photovoltaic module region extraction in densely arranged scenarios can be effectively improved, avoiding boundary breakage, adhesion, and missed detection problems. Through brightness differences and texture features, accurate interference judgment of abnormal lighting, surface anomalies, and normal areas is achieved. Differentiated feature matching strategies are adopted for different interference types, which can significantly reduce the impact of environmental interference such as complex lighting, shading, and stains on module type recognition, improving the robustness and accuracy of type recognition. By obtaining accurate and reliable contour masks, module types, and interference judgment information, and associating them with training the initial image segmentation model, the quality of model training data can be optimized from the source, enhancing the model's adaptability to complex photovoltaic scenarios. This enables efficient, accurate, and stable statistics of the number of photovoltaic module panels, meeting the practical application needs of automated photovoltaic inspection and maintenance.

[0013] The present invention also provides a photovoltaic module panel number recognition system based on image segmentation, comprising: The preprocessing module is used to acquire images of multiple photovoltaic modules under several photovoltaic application scenarios and to preprocess the images of the multiple photovoltaic modules. The training data acquisition module is used to acquire the component type, interference determination, and contour mask of photovoltaic modules in multi-photovoltaic module images through machine vision image processing; The model acquisition module is used to associate the component type, interference judgment status, and contour mask with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and to train the initial image segmentation model constructed by the image segmentation algorithm to obtain the final image segmentation model. The target acquisition module is used to input the target multi-photovoltaic module image into the final image segmentation model to obtain the target contour mask, and the number of target contour masks is used as the number of photovoltaic module panels.

[0014] By adopting the above technical solution, the present invention has the following advantages: By acquiring the component type, interference determination, and contour mask of photovoltaic modules in multiple photovoltaic module images, and training the initial image segmentation model with the associated component type, interference determination, contour mask, and the corresponding single photovoltaic module image in the multiple photovoltaic module images, the technical problem of low accuracy in counting photovoltaic module modules caused by the failure of existing technologies to consider interference factors in photovoltaic scenarios is solved.

[0015] The present invention also provides a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the photovoltaic module panel number recognition method based on image segmentation. Attached Figure Description

[0016] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings.

[0017] Figure 1 This is a flowchart illustrating the photovoltaic module panel number recognition method based on image segmentation of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only one preferred embodiment of this invention and are only used to explain this invention. They do not limit the scope of protection of this invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0019] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations (or steps) can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it may also have additional steps not included in the figures; the process may correspond to a method, function, procedure, subroutine, subroutine, etc.

[0020] Example 1: like Figure 1 As shown, the photovoltaic module panel number recognition method based on image segmentation includes the following steps: S1: Acquire images of multiple photovoltaic modules in several photovoltaic application scenarios and preprocess the images of multiple photovoltaic modules.

[0021] As an optional embodiment, the preprocessing of the multi-photovoltaic module images includes: Images of multiple photovoltaic modules are scaled to a uniform size using a bilinear interpolation algorithm; Illumination correction is performed on images of multiple photovoltaic modules using an adaptive histogram equalization algorithm. Gaussian filtering is used to smooth the images of multiple photovoltaic modules, and median filtering is used to remove noise from the images of multiple photovoltaic modules. The edge enhancement algorithm is used to strengthen the borders of photovoltaic modules in images of multiple photovoltaic modules.

[0022] In this embodiment, two types of acquisition methods are used to acquire images of multiple photovoltaic modules in several photovoltaic application scenarios: Professional acquisition: using an industrial-grade camera (such as Basler acA2500-14uc) with a wide-angle lens, setting the resolution to ≥2500×2000 pixels, and the shooting distance to 3-10 meters to ensure that the image clearly presents the details and boundaries of the modules; Convenient acquisition: supporting shooting with mobile devices such as mobile phones and tablets, requiring that the lens be kept at an angle of 30-60° to the roof plane during shooting, avoiding backlighting, and the image resolution to ≥1920×1080 pixels. The image acquisition for multiple photovoltaic modules needed to cover monocrystalline / polycrystalline silicon modules, different sizes such as 166mm / 182mm / 210mm, rectangular / misaligned installation methods, and interference scenarios such as dust accumulation, shading, and aging. A total of 10,000 images were collected. The image scale was expanded to 30,000 images by randomly flipping (50% probability horizontally and 50% vertically), randomly rotating from -15° to 15°, scaling from 0.8 to 1.2 times, adjusting brightness / contrast by ±20%, and adding random noise of ≤5% intensity, thereby improving the generalization ability of the subsequent model. The image preprocessing is as follows: ① Size standardization: The images of multiple photovoltaic modules are uniformly scaled to 1024×1024 pixels, and a bilinear interpolation algorithm is used to ensure that no details are lost; ② Illumination correction: The brightness and contrast are adjusted by the adaptive histogram equalization (CLAHE) algorithm to solve the problem of uneven brightness caused by strong light and shadow; ③ Noise removal: A 3×3 kernel Gaussian filter combined with a 5×5 kernel median filter is used to remove salt-and-pepper noise and Gaussian noise; ④ Edge enhancement: The Sobel operator is used to enhance the boundary features of the module border and adjacent modules, providing clear input for subsequent segmentation.

[0023] S2: Obtain the component type, interference determination, and contour mask of photovoltaic modules in the multi-photovoltaic module image through machine vision image processing.

[0024] In some embodiments, the step of obtaining the photovoltaic module type, interference determination, and contour mask of the photovoltaic modules in the multi-photovoltaic module image through machine vision image processing includes: Texture features and straight edge features in the multi-photovoltaic module image are extracted by feature extraction algorithm. Based on the texture characteristics and straight edge features, the multi-photovoltaic module image is segmented to obtain the single photovoltaic module region, thereby obtaining the contour mask. Interference is determined by analyzing the brightness differences and texture features of a single photovoltaic module area. Based on the interference determination, the single photovoltaic module area is adaptively corrected. The texture features and straight edge features within the single photovoltaic module area are matched with the feature library of standard modules to obtain the module type.

[0025] Specifically, the step of segmenting the multi-photovoltaic module image based on texture characteristics and straight edge features to obtain a single photovoltaic module region includes: The straight edge features are completed according to the arrangement pattern of the component array. Several candidate regions are obtained based on the straight edge features. The texture features of the candidate regions are compared with the standard component feature library to obtain the confidence of the candidate regions. The candidate regions with confidence greater than or equal to the preset confidence are taken as photovoltaic component regions. The borders of the candidate regions with confidence less than the preset confidence are adjusted according to the adjacent photovoltaic component regions of the candidate regions with confidence less than the preset confidence. The adjusted candidate regions are also taken as photovoltaic component regions, thus obtaining a single photovoltaic component region.

[0026] In this embodiment, the LBP (Local Binary Pattern) algorithm is specifically used, with a neighborhood radius of 3 and a sampling point count of 8. This extracts the texture features of the photovoltaic modules in the multi-PV module image (reflecting the surface roughness and texture distribution patterns of the modules). Simultaneously, HOG (Histogram of Oriented Gradients) features are extracted to enhance the discriminative power of the texture features. The Canny edge detection algorithm (threshold of 100-200) is used to extract all edges in the multi-PV module image. Then, Hough transform (rho precision of 1, theta precision of π / 180, voting threshold of 100) is used to extract straight edges, filtering out the straight edges corresponding to the PV module borders (excluding irrelevant straight lines in the background, such as supports and ground lines). The module array arrangement is as follows: PV modules are mostly in rectangular arrays, with parallel borders and uniform spacing between adjacent modules. The straight edge features are completed using the module array arrangement, thus correcting edge breaks caused by shading or uneven illumination (for example, if a PV module's border is missing 1 / 3 of a straight line, the missing straight edge is completed based on the border direction and spacing of adjacent modules). The standard component feature library contains the following: standard texture features and standard straight-line edge features (border size, edge spacing) of various photovoltaic (PV) components. Based on the completed straight-line edges, several candidate regions are divided (each candidate region corresponds to a potential PV component). The matching degree between the texture features of each candidate region and the texture features of each PV component in the standard component feature library is calculated, and the maximum matching degree is used as the confidence level of the candidate region. Candidate regions with a confidence level ≥ 0.8 (preset confidence level) are directly identified as single PV component regions. For candidate regions with a confidence level < 0.8 (mostly due to blurred edges or slight shading), their adjacent PV component regions with a confidence level ≥ 0.8 are obtained. Based on the border size and spacing of the PV components corresponding to the PV component regions, the border of the low-confidence candidate region is adaptively adjusted (for example, if the border width of adjacent PV components is 1.6m and the spacing is 0.1m, if the border width of the low-confidence region is 1.5m, it is adjusted to 1.6m to ensure consistency with the size of adjacent PV components). The adjusted low-confidence candidate regions are identified as single PV component regions. All individual photovoltaic module regions are aggregated and binarized (module regions are white, background is black) to generate the outline mask corresponding to each individual photovoltaic module.

[0027] Specifically, the interference determination process, which involves using brightness differences and texture features within a single photovoltaic module region to identify interference, includes: Obtain the grayscale mean and grayscale standard deviation of a single photovoltaic module area, determine the brightness anomaly range based on the grayscale mean and grayscale standard deviation, and determine the interference of a single photovoltaic module area whose grayscale mean is not within the brightness anomaly range and whose texture features match the standard module feature library to a degree greater than or equal to the preset matching degree as illumination anomaly. The texture features of a single photovoltaic module area are matched with the feature library of standard modules, and the interference of a single photovoltaic module area with a matching degree less than the preset matching degree is judged as surface anomaly. A single photovoltaic module area whose average grayscale value is within the abnormal brightness range and whose texture features match the standard component feature library to a degree greater than or equal to the preset matching degree is judged as normal.

[0028] Specifically, the adaptive correction of a single photovoltaic module region based on interference determination, and the feature matching of texture features and straight edge features within the single photovoltaic module region with a standard module feature library to obtain the module type, includes: If the interference is determined to be surface anomaly, the difference region between the interference region that causes the matching degree to be less than the preset matching degree and the single photovoltaic module region is obtained. The texture features in the difference region and the straight edge features of the single photovoltaic module region are matched with the standard module feature library to obtain the module type. If the interference is determined to be abnormal or normal lighting, the texture features and straight edge features within a single photovoltaic module area are matched with the standard module feature library to obtain the module type.

[0029] In this embodiment, the OpenCV algorithm is used to calculate the mean grayscale value and standard deviation of grayscale values ​​for each individual photovoltaic module region (the mean grayscale value reflects the overall brightness of the region, and the standard deviation reflects the brightness uniformity of the region). Based on the mean grayscale value and standard deviation, the 3σ principle is used to determine the brightness anomaly range. The calculated mean grayscale value is compared with the brightness anomaly range (e.g., 120-180). Simultaneously, the texture features of this region are matched with a standard module feature library, and the matching degree is calculated. If the mean grayscale value is not within the 120-180 range (i.e., <120 or >180), and the matching degree between the texture features and the standard module feature library is ≥0.75 (preset matching degree), then the individual photovoltaic module is considered to be... The interference type for the module area is "abnormal illumination" (e.g., strong sunlight on a sunny day causes the grayscale mean to be 200 and the texture matching degree to be 0.82, which is judged as abnormal illumination). If the matching degree between the texture feature and the standard module feature library is <0.75, regardless of whether the grayscale mean is within the normal range, the interference type for this single photovoltaic module area is judged as "surface abnormality" (surface abnormalities include shading, stains, etc., for example, if there are leaves shading the module surface, the texture matching degree is 0.68, which is judged as surface abnormality). If the grayscale mean is in the range of 120-180 and the matching degree between the texture feature and the standard module feature library is ≥0.75, then this single photovoltaic module area is judged as "normal" (no obvious interference). If the interference condition is "surface anomaly", an image difference algorithm is used to perform a difference operation between the single photovoltaic module area and the standard module image to obtain the interference area (i.e., the area where the shading or stains are located) that causes the matching degree to be lower than 0.75. The difference area between this area and the single photovoltaic module area (i.e., the clean module area after removing the interference area) is extracted to complete the area correction. If the interference condition is "lighting anomaly" or "normal", there is no need to perform area removal correction on the single photovoltaic module area. Only the complete single photovoltaic module area needs to be retained (lighting anomaly only affects brightness and does not affect the effectiveness of texture features and straight edge features). For abnormal surface areas: the texture features of the difference area are combined with the complete straight edge features of a single photovoltaic module area and matched with the standard module feature library. The module type with the highest matching degree is selected as the module type of the area (for example, the texture features of the difference area match the standard features of monocrystalline silicon modules with a degree of 0.81, which is higher than that of polycrystalline silicon (0.72) and thin film (0.65), so it is determined to be a monocrystalline silicon module). For areas with abnormal or normal illumination: the complete texture features and straight edge features of a single photovoltaic module area are directly matched with the standard module feature library. The module type with the highest matching degree is selected as the module type of the area.

[0030] By combining texture features and straight edge features to segment images of multiple photovoltaic modules, and completing edge features according to the arrangement pattern of the module array, along with confidence comparison and adjacent region border correction, the completeness and accuracy of photovoltaic module region extraction in densely arranged scenarios can be effectively improved, avoiding boundary breakage, adhesion, and missed detection problems. Accurate interference determination of abnormal lighting, surface anomalies, and normal areas is achieved through brightness differences and texture features. Differentiated feature matching strategies are adopted for different interference types, which can significantly reduce the impact of environmental interference such as complex lighting, shading, and stains on module type recognition, improving the robustness and accuracy of type recognition. By obtaining accurate and reliable contour masks, module types, and interference determination information, reliable labeled data is provided for subsequent image segmentation model training, ensuring the model's segmentation accuracy from the source.

[0031] S3: Associate the component type, interference determination, and contour mask with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and train the initial image segmentation model constructed by the image segmentation algorithm to obtain the final image segmentation model.

[0032] In some embodiments, associating the component type, interference determination, and contour mask with the corresponding single photovoltaic component image in a multi-photovoltaic component image, and training the initial image segmentation model constructed by the image segmentation algorithm to obtain the final image segmentation model, includes: An initial image segmentation model was constructed using Mask R-CNN; The initial image segmentation model is trained by using the corresponding single photovoltaic module image as input, the module type and interference judgment as classification supervision labels, and the contour mask as segmentation supervision labels.

[0033] In this embodiment, Mask R-CNN is used as the core architecture, and ResNet-50-FPN is used as the backbone network to construct an initial image segmentation model for residential photovoltaic modules. To enable the model to quickly learn common visual features such as object detection and contour segmentation, the model is first pre-trained based on the open-source COCO dataset, and the official pre-trained weights are loaded. These weights have been learned through massive amounts of general scene data and already possess basic semantic logic such as object recognition and contour perception, providing high-quality initialization parameters for subsequent photovoltaic module-specific tasks. The model training adopts a phased fine-tuning strategy, balancing feature transfer efficiency and task adaptability: In the first phase, the first 10 layers of the ResNet-50-FPN backbone network are frozen, and only the detection and segmentation head network of the model is trained. The learning rate is set to 0.001, and iterative training is conducted for 50 epochs to allow the model to quickly adapt to the features specific to photovoltaic modules. In the second phase, the entire network layer of the model is unfrozen, and full fine-tuning is performed. The learning rate is reduced to 0.0001, and training is conducted continuously for 100 epochs to deeply optimize the global parameters. The training data of the entire network layer is coupled with photovoltaic module type, interference label, contour mask, and single-module slice image to achieve accurate end-to-end segmentation and recognition. During the fine-tuning training of this full network layer, component type and interference judgment status are used as classification supervision labels, and contour mask is used as segmentation supervision labels. This allows the model to simultaneously perceive component category features and interference state features during the learning process, and to jointly learn based on the inherent relationship between component type, interference status, and contour boundary. This ensures that the model fully learns the inherent relationship between component type, interference judgment status, and contour mask, and fully considers the impact of component type differences and interference factors on the segmentation results. This effectively improves the accuracy and reliability of photovoltaic module contour segmentation, thereby improving the accuracy of photovoltaic module panel count. Before training, the model needs to be specifically adapted and configured: the input image size is uniformly set to 1024×1024 pixels; combined with the actual size of residential photovoltaic modules, the anchor frame scale is optimized to (64,128), (128,256), and (256,512), with three aspect ratios of 1:1, 3:2, and 2:3 to improve target matching accuracy; the batch size is set to 8 to adapt to the NVIDIA RTX 3090 GPU memory and computing power. The optimizer used is SGD with a momentum of 0.9 and weight decay of 0.0001. The loss function combines cross-entropy loss and Dice loss to effectively alleviate class imbalance and enhance segmentation accuracy. The entire model is trained using a single NVIDIA RTX 3090 GPU. During training, model performance is evaluated on the validation set every 10 epochs, with the core metrics being the mean intersection-over-union ratio (mIoU) and object recognition accuracy. An early stopping strategy is also introduced: if the validation set accuracy does not improve for 20 consecutive epochs, training is immediately terminated, and the optimal model weights are automatically saved to avoid overfitting and improve training efficiency.

[0034] S4: Input the target multi-photovoltaic module image into the final image segmentation model to obtain the target contour mask, and use the number of target contour masks as the number of photovoltaic module panels.

[0035] Specifically, the step of using the number of target contour masks as the number of photovoltaic module panels includes: Obtain the cross-connection ratio (CBR) among all target contour masks, and obtain the number of CBRs that are greater than the preset CBR. Use the difference between the number of target contour masks and the number of CBRs as the number of photovoltaic module panels.

[0036] Understandably, the intersection-to-union ratio (CTU) refers to the degree of overlap between two contour masks, with a value ranging from 0 to 1. By calculating the CTU between target contour masks and removing those with CTUs greater than a preset value from the total number of masks, the problem of the same photovoltaic module being repeatedly detected and having multiple contour masks generated can be effectively eliminated. This avoids an overestimation of the number of modules due to repeated detection, thus significantly improving the accuracy and robustness of the photovoltaic module module count. Before obtaining the CTU, mask optimization is required, which involves morphological dilation and erosion to eliminate burrs and voids at the mask edges.

[0037] Example 2: This embodiment also provides a photovoltaic module panel count recognition system based on image segmentation, applicable to the aforementioned photovoltaic module panel count recognition method based on image segmentation, including: The preprocessing module is used to acquire images of multiple photovoltaic modules under several photovoltaic application scenarios and to preprocess the images of the multiple photovoltaic modules. The training data acquisition module is used to acquire the component type, interference determination, and contour mask of photovoltaic modules in multi-photovoltaic module images through machine vision image processing; The model acquisition module is used to associate the component type, interference judgment status, and contour mask with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and to train the initial image segmentation model constructed by the image segmentation algorithm to obtain the final image segmentation model. The target acquisition module is used to input the target multi-photovoltaic module image into the final image segmentation model to obtain the target contour mask, and the number of target contour masks is used as the number of photovoltaic module panels.

[0038] Example 3: This embodiment also provides a computer device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the photovoltaic module panel number recognition method based on image segmentation.

[0039] The specific embodiments described above are preferred embodiments of the photovoltaic module panel number recognition method, system and device based on image segmentation of the present invention, and are not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to the specific embodiments described above. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.

Claims

1. A method for identifying the number of photovoltaic module panels based on image segmentation, characterized in that, Includes the following steps: Acquire images of multiple photovoltaic modules in several photovoltaic application scenarios, and preprocess the images of multiple photovoltaic modules; Machine vision image processing is used to obtain the component type, interference determination, and contour mask of photovoltaic modules in multi-photovoltaic module images; The component type, interference determination, and contour mask are associated with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and the initial image segmentation model constructed by the image segmentation algorithm is trained to obtain the final image segmentation model. The target multi-photovoltaic module image is input into the final image segmentation model to obtain the target contour mask, and the number of target contour masks is taken as the number of photovoltaic module panels.

2. The photovoltaic module panel number recognition method based on image segmentation according to claim 1, characterized in that, The preprocessing of images of multiple photovoltaic modules includes: Images of multiple photovoltaic modules are scaled to a uniform size using a bilinear interpolation algorithm; Illumination correction is performed on images of multiple photovoltaic modules using an adaptive histogram equalization algorithm. Gaussian filtering is used to smooth the images of multiple photovoltaic modules, and median filtering is used to remove noise from the images of multiple photovoltaic modules. The edge enhancement algorithm is used to strengthen the borders of photovoltaic modules in images of multiple photovoltaic modules.

3. The photovoltaic module panel number recognition method based on image segmentation according to claim 1, characterized in that, The step of obtaining the photovoltaic module type, interference determination, and contour mask of multiple photovoltaic module images through machine vision image processing includes: Texture features and straight edge features in the multi-photovoltaic module image are extracted by feature extraction algorithm. Based on the texture characteristics and straight edge features, the multi-photovoltaic module image is segmented to obtain the single photovoltaic module region, thereby obtaining the contour mask. Interference is determined by analyzing the brightness differences and texture features of a single photovoltaic module area. Based on the interference determination, the single photovoltaic module area is adaptively corrected. The texture features and straight edge features within the single photovoltaic module area are matched with the feature library of standard modules to obtain the module type.

4. The photovoltaic module panel number recognition method based on image segmentation according to claim 3, characterized in that, The step of segmenting multi-photovoltaic module images based on texture characteristics and straight edge features to obtain a single photovoltaic module region includes: The straight edge features are completed according to the arrangement pattern of the component array. Several candidate regions are obtained based on the straight edge features. The texture features of the candidate regions are compared with the standard component feature library to obtain the confidence of the candidate regions. The candidate regions with confidence greater than or equal to the preset confidence are taken as photovoltaic component regions. The borders of the candidate regions with confidence less than the preset confidence are adjusted according to the adjacent photovoltaic component regions of the candidate regions with confidence less than the preset confidence. The adjusted candidate regions are also taken as photovoltaic component regions, thus obtaining a single photovoltaic component region.

5. The photovoltaic module panel number recognition method based on image segmentation according to claim 3, characterized in that, The method of obtaining interference determination results by analyzing the brightness differences and texture features of a single photovoltaic module region includes: Obtain the grayscale mean and grayscale standard deviation of a single photovoltaic module area, determine the brightness anomaly range based on the grayscale mean and grayscale standard deviation, and determine the interference of a single photovoltaic module area whose grayscale mean is not within the brightness anomaly range and whose texture features match the standard module feature library to a degree greater than or equal to the preset matching degree as illumination anomaly. The texture features of a single photovoltaic module area are matched with the feature library of standard modules, and the interference of a single photovoltaic module area with a matching degree less than the preset matching degree is judged as surface anomaly. A single photovoltaic module area whose average grayscale value is within the abnormal brightness range and whose texture features match the standard component feature library to a degree greater than or equal to the preset matching degree is judged as normal.

6. The photovoltaic module panel number recognition method based on image segmentation according to claim 5, characterized in that, The adaptive correction of a single photovoltaic module region based on interference determination, and the matching of texture features and straight edge features within the single photovoltaic module region with a standard module feature library to obtain the module type, includes: If the interference is determined to be surface anomaly, the difference region between the interference region that causes the matching degree to be less than the preset matching degree and the single photovoltaic module region is obtained. The texture features in the difference region and the straight edge features of the single photovoltaic module region are matched with the standard module feature library to obtain the module type. If the interference is determined to be abnormal or normal lighting, the texture features and straight edge features within a single photovoltaic module area are matched with the standard module feature library to obtain the module type.

7. The photovoltaic module panel number recognition method based on image segmentation according to claim 1, characterized in that, The step of associating component type, interference determination, and contour mask with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and training the initial image segmentation model constructed by the image segmentation algorithm to obtain the final image segmentation model, includes: An initial image segmentation model was constructed using Mask R-CNN; The initial image segmentation model is trained by using the corresponding single photovoltaic module image as input, the module type and interference judgment as classification supervision labels, and the contour mask as segmentation supervision labels.

8. The photovoltaic module panel number recognition method based on image segmentation according to claim 1, characterized in that, The method of using the number of target contour masks as the number of photovoltaic module panels includes: Obtain the cross-connection ratio (CBR) among all target contour masks, and obtain the number of CBRs that are greater than the preset CBR. Use the difference between the number of target contour masks and the number of CBRs as the number of photovoltaic module panels.

9. A photovoltaic module panel count recognition system based on image segmentation, applicable to the photovoltaic module panel count recognition method based on image segmentation as described in any one of claims 1-8, characterized in that, include: The preprocessing module is used to acquire images of multiple photovoltaic modules under several photovoltaic application scenarios and to preprocess the images of the multiple photovoltaic modules. The training data acquisition module is used to acquire the component type, interference determination, and contour mask of photovoltaic modules in multi-photovoltaic module images through machine vision image processing; The model acquisition module is used to associate the component type, interference judgment status, and contour mask with the corresponding single photovoltaic component image in the multi-photovoltaic component image, and to train the initial image segmentation model constructed by the image segmentation algorithm to obtain the final image segmentation model. The target acquisition module is used to input the target multi-photovoltaic module image into the final image segmentation model to obtain the target contour mask, and the number of target contour masks is used as the number of photovoltaic module panels.

10. A computer device, characterized in that: include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the photovoltaic module panel number recognition method based on image segmentation as described in any one of claims 1-8.