Search

CN-122024094-A - Two-stage photovoltaic bracket identification and statistics method and system based on improved SSD model

CN122024094ACN 122024094 ACN122024094 ACN 122024094ACN-122024094-A

Abstract

The invention belongs to the technical field of photovoltaic inspection, and particularly provides a two-stage photovoltaic bracket identification and statistics method and system based on an improved SSD model, comprising the steps of replacing a VGG skeleton in the SSD model with ResNet-50 to form the improved SSD model, distinguishing an orthographic image of an unmanned aerial vehicle to be processed based on the improved SSD model to obtain the boundary frame coordinates of all photovoltaic group strings, and removing overlapped boundary frames based on a non-maximum suppression algorithm to generate an ROI region set; preprocessing an ROI image, extracting all closed contours in the ROI image based on Canny operator edge detection, extracting the closed contours in an edge image, calculating the size of a contour circumscribed rectangle, setting a screening threshold, counting the number of contours conforming to the threshold, accumulating the number of supports of all ROI areas, and obtaining the total number of photovoltaic supports of the whole image. The method and the system carry out identification statistics on the number of the photovoltaic brackets, and solve the problem that the construction and operation and maintenance management of the photovoltaic station depend on manual investigation.

Inventors

  • JIANG JUN
  • XU TAO
  • WANG YANG
  • Ge Peijuan
  • ZHANG LING
  • XU MINGXI
  • WANG CHENYUE
  • ZOU YIBIN

Assignees

  • 上海勘测设计研究院有限公司

Dates

Publication Date
20260512
Application Date
20260105

Claims (10)

  1. 1. The two-stage photovoltaic bracket identification statistical method based on the improved SSD model is characterized by comprising the following steps of: The first stage comprises the steps of detecting photovoltaic strings and extracting ROI based on an improved SSD model, wherein VGG skeleton in the SSD model is replaced by ResNet-50 to form the improved SSD model, distinguishing the orthographic images of the unmanned aerial vehicle to be processed based on the improved SSD model to obtain the boundary frame coordinates of all the photovoltaic strings, and removing overlapped boundary frames based on a non-maximum suppression algorithm to generate an ROI region set; The second stage of recognizing and counting the number of the photovoltaic brackets in the ROI area, namely preprocessing the ROI image, extracting all closed contours in the ROI image based on Canny operator edge detection, extracting the closed contours in an edge image, calculating the size of a contour circumscribed rectangle, setting a screening threshold, and counting the number of contours conforming to the threshold Accumulating the number of stents for all ROI areas And obtaining the total number of the photovoltaic brackets of the whole image.
  2. 2. The method for two-stage photovoltaic rack identification statistics based on improved SSD model as recited in claim 1, characterized in that said first stage comprises the following sub-steps: S101, improving SSD model architecture design, namely replacing a VGG skeleton in an SSD model with ResNet-50; S102, data set construction and model training, namely acquiring image data sets of photovoltaic group strings under different conditions, and then training an improved SSD model constructed in the step S101; S103, detecting the photovoltaic group strings and extracting the ROIs, namely inputting the to-be-processed unmanned aerial vehicle orthographic image into a trained improved SSD model, outputting the boundary frame coordinates (x 1, y1, x2 and y 2) of all the photovoltaic group strings, removing the overlapped boundary frames based on a non-maximum suppression algorithm, and generating a ROI region set { R 1 ,R 2 ,...,R n }, wherein each ROI corresponds to an image region of one photovoltaic group string in the image.
  3. 3. The method according to claim 2, wherein in step S102, the collection of the image data sets of the photovoltaic strings under different conditions includes the photovoltaic string data sets of different seasons, time periods, and weather conditions.
  4. 4. The method for identifying and counting two-stage photovoltaic brackets based on the improved SSD model according to claim 2, wherein in the step S102, after collecting the image data sets of the photovoltaic strings under different conditions, a Mosaic data enhancement method is adopted to enhance the data of the collected image data.
  5. 5. The method for two-stage photovoltaic rack identification statistics based on improved SSD model as recited in claim 1, wherein the second stage comprises the following sub-steps: s201, preprocessing an ROI image; S202, performing combined operation of open operation and close operation on the preprocessed image to remove noise; S203, extracting all closed contours in the ROI image based on Canny operator edge detection; S204, screening and counting the number of the bracket contours, namely traversing all edges in the image, extracting a closed contour in an edge image, calculating the size of a rectangle circumscribed by the closed contour, setting a screening threshold according to the actual size of the photovoltaic bracket, and counting the number of the contours conforming to the threshold Namely the number of photovoltaic brackets in a single ROI area, and accumulating the bracket numbers of all the ROI areas And obtaining the total number of the photovoltaic brackets of the whole image.
  6. 6. The method according to claim 5, wherein the preprocessing of the ROI image in step S201 comprises the following steps: 1) Size normalization, namely scaling each ROI area to a fixed size, adopting bilinear interpolation to maintain the image proportion, and filling the blank area with gray; 2) The HSV threshold value filters and separates shadows, namely, the normalized RGB image is converted into an HSV color space, a threshold value interval is set according to the color characteristics of the photovoltaic bracket, a shadow area is filtered, a high-brightness non-shadow part is reserved, and the formula is expressed as follows: ; Wherein, the The pixels are formed in a pattern of pixels, For filtered pixel values, 255 is the remaining stent candidate, 0 is the background or shadow region, As the hue value of the pixel point, 、 The upper limit and the lower limit of the hue threshold are respectively, For the saturation value of the pixel point, 、 The upper limit and the lower limit of the saturation value are respectively, For the brightness value of the pixel point, 、 The brightness value upper limit and the brightness value lower limit are respectively; 3) Setting a gray threshold T, if the gray value of a pixel point in the image is greater than or equal to T, taking 255 as the pixel value, dividing the pixel point in the image into a foreground which is a photovoltaic group string and a bracket edge, otherwise, taking 0 as the pixel value, dividing the pixel point in the image into a background which is a part of the ROI region except the photovoltaic group string, wherein the expression is as follows: 。
  7. 7. The method for two-stage photovoltaic bracket recognition statistics based on the improved SSD model of claim 5, wherein in step S202, the noise-point removing operation of the combined operation of the open operation and the close operation is performed on the preprocessed image as follows: 1) And (3) performing operation, namely adopting 3X 3 rectangular structural elements to corrode and expand, removing dust on the surface of the bracket and removing small-area noise points, wherein the formula is as follows: ; 2) And (3) performing closed operation, namely filling small holes in the outline of the bracket by adopting 5X 5 rectangular structural elements to expand and then corrode, wherein the formula is as follows: ; Wherein: the corrosion formula is expressed as: ; the expansion formula is expressed as: 。 In the above expression, a is a processing object of an operation in an original image, B is a rectangular structural element of an operation rule, an open operation is a 3×3 rectangular structural element, and a closed operation is a 5×5 rectangular structural element.
  8. 8. The method according to claim 5, wherein in step S203, all closed contours in the ROI image are extracted based on Canny operator edge detection, and the method comprises the following steps: 1) Gaussian filtering, namely removing interference of high-frequency noise reduction noise on edge detection through a two-dimensional Gaussian kernel convolution image, wherein the two-dimensional Gaussian kernel function is as follows: ; wherein x and y are the coordinates of the pixels of the image, To control the smoothness of Gaussian filter, take ; 2) Gradient calculation, namely, carrying out kernel analysis on the Gaussian filtered image and the horizontal gradient respectively Vertical gradient core Convolving to obtain horizontal gradient Vertical gradient The amplitude and the direction of the edge are obtained by calculating the gradient of the image in the horizontal x and the vertical y directions, and the horizontal gradient is obtained Vertical gradient The calculation formula of (2) is as follows: ; Wherein, the In the form of a horizontal gradient core, In the form of a vertical gradient core, Is a Gaussian filtered image; Gradient amplitude The calculation formula is as follows: ; The gradient direction calculation formula is: ; Wherein, the Is the gradient direction; (3) Non-maximum suppression, namely vectorizing the gradient direction into 4 main directions, reserving a local gradient maximum value, and thinning the edge of the bracket to be single pixel wide; (4) And setting a hysteresis threshold, namely setting a high threshold and a low threshold to distinguish a strong edge from a weak edge, connecting the weak edge to the strong edge to form a complete edge, and finally outputting a bracket edge binary image.
  9. 9. The method for two-stage photovoltaic rack identification and statistics based on improved SSD model as recited in claim 5, wherein in said step S204, the closed contour circumscribed rectangle has a size of Width of the steel sheet Area of Aspect ratio 。
  10. 10. A two-stage photovoltaic stent identification statistical system based on an improved SSD model, comprising a memory and a processor, wherein the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform a two-stage photovoltaic stent identification statistical method based on an improved SSD model as set forth in any one of claims 1 to 9.

Description

Two-stage photovoltaic bracket identification and statistics method and system based on improved SSD model Technical Field The invention belongs to the technical field of photovoltaic inspection, and particularly relates to a two-stage photovoltaic bracket identification and statistics method and system based on an improved SSD model. Background In the construction of a photovoltaic station and operation and maintenance management, a traditional mode estimates the construction progress through manual on-site investigation and statistics of the installation quantity of photovoltaic group strings and panel brackets. The traditional manual statistics mode has the problems of low efficiency, large influence by environment and the like, and the digital construction and operation and maintenance management requirements of a large-scale photovoltaic station are difficult to meet. In the prior art, a single-stage deep learning method (such as original YOLO and fast R-CNN) is often adopted to directly detect the bracket, so that the hierarchical relation between the photovoltaic group string and the single bracket is easily confused, the bracket is small in size and dense in arrangement, and the detection overlapping rate is high and the omission rate is higher. If the pure traditional image processing (such as threshold segmentation and contour matching) is adopted, the method depends on the artificial design characteristics, cannot adapt to illumination changes (such as oblique light in the morning and evening) and shadow interference (such as vegetation/equipment shielding), and has low recognition accuracy in complex scenes. Therefore, a two-stage method combining deep learning strong feature extraction capability with traditional vision algorithm fine recognition processing is needed, and the problems of no mature, high precision and high detection speed of a feasible solution due to the fact that the construction and operation and maintenance management of a photovoltaic station rely on manual investigation are solved. Disclosure of Invention The invention aims to solve the technical problem of providing a two-stage photovoltaic bracket identification and statistics method and system based on an improved SSD model, which are used for identifying and counting the number of photovoltaic brackets and solving the problem that construction and operation and maintenance management of a photovoltaic station depend on manual investigation. In order to solve the technical problems, the technical scheme adopted by the invention is that the two-stage photovoltaic bracket identification and statistics method based on the improved SSD model comprises the following steps: The first stage comprises the steps of detecting photovoltaic strings and extracting ROI based on an improved SSD model, wherein VGG skeleton in the SSD model is replaced by ResNet-50 to form the improved SSD model, distinguishing the orthographic images of the unmanned aerial vehicle to be processed based on the improved SSD model to obtain the boundary frame coordinates of all the photovoltaic strings, and removing overlapped boundary frames based on a non-maximum suppression algorithm to generate an ROI region set; The second stage of recognizing and counting the number of the photovoltaic brackets in the ROI area, namely preprocessing the ROI image, extracting all closed contours in the ROI image based on Canny operator edge detection, extracting the closed contours in an edge image, calculating the size of a contour circumscribed rectangle, setting a screening threshold, and counting the number of contours conforming to the threshold Accumulating the number of stents for all ROI areasAnd obtaining the total number of the photovoltaic brackets of the whole image. In a preferred embodiment, the first stage comprises the following sub-steps: S101, improving SSD model architecture design, namely replacing a VGG skeleton in an SSD model with ResNet-50; S102, data set construction and model training, namely acquiring image data sets of photovoltaic group strings under different conditions, and then training an improved SSD model constructed in the step S101; S103, detecting the photovoltaic group strings and extracting the ROIs, namely inputting the to-be-processed unmanned aerial vehicle orthographic image into a trained improved SSD model, outputting the boundary frame coordinates (x 1, y1, x2 and y 2) of all the photovoltaic group strings, removing the overlapped boundary frames based on a non-maximum suppression algorithm, and generating a ROI region set { R 1,R2,...,Rn }, wherein each ROI corresponds to an image region of one photovoltaic group string in the image. In a preferred embodiment, in step S102, the collection of the image data sets of the photovoltaic strings under different conditions includes the collection of the photovoltaic string data sets under different seasons, periods, and weather conditions. In a preferred embodiment, in step S102