# An Edge-Guided Deep Learning Solar Panel Hotspot Thermal Image Segmentation Algorithm
###### Abstract  
To overcome the deficiencies in segmenting hot spots from thermal infrared images, such as difficulty extracting the edge features, low accuracy, and a high missed detection rate, an improved Mask R-CNN photovoltaic hot spot thermal image segmentation algorithm has been proposed in this paper. Firstly, the edge image features of hot spots were extracted based on residual neural networks. Secondly, by combining the feature pyramid structure, an edge-guided feature pyramid structure was designed, and the hot spot edge features were injected into a Mask R-CNN network. Thirdly, an infrared spatial attention module was introduced into the Mask R-CNN network when feature extraction and the infrared features of the detected hot spots were enhanced. Fourthly, the size ratio of the candidate frames was adjusted self-adaptively according to the structural characteristics of the aspect ratio of the hot spots. Finally, the validation experiments were conducted, and the results demonstrated that the hot spot contours of thermal infrared images were enhanced through the algorithm proposed in this paper, and the segmentation accuracy was significantly improved. photovoltaic hot spot; image segmentation; deep learning; edge guidance Article  
An Edge-Guided Deep Learning Solar Panel Hotspot Thermal Image Segmentation Algorithm. 202312202313110313  
distribution of the target. The energy of spontaneous radiation is low, and background radiation is easy to produce a large interference with the measurement results, which causes the low resolution of the hot spot image and fuzzy boundaries caused by thermal cross, limiting the improvement of hot spot detection accuracy. To solve the above problems, scholars around the world have proposed a series of processing algorithms that have been applied to photovoltaic hot spot image segmentation and achieved good results. [PERSON] et al. [6] proposed a fault diagnosis method that used ROI, contour lines, and histograms to analyze the applicability of thermal image processing and edge detection for defective photovoltaic modules, which provided promising detection results for the hotspot formations in specific defective cells in an observed module. Similar to [PERSON], [PERSON] et al. [7] also segment and detect internal defects and hot spots caused by external shading in PV models using morphological transformations and Canny edge detector algorithms. [PERSON] et al. [8] proposed an algorithm combining digital image processing with convolutional neural networks to automatically detect and classify photovoltaic faults. Firstly, the images were filtered using a Gaussian filter, the edges were highlighted through Laplacian operators, and then the fault area of the preprocessed image was segmented with a preset threshold. Finally, a dataset for training convolutional neural networks for fault classification was established with the segmented fault images, and validation experiments were conducted. The experimental results showed that the proposed method is very effective in automatic fault detection and classification of hot spots. [PERSON] et al. [9] proposed a hot spot detection method based on grayscale histogram curve fitting to address the problems of high random noise and non-uniform clutter in thermal images caused by complex environments and emissivity uncertainty, in which the least squares fitting technique was used to fit some points where hot spots can be separated from photovoltaic modules. The separated points were utilized as thresholds to segment the hot spots from the background. Applying the method to detect hot spots in outdoor PV modules, the results show that hotspots can be effectively detected in the obtained images where the noise generated during the image acquisition process is suppressed. To efficiently visualize the heat generated by different sediments on the surface of solar panels, [PERSON] et al. [10] proposed a watershed transform image segmentation technique based on marking the heated area of the observed thermal image pseudo-colors.