Bridge and dam target detection method and system based on improved centerNet network
By improving the centerNet network, the M-CenterNet network model was proposed, and the traditional method has solved the problems of low accuracy and confusion in bridge and dam detection, and achieved high accuracy bridge and dam detection.
Patent Information
- Application Number
- CN202411963061.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-22
AI Technical Summary
Traditional methods have low accuracy in the detection of bridges and dams and are prone to confuse bridges and dams. No distinction research has been conducted on bridges and dams in deep learning.
Improve the centerNet network, propose the M-CenterNet network model, and process aerial images through multiple convolution and upsampling, combined with the improved loss function and spatial attention module, optimize network parameters to improve detection accuracy.
It significantly improves the accuracy of bridge and dam detection, can effectively distinguish bridge and dam, and improves the degree of automation of detection.
Smart Images

Figure CN119863707A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a bridge and dam target detection method and system based on an improved CenterNet network. Background Art
[0002] In real life, some bridges are built on land, while some dams are built on rivers or lakes. The environments of the two are quite different. However, many bridges and dams are built across rivers, so their environments are very similar. In addition, the spectral and shape texture information of some bridges and dams are very similar. Bridges are usually directly connected to roads on land, but some dams are also connected to roads. Therefore, the detection of the two objects is easily confused.
[0003] Traditional target detection methods have low detection accuracy and automation for bridges and dams. In recent years, deep learning technology has developed rapidly and has also shown good results in the field of target detection. At present, deep learning methods are widely used in the extraction of objects such as aircraft, ships, vehicles, and buildings. However, there are few studies on deep learning for dam detection, and no scholars have studied the distinction between bridges and dams. Although the existing technology has achieved certain results in the study of bridges or dams through deep learning alone, the two have not yet been studied together. Summary of the invention
[0004] In order to at least partially solve the problems of low accuracy of traditional methods in bridge and dam detection, easy confusion between bridges and dams during detection, and no research on distinguishing bridges and dams in deep learning, the present invention provides a bridge and dam target detection method and system with an improved centerNet network. The present invention improves the centerNet network to obtain an M-CenterNet network model, inputs the training aerial image into a preset M-CenterNet network model, performs multiple convolution and upsampling processing on the training aerial image through the M-CenterNet network model to obtain a predicted detection result, and then optimizes the M-CenterNet network model parameters according to the training function to obtain the optimal M-CenterNet network model, detects the target aerial image according to the optimal M-CenterNet network model, and completes the detection of bridges and dams in the target aerial image. This method greatly enhances the detection accuracy of bridges and dams.
[0005] In order to achieve the above object, the technical solution of the present invention is:
[0006] The first aspect of the present invention proposes a bridge and dam target detection method using an improved centerNet network, comprising:
[0007] Step 1: Input the training aerial image into the M-CenterNet network model to obtain the predicted detection results, so as to optimize the M-CenterNet network model according to the predicted detection results;
[0008] Step 2: Calculate the loss between the predicted detection result and the true result according to the improved loss function, optimize the M-CenterNet network model parameters by minimizing the loss, and obtain the optimal M-CenterNet network model to improve the accuracy of detection;
[0009] Step 3: Input the target aerial image into the optimal M-CenterNet network model to obtain the detection result.
[0010] Furthermore, before inputting the training aerial images into the M-CenterNet network model, the training aerial images are preprocessed according to a non-maximum suppression algorithm to improve the accuracy of model detection.
[0011] Furthermore, the M-CenterNet network model includes a first convolution unit, a first upsampling and feature connection unit, a second upsampling unit, a third upsampling unit and a convolution layer;
[0012] The first convolution unit is used to perform a convolution operation on the training aerial image;
[0013] The first upsampling and feature connection unit is used to upsample and concatenate the features in the first convolution unit;
[0014] The second upsampling unit is used to upsample the output of the first upsampling and feature connection units to obtain detailed information in shallow features;
[0015] The third up-sampling unit is used to up-sample the output of the second up-sampling unit;
[0016] The convolution layer is used to perform a convolution operation on the output of the third upsampling unit.
[0017] Furthermore, the first convolution unit includes a first convolution layer, a second convolution layer, a third convolution layer, and a fourth convolution layer connected in sequence;
[0018] A first spatial attention module is further provided between the first convolution layer and the second convolution layer, and the output of the first convolution layer is processed by the first spatial attention module and then input into the second convolution layer;
[0019] A second spatial attention module is also provided between the second convolution layer and the third convolution layer. The output of the second convolution layer is processed by the second spatial attention module and then input into the third convolution layer.
[0020] Furthermore, the first spatial attention module and the second spatial attention module both include a maximum pooling layer, a mean pooling layer, a convolution layer, and an activation function layer to improve the extraction effect of spatial information features;
[0021] The maximum pooling and mean pooling layers are used to perform maximum pooling and mean pooling on the input features, and then concatenate the features after the maximum pooling and the features after the mean pooling, and input the concatenated features into the convolution layer;
[0022] The convolution layer is used to perform a convolution operation on the splicing features;
[0023] The activation function layer is used to process the output of the convolutional layer.
[0024] Furthermore, the first upsampling and feature connection unit includes an upsampling unit, a concatenation unit and a convolution unit;
[0025] The up-sampling unit is used to up-sample the output of the fourth convolutional layer;
[0026] The splicing unit is used to splice the output of the third convolutional layer and the output of the upsampling unit;
[0027] The convolution unit is used to perform a convolution operation on the output of the concatenation unit.
[0028] Furthermore, the improved loss function includes reducing the width and height loss weights in the CenterNet network loss function to one tenth;
[0029] The improved loss function is expressed as follows:
[0030] L det =L k +0.1λ size L size +λ off L off
[0031] Among them, L det is the improved loss function, L k is the key point loss, λ size is the loss weight of the original width and height, L size Width and height loss, λ off is the bias loss weight, L off For paranoid loss.
[0032] The second aspect of the present invention proposes a bridge and dam target detection system based on an improved centerNet network, comprising:
[0033] The M-CenterNet network module is used to input the training aerial images into the M-CenterNet network model to obtain the predicted detection results, so as to optimize the M-CenterNet network model according to the predicted detection results;
[0034] A training module is used to calculate the loss between the predicted detection result and the real result according to the improved loss function, and optimize the M-CenterNet network model parameters by minimizing the loss to obtain the optimal M-CenterNet network model, so as to improve the accuracy of detection;
[0035] The detection module is used to input the target aerial image into the optimal M-CenterNet network model to obtain the detection result.
[0036] According to the first aspect of the present invention, an electronic device is proposed, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for detecting bridges and dams using an improved centerNet network as described in the first aspect above is implemented.
[0037] The fourth aspect of the present invention proposes a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a bridge and dam target detection method of an improved centerNet network as described in the first aspect above.
[0038] Beneficial effects of the present invention:
[0039] (1) The present invention realizes the detection of bridges and dams through the M-CenterNet network model, which can well distinguish bridges and dams and ensure the accuracy of detection.
[0040] (2) The present invention sets up a first spatial attention module and a second spatial attention module to improve the extraction effect of spatial information features. The first spatial attention module and the second spatial attention module are first processed by maximum pooling and mean pooling, and the results are spliced into a specific graph, and then processed by convolution and activation functions. Through the spatial attention mechanism, local information in space can be highlighted. Since there are many situations in the spatial distribution of various objects in remote sensing images, the spatial attention mechanism can enhance the extraction effect of target features.
[0041] (3) Add the first upsampling and feature connection unit between the encoder and decoder. Use a structure similar to that in the U-Net network, first upsample the deep features, then splice them with the shallow features, and then obtain the upsampled comprehensive features through convolution. Through this unit, the detail information in the shallow features can be fused. Since the present invention is to obtain a heat map rather than a semantic segmentation result, it does not require particularly detailed shape information. Therefore, only the features after the first upsampling are connected and fused. For the shallower features, which contain more target shape detail information interference, no splicing is performed.
[0042] (4) The present invention adjusts the loss weights of width and height in the CenterNet network loss function. In the bridge and dam detection task based on remote sensing data, the type and position of the target are mainly extracted, and the width and height shape of its bounding box are not the key tasks for extraction. Therefore, the width and height loss weights are reduced. The present invention reduces the width and height loss weights to one tenth of the original loss function. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a bridge and dam target detection method using an improved centerNet network provided in an embodiment of the present invention.
[0044] Figure 2 One of the flowcharts of a bridge and dam target detection method of an improved centerNet network provided in an embodiment of the present invention.
[0045] Figure 3 The second flowchart of a bridge and dam target detection method of an improved centerNet network provided in an embodiment of the present invention.
[0046] Figure 4 Schematic diagram of bridge and dam samples provided for embodiments of the present invention.
[0047] Figure 5 A schematic diagram of a first spatial attention module provided in an embodiment of the present invention.
[0048] Figure 6 A schematic diagram of a first upsampling and feature connection unit provided in an embodiment of the present invention.
[0049] Figure 7 An architecture diagram of a bridge and dam target detection system based on an improved centerNet network provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all 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.
[0051] Example 1
[0052] like Figure 1 As shown, a bridge and dam target detection method of an improved centerNet network includes:
[0053] Step 1: Input the training aerial image into the M-CenterNet network model to obtain the predicted detection results.
[0054] Specifically, before inputting the training aerial images into the M-CenterNet network model, the training aerial images must be preprocessed according to the non-maximum suppression algorithm to improve the accuracy of detection.
[0055] The M-CenterNet network model includes the first convolution unit, the first upsampling and feature connection unit, the second upsampling unit, the third upsampling unit and the convolution layer.
[0056] The first convolution unit is used to perform convolution operations on the training aerial images. The first upsampling and feature connection unit is used to upsample and concatenate the features in the first convolution unit. The second upsampling unit is used to upsample the output of the first upsampling and feature connection unit. The third upsampling unit is used to upsample the output of the second upsampling unit. The convolution layer is used to perform convolution operations on the output of the third upsampling unit.
[0057] Step 2: Calculate the loss between the predicted detection result and the true result according to the improved loss function, optimize the M-CenterNet network model parameters by minimizing the loss, and obtain the optimal M-CenterNet network model.
[0058] Specifically, the present invention adjusts the width and height loss weights in the CenterNet network loss function. In the bridge and dam detection task based on remote sensing data, the type and position of the target are mainly extracted, and the width and height shape of its bounding box are not the key tasks for extraction. Therefore, the width and height loss weights can be reduced. The present invention reduces the width and height loss weights to one tenth of the original loss function.
[0059] The improved loss function is expressed as follows:
[0060] Ldet =L k +0.1λ size L size +λ off L off
[0061] Among them, L det is the improved loss function, L k is the key point loss, λ size is the loss weight of the original width and height, L size Width and height loss, λ off is the bias loss weight, L off For paranoid loss
[0062] Step 3: Input the target aerial image into the optimal M-CenterNet network model to obtain the detection result.
[0063] The present invention preprocesses the aerial images, then inputs the preprocessed aerial images into the M-CenterNet network model, and sequentially processes the input preprocessed aerial images through the first convolution unit, the first upsampling and feature connection unit, the second upsampling unit, the third upsampling unit and the convolution layer in the M-CenterNet network model, and then completes the detection task. The present invention obtains the optimal M-CenterNet network model through the improved loss function training, and improves the detection accuracy of bridges and dams.
[0064] Example 2
[0065] Based on the above embodiments, Figure 2 As shown, the present invention proposes a specific structure of the M-CenterNet network model, which specifically includes:
[0066] Convolutional Neural Network (CNN) is a basic network structure. In deep learning, a variety of network structures are extended based on convolutional neural networks. Convolution is a typical operation in image processing. It can be used as an operator such as low-pass and high-pass filtering, and can be directly used in digital image processing operations such as edge detection and image blurring. A convolutional neural network is a neural network that uses convolution operations to replace general matrix multiplication operations in at least one layer of the network. With the improvement of hardware level and the development of large-scale data sets, convolutional neural networks have shown good results in image recognition, target detection, semantic segmentation and other fields.
[0067] In deep learning-based object detection, the commonly used scheme is anchor-frame-based detection, among which Faster R-CNN is one of the most classic object detection network structures, which has gradually developed from R-CNN and Fast R-CNN and has high detection accuracy. The network process is mainly divided into two steps. The first step is to find the anchor frame of the object to be detected in the image, and the second step is to classify the anchor frame. In remote sensing target detection, Faster R-CNN has been successfully applied to the extraction of ground objects such as buildings, airplanes, and ships. However, when applying an anchor-frame-based network, the predefined size of the anchor frame needs to be specified before the network runs, so different predefined sizes will limit the performance of the algorithm. In addition, the operation of specifying the anchor frame also increases the cost of manual processing.
[0068] CenterNet is a typical anchor-free network developed on the basis of CornerNet. First, a heatmap is generated based on the size of the target box in the sample and combined with a Gaussian filter. Then, the heatmap is extracted through a feature extraction network and upsampling to obtain the center point of the object and regress the width and height of the target. This method directly performs filtering operations on the heatmap, eliminating the time-consuming NMS (Non-Maximum Suppression) processing process.
[0069] The improved CenterNet network is named M-CenterNet network in this paper. Since the scales of bridges and dams are not uniform, in some samples obtained by high-resolution remote sensing images, bridges and dams are relatively large targets, such as Figure 3 As shown in the figure, the original method is not accurate enough when regressing through the heat map. In addition, since some bridges and dams have similar morphological features, it is necessary to retain enough details in the network.
[0070] The improved M-CenterNet network structure is as follows: Figure 2 As shown in Figure 2, the M-CenterNet network model includes the first convolution unit, the first upsampling and feature connection unit, the second upsampling unit, the third upsampling unit and the convolution layer.
[0071] The first convolution unit is used to perform convolution operations on the training aerial images. The first upsampling and feature connection unit is used to upsample and concatenate the features in the first convolution unit. The second upsampling unit is used to upsample the output of the first upsampling and feature connection unit. The third upsampling unit is used to upsample the output of the second upsampling unit. The convolution layer is used to perform convolution operations on the output of the third upsampling unit.
[0072] The first convolution unit includes the first convolution layer, the second convolution layer, the third convolution layer, and the fourth convolution layer connected in sequence. A first spatial attention module is also provided between the first convolution layer and the second convolution layer, and the output of the first convolution layer is processed by the first spatial attention module and then input to the second convolution layer. A second spatial attention module is also provided between the second convolution layer and the third convolution layer, and the output of the second convolution layer is processed by the second spatial attention module and then input to the third convolution layer.
[0073] Specifically, the first spatial attention module and the second spatial attention module both include a maximum pooling and mean pooling layer, a convolution layer, and an activation function layer. The maximum pooling and mean pooling layers are used to perform maximum pooling and mean pooling on the input features, and then concatenate the maximum pooled features and the mean pooled features, and input the concatenated features into the convolution layer. The convolution layer is used to perform a convolution operation on the concatenated features. The activation function layer is used to process the output of the convolution layer.
[0074] The addition of the first spatial attention module and the second spatial attention module is used to improve the extraction effect of spatial information features. The spatial attention mechanism first processes through maximum pooling and mean pooling, and splices the results into a special graph, and then processes through convolution and activation functions. The process is as follows Figure 4 As shown in the figure, the spatial attention mechanism can highlight the local information in space. Since there are many situations in the spatial distribution of various objects in remote sensing images, the spatial attention mechanism can enhance the extraction effect of target features.
[0075] Add the first upsampling and feature connection unit between the encoder and decoder (the first convolution unit and the second upsampling unit). Use a structure similar to that in the U-Net network, first upsample the deep features, then concatenate them with the shallow features, and then obtain the upsampled comprehensive features through convolution, such as Figure 5 As shown. The first upsampling and feature connection unit can fuse the detail information in the shallow features. Since the present invention is to obtain a heat map rather than a semantic segmentation result, no particularly detailed shape information is required. Therefore, only the features after the first upsampling are connected and fused. For shallower features, which contain more target shape detail information interference, no splicing is performed.
[0076] Specifically, the first upsampling and feature connection unit includes an upsampling unit, a splicing unit and a convolution unit. The upsampling unit is used to upsample the output of the fourth convolution layer. The splicing unit is used to splice the output of the third convolution layer and the output of the upsampling unit. The convolution unit is used to perform a convolution operation on the output of the splicing unit.
[0077] Example 3
[0078] Based on the above embodiments, the embodiments of the present invention provide an evaluation scheme for verifying the accuracy of the present invention, which specifically includes:
[0079] The evaluation scheme uses precision, recall and F2 score as evaluation indicators. According to the above three precision indicators, the precision and recall can be obtained:
[0080]
[0081] Among them, Precision is accuracy, Recall is recall rate, TP is true positive, FN is false negative, and FP is false positive. Specifically, if the sample real data and the predicted box output by the model are both correct classification targets, the detection result is recorded as TP. If the sample real data is the correct target, but the model output does not detect it, the result is recorded as FN. If the sample real data does not have the correct target, but the model outputs the target at this position, the result is recorded as FP.
[0082] In the above formula, accuracy is the precision rate, which indicates the proportion of accurately predicted targets in the predicted results; recall rate is the recall rate, which indicates the proportion of real targets that are correctly detected. On this basis, the F score is obtained:
[0083]
[0084] Among them, F Score is the F score and β is the weight.
[0085] The value of β can affect the weight of precision and recall rate in comprehensive accuracy evaluation. In actual applications based on remote sensing extraction, more attention is paid to whether as many target objects as possible can be extracted, that is, more attention is paid to the recall rate. Therefore, the present invention adopts β=2, that is, F2 accuracy is used as the comprehensive accuracy index to improve the influence of recall rate in accuracy evaluation.
[0086] The study uses the DIOR target detection dataset. This dataset is a public optical remote sensing target detection dataset, containing 23,463 images, a total of 192,472 instances, including 20 categories such as airplanes, airports, bridges, and dams. The image resolution, imaging conditions, weather, seasons, etc. of this dataset vary, so it is suitable for verifying the detection capabilities of deep learning models. In this invention, only two categories, bridges and dams, in the dataset are extracted for research. After extraction, a total of 3035 images are obtained, of which 1311 are training set data and 1724 are test set data.
[0087] The experimental environment of this invention is Windows 11 operating system, NVIDIA GeForce RTX 3070 GPU graphics card, and the implementation program is Python language and Pytorch deep learning framework.
[0088] In the experiment, the training process is set to 300 epochs, and the ResNet50 pre-trained model is used. Since the network proposed in the present invention contains a new structure, only the same structural parts as those in the pre-trained model are read in the new network. Considering that the basic Faster R-CNN structure includes NMS operation when applied, while the original CenterNet does not include NMS operation, the experimental setting comparison group is:
[0089] (1) Faster R-CNN network, using NMS;
[0090] (2) Original CenterNet network;
[0091] (3) CenterNet network combined with NMS;
[0092] (4) M-CenterNet network, which is a network that combines NMS, spatial attention mechanism and encoder-decoder connection module.
[0093] The bridge and dam extraction results based on the DIOR dataset are shown in Table 1. The Faster R-CNN, CenterNet, CenterNet-NMS, and M-CenterNet in the table correspond to the comparison groups of the experimental settings. The table shows the three indicators of precision, recall, and F2 score.
[0094] Table 1 Detection accuracy of DIOR dataset
[0095]
[0096]
[0097] The data in the experiment are directly extracted from the DIOR dataset. The number of test samples is greater than the number of training samples, so the obtained accuracy value is relatively low, but it can also characterize the detection ability of the algorithm. As can be seen from Table 1, M-CenterNet has the highest comprehensive extraction accuracy. The accuracy of the original CenterNet is obviously low. Since the NMS mechanism is not used, there are too many repeated predictions of the same target, so the accuracy decreases, and its final F2 average score is slightly lower than the Faster R-CNN network structure using the NMS mechanism. Although CenterNet obtains the center point based on the peak value of the heat map and then generates a prediction box, the problem of overlapping prediction boxes can be reduced in principle. However, for objects with larger targets, there may be more than one peak value in the heat map, so there may be more overlaps. After adding NMS, the extraction accuracy of CenterNet is significantly improved. After using the improved M-CenterNet network, the overall accuracy is further improved. Its accuracy is improved by 5.7% compared with the original CenterNet network; compared with Faster R-CNN, the accuracy is improved by 5.4%. Figure 6 A schematic diagram of typical test results.
[0098] exist Figure 6 In (1), for the bridge on the river, none of the four solutions have false positives, which shows the ability of deep learning methods in feature extraction. However, there is a phenomenon of overlapping detection in the structure of Faster R-CNN. Figure 6 In (2), for the dam on the river, the four schemes also have no false detection, but the original CenterNet and the CenterNet network combined with NMS have overlapping phenomena. In Figure (3), the results of the original CenterNet and the CenterNet network combined with NMS identify the bridge and some land features as dams, while the improved M-CenterNet network has no false recognition. In Figure (4), according to the sample information, it can be determined that the image below is a bridge, which the Faster R-CNN method did not detect. The original CenterNet and the CenterNet network combined with NMS mistakenly identified it as a dam. Only the improved M-CenterNet network correctly detected the bridge. In Figure (5), the original CenterNet has multiple overlapping detections, and the original CenterNet and the CenterNet network combined with NMS will identify the same feature as a bridge and a dam at the same time, while M-CenterNet can accurately identify it. It can be seen that for some situations that are prone to confusion, M-CenterNet has a better detection effect. In summary, the improved M-CenterNet network can be better applied to the detection of bridges and dams.
[0099] Combined with the characteristics of bridge and dam targets, the present invention obtains an improved M-CenterNet network structure by adding the NMS processing algorithm, adding the first spatial attention module and the second spatial attention module to the encoder, strengthening the connection between the feature encoder and the decoder, and adjusting the bounding box shape loss value. The experimental results show that the present invention has a good detection effect. Compared with the original CenterNet network, the M-CenterNet network can improve the accuracy by 5.7%, and compared with the Faster R-CNN network, the M-CenterNet network can improve the accuracy by 5.4%.
[0100] Example 4
[0101] Based on the above embodiments, Figure 7 As shown, a bridge and dam target detection system based on an improved centerNet network includes:
[0102] The M-CenterNet network module is used to input the training aerial images into the M-CenterNet network model to obtain the predicted detection results.
[0103] The training module is used to calculate the loss between the predicted detection result and the true result according to the improved loss function, optimize the M-CenterNet network model parameters by minimizing the loss, and obtain the optimal M-CenterNet network model.
[0104] The detection module is used to input the target aerial image into the optimal M-CenterNet network model to obtain the detection result.
[0105] It should be noted that the bridge and dam target detection system of the improved centerNet network provided in an embodiment of the present invention is to implement the bridge and dam target detection method of the improved centerNet network in the above embodiment. Its specific functions can be referred to the above method embodiments and will not be repeated here.
[0106] Example 5
[0107] Corresponding to the above method, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a bridge and dam target detection method of an improved centerNet network as in the above embodiment.
[0108] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a bridge and dam target detection method of an improved centerNet network as described in the above embodiment.
[0109] In summary, the present invention realizes the detection of bridges and dams through the M-CenterNet network model, and ensures the accuracy of detection. The present invention sets a first spatial attention module and a second spatial attention module to improve the extraction effect of spatial information features. The first spatial attention module and the second spatial attention module are first processed by maximum pooling and mean pooling, and the results are spliced into a specific graph, and then processed by convolution and activation function. Through the spatial attention mechanism, local information in space can be highlighted. Since there are many situations in the spatial distribution of various objects in remote sensing images, the spatial attention mechanism can enhance the extraction effect of target features. Increase the first upsampling and feature connection unit between the encoder and decoder. Using a structure similar to that in the U-Net network, the deep features are first upsampled, then spliced with the shallow features, and then the upsampled comprehensive features are obtained by convolution. Through this unit, the detail information in the shallow features can be fused. Since the present invention is to obtain a heat map rather than a semantic segmentation result, it does not require particularly detailed shape information, so only the features after the first upsampling are connected and fused. For shallower features, it contains more target shape detail information interference and no longer splices. The present invention adjusts the loss weights of width and height in the CenterNet network loss function. In the bridge and dam detection task based on remote sensing data, the type and position of the target are mainly extracted, and the width and height shape of its bounding box are not the key tasks for extraction. Therefore, the loss weights of width and height can be reduced. The present invention reduces the loss weights of width and height to one tenth of the original loss function.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A bridge and dam target detection method based on an improved centerNet network, characterized in that: include: Step 1: Input the training aerial image into the M-CenterNet network model to obtain the predicted detection results; Step 2: Calculate the loss between the predicted detection result and the true result according to the improved loss function, optimize the M-CenterNet network model parameters by minimizing the loss, and obtain the optimal M-CenterNet network model; Step 3: Input the target aerial image into the optimal M-CenterNet network model to obtain the detection result.
2. According to claim 1, a bridge and dam target detection method based on an improved centerNet network is characterized in that: Before inputting the training aerial images into the M-CenterNet network model, the training aerial images must be preprocessed according to a non-maximum suppression algorithm.
3. According to claim 1, a bridge and dam target detection method based on an improved centerNet network is characterized in that: The M-CenterNet network model includes a first convolution unit, a first upsampling and feature connection unit, a second upsampling unit, a third upsampling unit and a convolution layer; The first convolution unit is used to perform a convolution operation on the training aerial image; The first upsampling and feature connection unit is used to upsample and concatenate the features in the first convolution unit; The second upsampling unit is used to upsample the output of the first upsampling and feature connection unit; The third up-sampling unit is used to up-sample the output of the second up-sampling unit; The convolution layer is used to perform a convolution operation on the output of the third upsampling unit.
4. The bridge and dam target detection method of the improved centerNet network according to claim 3 is characterized in that: The first convolution unit includes a first convolution layer, a second convolution layer, a third convolution layer, and a fourth convolution layer connected in sequence; A first spatial attention module is further provided between the first convolution layer and the second convolution layer, and the output of the first convolution layer is processed by the first spatial attention module and then input into the second convolution layer; A second spatial attention module is also provided between the second convolution layer and the third convolution layer. The output of the second convolution layer is processed by the second spatial attention module and then input into the third convolution layer.
5. The bridge and dam target detection method of the improved centerNet network according to claim 4 is characterized in that: The first spatial attention module and the second spatial attention module both include a maximum pooling layer, a mean pooling layer, a convolution layer, and an activation function layer; The maximum pooling and mean pooling layers are used to perform maximum pooling and mean pooling on the input features, and then concatenate the features after the maximum pooling and the features after the mean pooling, and input the concatenated features into the convolution layer; The convolution layer is used to perform a convolution operation on the splicing features; The activation function layer is used to process the output of the convolutional layer.
6. The bridge and dam target detection method of the improved centerNet network according to claim 4 is characterized in that: The first upsampling and feature connection unit includes an upsampling unit, a splicing unit and a convolution unit; The up-sampling unit is used to up-sample the output of the fourth convolutional layer; The splicing unit is used to splice the output of the third convolutional layer and the output of the upsampling unit; The convolution unit is used to perform a convolution operation on the output of the concatenation unit.
7. The bridge and dam target detection method of the improved centerNet network according to claim 1 is characterized in that: The improved loss function includes reducing the width and height loss weights in the CenterNet network loss function to one tenth; The improved loss function is expressed as follows: L det =L k +0.1min size L size +λ off L off Among them, L det is the improved loss function, L k is the key point loss, λ size is the loss weight of the original width and height, L size Width and height loss, λ off is the bias loss weight, L off For paranoid loss.
8. A bridge and dam target detection system based on an improved centerNet network, characterized in that: include: M-CenterNet network module, used to input the training aerial images into the M-CenterNet network model to obtain the predicted detection results; A training module, used to calculate the loss between the predicted detection result and the real result according to the improved loss function, optimize the M-CenterNet network model parameters by minimizing the loss, and obtain the optimal M-CenterNet network model; The detection module is used to input the target aerial image into the optimal M-CenterNet network model to obtain the detection result.
9. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a bridge and dam target detection method of an improved centerNet network as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the bridge and dam target detection method of the improved centerNet network as described in any one of claims 1 to 7.