A method for reducing false positive rate of target detection and a storage medium

By constructing a change detection network with a dual-branch structure, enhancing feature representation through feature aggregation and self-attention modules, and combining multi-scale convolution and spatiotemporal attention mechanisms, the false alarm problem of object detection networks in complex environments is solved, achieving efficient and accurate object detection.

CN121259385BActive Publication Date: 2026-08-25BEIJING HOPE WISH PHOTOELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511330921.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2026-08-25
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

Existing target detection networks struggle to accurately distinguish between real targets and background interference or clutter in complex environments, resulting in a high false alarm rate and impacting the security monitoring effectiveness and decision-making accuracy of detection terminals.

Method used

A dual-branch change detection network is constructed. The feature representation capability is enhanced by a feature aggregation module and a self-attention module. A change perception module with multi-scale convolution and weighted fusion is used, combined with a spatiotemporal attention mechanism, to generate multi-scale difference feature maps and perform supervised training to reduce the false alarm rate.

Benefits of technology

It significantly reduces false alarm rates, improves the accuracy and robustness of target detection, adapts to environmental changes at different scales, reduces deployment costs and time, and is suitable for detection equipment such as photoelectric turntables and detection terminals with target detection functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121259385B_ABST
    Figure CN121259385B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of detection, and particularly relates to a method for reducing false alarm rate of target detection and a storage medium, comprising defining a change detection data set and labeling a change true value; the change detection data set comprises a plurality of image pair samples, and the image pair comprises a background image and a detection image; the image pair samples of the change detection data set are input into an encoding backbone part of a pre-constructed change detection network to obtain multi-scale feature maps corresponding to the background image and the detection image respectively; the present application constructs a change detection network with a double-branch structure, extracts multi-scale features of the background image and the detection image respectively, and enhances the representation ability of the features by using a feature aggregation module and a self-attention module to effectively mine the saliency change information between the images. This method can accurately distinguish between real targets and background interference or debris, significantly reduce the false alarm rate, and improve the accuracy of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of detection technology, specifically relating to a method and storage medium for reducing the false alarm rate of target detection. Background Technology

[0002] In the fields of computer vision and image processing, object detection technology, as a core tool, is widely used in various monitoring scenarios such as park inspections and security protection. However, existing object detection networks in detection terminals face many challenges in practical applications, especially the problems of false positives and false negatives. Limited by the representativeness of training data and the generalization ability of the model, object detection networks often struggle to accurately distinguish between real targets and background interference or clutter in complex environments such as complex backgrounds, sudden changes in illumination, or stationary targets, leading to a large number of false positives. This not only reduces the accuracy and reliability of the object detection system but also increases the workload and complexity of subsequent processing.

[0003] To address this issue, large-scale on-site data acquisition and model fine-tuning are often relied upon. However, this approach is costly, time-consuming, and difficult to adapt quickly to changes in different scenarios and environments, thus limiting the widespread deployment and efficient application of target detection networks on various detection terminals. This is especially true for detection terminals deployed in critical areas such as industrial parks, where the accuracy and real-time performance of target detection are extremely critical. Frequent false alarms and missed alarms directly impact the security monitoring effectiveness and decision-making accuracy of the detection terminals. Summary of the Invention

[0004] To address the shortcomings of existing target detection technologies, such as the inability of existing target detection networks to accurately distinguish between real targets and background interference or clutter in complex environments due to limitations in the representativeness of training data and the generalization ability of models, resulting in a large number of false alarms and affecting the security monitoring effect and decision-making accuracy of detection terminals, this invention provides a method and storage medium to reduce the false alarm rate of target detection, thereby solving the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a method for reducing the false alarm rate of target detection, comprising: S1. Define the change detection dataset and label the real change values; the change detection dataset includes several image pairs, and the image pairs include background images and detection images; S2. Input the image pairs from the change detection dataset into the encoding backbone of the pre-constructed change detection network to obtain multi-scale feature maps corresponding to the background image and the detection image, respectively. S3. The first predetermined multi-scale feature map is processed by the configured feature aggregation module in the manner of pairing shallow feature maps with deeper feature maps to obtain an aggregated and enhanced multi-scale feature map; the second predetermined multi-scale feature map is processed by the configured self-attention module to obtain a self-attention enhanced feature map. S4. Subtract the multi-scale feature map of the background image after aggregation / self-attention enhancement from the multi-scale feature map of the detection image after aggregation / self-attention enhancement, and take the absolute value to generate a multi-scale difference feature map. S5. The multi-scale difference feature map is processed by the configured change perception module to obtain the enhanced multi-scale change perception feature map. S6. The enhanced multi-scale change perception feature map is processed through the configured spatiotemporal attention module to obtain the spatiotemporal attention feature map; S7. Input the spatiotemporal attention feature map into the configured change detection prediction head to obtain the final output change map of the change detection network, and perform supervised training on the final output change map using the real change values; S8. Deploy the trained change detection network to the detection terminal to remove false positives in target detection.

[0006] Further improvements to this technical solution include step S1, which includes: S11. Define the change detection dataset. ,in, , where n represents the change detection dataset The total number of image pairs in the middle; Indicates the first Image pairs; Represents a background image; This indicates a detected image that shows a change relative to the background image; and All dimensions are , Image height, Image width; S12, Image pair The changes in the true values ​​are labeled to generate a binary mask image. Among them, the binarized mask image The size is Binarized mask image In this context, a pixel value of 1 indicates a changing area, and a pixel value of 0 indicates a non-changing area.

[0007] Further improvements to this technical solution include step S2, which includes: S21. The MobileNetV2 network structure with the global average pooling layer and the final fully connected layer removed is configured as the coding backbone of the change detection network. The coding backbone contains five stages, each containing a convolutional module with a stride of 2, which is used to progressively downsample the multi-scale feature map in the spatial dimension, so that the size of the multi-scale feature map is reduced to half of the previous stage. S22. Compare the images in the change detection dataset to samples. The input is fed into the encoding backbone to extract multi-scale feature maps from the background image and the detection image, respectively; among which, For background image Output multi-scale feature maps , , , and ; For detecting images Output multi-scale feature maps , , , and ; The dimensions of each multi-scale feature map are based on the input image size. The calculation is as follows: and The size is , indicating spatial resolution is And the number of channels is 16; and The size is , indicating spatial resolution is And the number of channels is 24; and The size is , indicating spatial resolution is And the number of channels is 32; and The size is , indicating spatial resolution is And the number of channels is 96; and The size is , indicating spatial resolution is And the number of channels is 160.

[0008] Further improvements to this technical solution include step S3, which includes: S31, Transfer the first predetermined multi-scale feature map , , , , and By pairing shallow feature maps with deeper feature maps, the configured feature aggregation module processes the data to obtain aggregated and enhanced multi-scale feature maps. , , , , and ; S32, Transfer the second predetermined multi-scale feature map and The feature map is obtained by processing the data through the configured self-attention module. and .

[0009] Further improvements to this technical solution include step S4, which includes: Aggregate the background image at scale 2 to enhance the feature map. Aggregated Enhancement Feature Map of Detection Image at Scale 2 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 2. ; Aggregate the background image at scale 3 to enhance the feature map. Aggregated Enhancement Feature Map of Detection Image at Scale 3 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 3. ; Aggregate the background image at scale 4 to enhance the feature map. Aggregated Enhancement Feature Map of Detection Image at Scale 4 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 4. ; Self-attention enhancement feature map of the background image at scale 5 Self-attention enhancement feature map of the detection image at scale 5 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 5. .

[0010] Further improvements to this technical solution include step S5, which includes: Multiscale difference feature map , , and The input configuration change-aware module is subjected to multi-scale convolution and weighted fusion to obtain enhanced multi-scale change-aware feature maps. , , and .

[0011] Further improvements to this technical solution include step S6, which includes: S61. Change-sensing feature map The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S62. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. ; Fusing spatiotemporal attention feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S63. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. ; Fusing spatiotemporal attention feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S64. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. Integrating spatiotemporal attention into feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. .

[0012] Further improvements to this technical solution include step S7, which includes: Will The kernel size input to the change detection prediction head is The convolutional layer is used, and a pre-stored sigmoid function is used for calculation to obtain the predicted change map. The size is ; Plot the predicted changes The final output change map of the change detection network is obtained by performing a 4-fold spatial upsampling using pre-stored bilinear interpolation. ; Using a binary mask image Changes in the final output diagram Calculate the loss and perform supervised training using a pre-stored backpropagation method.

[0013] Further improvements to this technical solution include using a binarized mask image. Changes in the final output diagram The formula for calculating the loss is: ; in, This represents the binary cross-entropy loss function. Represents the Dice loss function. This is the loss balance coefficient.

[0014] In a second aspect, the present invention provides a computer storage medium storing instructions which, when executed, perform the methods described in the above aspects.

[0015] The beneficial effects of this invention are as follows: This invention constructs a dual-branch change detection network to extract multi-scale features from both the background and detection images. It then utilizes a feature aggregation module and a self-attention module to enhance the representational power of these features, effectively uncovering significant changes between images. This method can accurately distinguish between real targets and background interference or clutter, significantly reducing false alarm rates and improving the accuracy of target detection.

[0016] By introducing a change-aware module that combines multi-scale convolution and weighted fusion, along with upsampling fusion and spatiotemporal attention mechanisms, this invention can adapt to change detection needs at different scales and effectively cope with environmental changes such as complex backgrounds and sudden changes in illumination. This design enhances the robustness of the system, enabling the detection terminal to maintain stable detection performance in various complex environments.

[0017] Traditional methods rely on large-scale field data acquisition and model fine-tuning, which are costly and time-consuming. In contrast, the change detection network structure of this invention is lightweight and has high inference efficiency, and can be flexibly integrated into conventional detection processes without the need for large-scale data acquisition and model adjustment, significantly reducing deployment costs and time.

[0018] The change detection network deployment method of this invention is not only applicable to specific detection equipment such as photoelectric turntables, but can also be widely applied to various detection terminals with target detection functions. Furthermore, through collaborative work of the interface target detection network, this invention provides efficient and reliable technical support for fields such as security monitoring and intelligent transportation. Attached Figure Description

[0019] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the change detection network.

[0022] Figure 3 This is a schematic diagram of the feature aggregation module.

[0023] Figure 4 This is a schematic diagram of the self-attention module.

[0024] Figure 5 This is a schematic diagram of the change sensing module.

[0025] Figure 6 This is a schematic diagram of the spatiotemporal attention module.

[0026] Figure 7 This is a flowchart illustrating the deployment method of a change detection network. Detailed Implementation

[0027] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the specific embodiments. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0029] Figure 1 This is a schematic flowchart illustrating a method for reducing the false alarm rate of target detection provided by the present invention. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.

[0030] like Figure 1 As shown, the method includes: S1. Define the change detection dataset and label the real change values; the change detection dataset includes several image pairs, and the image pairs include background images and detection images; S2. Input the image pairs from the change detection dataset into the encoding backbone of the pre-constructed change detection network to obtain multi-scale feature maps corresponding to the background image and the detection image, respectively. S3. The first predetermined multi-scale feature map is processed by the configured feature aggregation module in the manner of pairing shallow feature maps with deeper feature maps to obtain an aggregated and enhanced multi-scale feature map; the second predetermined multi-scale feature map is processed by the configured self-attention module to obtain a self-attention enhanced feature map. S4. Subtract the multi-scale feature map of the background image after aggregation / self-attention enhancement from the multi-scale feature map of the detection image after aggregation / self-attention enhancement, and take the absolute value to generate a multi-scale difference feature map. S5. The multi-scale difference feature map is processed by the configured change perception module to obtain the enhanced multi-scale change perception feature map. S6. The enhanced multi-scale change perception feature map is processed through the configured spatiotemporal attention module to obtain the spatiotemporal attention feature map; S7. Input the spatiotemporal attention feature map into the configured change detection prediction head to obtain the final output change map of the change detection network, and perform supervised training on the final output change map using the real change values; S8. Deploy the trained change detection network to the detection terminal to remove false positives in target detection.

[0031] This invention constructs a dual-branch change detection network to extract multi-scale features from both the background and detection images. It then utilizes a feature aggregation module and a self-attention module to enhance the representational power of these features, effectively uncovering significant changes between images. This method can accurately distinguish between real targets and background interference or clutter, significantly reducing false alarm rates and improving the accuracy of target detection.

[0032] To facilitate understanding of the present invention, the following description further illustrates the method for reducing the false alarm rate of target detection provided by the present invention, based on the principle of the method for reducing the false alarm rate of target detection and in conjunction with the process of deploying the change detection network in the embodiments.

[0033] Specifically, step S1 includes: S11. Define the change detection dataset. ,in, , where n represents the change detection dataset The total number of image pairs in the middle; Indicates the first Image pairs; Represents a background image; This indicates a detected image that shows a change relative to the background image; and All dimensions are , Image height, Image width; S12, Image pair The changes in the true values ​​are labeled to generate a binary mask image. Among them, the binarized mask image The size is Binarized mask image In this context, a pixel value of 1 indicates a changing area, and a pixel value of 0 indicates a non-changing area.

[0034] Based on the dataset defined in step S1, the present invention constructs as follows: Figure 2 The change detection network shown includes a dual-branch structure and is used to process the background image. and detection images Paired inputs.

[0035] Additionally, step S2 includes: S21. The MobileNetV2 network structure with the global average pooling layer and the final fully connected layer removed is configured as the coding backbone of the change detection network. The coding backbone contains five stages, each containing a convolutional module with a stride of 2, which is used to progressively downsample the multi-scale feature map in the spatial dimension, so that the size of the multi-scale feature map is reduced to half of the previous stage. S22. Compare the images in the change detection dataset to samples. The input is fed into the encoding backbone to extract multi-scale feature maps from the background image and the detection image, respectively; among which, For background image Output multi-scale feature maps , , , and ; For detecting images Output multi-scale feature maps , , , and ; The dimensions of each multi-scale feature map are based on the input image size. The calculation is as follows: and The size is , indicating spatial resolution is And the number of channels is 16; and The size is , indicating spatial resolution is And the number of channels is 24; and The size is , indicating spatial resolution is And the number of channels is 32; and The size is , indicating spatial resolution is And the number of channels is 96; and The size is , indicating spatial resolution is And the number of channels is 160.

[0036] Specifically, the change detection network described in this invention is a dual-temporal feature extraction and fusion network based on a lightweight backbone network, specifically designed to identify significant change regions in multi-temporal images. This network uses MobileNetV2 as its encoding backbone, and its structure is adjusted by removing the global average pooling layer and the final fully connected layer to better adapt to pixel-level change detection tasks.

[0037] In addition, step S3 includes: S31, Transfer the first predetermined multi-scale feature map , , , , and By pairing shallow feature maps with deeper feature maps, the configured feature aggregation module processes the data to obtain aggregated and enhanced multi-scale feature maps. , , , , and ; S32, Transfer the second predetermined multi-scale feature map and The feature map is obtained by processing the data through the configured self-attention module. and .

[0038] To enhance the change detection network's ability to perceive local changes in images, this invention is configured with, as follows: Figure 3The feature aggregation module shown is used to fuse feature map information from different levels. This module takes feature maps from adjacent layers in the feature extraction network as paired inputs and interacts with them through a cross-attention mechanism. One layer acts as the query, and the other as the key and value. During this process, the key and value are downsampled to reduce computational overhead. This feature aggregation module effectively fuses shallow detail information with deep semantic information, improving the representation ability of changing regions. It also boasts advantages such as lightweight structure and high inference efficiency, making it suitable for deployment requirements of resource-sensitive edge devices.

[0039] S311, Feature map and feature map Input to the feature aggregation module: Will The kernel size in the input feature aggregation module is The convolutional layer yields the feature map. The size is .Will Divide it into two parts along the channel dimension on average, and obtain and The size is .

[0040] Will Downsampling is performed using max pooling to obtain The size is .

[0041] Will The query is flattened and then projected through a linear layer to obtain the result. The size is .

[0042] Will The surface is flattened, and features are projected through two linear layers to obtain the key. Sum The size is .

[0043] Will Through a convolution kernel size of Furthermore, a deconvolutional layer with a stride of 2 is used to obtain features. The size is Features Divide it into two parts along the channel dimension on average, and obtain and The size is .

[0044] Will Downsampling is performed using max pooling to obtain The size is .

[0045] Will The query is flattened and then projected through a linear layer to obtain the result. The size is .

[0046] Will The surface is flattened, and features are projected through two linear layers to obtain the key. Sum The size is .

[0047] Will and The cross-attention score is calculated using the following formula: The size is :

[0048] in, The scale normalization parameter is set to 24 in this invention. This indicates that the Softmax function is used for calculation.

[0049] Will and The cross-attention score is calculated using the following formula: The size is :

[0050] in, The scaling normalization parameter is set to 24 in this invention.

[0051] Will and Perform weighted information updates to obtain The size is : ; Will and Perform weighted information updates to obtain The size is : ; Will Restore to spatial feature dimensions, and with Concatenate along the channel dimension, then pass through a Dimensionality reduction is performed on the convolutional layers to obtain... The size is .

[0052] Will Restore to spatial feature dimensions, and with Concatenate along the channel dimension, then pass through a Dimensionality reduction is performed on the convolutional layers to obtain... The size is .

[0053] Will and Concatenate along the channel dimension, then pass through a Dimensionality reduction is performed on the convolutional layers to obtain... The size is .

[0054] Similarly, the feature map and feature map Input to the feature aggregation module to obtain The size is ; feature map and feature map Input to the feature aggregation module to obtain The size is ; feature map and feature map Input to the feature aggregation module to obtain The size is ; feature map and feature map Input to the feature aggregation module to obtain The size is ; feature map and feature map Input to the feature aggregation module to obtain The size is .

[0055] To improve the deepest feature map and To enhance the expressive power of its features, this invention introduces a method such as... Figure 4 The self-attention module shown is used as the query, key, and value of the feature map itself. Through a self-attention mechanism, it models long-distance dependencies within features, helping to capture global contextual information and enhancing the overall perception of changing regions. This module is compact and computationally efficient, complementing the feature aggregation module and further improving the network's ability to identify subtle changes in complex scenes.

[0056] S321, Feature map Input to the self-attention module: Will Through a convolution kernel size of The convolutional layer yields the feature map. The size is . Feature map Divide it into two parts along the channel dimension on average, and obtain and The size is .Will The data is flattened and then projected through three linear layers to obtain the query result. ,key Sum The size is .

[0057] Will and The cross-attention score is calculated using the following formula: The size is :

[0058] in, The scaling parameter is set to 160 in this invention.

[0059] Will and Perform weighted information updates to obtain The size is :

[0060] Will Restore to spatial feature dimensions, and with Concatenate along the channel dimension, then pass through a Dimensionality reduction is performed on the convolutional layers to obtain... The size is .

[0061] Similarly, the feature map Input into the self-attention module, and get The size is .

[0062] Then, step S4 includes: Aggregate the background image at scale 2 to enhance the feature map. Aggregated Enhancement Feature Map of Detection Image at Scale 2 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 2. ; Aggregate the background image at scale 3 to enhance the feature map. Aggregated Enhancement Feature Map of Detection Image at Scale 3 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 3. ; Aggregate the background image at scale 4 to enhance the feature map. Aggregated Enhancement Feature Map of Detection Image at Scale 4 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 4. ; Self-attention enhancement feature map of the background image at scale 5 Self-attention enhancement feature map of the detection image at scale 5 Subtract the values ​​and take the absolute values ​​to generate a difference feature map at scale 5. .

[0063] To further explore the differences in feature levels between two-phase images, this invention introduces a temporal difference modeling mechanism. Specifically, the enhanced feature maps of the background image and the detection image at multiple scales are subtracted element-wise, and the absolute values ​​are taken to generate difference feature maps. This method can effectively highlight significant change regions between consecutive time steps, suppress static background interference, and provide a more sensitive and robust representation of change information for subsequent modules.

[0064] S41, will and Perform element-by-element subtraction and take the absolute value to obtain... The size is : .

[0065] Similarly, and Perform element-by-element subtraction and take the absolute value to obtain... The size is ;Will and Perform element-by-element subtraction and take the absolute value to obtain... The size is ;Will and Perform element-by-element subtraction and take the absolute value to obtain... The size is .

[0066] In addition, step S5 includes: Multiscale difference feature map , , and The input configuration change-aware module is subjected to multi-scale convolution and weighted fusion to obtain enhanced multi-scale change-aware feature maps. , , and .

[0067] To enhance the ability to perceive multi-scale change information, this invention introduces, for example... Figure 5 The change-aware module shown is based on a multi-scale convolutional structure. It employs a combination of standard convolutions with different receptive fields and dynamically deformable convolutions to extract local change patterns, extracting differential features at three scales with dilation rates of 1, 3, and 5. Simultaneously, a learnable weighting mechanism is introduced to weight and fuse the features from the three scales and a skip connection branch. The final output change-aware features effectively suppress spurious changes caused by background interference while responding to real changes, thus improving detection accuracy and robustness.

[0068] S51, will Input to the change sensing module: Will Through a convolution kernel size of A convolutional layer with an expansion rate of 1 yields features. The size is ,Will Input to a convolution kernel of size Dynamically deformable convolutional layers are used to obtain features. The size is .

[0069] Will Through a convolution kernel size of A convolutional layer with an expansion ratio of 3 is used to obtain features. The size is ,Will Input to a convolution kernel of size Dynamically deformable convolutional layers are used to obtain features. The size is .

[0070] Will Through a convolution kernel size of A convolutional layer with an expansion ratio of 5 is used to obtain features. The size is ,Will Input to a convolution kernel of size Dynamically deformable convolutional layers are used to obtain features. The size is .

[0071] Will Perform global average pooling and flatten the vectors to obtain the feature vectors. , length is ,Will The weighted score vector is obtained by passing a fully connected layer and calculating using the Softmax function. The length is 4. (Passed) ,Will , , and Weighted fusion is performed to obtain features The size is : ; in, express The first score, express The second score, express The third score, express The fourth score.

[0072] Similarly, Input to the multi-scale change perception module to obtain features The size is ;Will Input to the multi-scale change perception module to obtain features The size is ;Will Input to the multi-scale change perception module to obtain features The size is .

[0073] Then, step S6 includes: S61. Change-sensing feature map The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S62. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. ; Fusing spatiotemporal attention feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S63. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. ; Fusing spatiotemporal attention feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S64. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. Integrating spatiotemporal attention into feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. .

[0074] To further enhance the discriminative power and spatial detail recovery of the feature maps, this invention introduces upsampling fusion and spatiotemporal attention mechanisms after the change perception module. First, the shallow feature map is upsampled through convolution and nearest-neighbor interpolation, and then fused with the high-resolution feature map from the corresponding stage to compensate for the spatial information lost during downsampling. The fused feature map is then fed into... Figure 6 The spatiotemporal attention module shown introduces channel attention and spatial attention mechanisms. Channel attention models inter-channel dependencies through global average pooling and fully connected layers, highlighting key semantic channels. Spatial attention utilizes multi-scale convolutions to extract spatial contextual information, explicitly enhancing the response to significantly changing regions. Finally, the enhanced feature map is output through element-wise weighted summation, effectively improving the model's sensitivity and robustness to changing regions while suppressing spurious changes in complex backgrounds, providing stronger support for final change discrimination.

[0075] S61, will Input to the spatiotemporal attention module: Will Perform global average pooling and flatten the vectors to obtain the feature vectors. , length is ,Will The channel attention score vector is obtained by passing through a fully connected layer and calculating using the sigmoid function. The length is 160.

[0076] Will and Multiply the results to obtain the channel attention feature map. The size is .

[0077] Will Input to a convolution kernel of size The convolutional layer yields the feature map. The size is .Will The inputs are respectively fed into the convolution kernel with a size of 1. The size of the convolutional layer and the convolutional kernel are The convolutional layers respectively produce feature maps. The size is Feature map The size is .Will and Perform addition operations and average pooling along the channel dimension to obtain the feature map. The size is .Will Input to a convolution kernel of size The convolutional layers are used, and the spatial attention score map is obtained by calculating using the sigmoid function. The size is .

[0078] Will and Multiplying the results yields a spatial attention feature map. The size is .

[0079] Will and Perform an addition operation to obtain the attention-enhanced feature map. The size is .

[0080] S62, will The input to the convolution kernel size is The convolutional layers are then upsampled by a factor of 2 using nearest neighbor interpolation to obtain the feature maps. The size is .

[0081] Will and Perform an addition operation to obtain the feature map. The size is .

[0082] S63, will Input to the spatiotemporal attention module: Will Perform global average pooling and flatten the vectors to obtain the feature vectors. , length is ,Will The channel attention score vector is obtained by passing through a fully connected layer and calculating using the sigmoid function. The length is 96.

[0083] Will and Multiply the results to obtain the channel attention feature map. The size is .

[0084] Will Input to a convolution kernel of size The convolutional layer yields the feature map. The size is .Will The inputs are respectively fed into the convolution kernel with a size of 1. The size of the convolutional layer and the convolutional kernel are The convolutional layers respectively produce feature maps. The size is Feature map The size is .Will and Perform addition operations and average pooling along the channel dimension to obtain the feature map. The size is .Will Input to a convolution kernel of size The convolutional layers are used, and the spatial attention score map is obtained by calculating using the sigmoid function. The size is .

[0085] Will and Multiplying the results yields a spatial attention feature map. The size is .

[0086] Will and Perform an addition operation to obtain the attention-enhanced feature map. The size is .

[0087] Similarly, the attention-enhanced feature maps are obtained sequentially. The size is and attention-enhanced feature maps The size is .

[0088] In addition, step S7 includes: Will The kernel size input to the change detection prediction head is The convolutional layer is used, and a pre-stored sigmoid function is used for calculation to obtain the predicted change map. The size is ; Plot the predicted changes The final output change map of the change detection network is obtained by performing a 4-fold spatial upsampling using pre-stored bilinear interpolation. ; Using a binary mask image Changes in the final output diagram Calculate the loss and perform supervised training using a pre-stored backpropagation method.

[0089] Furthermore, by binarizing the mask image Changes in the final output diagram The formula for calculating the loss is: ; in, Represents the binary cross-entropy loss function; Represents the Dice loss function; The loss balance coefficient is set to 0.3 in this invention.

[0090] Finally, step S8 includes: Deploy the trained change detection network to the detection terminal and start the terminal. The detection terminal can be an optoelectronic turntable device with target detection function.

[0091] like Figure 7 As shown, after integrating the change detection network, the photoelectric turntable initially has no usable background image. Therefore, once the photoelectric turntable has stabilized at a preset position for the first time, if it continuously... If no target is detected within a given time period, the system will save the image frame acquired at that moment. Save it as the first background image for this preset position.

[0092] if Targets were detected within a certain timeframe, but all targets were within... If the position of the detected target does not change within the detection time, it is considered that all detected targets are long-term static targets, thus satisfying the condition of no moving target interference. The system then uses the image frame acquired at that moment. Save it as the first background image for this preset position.

[0093] If the first background image at the preset position is successfully acquired, it is initialized as the historical background image of that preset position. and the current real-time background image .

[0094] When the photoelectric turntable is stationary at a preset position, if the currently detected video image... The target was detected by the target detection function, and the historical background image. If it exists, then it will and The data is input into the change detection network, and the predicted change map is obtained by following steps S2 to S7 above. .

[0095] Map the bounding boxes detected by the object detection function to In the middle, calculate the score of the degree of change in the detection box region. : ; in, This indicates the height of the detection frame. This indicates the width of the detection frame. This represents the index of any row within the target box. This represents the index of any column within the target box. express The value at any point within the target bounding box region.

[0096] if Less than the preset threshold If the target detected by the target detection function is considered to be a background or a long-term stationary target, it is considered a false alarm and is removed.

[0097] When the photoelectric turntable stops at a preset position, if it continuously... If no target is detected within seconds, and and If initialized, the system will display a real-time background image. Update to the image acquired at that moment. If the real-time background image... Updated, and the background image is from the last update history. The time exceeds the preset threshold The system will then display the historical background image. Updated to the newly acquired live background image .

[0098] The optoelectronic turntable integrates a Huawei Atlas 200IA2 inference acceleration module and deploys the change detection network described in this invention to assist existing target detection networks in false alarm removal. The change detection network and the target detection network work collaboratively through a unified interface to process the video image stream acquired by the optoelectronic device in real time, improving the system's accuracy in identifying areas of abnormal change.

[0099] Specifically, the object detection network first performs routine object recognition operations on each frame of the image. Then, it inputs the current frame image and the historical background image at the same preset position into the change detection network to generate a pixel-level change map. Based on the change detection results, the system scores the degree of change of the candidate boxes in the object detection output and determines whether they are false alarms based on a preset threshold, thereby achieving high-precision dynamic object selection.

[0100] The Huawei Atlas 200IA2 acceleration module provides efficient inference support at the edge for the aforementioned change detection network, ensuring the model's real-time operation capability on the optoelectronic turntable device. This invention's method can complete local change detection and false alarm judgment without cloud dependency, and is suitable for the integrated deployment of optoelectronic devices with target detection capabilities.

[0101] This embodiment verifies the false alarm removal capability of the proposed change detection network in a practical target detection task. In a fixed outdoor monitoring scenario, a certain type of photoelectric turntable is used to monitor a distant area for an extended period. The target detection network employs a pre-trained YOLOv5 network and detects pedestrians and vehicles. The false alarm performance of the following two configurations is tested: Control group: Using only the object detection network; Experimental group: Deploy the change detection network described in this invention to filter out false alarms in the detection results of the target detection network.

[0102] The experiment used a photoelectric turntable to capture a continuous video clip at a preset position, containing 7500 frames and labeling a total of 842 real targets. A false alarm was defined as a detection bounding box with an intersection-union ratio (IU) of less than 0.2 and no semantic overlap with the real target. The experimental results are shown in Table 1. Table 1. Comparison of experimental performance indicators for false alarm removal based on change detection network.

[0103] As can be seen from the table, the ability of the change detection network proposed in this invention to remove false alarms in target detection tasks has been significantly verified.

[0104] The control group, using only a traditional target detection network, detected 975 targets, of which 828 were true targets, resulting in 147 false positives and a false positive rate of 15.08%. The experimental group, by introducing the change detection network of this invention, reduced the total number of detected targets to 854, with 825 being true targets and only 29 false positives, significantly lowering the false positive rate to 3.40%. This demonstrates that the change detection network effectively eliminates false positives caused by background interference and static targets.

[0105] Regarding false negatives, the control group had 14 false negatives, with a false negative rate of 1.66%; the experimental group had 17 false negatives, with a false negative rate of 2.02%. Although there was a slight increase, the false negative rate was still within an acceptable range, indicating that the change detection network of the present invention significantly improves the false positive filtering capability while basically maintaining the recall performance of the original target detection module.

[0106] In summary, the experimental results show that the change detection network of the present invention can improve the accuracy of the target detection system in complex scenarios, especially in reducing false alarms, and has good engineering application value.

[0107] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0108] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.

Claims

1. A method for reducing the false alarm rate of target detection, characterized in that, include: S1. Define the change detection dataset and label the real change values; the change detection dataset includes several image pairs, and the image pairs include background images and detection images; S2. Input the image pairs from the change detection dataset into the encoding backbone of the pre-constructed change detection network to obtain multi-scale feature maps corresponding to the background image and the detection image, respectively. Configure the MobileNetV2 network structure with the global average pooling layer and the final fully connected layer removed as the encoding backbone of the change detection network. The encoding backbone contains five stages, each containing a convolutional module with a stride of 2, which is used to progressively downsample the multi-scale feature map in the spatial dimension, so that the size of the multi-scale feature map is reduced to half of the previous stage. S3. The first predetermined multi-scale feature map is processed by the configured feature aggregation module in the manner of pairing shallow feature maps with deeper feature maps to obtain an aggregated and enhanced multi-scale feature map; the second predetermined multi-scale feature map is processed by the configured self-attention module to obtain a self-attention enhanced feature map. S4. Subtract the multi-scale feature maps of the background image after aggregation enhancement or self-attention enhancement at different scales from the multi-scale feature maps of the detection image after aggregation enhancement or self-attention enhancement at different scales, and take the absolute value to generate a multi-scale difference feature map. S5. The multi-scale difference feature map is processed by the configured change perception module to obtain the enhanced multi-scale change perception feature map. S6. The enhanced multi-scale change perception feature map is processed through the configured spatiotemporal attention module to obtain the spatiotemporal attention feature map; S7. Input the spatiotemporal attention feature map into the configured change detection prediction head to obtain the final output change map of the change detection network, and perform supervised training on the final output change map using the real change values; S8. Deploy the trained change detection network to the detection terminal to remove false positives in target detection; Step S4 includes: The aggregated enhanced feature map of the background image at scale 2 is subtracted from the aggregated enhanced feature map of the detection image at scale 2, and the absolute value is taken to generate a difference feature map at scale 2. ; The aggregated enhanced feature map of the background image at scale 3 is subtracted from the aggregated enhanced feature map of the detection image at scale 3, and the absolute value is taken to generate a difference feature map at scale 3. ; The aggregated enhanced feature map of the background image at scale 4 is subtracted from the aggregated enhanced feature map of the detection image at scale 4, and the absolute value is taken to generate a difference feature map at scale 4. ; The self-attention enhancement feature map of the background image at scale 5 is subtracted from the self-attention enhancement feature map of the detection image at scale 5, and the absolute value is taken to generate a difference feature map at scale 5. .

2. The method for reducing the false alarm rate of target detection according to claim 1, characterized in that, Step S1 includes: S11. Define the change detection dataset. ,in, , where n represents the change detection dataset The total number of image pairs in the middle; Indicates the first Image pairs; Represents a background image; This indicates a detected image that shows a change relative to the background image; and All dimensions are , Image height, Image width; S12, Image pair The changes in the true values ​​are labeled to generate a binary mask image. Among them, the binarized mask image The size is Binarized mask image In this context, a pixel value of 1 indicates a changing area, and a pixel value of 0 indicates a non-changing area.

3. The method for reducing the false alarm rate of target detection according to claim 2, characterized in that, Step S2 includes: Images from the change detection dataset are used as samples. The input is fed into the encoding backbone to extract multi-scale feature maps from the background image and the detection image, respectively; among which, For background image Output multi-scale feature maps , , , and ; For detecting images Output multi-scale feature maps , , , and ; The dimensions of each multi-scale feature map are based on the input image size. The calculation is as follows: and The size is , indicating spatial resolution is And the number of channels is 16; and The size is , indicating spatial resolution is And the number of channels is 24; and The size is , indicating spatial resolution is And the number of channels is 32; and The size is , indicating spatial resolution is And the number of channels is 96; and The size is , indicating spatial resolution is And the number of channels is 160.

4. The method for reducing the false alarm rate of target detection according to claim 3, characterized in that, Step S3 includes: S31, Transfer the first predetermined multi-scale feature map , , , , and By pairing shallow feature maps with deeper feature maps, the configured feature aggregation module processes the data to obtain aggregated and enhanced multi-scale feature maps. , , , , and ;in, This is an aggregated enhancement feature map of the background image at scale 2. This is an aggregated enhanced feature map of the background image at scale 3. This is an aggregated enhancement feature map of the background image at scale 4. To detect the aggregated augmented feature map of the image at scale 2, To detect the aggregated augmented feature map of the image at scale 3, To detect the aggregated enhanced feature map of the image at scale 4; S32, Transfer the second predetermined multi-scale feature map and The feature map is obtained by processing the data through the configured self-attention module. and .

5. The method for reducing the false alarm rate of target detection according to claim 4, characterized in that, Step S5 includes: Multiscale difference feature map , , and The input configuration change-aware module is subjected to multi-scale convolution and weighted fusion to obtain enhanced multi-scale change-aware feature maps. , , and .

6. The method for reducing the false alarm rate of target detection according to claim 5, characterized in that, Step S6 includes: S61. Change-sensing feature map The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S62. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. ; Fusing spatiotemporal attention feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S63. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. ; Fusing spatiotemporal attention feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. ; S64. Spatiotemporal attention feature map With change-sensing feature map Upsampling and fusion are performed to obtain a spatiotemporal attention fusion feature map. Integrating spatiotemporal attention into feature maps The input is fed into the spatiotemporal attention module to obtain the spatiotemporal attention feature map. .

7. The method for reducing the false alarm rate of target detection according to claim 6, characterized in that, Step S7 includes: Will The kernel size input to the change detection prediction head is The convolutional layer is used, and a pre-stored sigmoid function is used for calculation to obtain the predicted change map. The size is ; Plot the predicted changes The final output change map of the change detection network is obtained by performing a 4-fold spatial upsampling using pre-stored bilinear interpolation. ; Using a binary mask image Changes in the final output diagram Calculate the loss and perform supervised training using a pre-stored backpropagation method.

8. The method for reducing the false alarm rate of target detection according to claim 7, characterized in that, Using a binary mask image Changes in the final output diagram The formula for calculating the loss is: ; in, This represents the binary cross-entropy loss function. Represents the Dice loss function. This is the loss balance coefficient.

9. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed, it implements the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Remote sensing image change detection method based on space-time attention enhancement

    CN116524362A

  • Ultrahigh spatial resolution remote sensing image change detection twin network and method

    CN117494765A