Satellite image substation detection method based on target detection frame center
Patent Information
- Application Number
- CN202311147210.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-07
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-09-07
AI Technical Summary
在对大区域遥感影像中的变电站进行目标检测时,无法直接对整幅影像一次性完成检测,通常需要将遥感影像裁剪成固定尺寸像素的图像块进行检测,最后将所有图像块的检测结果按照裁剪的位置进行拼接得到最终结果,但得到的目标框检测结果存在检测结果不完整、错误检测的情况,导致检测结果的准确率降低,主要原因如下:
[0033]本发明所提出的一种基于目标检测框中心的卫星影像变电站检测方法的优势是针对当前单次遥感影像变电站目标检测结果存在准确率低和检测不完整的情况,采用一次检测与二次检测结合检测的方式,以初次检测结果检测框的中心位置重新生成待检测遥感影像图像块进行二次检测,使检测框对应的目标位于图像块的中心位置,避免检测目标被裁剪到不同的图像块中,保证检测结果框的完整性,同时目标位于图像块的中心位置可以在特征提取过程中捕获目标及周围更多的信息,增强模型的判别能力,剔除较多一次检测中的结果,提高变电站检测结果的准确性。
Smart Images

Figure CN117132901B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of high-resolution satellite remote sensing image target detection technology, and in particular relates to a satellite image substation detection method based on the center of the target detection frame. Background Technology
[0002] With the rapid development of target detection technology and the continuous improvement of remote sensing image resolution, the automatic extraction of target features from large-area high-resolution remote sensing images using target detection algorithms is more efficient than traditional manual visual interpretation, significantly reducing the workload. Substations are power facilities in power systems that transform voltage, receive and distribute electrical energy, control the flow of electricity, and adjust voltage. They connect power grids of various voltage levels through their transformers. In recent years, with the development of smart grids, communication technologies, and computer technologies, and the ever-expanding scale of power grids, accurately obtaining substation location information is of great significance for providing basic data support in fields such as ecological environmental protection, monitoring of illegal construction around substations, geographic data updates, and urban planning management. When performing target detection on substations in large-area remote sensing images, it is impossible to complete the detection of the entire image at once. Typically, the remote sensing image needs to be cropped into image blocks of fixed pixel size for detection. Finally, the detection results of all image blocks are stitched together according to the cropped positions to obtain the final result. However, the resulting target bounding box detection results may be incomplete or contain errors, leading to a decrease in the accuracy of the detection results. The main reasons are as follows:
[0003] 1. Compared to the central region of an image patch, the edge region cannot capture more effective feature information during feature extraction, leading to more false detection results, such as... Figure 1 As shown in (a).
[0004] 2. The same target is cropped into different image patches, resulting in incomplete detection results. Only a part of the target is detected, not the entire target. For example... Figure 1 As shown in (b).
[0005] Therefore, how to solve the problems of erroneous detection and incomplete detection in the process of substation target detection in high-resolution remote sensing images is a key technical problem that urgently needs to be solved. Summary of the Invention
[0006] The purpose of this invention is to solve the problems in the prior art and to propose a substation detection method based on satellite imagery of the target detection frame center.
[0007] This invention is achieved through the following technical solution: This invention proposes a method for detecting substations based on satellite imagery of the target detection frame center, the method comprising the following steps:
[0008] Step 1: Data Acquisition;
[0009] Step 2: Create an object detection dataset and train an object detection model;
[0010] Step 3: Use the trained target detection model to extract target detection information from the remote sensing image to be detected, and obtain the initial detection results;
[0011] Step 4: Convert the coordinates of the center position of the detection box, converting the latitude and longitude coordinates to the coordinates on the remote sensing image;
[0012] Step 5: Generate an image block of the specified pixel size based on the coordinates of the center point of the detection box;
[0013] Step 6: Perform secondary detection on the image patches generated in Step 5 using the target detection model trained in Step 2;
[0014] Step 7: Merge the detection results of each image block to obtain the final detection result of the substation.
[0015] Furthermore, in step 1, after performing atmospheric correction, geometric correction, image fusion, and image registration on the high-resolution satellite remote sensing image, remote sensing image data is obtained, which is used for the creation of target detection dataset and the image to be detected. The remote sensing image coordinate system adopts the WGS84 coordinate system.
[0016] Furthermore, step 2 specifically includes:
[0017] Step 2.1: Select the remote sensing image to create the dataset, draw a bounding box for the target to be detected and label it, and crop the drawn sample according to a fixed pixel size to obtain the remote sensing image target detection dataset.
[0018] Step 2.2: Train the object detection model using the generated dataset.
[0019] Furthermore, step 3 specifically includes:
[0020] Step 3.1: Crop the entire remote sensing image into image blocks of uniform pixel size for target detection;
[0021] Step 3.2: Merge the detection results of each image block to obtain the initial detection results of the substation target.
[0022] Furthermore, step 4 specifically includes:
[0023] Step 4.1: Calculate the latitude and longitude coordinates of the center point of the detection frame (lon) center point ,lat center point );
[0024] Step 4.2: Set the center point's latitude and longitude coordinates (lon) center point ,lat center point Transform to the corresponding remote sensing image's coordinates (x... pix ,y pix ).
[0025] Further, step 4.1 specifically involves: using the initial detection results to obtain the latitude and longitude coordinates of the two vertices at the upper left and lower right positions of the rectangular detection box, and calculating the average value of each to obtain the latitude and longitude coordinates of the center point of the detection box (lon). center point ,lat center point ).
[0026] Furthermore, the conversion formula in step 4.2 is specifically as follows:
[0027]
[0028] Among them: lon remote-sensing image It refers to the longitude coordinates of the upper left corner of the remote sensing image, lat remote-sensing image Pixel_width refers to the latitude coordinate of the top left corner of the remote sensing image, Pixel_height refers to the resolution of the image in horizontal space, and Pixel_height refers to the resolution of the image in vertical space.
[0029] Furthermore, in step 5, taking 1024×1024 as an example, the coordinates of the four vertices (x, y, y) of the region corresponding to the image patch on the remote sensing image map are respectively (x, y ... pix -1024 / 2+1,y pix -1024 / 2+1), (x pix -1024 / 2+1,y pix +1024 / 2), (x pix +1024 / 2,y pix -1024 / 2+1), (x pix +1024 / 2,y pix +1024 / 2), generate corresponding remote sensing image blocks to be detected for all detection boxes in the initial detection results.
[0030] This invention proposes an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the satellite image substation detection method based on the center of a target detection frame.
[0031] This invention proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the satellite imagery substation detection method based on the center of a target detection frame.
[0032] The beneficial effects of this invention are:
[0033] The advantage of the satellite image substation detection method based on the center of the target detection box proposed in this invention is that it addresses the low accuracy and incomplete detection of substation targets in current single remote sensing imagery. It employs a combination of primary and secondary detection methods. The primary detection method uses the center position of the detection box from the initial detection result to regenerate the remote sensing image block to be detected for secondary detection. This ensures that the target corresponding to the detection box is located at the center of the image block, preventing the target from being cropped into different image blocks and guaranteeing the integrity of the detection result box. Furthermore, the target being located at the center of the image block allows for the capture of more information about the target and its surroundings during feature extraction, enhancing the model's discriminative ability, eliminating many results from the primary detection, and improving the accuracy of the substation detection results. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0035] Figure 1 This is a schematic diagram of problems with the target detection results in substations in the existing technology. (a) represents a schematic diagram of erroneous detection results, and (b) represents a schematic diagram of incomplete detection results.
[0036] Figure 2 This is an example of generating an image block to be detected from the center of the detection box in the initial detection result, where (a) represents the target box detected in the initial detection, (b) represents the center point position of the target box, and (c) generates the image block to be predicted based on the center point position.
[0037] Figure 3 This is a flowchart of a satellite image substation detection method based on the center of a target detection frame, as described in this invention.
[0038] Figure 4 This diagram illustrates a comparison of the substation inspection frame integrity results between existing technical testing methods (direct testing (yolov8m)) and the method described in this invention (initial testing: Yolov8m + secondary testing: Yolov8m). In this diagram, (a) represents the existing technical testing method, and (b) represents the method described in this invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] To address the issues of low accuracy and incomplete detection in current remote sensing imagery of substation targets, a combined primary and secondary detection method is adopted. For example... Figure 2 As shown, the remote sensing image patch to be detected is regenerated with the center position of the detection box of the initial detection result, so that the target corresponding to the detection box is located in the center of the image patch. This avoids the detection target being cropped into different image patches, ensuring the integrity of the final detection box. At the same time, the target being located in the center of the image patch can capture more information about the target and its surroundings during the feature extraction process, enhancing the model's discrimination ability and improving the accuracy of the detection results.
[0041] This invention mainly includes seven steps: data acquisition, model training, initial detection, coordinate transformation of the detection box center position, generation of image patches to be detected, secondary detection, and result merging. By generating image patches to be detected at the center position of the detection box in remote sensing imagery, the model's judgment ability and the integrity of the detection result boxes are improved. The method flow is as follows: Figure 3 As shown.
[0042] Specifically, this invention proposes a substation detection method based on satellite imagery of the target detection frame center, the method comprising the following steps:
[0043] Step 1: Data Acquisition;
[0044] In step 1, after performing atmospheric correction, geometric correction, image fusion and image registration on the high-resolution satellite remote sensing image, remote sensing image data is obtained, which is used for the creation of target detection dataset and the image to be detected. The remote sensing image coordinate system adopts the WGS84 coordinate system (EPSG:4326).
[0045] Step 2: Create an object detection dataset and train an object detection model;
[0046] Step 2 specifically involves:
[0047] Step 2.1: Select the remote sensing image to create the dataset, draw a bounding box for the target to be detected and label it, and crop the drawn sample according to a fixed pixel size to obtain the remote sensing image target detection dataset.
[0048] Step 2.2: Train the object detection model using the generated dataset.
[0049] Step 3: Use the trained target detection model to extract target detection information from the remote sensing image to be detected, and obtain the initial detection results;
[0050] Step 3 specifically involves:
[0051] Step 3.1: Due to limitations in computer performance, it is not possible to complete the detection of the entire remote sensing image in one go. Instead, the entire remote sensing image is cropped into image blocks with uniform pixel specifications for target detection.
[0052] Step 3.2: Merge the detection results of each image block to obtain the initial detection results of the substation target.
[0053] Step 4: Convert the coordinates of the center position of the detection box, converting the latitude and longitude coordinates to the coordinates on the remote sensing image;
[0054] Step 4 specifically involves:
[0055] Step 4.1: Calculate the latitude and longitude coordinates of the center point of the detection frame (lon) center point ,lat center point );
[0056] Step 4.1 specifically involves: using the initial detection results to obtain the latitude and longitude coordinates of the top left and bottom right vertices of the rectangular detection box, and calculating the average value of each to obtain the latitude and longitude coordinates of the center point of the detection box (lon). center point ,lat center point ).
[0057] Step 4.2: Set the center point's latitude and longitude coordinates (lon) center point ,lat center point Transform to the corresponding remote sensing image's coordinates (x... pix ,y pix ).
[0058] The conversion formula in step 4.2 is as follows:
[0059]
[0060] Among them: lon remote-sensing image It refers to the longitude coordinates of the upper left corner of the remote sensing image, lat remote-sensing image Pixel_width refers to the latitude coordinate of the top left corner of the remote sensing image, Pixel_height refers to the resolution of the image in horizontal space, and Pixel_height refers to the resolution of the image in vertical space.
[0061] Step 5: Generate an image block of the specified pixel size based on the coordinates of the center point of the detection box;
[0062] In step 5, taking 1024×1024 as an example, the coordinates of the four vertices of the image patch corresponding to the upper left, lower left, upper right, and lower right regions on the remote sensing image map are (x... pix -1024 / 2+1,y pix -1024 / 2+1), (x pix -1024 / 2+1,y pix +1024 / 2), (x pix +1024 / 2,y pix -1024 / 2+1), (x pix +1024 / 2,y pix +1024 / 2), generate corresponding remote sensing image blocks to be detected for all detection boxes in the initial detection results.
[0063] Step 6: Perform secondary detection on the image patches generated in Step 5 using the target detection model trained in Step 2;
[0064] Step 7: Merge the detection results of each image block to obtain the final detection result of the substation.
[0065] This invention proposes a detection method to improve the accuracy of substation target detection results in remote sensing images. It solves the problems of numerous false detections and incomplete results in current target detection methods, laying the foundation for high-precision, large-scale accurate identification of substation targets. Using substation target detection results in Liaoning Province as an example, a comparative experiment is conducted between the method described in this invention and direct detection methods. Figure 4 As shown, the target detection model adopted the YOLOv8 model. The experimental environment was Windows 10 operating system, 256GB of memory, and an NVIDIA GeForce RTX 3090 graphics card with 24GB of video memory. During training, the batch size was set to 16, the number of iterations was set to 80, and the pixel size of both training and prediction images was 1024×1024. The results are shown in Table 1. The results show that compared with direct detection, the method described in this invention can remove a large number of erroneous results while retaining most of the correct detection results, and the detection box matches the substation boundary better, reducing the occurrence of incomplete detection. In terms of detection time, the secondary detection does not need to traverse the entire image, but only detects the detection box area, with a time of less than 1.2 hours. The combination of the YOLOv8n model for the initial detection and the YOLOv8m model for the secondary detection has the advantages of short detection time and high accuracy, and can be used as the preferred choice for substation detection tasks.
[0066] Table 1 Comparison of substation detection results between the method of the present invention and the direct detection method.
[0067]
[0068] This invention proposes an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the satellite image substation detection method based on the center of a target detection frame.
[0069] This invention proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the satellite imagery substation detection method based on the center of a target detection frame.
[0070] The memory in this application embodiment can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM). It should be noted that the memory used in the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0071] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0072] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0073] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuitry in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0074] The above provides a detailed description of the substation detection method based on the center of the target detection frame proposed in this invention. Specific examples have been used to illustrate the principle and implementation of this invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for detecting substations based on satellite imagery of target detection frames, characterized in that, The method includes the following steps: Step 1: Data Acquisition; Step 2: Create an object detection dataset and train an object detection model; Step 3: Use the trained target detection model to extract target detection information from the remote sensing image to be detected, and obtain the initial detection results; Step 4: Convert the coordinates of the center position of the detection box, converting the latitude and longitude coordinates to the coordinates on the remote sensing image; Step 5: Generate an image block of the specified pixel size based on the coordinates of the center point of the detection box; Step 6: Perform secondary detection on the image patches generated in Step 5 using the target detection model trained in Step 2; Step 7: Merge the detection results of each image block to obtain the final detection result of the substation; Step 3 specifically involves: Step 3.1: Crop the entire remote sensing image into image blocks of uniform pixel size for target detection; Step 3.2: Merge the detection results of each image block to obtain the initial detection results of the substation target; Step 4 specifically involves: Step 4.1: Calculate the latitude and longitude coordinates of the center point of the detection frame ( , ); Step 4.2: Set the latitude and longitude coordinates of the center point ( , ) Convert to the corresponding remote sensing image's coordinates ( , ); Step 4.1 specifically involves: using the initial detection results to obtain the latitude and longitude coordinates of the two vertices at the upper left and lower right positions of the rectangular detection box, and calculating the average value of each to obtain the latitude and longitude coordinates of the center point of the detection box. , ); The specific conversion formula in step 4.2 is as follows: in: It refers to the longitude coordinates of the upper left corner of the remote sensing image. It refers to the latitude coordinates of the upper left corner of the remote sensing image. This refers to the resolution of the image in horizontal space. It refers to the resolution of the image in vertical space.
2. The method according to claim 1, characterized in that, In step 1, after performing atmospheric correction, geometric correction, image fusion and image registration on the high-resolution satellite remote sensing image, remote sensing image data is obtained, which is used for the creation of target detection dataset and the image to be detected. The remote sensing image coordinate system adopts the WGS84 coordinate system.
3. The method according to claim 2, characterized in that, Step 2 specifically involves: Step 2.1: Select the remote sensing image to create the dataset, draw a bounding box for the target to be detected and label it, and crop the drawn sample according to a fixed pixel size to obtain the remote sensing image target detection dataset. Step 2.2: Train the object detection model using the generated dataset.
4. The method according to claim 3, characterized in that, In step 5, taking 1024×1024 as an example, the coordinates of the four vertices of the upper left, lower left, upper right, and lower right of the region corresponding to the image patch on the remote sensing image map are respectively ( -1024 / 2+1, -1024 / 2+1), ( -1024 / 2+1, +1024 / 2), ( +1024 / 2, -1024 / 2+1), ( +1024 / 2, (+1024 / 2) Generates corresponding remote sensing image blocks to be detected for all detection boxes in the initial detection results.
5. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-4.
6. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Remote sensing image building detection method and device, and computer readable storage medium
CN112990086A
Remote sensing image labeling method and related equipment
CN115861416A