A SAR image target detection and recognition integrated method and system
By introducing the EMA mechanism and the output side of the YOLOV8 model's C2F module to introduce the SE attention mechanism, combined with the optimization of the dynamic learning rate and loss function, the problem of poor stability of the SAR image target detection model has been solved. robustness.
Patent Information
- Application Number
- CN202311512497.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2043-11-10
AI Technical Summary
The prior art SAR image object detection method has poor model stability, and there are problems of sharp changes in model weights and fluctuations in performance.
The EMA mechanism is introduced into the C2f module of the YOLOv8 model, and the SE attention mechanism is introduced at the output end. At the same time, a dynamic learning rate formula and loss function are constructed to optimize model training and parameter updates.
It improves the stability and detection and recognition accuracy of the model, reduces the oscillation and over-fitting of the model, and improves the robustness and accuracy of target detection in SAR images.
Smart Images

Figure CN117496253B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of synthetic aperture radar (SAR) automatic target detection and recognition, and in particular to a SAR image target detection and recognition integrated method and system. Background Art
[0002] Synthetic Aperture Radar (SAR) is a remote sensing technology that is widely used in various applications, especially in ship detection and identification. SAR technology is able to provide high-resolution ground images in a variety of weather conditions, both during the day and at night. Due to these characteristics, SAR technology has become the core of many marine monitoring systems.
[0003] In recent years, with the rapid development of deep learning technology, the detection and recognition of targets in SAR images using deep learning methods has become more and more popular. One method that has received particular attention is the target detection framework based on YOLO (You Only Look Once), which is popular for its real-time and high efficiency. Nevertheless, the traditional YOLO architecture and its subsequent versions (such as YOLOv3, YOLOv4, etc.) are designed for optical images and are not fully suitable for processing SAR images, because SAR images are different from optical images in characteristics.
[0004] Chinese patent publication number CN113536929A discloses a SAR image target detection method in complex scenes. The YOLOv5 network model is used to train the features of SAR images to obtain the initial features of targets in different scenes; the hybrid attention module composed of spatial attention and channel attention is used to strengthen the initial features to obtain a feature map with screening weighted characteristics. For important target features, the network allocates a larger processing weight to enhance the network's feature learning ability for the target area and improve the target detection rate in complex scene areas; the target position is predicted on the enhanced feature map, the training loss function is optimized, the confidence of the prediction box is improved, and the model parameters are updated in reverse, so that the prediction box output by the network is closer to the real target, and the convergence speed of the model update is accelerated. This patent application improves the SAR image target detection performance in complex scenes and can quickly detect SAR image targets in any scene. However, this patent application may have model instability and overfitting problems. The weights of the model may change dramatically, resulting in performance fluctuations. Summary of the invention
[0005] The technical problem to be solved by the present invention is the problem of poor model stability of the prior art SAR image target detection method.
[0006] The present invention solves the above technical problems by the following technical means: a SAR image target detection and recognition integrated method, comprising the following steps:
[0007] Step 1: Build the YOLOv8 model, introduce the EMA mechanism in the C2f module of the YOLOv8 model, and introduce the SE attention mechanism at the output of the YOLOv8 model;
[0008] Step 2: Set the dynamic learning rate formula and construct the loss function;
[0009] Step 3: Update the parameters of the YOLOv8 model and use the dynamic learning rate formula to continuously adjust the learning rate of the YOLOv8 model to train the YOLOv8 model and calculate the corresponding loss function value. When the loss function value reaches the minimum or the model reaches the preset number of iterations, stop training to obtain a trained YOLOv8 model.
[0010] Step 4: Input the real-time collected SAR image into the trained YOLOv8 model for target detection and recognition.
[0011] Furthermore, an EMA mechanism is introduced into the C2f module of the YOLOv8 model, which is defined as a C2f-EMA module. The YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module and a classifier.
[0012] Furthermore, the EMA mechanism is introduced into the C2f module of the YOLOv8 model, including:
[0013] Step 101: EMA parameter initialization;
[0014] Step 102: In each training iteration of the YOLOv8 model, the loss of the C2f module is calculated and the parameters of the C2f module are updated;
[0015] Step 103: After each training iteration, the EMA parameters are updated using the parameters of the C2f module;
[0016] Step 104: After the YOLOv8 model training is completed, when used for target detection tasks, the EMA parameters are used instead of the current C2f module parameters for inference.
[0017] Furthermore, the step 101 includes:
[0018] Before training the YOLOv8 model, the EMA parameters are initialized first. These parameters have the same structure and initial values as the parameters of the C2f module, thereby creating an EMA parameter variable with the same structure as the C2f module parameters and completing the EMA parameter initialization.
[0019] Furthermore, the step 103 includes:
[0020] After each training iteration, the EMA parameters are updated, and the update formula is:
[0021] EMA parameter = α*current C2f module parameter + (1-α)*EMA parameter
[0022] Here, α is the attenuation factor.
[0023] Furthermore, the dynamic learning rate formula is:
[0024]
[0025] Among them, η t is the learning rate after the tth cycle, η min is the minimum learning rate, η max is the initial learning rate, T is the learning rate annealing period, and t is the current period.
[0026] Furthermore, the loss function includes a regression loss function, and the formula of the regression loss function is:
[0027]
[0028] Among them, IoU is the intersection over union ratio, Intersection is the intersection area of the predicted box and the real box, Area is the area of the predicted box or the real box, and A bb Area is the bounding box area of the predicted box and the real box. a is the area of the prediction box, Area b is the area of the real box.
[0029] Furthermore, the loss function also includes a confidence loss function, and the formula of the confidence loss function is:
[0030] L conf = -log(p) + α·(1-p) γ log(1-p)
[0031] Among them, p is the model's confidence in the existence of the target, and α and γ are hyperparameters.
[0032] The present invention also provides a SAR image target detection and recognition integrated system, comprising:
[0033] The model building module is used to build the YOLOv8 model, introduce the EMA mechanism in the C2f module of the YOLOv8 model, and introduce the SE attention mechanism at the output end of the YOLOv8 model;
[0034] The loss function construction module is used to set the dynamic learning rate formula and construct the loss function;
[0035] The model training module is used to update the parameters of the YOLOv8 model and continuously adjust the learning rate of the YOLOv8 model using the dynamic learning rate formula, so as to train the YOLOv8 model and calculate the corresponding loss function value. When the loss function value reaches the minimum or the model reaches the preset number of iterations, the training is stopped to obtain the trained YOLOv8 model.
[0036] The target detection module is used to input the real-time collected SAR images into the trained YOLOv8 model for target detection and recognition.
[0037] Furthermore, an EMA mechanism is introduced into the C2f module of the YOLOv8 model, which is defined as a C2f-EMA module. The YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module and a classifier.
[0038] Furthermore, the EMA mechanism is introduced into the C2f module of the YOLOv8 model, including:
[0039] Step 101: EMA parameter initialization;
[0040] Step 102: In each training iteration of the YOLOv8 model, the loss of the C2f module is calculated and the parameters of the C2f module are updated;
[0041] Step 103: After each training iteration, the EMA parameters are updated using the parameters of the C2f module;
[0042] Step 104: After the YOLOv8 model training is completed, when used for target detection tasks, the EMA parameters are used instead of the current C2f module parameters for inference.
[0043] Furthermore, the step 101 includes:
[0044] Before training the YOLOv8 model, the EMA parameters are initialized first. These parameters have the same structure and initial values as the parameters of the C2f module, thereby creating an EMA parameter variable with the same structure as the C2f module parameters and completing the EMA parameter initialization.
[0045] Furthermore, the step 103 includes:
[0046] After each training iteration, the EMA parameters are updated, and the update formula is:
[0047] EMA parameter = α*current C2f module parameter + (1-α)*EMA parameter
[0048] Here, α is the attenuation factor.
[0049] Furthermore, the dynamic learning rate formula is:
[0050]
[0051] Among them, η t is the learning rate after the tth cycle, η min is the minimum learning rate, η max is the initial learning rate, T is the learning rate annealing period, and t is the current period.
[0052] Furthermore, the loss function includes a regression loss function, and the formula of the regression loss function is:
[0053]
[0054] Among them, IoU is the intersection over union ratio, Intersection is the intersection area of the predicted box and the real box, Area is the area of the predicted box or the real box, and A bb Area is the bounding box area of the predicted box and the real box. a is the area of the prediction box, Area b is the area of the real box.
[0055] Furthermore, the loss function also includes a confidence loss function, and the formula of the confidence loss function is:
[0056] L conf = -log(p) + α·(1-p) γ log(1-p)
[0057] Among them, p is the model's confidence in the existence of the target, and α and γ are hyperparameters.
[0058] The advantages of the present invention are:
[0059] (1) The present invention introduces the SE attention mechanism at the output end of the YOLOv8 model. The SE attention mechanism reweights the input feature map through the learned channel weights, so that the channels with important information are emphasized and the irrelevant channels are weakened, thereby enhancing the model's attention to the target area and improving the accuracy of detection and recognition. The EMA mechanism is introduced in the C2f module of the YOLOv8 model. The EMA mechanism can improve the stability of the model, reduce the oscillation of the model, and prevent overfitting.
[0060] (2) The present invention uses the basic model of YOLOv8 to improve the detection and recognition accuracy. YOLOv8 improves the detection and recognition accuracy by improving the network structure, loss function, sample allocation strategy, data enhancement techniques and other aspects. These improvements make it more powerful and accurate in target detection tasks.
[0061] (3) The present invention constructs a dynamic learning rate formula and uses a cosine annealing learning rate strategy to gradually reduce the learning rate during the training process to ensure that the model converges faster in the early stage of training and adjusts the parameters more finely in the later stage of training, which helps the model achieve better generalization performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 The following is an architecture diagram of the YOLOv8 model in an integrated method for SAR image target detection and recognition disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are 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.
[0064] Example 1
[0065] like Figure 1 As shown, the present invention provides a SAR image target detection and recognition integrated method, comprising the following steps:
[0066] S1: Build the YOLOv8 model, introduce the EMA mechanism in the C2f module of the YOLOv8 model, and introduce the SE attention mechanism at the output of the YOLOv8 model;
[0067] YOLOv8 is a target detection model whose main structure includes backbone network, FPN (Feature Pyramid Network), YOLO head and NMS (Non-Maximum Suppression).
[0068] 1. Backbone network: YOLOv8 uses CSPDarknet as the backbone network, which consists of CSP (Cross Stage Partial) module and Darknet-53. The CSP module can reduce the number of parameters and improve the performance of the model.
[0069] 2. FPN (Feature Pyramid Network): FPN is used to connect feature maps of different scales in order to detect objects of different sizes. It can better utilize the spatial information in the feature map.
[0070] 3. YOLO head: YOLOv8 uses 3 YOLO heads, each of which is responsible for predicting targets of different sizes. Each YOLO head inputs the feature map into a convolutional layer, and then uses a fully connected layer to predict the category and bounding box.
[0071] 4.NMS (Non-Maximum Suppression): NMS is used to remove overlapping detection boxes and retain the target box with the highest confidence.
[0072] The detection and recognition accuracy can be improved by using the basic model of YOLOv8. YOLOv8 improves the detection and recognition accuracy by improving the network structure, loss function, sample allocation strategy, data enhancement techniques and other aspects. These improvements make it more powerful and accurate in target detection tasks.
[0073] In this embodiment, in order to facilitate the description of the model architecture, the EMA mechanism is introduced into the C2f module of the YOLOv8 model and defined as the C2f-EMA module. Figure 1 As shown, the YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module and a classifier. It should be noted that the first, second, third, etc. sequence words above are only used to distinguish different modules and have no special meaning. Among them, the SE attention module is the SE attention mechanism introduced by the YOLOv8 model. The SE attention mechanism and the introduction of the EMA mechanism are described in detail below.
[0074] The SE (Squeeze-and-Excitation) attention mechanism is introduced to enhance the model's attention to the target area, thereby improving the detection and recognition performance of the target. The core idea of the SE attention mechanism is to reweight the input feature map through the learned channel weights, so that the channels with important information are emphasized and the irrelevant channels are weakened. The SE attention module is an existing mature module. The present invention only uses this module to enhance attention, and does not improve the specific architecture of the SE attention module. The SE attention module includes the following steps:
[0075] Squeeze stage: In this stage, a global average pooling operation is applied to the input feature map to compress the feature map of each channel into a single value. This value represents the global feature importance of each channel.
[0076] Excitation phase: In this phase, the importance of each channel is modeled through a fully connected layer. This fully connected layer usually includes a ReLU activation function and a Sigmoid activation function to ensure that the weight range is between 0 and 1.
[0077] Scale stage: In this stage, the original feature map is weighted using the channel weights calculated in the Excitation stage. Specifically, the original feature map of each channel is multiplied by the corresponding channel weight to enhance the feature representation of important channels.
[0078] Using the attention mechanism enables the model to better focus on the target area. The attention mechanism enables the model to better focus on the target area and improve the detection and recognition performance of the target. This will help improve the model's attention, thereby improving accuracy and reducing false detections. After introducing the SE attention module, the model can adaptively focus on important feature channels, which helps improve the performance of target detection and recognition. The training process of this module is end-to-end, and through the back-propagation algorithm, the model can automatically learn the optimal channel weights.
[0079] In order to improve the stability and generalization ability of the model, the EMA (exponential moving average) mechanism is introduced in the C2f module, which smoothes the parameters of the C2f module. The core idea of EMA is to weighted average the parameters of the current model with its historical parameters to reduce the shock of the model. The following is the detailed process of introducing EMA in the C2f module:
[0080] 1) EMA parameter initialization:
[0081] Before model training, the parameters of EMA are initialized first. These parameters have the same structure as the parameters of the C2f module, and the initial values are the same as the parameters of the C2f module. This means that we create an EMA parameter variable with the same structure as the C2f module parameters.
[0082] 2) Model training:
[0083] In each training iteration, normal forward propagation and back propagation are performed to calculate the loss of the C2f module and update the parameters of the C2f module. This is the standard training process for updating the weights of the C2f module.
[0084] 3)EMA parameter update:
[0085] After each training iteration, the EMA parameters are updated using the exponential moving average formula:
[0086] EMA parameter = α*current C2f module parameter + (1-α)*EMA parameter
[0087] Among them, α is the attenuation factor, which usually takes a value close to 1 but slightly less than 1, such as 0.999. This value determines the weight of the EMA parameter to the current C2f module parameter. The larger α is, the smoother the update of the EMA parameter is.
[0088] 4) Model Reasoning:
[0089] When the model is used for object detection tasks, EMA parameters are usually used for inference instead of the current C2f module parameters. This is because EMA parameters smooth the weights of the C2f module, which helps reduce the oscillation of the model and improve the stability and generalization ability of the model.
[0090] It should be noted that the parameter update and training processes mentioned above about the EMA mechanism are synchronized with the parameter update and training of the YOLOv8 model. The parameter update process of the YOLOv8 model involves the EMA parameter update. The introduction of the EMA mechanism in the C2f module can improve the stability of the model because the EMA mechanism can improve the stability of the model, reduce the oscillation of the model, and prevent overfitting. Introducing the EMA mechanism into the C2f module will help achieve this goal and make the model smoother and more stable.
[0091] S2: Set the dynamic learning rate formula and construct the loss function;
[0092] The loss function selects the CIoU (Complete Intersection over Union) loss function, which is an improved regression loss function. The formula of the regression loss function is:
[0093]
[0094] Among them, IoU is the intersection over union ratio, Intersection is the intersection area of the predicted box and the real box, Area is the area of the predicted box or the real box, and A bb Area is the bounding box area of the predicted box and the real box. a is the area of the prediction box, Area b is the area of the real box.
[0095] The loss function also selects the VFL (Variational Focal Loss) loss function, which is an improved confidence loss function. The formula of the confidence loss function is:
[0096] L conf = -log(p) + α·(1-p) γ log(1-p)
[0097] Among them, p is the model's confidence in the existence of the target, and α and γ are hyperparameters.
[0098] Using the cosine annealing learning rate strategy, the learning rate is gradually reduced during the training process to ensure that the model converges faster in the early stages of training and fine-tune the parameters in the later stages of training, which helps the model achieve better generalization performance. The dynamic learning rate formula is:
[0099]
[0100] Among them, η t is the learning rate after the tth cycle, η min is the minimum learning rate, η max is the initial learning rate, T is the learning rate annealing period, and t is the current period.
[0101] S3: Collect SAR data set. The present invention uses SRSDD data set, inputs the data set into YOLOv8 model, updates the parameters of YOLOv8 model and uses dynamic learning rate formula to continuously adjust the learning rate of YOLOv8 model, so as to train YOLOv8 model, calculate the corresponding loss function value, and stop training when the loss function value reaches the minimum or the model reaches the preset number of iterations to obtain the trained YOLOv8 model; it should be noted that the parameters of YOLOv8 model updated here include the parameters of C2f module and EMA parameter update, calculate the loss function value during the update process, and stop training when the loss function value reaches the minimum or the model reaches the preset number of iterations. The parameters of C2f module and EMA parameters obtained at this time are the optimal parameters of the model, and the model is updated and optimized together with the obtained dynamic learning rate, etc. to obtain the optimized model. The minimum loss function value refers to the situation where both the regression loss function and the confidence loss function in step S2 are minimized.
[0102] S4: Input the real-time collected SAR image into the trained YOLOv8 model for target detection and recognition.
[0103] Through the above technical solutions, the present invention uses the YOLOv8 infrastructure, introduces the attention mechanism, introduces the EMA mechanism in the C2f module, introduces the CIoU and VFL loss functions, improves the accuracy and robustness of ship target detection and recognition in SAR images, and has significant advantages over the existing technology. At the same time, it automatically learns and focuses on key features, which is suitable for target detection tasks in multiple fields. This innovative method makes the target accuracy reach 99%.
[0104] Example 2
[0105] Based on Example 1, Example 2 of the present invention further provides a SAR image target detection and recognition integrated system, including:
[0106] The model building module is used to build the YOLOv8 model, introduce the EMA mechanism in the C2f module of the YOLOv8 model, and introduce the SE attention mechanism at the output end of the YOLOv8 model;
[0107] The loss function construction module is used to set the dynamic learning rate formula and construct the loss function;
[0108] The model training module is used to update the parameters of the YOLOv8 model and continuously adjust the learning rate of the YOLOv8 model using the dynamic learning rate formula, so as to train the YOLOv8 model and calculate the corresponding loss function value. When the loss function value reaches the minimum or the model reaches the preset number of iterations, the training is stopped to obtain the trained YOLOv8 model.
[0109] The target detection module is used to input the real-time collected SAR images into the trained YOLOv8 model for target detection and recognition.
[0110] Specifically, the EMA mechanism is introduced into the C2f module of the YOLOv8 model, which is defined as a C2f-EMA module. The YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module and a classifier.
[0111] Specifically, the EMA mechanism is introduced into the C2f module of the YOLOv8 model, including:
[0112] Step 101: EMA parameter initialization;
[0113] Step 102: In each training iteration of the YOLOv8 model, the loss of the C2f module is calculated and the parameters of the C2f module are updated;
[0114] Step 103: After each training iteration, the EMA parameters are updated using the parameters of the C2f module;
[0115] Step 104: After the YOLOv8 model training is completed, when used for target detection tasks, the EMA parameters are used instead of the current C2f module parameters for inference.
[0116] More specifically, step 101 includes:
[0117] Before training the YOLOv8 model, the EMA parameters are initialized first. These parameters have the same structure and initial values as the parameters of the C2f module, thereby creating an EMA parameter variable with the same structure as the C2f module parameters and completing the EMA parameter initialization.
[0118] More specifically, step 103 includes:
[0119] After each training iteration, the EMA parameters are updated, and the update formula is:
[0120] EMA parameter = α*current C2f module parameter + (1-α)*EMA parameter
[0121] Here, α is the attenuation factor.
[0122] Specifically, the dynamic learning rate formula is:
[0123]
[0124] Among them, η t is the learning rate after the tth cycle, η min is the minimum learning rate, η max is the initial learning rate, T is the learning rate annealing period, and t is the current period.
[0125] Specifically, the loss function includes a regression loss function, and the formula of the regression loss function is:
[0126]
[0127] Among them, IoU is the intersection over union ratio, Intersection is the intersection area of the predicted box and the real box, Area is the area of the predicted box or the real box, and A bb Area is the bounding box area of the predicted box and the real box. a is the area of the prediction box, Area b is the area of the real box.
[0128] More specifically, the loss function also includes a confidence loss function, and the formula of the confidence loss function is:
[0129] L conf = -log(p) + α·(1-p) γ log(1-p)
[0130] Among them, p is the model's confidence in the existence of the target, and α and γ are hyperparameters.
[0131] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. 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 SAR image target detection and recognition integrated method, characterized in that: The following steps are involved: Step 1: Build the YOLOv8 model, introduce the EMA mechanism in the C2f module of the YOLOv8 model, and introduce the SE attention mechanism at the output of the YOLOv8 model; Step 2: Set the dynamic learning rate formula and construct the loss function; Step 3: Update the parameters of the YOLOv8 model and use the dynamic learning rate formula to continuously adjust the learning rate of the YOLOv8 model to train the YOLOv8 model and calculate the corresponding loss function value. When the loss function value reaches the minimum or the model reaches the preset number of iterations, stop training to obtain a trained YOLOv8 model. Step 4: Input the real-time collected SAR image into the trained YOLOv8 model for target detection and recognition; The EMA mechanism is introduced into the C2f module of the YOLOv8 model, which is defined as a C2f-EMA module. The YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module, and a classifier; The EMA mechanism is introduced into the C2f module of the YOLOv8 model, including: Step 101: EMA parameter initialization; Step 102: In each training iteration of the YOLOv8 model, the loss of the C2f module is calculated and the parameters of the C2f module are updated; Step 103: After each training iteration, the EMA parameters are updated using the parameters of the C2f module; Step 104: After the YOLOv8 model is trained, when used for target detection tasks, the EMA parameters are used for reasoning instead of the current C2f module parameters; The step 101 comprises: Before training the YOLOv8 model, the EMA parameters are initialized first. These parameters have the same structure and initial values as the parameters of the C2f module, thus creating an EMA parameter variable with the same structure as the C2f module parameters to complete the EMA parameter initialization. The step 103 comprises: After each training iteration, the EMA parameters are updated, and the update formula is: EMA parameter = α * current C2f module parameter + (1 - α) * EMA parameter Where α is the attenuation factor; The introduction of SE attention mechanism is specifically as follows: Compression stage: In this stage, the global average pooling operation is applied to the input feature map to compress the feature map of each channel into a single value, which represents the global feature importance of each channel; Excitation phase: In this phase, the importance of each channel is modeled through a fully connected layer. This fully connected layer usually includes a ReLU activation function and a Sigmoid activation function to ensure that the weight range is between 0 and 1; Scaling stage: In this stage, the channel weights calculated in the excitation stage are used to weight the original feature maps. Specifically, the original feature map of each channel is multiplied by the corresponding channel weight to enhance the feature representation of important channels.
2. The SAR image target detection and recognition integrated method according to claim 1, characterized in that: The dynamic learning rate formula is: in, For the The learning rate after the end of the cycle, is the minimum learning rate, is the initial learning rate, is the learning rate annealing period, For the current cycle.
3. The SAR image target detection and recognition integrated method according to claim 1 is characterized in that: The loss function includes a regression loss function, and the formula of the regression loss function is: in, is the intersection-and-union ratio, is the intersection area of the predicted box and the true box, is the area of the predicted box or the true box, is the bounding box area of the predicted box and the true box, is the area of the prediction box, is the area of the real box.
4. The SAR image target detection and recognition integrated method according to claim 3 is characterized in that: The loss function also includes a confidence loss function, and the formula of the confidence loss function is: in, is the model’s confidence in the existence of the target, and are all hyperparameters.
5. A SAR image target detection and recognition integrated system, characterized in that: include: The model building module is used to build the YOLOv8 model, introduce the EMA mechanism in the C2f module of the YOLOv8 model, and introduce the SE attention mechanism at the output end of the YOLOv8 model; The loss function construction module is used to set the dynamic learning rate formula and construct the loss function; The model training module is used to update the parameters of the YOLOv8 model and continuously adjust the learning rate of the YOLOv8 model using the dynamic learning rate formula, so as to train the YOLOv8 model and calculate the corresponding loss function value. When the loss function value reaches the minimum or the model reaches the preset number of iterations, the training is stopped to obtain the trained YOLOv8 model. The target detection module is used to input the real-time collected SAR images into the trained YOLOv8 model for target detection and recognition; The EMA mechanism is introduced into the C2f module of the YOLOv8 model, which is defined as a C2f-EMA module. The YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module, and a classifier; The EMA mechanism is introduced in the C2f module of the YOLOv8 model, including the following functional units: Initialization unit, used for EMA parameter initialization; The loss calculation unit is used to calculate the loss of the C2f module and update the parameters of the C2f module in each training iteration of the YOLOv8 model; The parameter updating unit is used to update the EMA parameters using the parameters of the C2f module after each training iteration; The inference unit is used to perform inference using EMA parameters instead of the current C2f module parameters when the YOLOv8 model is trained for target detection tasks; The specific operation mode of the initialization unit is: Before training the YOLOv8 model, the EMA parameters are initialized first. These parameters have the same structure and initial values as the parameters of the C2f module, thus creating an EMA parameter variable with the same structure as the C2f module parameters to complete the EMA parameter initialization. The specific operation mode of the parameter updating unit is as follows: After each training iteration, the EMA parameters are updated, and the update formula is: EMA parameter = α * current C2f module parameter + (1 - α) * EMA parameter Where α is the attenuation factor; The introduction of SE attention mechanism is specifically as follows: Compression stage: In this stage, the global average pooling operation is applied to the input feature map to compress the feature map of each channel into a single value, which represents the global feature importance of each channel; Excitation phase: In this phase, the importance of each channel is modeled through a fully connected layer. This fully connected layer usually includes a ReLU activation function and a Sigmoid activation function to ensure that the weight range is between 0 and 1; Scaling stage: In this stage, the channel weights calculated in the excitation stage are used to weight the original feature maps. Specifically, the original feature map of each channel is multiplied by the corresponding channel weight to enhance the feature representation of important channels.
6. The SAR image target detection and recognition integrated system according to claim 5, characterized in that: The EMA mechanism is introduced into the C2f module of the YOLOv8 model, which is defined as a C2f-EMA module. The YOLOv8 model includes a sequentially connected input layer, a first CBS module, a second CBS module, a first C2f-EMA module, a third CBS module, a second C2f-EMA module, a fourth CBS module, a third C2f-EMA module, a fifth CBS module, a fourth C2f-EMA module, an SE attention module, and a classifier.
Citation Information
Patent Citations
SAR image target detection method in complex scene
CN113536929A
Method and system for detecting abnormal aircraft target in designated area based on historical data
CN116071667A
Telescope pose monitoring method based on computer vision
CN116843756A
Lightweight target detection method and system based on context awareness local enhancement
CN116977860A