Mountain photovoltaic panel identification and counting system based on rotating target detection
By using image stitching and aliquot module and YOLOv8-OBB rotation object detection algorithm in the mountain photovoltaic panel recognition and counting system, the counting deviation caused by the overlapping and angle changes of photovoltaic panels in the mountain photovoltaic panel recognition counting is solved, and efficient and accurate photovoltaic panel unit counting is achieved.
Patent Information
- Application Number
- CN202510089870.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
In the identification and counting of mountain photovoltaic panels, the prior art has problems such as duplicate viewing of drone data acquisition routes, overlapping photovoltaic panel images caused by the deviation of mountain conditions and data acquisition angles, and changing photovoltaic panel angles, resulting in difficulty in detecting and positioning of photovoltaic panels and serious counting deviations.
A mountain photovoltaic panel identification and counting system based on rotation target detection is adopted. The system consists of three modules: image stitching and aliquoting, photovoltaic panel positioning and edge deduplication, and unit counting. The photovoltaic counting task of the drone cruise image is converted into detection and split edge processing tasks for a small number of images through image stitching and aliquoting modules. The rotation target positioning and unit counting of the photovoltaic panel are used using the YOLOv8-OBB rotation target detection algorithm and corner point detection algorithm.
The system reduces the deduplication complexity of target counts between images through image stitching and splitting modules, introduces a rotary object detection algorithm to solve the problem of adjacent positioning overlap between photovoltaic panel targets in mountainous conditions, improves the accuracy of unit counting of photovoltaic panels, and realizes a complete, accurate and efficient unit counting system for mountain photovoltaic panels.
Smart Images

Figure CN120047854A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of unmanned aerial vehicles, and in particular to a mountain photovoltaic panel recognition and counting system based on rotating target detection. Background Art
[0002] At present, the identification and counting of photovoltaic panels by drones is prone to difficulties in photovoltaic panel detection and positioning, and serious counting deviations due to problems such as repeated field of view of the drone data collection route, overlapping photovoltaic panel images caused by mountainous conditions and data collection angle offset, and changes in the angle of photovoltaic panels under mountainous conditions.
[0003] Based on the machine vision recognition capability, the identification and counting of photovoltaic panels by drones is realized through two processes: photovoltaic panel positioning and photovoltaic panel counting. The difference between most existing works lies in the realization of photovoltaic panel positioning. In existing work, photovoltaic panel positioning is often realized based on traditional algorithms or deep learning algorithms. Traditional algorithms usually use traditional artificial operators to extract image features and combine traditional classifiers to determine and confirm the positioning target, such as the Haar operator and Adaboost classification algorithm, HOG feature and SVM classification algorithm; deep learning target detection algorithms use the integrated structure of feature extraction and classification recognition of neural networks to quickly identify photovoltaic panel targets, such as DETR, Yolov5 and other target detection algorithms. However, due to the tilt of photovoltaic panels in mountainous areas, the target detection algorithm has problems such as high degree of intersection of bounding boxes and repeated influence between multiple targets in the bounding box when positioning photovoltaic panels, which leads to higher statistical errors when counting mountainous photovoltaic panels. Summary of the invention
[0004] The purpose of the present invention is to provide a mountain photovoltaic panel identification and counting system based on rotating target detection, which solves the problems raised in the background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions: A mountain photovoltaic panel recognition and counting system based on rotating target detection consists of three modules: image stitching and equal division, photovoltaic panel positioning and edge deduplication, and unit counting. Together, they complete the task of unit counting of photovoltaic panels in mountainous environments. Each module performs serial processing to form a system data processing flow.
[0006] Preferably, the image stitching and equal division module fuses and stitches the image sequence collected by the drone route into a global image, and divides the global image into equal parts to reduce the computing resource requirements; the photovoltaic panel positioning module uses an algorithm model to locate and identify mountain photovoltaic panels in each equal-divided image, and designs edge deduplication rules to deduplicate and combine photovoltaic panels with overlapping geographical locations between adjacent equal-divided images; finally, the unit counting module uses a corner point detection method to accurately count the number of photovoltaic panel units.
[0007] Preferably, the image stitching and equal division module is mainly responsible for receiving the image information collected by the drone through the data receiving service, and then stitching and merging multiple photos taken by the drone into a global image through the image stitching tool supporting the drone, and finally dividing the global image into multiple equally divided images in equal proportions through the script tool and the image tool, and performing image enhancement preprocessing to form an equally divided image sequence with relatively low inference cost and distinct target features. The module is divided into three functional blocks according to its functions: data receiving service, image stitching processing, and image segmentation and enhancement processing. The specific data processing function is described as follows: 1) Data receiving service: responsible for receiving the parameter information such as the image path pth to be processed, the equal division parameter cut, the model inference threshold thresh, etc. passed in the service request, and performing image format and integrity verification under the image path to be processed; 2) Image stitching processing: Responsible for reconstructing the image sequence under the processing path into a global image through the DJI Zhitu software tool. The specific processing is to use the image data collected by the drone and the .MRK geographic location information file and .csv image control point file as tool input, and use the DJI Zhitu software tool to perform two-dimensional reconstruction of the images collected by the drone mountain photovoltaic panels to generate a global image image cpt; 3) Image segmentation enhancement processing: responsible for dividing the global image image according to the equal division parameter c received by the service cpt Geometric segmentation to form an equally divided image sequence image_cuts:[img_cut 1, img_cut 2,..., img_cut c×c, ] and perform contrast enhancement on each equally divided image in the sequence to improve the edge contour information of the photovoltaic panel in the image.
[0008] Preferably, the photovoltaic panel positioning and edge deduplication module is mainly responsible for positioning and identifying the overall target of the photovoltaic panel in a mountainous environment through the photovoltaic panel detection algorithm model reasoning for the image sequence image_cuts after equal division; by designing edge deduplication rules, the intersection and difference relationship of the positioning rectangular frame is used to combine and deduplication the edge targets in adjacent equal-divided images; 1) Mountain photovoltaic panel detection model The mountain photovoltaic panel detection model uses machine vision to identify UAV remote sensing images and identify and locate the photovoltaic panel targets contained therein. The model is implemented using the YOLOv8-OBB rotating target detection algorithm. The algorithm introduces a rotating bounding box in the YOLOv8 algorithm framework to solve the problem that the traditional target detection method is difficult to accurately cover with a rectangular box when dealing with long strips, irregular shapes or objects with a specific direction. YOLOv8-OBB uses a rotating bounding box (OBB) to more accurately surround objects with a specific direction by introducing angle information, thereby improving detection accuracy; In the YOLOv8-OBB algorithm, the anchor-free mechanism is used to reduce the dependence on predefined anchor points, reduce the complexity of the model, make the model easier to train and generalize, and improve the accuracy of detection, especially when dealing with small-sized objects. The multi-scale feature fusion strategy can better utilize feature information of different scales, improve the detection ability of targets of different scales, and enable the model to have a good detection effect on rotating targets of different sizes. The non-maximum suppression algorithm is used to screen out the most likely object position, reduce redundant detection results, and improve detection reliability in complex scenes. The mountain photovoltaic panel detection model takes the equally divided image sequence image_cuts and the detection threshold thresh as input, and performs a i Perform the rotation target positioning of the photovoltaic panel, limit the detection of non-photovoltaic targets according to the detection threshold thresh, and obtain the positioning result list of photovoltaic targets plate_detec:[land 1 , land 2 ,...,land n ], among which land i Table 1: Location information of the i-th bread target, land i It is in the form of {x, y, w, h, a}, which represents the coordinates and rotation angle of the positioning frame; 2) Edge deduplication Edge deduplication is mainly based on the equally divided image, the photovoltaic positioning result plate_detec, and the deduplication edge range a. The edge deduplication rule is designed by using the relationship between the photovoltaic positioning rectangular frames, and the photovoltaic positioning results are deduplicated and combined for the equally divided segmented edges of adjacent equally divided images. The specific calculation process is described as follows: For the two equally divided images img_c adjacent to each other A 、img_c B , ① Edge deduplication area division: According to the width W, height H and edge range a of the left image, a rectangular deduplication area with an edge range of Area_M: {(WW / a,0), (W+W / a,0), (W+W / a,H), (WW / a,H)} is defined; ② Edge target collection: According to the deduplication area Area_M, the image img_c is divided equally A 、img_c B PV panel positioning results plate_detec A 、plate_detec B The location target land that has an intersection and inclusion relationship with the deduplication area i Filter and obtain the target Land_M to be removed: {land 1 ,land 2 ,...,land k}; ③ Edge deduplication: Treat each location land in the deduplication target Land_M i With all other targeting {land 1 ,land 2 ,,...,land i-1 ,land i+1 ,...,land k}, calculate the intersection and inclusion relationship of the rectangular frames, perform a rectangular union operation on the positioning target frames that have an intersection relationship, and delete the positioning target frames with a smaller area in the inclusion relationship; ④ Edge merging: Set the edge merging distance threshold t, and filter the positioning targets whose corner point distances of the positioning target frame near the deduplication edge are less than t for the Land_M deduplication results in the ③ edge deduplication stage, and perform rectangular merging operations on the positioning frames with the same angle and similar corner point distances of the positioning target frames; The edge deduplication calculation is performed on all adjacent equally divided images, and the deduplication results of each image are summarized to obtain the global image photovoltaic positioning result P_Detec, which has the same structure as plate_detec.
[0009] Preferably, the unit counting module is mainly responsible for performing image segmentation to cut out a single photovoltaic target image for the photovoltaic target detected in the global image, and using a corner point detection method to detect photovoltaic corner points in the photovoltaic image, and statistically calculating the corner points to realize photovoltaic panel unit counting; 1) Photovoltaic target image segmentation: Based on the global image cpt , the global image photovoltaic positioning result P_Detec, using P_Detec to locate each photovoltaic target in the image cptThe image is cut on the plate, and the image is corrected by using the positioning information of each photovoltaic panel to perform image affine transformation, and the single photovoltaic image set img_ plates: {img_p 1 ,img_p 2 ,,...,img_p m}, where img_p i represents a single photovoltaic target image; 2) Corner point detection and rule statistics The corner detection method is implemented based on the YOLOv8 target detection algorithm. Compared with the same type of target detection algorithms, the YoloV8 algorithm achieves good detection performance and classification performance at the same time, and is currently the only detector that can still exceed 30FPS under high precision (optimal accuracy 56.8% AP). The algorithm can adaptively constrain the size range of the detection target to achieve the effect of accelerating detection and reducing false detection. It is also lighter and more efficient among the same type of detection algorithms. Compared with the traditional method of artificial operators in corner detection work, the deep learning method has better practical application robustness. Using a small amount of manually annotated samples can achieve performance higher than traditional image processing methods such as canny edge detection operators, and using the batch inference calculation of the lightweight model YOLOv8 model, fast corner detection can be achieved; By placing each single photovoltaic target image img_plates in the single photovoltaic image set img_plates i Perform corner point detection model inference, and count the photovoltaic panel units according to the number of detected corner points p:
[0010] The function num represents the unit counting process, k represents the actual number of photovoltaic panel assembly row units, and k is usually 4.
[0011] Compared with the prior art, the present invention has the following beneficial effects: The present invention utilizes image stitching and geometric splitting counting process to transform the photovoltaic counting task of UAV cruise images into detection and splitting edge processing tasks of a small number of images, thereby simplifying the repeated counting processing tasks caused by the overlapping geographical locations between photovoltaic panel images.
[0012] The cruise image sequence is converted into a small number of equally divided, non-overlapping images through the image stitching and splitting module, reducing the complexity of target counting deduplication between images; by introducing the YoloV8 rotating target detection algorithm and corner detection algorithm to locate the photovoltaic panels in the equally divided images, the problem of adjacent positioning overlap between multi-angle photovoltaic panel targets in mountainous conditions is solved, and a reliable data basis is also provided for the processing of photovoltaic panel positioning information at the equally divided edges, thereby improving the accuracy of photovoltaic panel unit counting statistics and realizing a complete, accurate and efficient mountain photovoltaic panel unit counting system. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a working example diagram of the image stitching tool of the present invention; Figure 3 The edge deduplication work of the present invention is aimed at processing the positioning frame overlapped and split problem graph of the equally divided edge; Figure 4 This is an example diagram of image stitching and equal division visualization of the present invention; Figure 5 This is a visualization example diagram of rotating target detection of mountain photovoltaic panels according to the present invention; Figure 6 This is an example diagram of the visualization of the photovoltaic panel unit counting corner point detection data of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0015] See also Figure 1-6 A mountain photovoltaic panel recognition and counting system based on rotating target detection is composed of three modules: image stitching and equal division, photovoltaic panel positioning and edge deduplication, and unit counting. Together, they complete the task of unit counting of photovoltaic panels in mountainous environments. Each module is processed serially to form a system data processing flow.
[0016] Specifically, the image stitching and equal division module fuses and stitches the image sequences collected by the drone route into a global image, and divides the global image into equal parts to reduce the computing resource requirements; the photovoltaic panel positioning module uses an algorithm model to locate and identify mountain photovoltaic panels in each equal-divided image, and designs edge deduplication rules to deduplicate and combine photovoltaic panels with overlapping geographical locations between adjacent equal-divided images; finally, the unit counting module uses the corner detection method to accurately count the number of photovoltaic panel units.
[0017] Specifically, the image stitching and segmentation module is mainly responsible for receiving the image information collected by the drone through the data receiving service, and then stitching and merging multiple photos taken by the drone into a global image through the image stitching tool supporting the drone. Finally, the global image is divided into multiple equally divided images in equal proportions through the script tool and the image tool, and image enhancement preprocessing is performed to form an equally divided image sequence with relatively low inference cost and distinct target features. The module is divided into three functional blocks according to its functions: data receiving service, image stitching processing, and image segmentation and enhancement processing. The specific data processing functions are described as follows: 3) Data receiving service: responsible for receiving the parameter information such as the image path pth to be processed, the equal division parameter cut, the model inference threshold thresh, etc. passed in the service request, and performing image format and integrity verification under the image path to be processed; 4) Image stitching processing: Responsible for reconstructing the image sequence under the processing path into a global image through the DJI Zhitu software tool. The specific processing is to use the image data collected by the drone and the .MRK geographic location information file and .csv image control point file as tool input, and use the DJI Zhitu software tool to perform two-dimensional reconstruction of the images collected by the drone mountain photovoltaic panels to generate a global image image cpt; 3) Image segmentation enhancement processing: responsible for dividing the global image image according to the equal division parameter c received by the service cpt Geometric segmentation to form an equally divided image sequence image_cuts:[img_cut 1, img_cut 2,..., img_cut c×c, ] and perform contrast enhancement on each equally divided image in the sequence to improve the edge contour information of the photovoltaic panel in the image.
[0018] Specifically, the photovoltaic panel positioning and edge deduplication module is mainly responsible for positioning and identifying the overall target of photovoltaic panels in mountainous environments through the photovoltaic panel detection algorithm model reasoning for the image sequence image_cuts after equal division; by designing edge deduplication rules, the intersection and difference relationship of the positioning rectangle frame is used to combine and deduplication the edge targets in adjacent equal division images; 1) Mountain photovoltaic panel detection model The mountain photovoltaic panel detection model uses machine vision to identify UAV remote sensing images and identify and locate the photovoltaic panel targets contained therein. The model is implemented using the YOLOv8-OBB rotating target detection algorithm. The algorithm introduces a rotating bounding box in the YOLOv8 algorithm framework to solve the problem that the traditional target detection method is difficult to accurately cover with a rectangular box when dealing with long strips, irregular shapes or objects with a specific direction. YOLOv8-OBB uses a rotating bounding box (OBB) to more accurately surround objects with a specific direction by introducing angle information, thereby improving detection accuracy; In the YOLOv8-OBB algorithm, the anchor-free mechanism is used to reduce the dependence on predefined anchor points, reduce the complexity of the model, make the model easier to train and generalize, and improve the accuracy of detection, especially when dealing with small-sized objects. The multi-scale feature fusion strategy can better utilize feature information of different scales, improve the detection ability of targets of different scales, and enable the model to have a good detection effect on rotating targets of different sizes. The non-maximum suppression algorithm is used to screen out the most likely object position, reduce redundant detection results, and improve detection reliability in complex scenes. The mountain photovoltaic panel detection model takes the equally divided image sequence image_cuts and the detection threshold thresh as input, and performs a i Perform the rotation target positioning of the photovoltaic panel, limit the detection of non-photovoltaic targets according to the detection threshold thresh, and obtain the positioning result list of photovoltaic targets plate_detec:[land 1 , land 2 ,...,land n ], among which land i Table 1: Location information of the i-th bread target, land i It is in the form of {x, y, w, h, a}, which represents the coordinates and rotation angle of the positioning frame; 2) Edge deduplication Edge deduplication is mainly based on the equally divided image, the photovoltaic positioning result plate_detec, and the deduplication edge range a. The edge deduplication rule is designed by using the relationship between the photovoltaic positioning rectangular frames, and the photovoltaic positioning results are deduplicated and combined for the equally divided segmented edges of adjacent equally divided images. The specific calculation process is described as follows: For the two equally divided images img_c adjacent to each other A 、img_c B , ① Edge deduplication area division: According to the width W, height H and edge range a of the left image, a rectangular deduplication area with an edge range of Area_M: {(WW / a,0), (W+W / a,0), (W+W / a,H), (WW / a,H)} is defined; ② Edge target collection: According to the deduplication area Area_M, the image img_c is divided equally A 、img_c B PV panel positioning results plate_detec A 、plate_detec B The location target land that has an intersection and inclusion relationship with the deduplication area i Filter and obtain the target Land_M to be removed: {land 1 ,land 2 ,...,land k}; ③ Edge deduplication: Treat each location land in the deduplication target Land_M i With all other targeting {land 1 ,land 2 ,,...,land i-1 ,land i+1 ,...,land k}, calculate the intersection and inclusion relationship of the rectangular frames, perform a rectangular union operation on the positioning target frames that have an intersection relationship, and delete the positioning target frames with a smaller area in the inclusion relationship; ④ Edge merging: Set the edge merging distance threshold t, and filter the positioning targets whose corner point distances of the positioning target frame near the deduplication edge are less than t for the Land_M deduplication results in the ③ edge deduplication stage, and perform rectangular merging operations on the positioning frames with the same angle and similar corner point distances of the positioning target frames; The edge deduplication calculation is performed on all adjacent equally divided images, and the deduplication results of each image are summarized to obtain the global image photovoltaic positioning result P_Detec, which has the same structure as plate_detec.
[0019] Specifically, the unit counting module is mainly responsible for performing image segmentation to cut out a single photovoltaic target image for the photovoltaic target detected in the global image, and using the corner point detection method to detect the photovoltaic corner points in the photovoltaic image, and statistically calculating the corner points to realize the photovoltaic panel unit counting; 3) Photovoltaic target image segmentation: Based on the global image cpt , the global image photovoltaic positioning result P_Detec, using P_Detec to locate each photovoltaic target in the image cptThe image is cut on the plate, and the image is corrected by using the positioning information of each photovoltaic panel to perform image affine transformation, and the single photovoltaic image set img_ plates: {img_p 1 ,img_p 2 ,,...,img_p m}, where img_p i represents a single photovoltaic target image; 4) Corner point detection and rule statistics The corner detection method is implemented based on the YOLOv8 target detection algorithm. Compared with the same type of target detection algorithms, the YoloV8 algorithm achieves good detection performance and classification performance at the same time, and is currently the only detector that can still exceed 30FPS under high precision (optimal accuracy 56.8% AP). The algorithm can adaptively constrain the size range of the detection target to achieve the effect of accelerating detection and reducing false detection. It is also lighter and more efficient among the same type of detection algorithms. Compared with the traditional method of artificial operators in corner detection work, the deep learning method has better practical application robustness. Using a small amount of manually annotated samples can achieve performance higher than traditional image processing methods such as canny edge detection operators, and using the batch inference calculation of the lightweight model YOLOv8 model, fast corner detection can be achieved; By placing each single photovoltaic target image img_plates in the single photovoltaic image set img_plates i Perform corner point detection model inference, and count the photovoltaic panel units according to the number of detected corner points p:
[0020] The function num represents the unit counting process, k represents the actual number of photovoltaic panel assembly row units, and k is usually 4.
[0021] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A mountain photovoltaic panel recognition and counting system based on rotating target detection, characterized in that: It consists of three modules: image stitching and equal division, photovoltaic panel positioning and edge deduplication, and unit counting. Together, they complete the task of unit counting of photovoltaic panels in mountainous environments. Each module processes in series to form a system data processing flow.
2. The mountain photovoltaic panel identification and counting system based on rotating target detection according to claim 1 is characterized in that: The image stitching and equal division module fuses and stitches the image sequences collected by the drone route into a global image, and divides the global image into equal parts to reduce the computing resource requirements; the photovoltaic panel positioning module uses an algorithm model to locate and identify mountain photovoltaic panels in each equal-divided image, and designs edge deduplication rules to deduplicate and combine photovoltaic panels with overlapping geographical locations between adjacent equal-divided images; finally, the unit counting module uses the corner point detection method to accurately count the number of photovoltaic panel units.
3. The mountain photovoltaic panel identification and counting system based on rotating target detection according to claim 1 is characterized in that: The image stitching and segmentation module is mainly responsible for receiving the image information collected by the drone through the data receiving service, and then stitching and merging multiple photos taken by the drone into a global image through the image stitching tool supporting the drone. Finally, the global image is divided into multiple equally divided images in equal proportions through the script tool and the image tool, and image enhancement preprocessing is performed to form an equally divided image sequence with relatively low inference cost and distinct target features. The module is divided into three functional blocks according to its functions: data receiving service, image stitching processing, and image segmentation and enhancement processing. The specific data processing functions are described as follows: 1) Data receiving service: responsible for receiving the parameter information such as the image path pth to be processed, the equal division parameter cut, the model inference threshold thresh, etc. passed in the service request, and performing image format and integrity verification under the image path to be processed; 2) Image stitching processing: Responsible for reconstructing the image sequence under the processing path into a global image through the DJI Zhitu software tool. The specific processing is to use the image data collected by the drone and the .MRK geographic location information file and .csv image control point file as tool input, and use the DJI Zhitu software tool to perform two-dimensional reconstruction of the images collected by the drone mountain photovoltaic panels to generate a global image image cpt; 3) Image segmentation enhancement processing: responsible for dividing the global image image according to the equal division parameter c received by the service cpt Geometric segmentation to form an equally divided image sequence image_cuts:[img_cut 1, img_cut 2,..., img_cut c×c, ] and perform contrast enhancement on each equally divided image in the sequence to improve the edge contour information of the photovoltaic panel in the image.
4. The mountain photovoltaic panel identification and counting system based on rotating target detection according to claim 1 is characterized in that: The photovoltaic panel positioning and edge deduplication module is mainly responsible for positioning and identifying the overall target of photovoltaic panels in mountainous environments through the photovoltaic panel detection algorithm model reasoning for the equally divided image sequence image_cuts; by designing edge deduplication rules, the intersection and difference relationship of the positioning rectangular frame is used to combine and deduplication edge targets in adjacent equally divided images; 1) Mountain photovoltaic panel detection model The mountain photovoltaic panel detection model uses machine vision to identify UAV remote sensing images and identify and locate the photovoltaic panel targets contained therein. The model is implemented using the YOLOv8-OBB rotating target detection algorithm. The algorithm introduces a rotating bounding box in the YOLOv8 algorithm framework to solve the problem that the traditional target detection method is difficult to accurately cover with a rectangular box when dealing with long strips, irregular shapes or objects with a specific direction. YOLOv8-OBB uses a rotating bounding box (OBB) to more accurately surround objects with a specific direction by introducing angle information, thereby improving detection accuracy; In the YOLOv8-OBB algorithm, the anchor-free mechanism is used to reduce the dependence on predefined anchor points, reduce the complexity of the model, make the model easier to train and generalize, and improve the accuracy of detection, especially when dealing with small-sized objects. The multi-scale feature fusion strategy can better utilize feature information of different scales, improve the detection ability of targets of different scales, and enable the model to have a good detection effect on rotating targets of different sizes. The non-maximum suppression algorithm is used to screen out the most likely object position, reduce redundant detection results, and improve detection reliability in complex scenes. The mountain photovoltaic panel detection model takes the equally divided image sequence image_cuts and the detection threshold thresh as input, and performs a i Perform the rotation target positioning of the photovoltaic panel, limit the detection of non-photovoltaic targets according to the detection threshold thresh, and obtain the positioning result list of photovoltaic targets plate_detec:[land1, land2,...,land n ], among which land i Table 1: Location information of the i-th bread target, land i It is in the form of {x, y, w, h, a}, which represents the coordinates and rotation angle of the positioning frame; 2) Edge deduplication Edge deduplication is mainly based on the equally divided image, the photovoltaic positioning result plate_detec, and the deduplication edge range a. The edge deduplication rule is designed by using the relationship between the photovoltaic positioning rectangular frames, and the photovoltaic positioning results are deduplicated and combined for the equally divided segmented edges of adjacent equally divided images. The specific calculation process is described as follows: For the two equally divided images img_c adjacent to each other A 、img_c B , ① Edge deduplication area division: According to the width W, height H and edge range a of the left image, a rectangular deduplication area with an edge range of Area_M: {(WW / a,0), (W+W / a,0), (W+W / a,H), (WW / a,H)} is defined; ② Edge target collection: According to the deduplication area Area_M, the image img_c is divided equally A 、img_c B PV panel positioning results plate_detec A 、plate_detec B The location target land that has an intersection and inclusion relationship with the deduplication area i Filter and obtain the target Land_M to be relocated: {land1, land2, ..., land k }; ③ Edge deduplication: Treat each location land in the deduplication target Land_M i and all other target locations {land1,land2,,...,land i-1 ,land i+1 ,...,land k }, calculate the intersection and inclusion relationship of the rectangular frames, perform rectangular union operation on the positioning target frames with intersection relationship, and delete the positioning target frames with smaller area in the inclusion relationship; ④ Edge merging: Set the edge merging distance threshold t, and filter the positioning targets whose corner point distances of the positioning target frame near the deduplication edge are less than t for the Land_M deduplication results in the ③ edge deduplication stage, and perform rectangular merging operations on the positioning frames with the same angle and similar corner point distances of the positioning target frames; The edge deduplication calculation is performed on all adjacent equally divided images, and the deduplication results of each image are summarized to obtain the global image photovoltaic positioning result P_Detec, which has the same structure as plate_detec.
5. The mountain photovoltaic panel identification and counting system based on rotating target detection according to claim 1 is characterized in that: The unit counting module is mainly responsible for performing image segmentation to cut out a single photovoltaic target image for the photovoltaic targets detected in the global image, and using the corner point detection method to detect photovoltaic corner points in the photovoltaic image, and statistically calculating the corner points to realize the photovoltaic panel unit counting; 1) Photovoltaic target image segmentation: Based on the global image cpt , the global image photovoltaic positioning result P_Detec, using P_Detec to locate each photovoltaic target in the image cpt Image cutting is performed on the image, and the image positioning information of each photovoltaic panel is used to perform image affine transformation to achieve image correction, and a single photovoltaic image set img_ plates is obtained: {img_p1,img_p2,,...,img_p m }, where img_p i represents a single photovoltaic target image; 2) Corner point detection and rule statistics The corner detection method is implemented based on the YOLOv8 target detection algorithm. Compared with the same type of target detection algorithms, the YoloV8 algorithm achieves good detection performance and classification performance at the same time, and is currently the only detector that can still exceed 30FPS under high precision (optimal accuracy 56.8% AP). The algorithm can adaptively constrain the size range of the detection target to achieve the effect of accelerating detection and reducing false detection. It is also lighter and more efficient among the same type of detection algorithms. Compared with the traditional method of artificial operators in corner detection work, the deep learning method has better practical application robustness. Using a small amount of manually annotated samples can achieve performance higher than traditional image processing methods such as canny edge detection operators, and using the batch inference calculation of the lightweight model YOLOv8 model, fast corner detection can be achieved; By placing each single photovoltaic target image img_plates in the single photovoltaic image set img_plates i Perform corner point detection model inference, and count the photovoltaic panel units according to the number of detected corner points p:
6. The function num represents the unit counting process, k represents the actual number of photovoltaic panel assembly row units, and k is usually 4.