Weak and small target detection method based on spatio-temporal adaptive resonance Mamba network

By using a spatiotemporally adaptive resonant Mamba network and leveraging a local contrast adaptation mechanism and bidirectional temporal scanning, the problems of local perception and motion feature extraction in weak target detection are solved, achieving efficient and robust target detection.

CN122289670APending Publication Date: 2026-06-26INST OF OPTICS & ELECTRONICS CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF OPTICS & ELECTRONICS CHINESE ACAD OF SCI
Filing Date
2026-05-28
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing weak target detection technologies are difficult to effectively distinguish between weak targets and high-frequency random noise due to long imaging distance, sensor resolution limitations, and atmospheric transmission interference. Furthermore, the existing Mamba architecture has deficiencies in local perception capabilities and motion feature extraction, resulting in high rates of missed detections and false alarms.

Method used

A robust detection of weak targets is achieved by employing a spatiotemporal adaptive resonance Mamba network, which combines a visual state space encoder, a spatiotemporal adaptive resonance fusion module, and a decoder with a local contrast adaptation mechanism, bidirectional temporal scanning, and a motion resonance mechanism.

Benefits of technology

It improves detection sensitivity, reduces false alarm rate, solves the problem of textureless alignment, and is suitable for deployment in infrared systems with high real-time requirements while maintaining high computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289670A_ABST
    Figure CN122289670A_ABST
Patent Text Reader

Abstract

This invention discloses a weak target detection method based on a spatiotemporal adaptive resonant Mamba network, belonging to the field of computer vision and image processing technology. The method includes: acquiring a sequence of images to be detected; determining an input image sequence from the sequence of images to be detected using a sliding time window and constructing an input image sequence tensor; inputting the input image sequence tensor into a visual state-space encoder to extract spatial features of each frame of the input image; inputting the extracted spatial features into a spatiotemporal adaptive resonant fusion module, which performs implicit motion alignment, motion resonance perception, bidirectional temporal scanning, and local contrast adaptive spatial scanning, ultimately obtaining spatiotemporally enhanced features and inputting them into a decoder; finally, reconstructing the features through the decoder and outputting the target detection result. This invention effectively solves the problems of easy loss of weak targets and high false alarm rate in complex dynamic scenes, significantly improving the detection accuracy and robustness of weak targets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and image processing technology, specifically relating to a method for detecting weak targets based on a spatiotemporal adaptive resonant Mamba network. Background Technology

[0002] Small target detection has significant application value in critical fields such as maritime search and rescue and security monitoring. However, due to limitations in imaging distance, sensor resolution, and atmospheric transmission interference, small targets in images typically appear as tiny (often less than 3×3 pixels), lacking texture and geometric information, and exhibiting low energy as point-like features. Furthermore, in real-world applications, the background often contains clutter, resulting in an extremely low signal-to-noise ratio for small targets, making them easily obscured by bright backgrounds.

[0003] Existing weak target detection technologies are mainly divided into two categories: single-frame detection and multi-frame detection, but both have significant limitations. Single-frame detection methods rely primarily on the local saliency of the target in space. Traditional filtering algorithms have poor generalization ability and are difficult to adapt to complex and ever-changing scenes. While deep learning-based convolutional neural networks (CNNs) or Transformers have strong feature extraction capabilities, the downsampling operations required in deep networks lead to a significant loss of feature information for weak targets. Furthermore, relying solely on the spatial information of a single frame, the network struggles to distinguish between highly similar high-frequency random noise spots and real targets, resulting in a high false alarm rate. Multi-frame detection methods introduce a temporal dimension to utilize motion information, but mainstream 3D convolutional computations are computationally expensive and difficult to deploy on edge devices. Moreover, existing multi-frame fusion methods rely on optical flow for motion compensation. However, weak targets inherently lack texture features, leading to significant errors or even failures in optical flow calculations. This results in failed inter-frame feature alignment, causing "ghosting" or energy dissipation of target features during the fusion process.

[0004] In terms of the core architecture for sequence image processing, early methods mainly relied on Recurrent Neural Networks (RNNs) and Transformer networks. However, both have bottlenecks when processing long sequences: although RNNs can update their memories over time, their computation process is sequential (i.e., ...). The calculation of the time must wait The computation time is too short (time-limited), making parallel training impossible and slow, and prone to gradient vanishing in long sequences. While Transformer networks offer good parallelism, their core attention mechanism requires pairwise computation of each element in the input sequence, resulting in a computational complexity of O(n log n). , This indicates the number of sequence elements involved in attention calculation (for visual input, sequence elements correspond to patch units or feature units obtained after image segmentation or feature transformation). As image resolution or sequence length increases, memory consumption and computational load increase quadratically, making it difficult to apply to edge devices.

[0005] In contrast, the State Space Model (SSM) combines the advantages of both approaches. During training, it can be transformed into a convolutional form, enabling efficient parallel training like CNNs; during inference, its computational complexity is only a fraction of that of a CNN. (Linear level). Regardless of the sequence length, SSM only needs to maintain a fixed-size hidden state, which allows it to have a global receptive field with extremely low memory overhead.

[0006] In recent years, the Mamba architecture based on SSM (Simultaneous Scanning Model) has emerged in vision tasks due to its excellent performance. However, its direct application to weak target detection still faces two major technical bottlenecks: First, the lack of local perception leads to the loss of weak signals. Compared to CNNs, which excel at extracting local neighborhood features, the Mamba architecture focuses more on global long sequence modeling. This mechanism can easily lead to the model over-focusing on large areas of background context while ignoring local high-frequency abrupt signals (i.e., weak targets) that occupy only a few pixels. This causes the target features to be smoothed or "diluted" by background noise during state updates, resulting in missed detections. Second, the fixed scanning mechanism leads to the failure of motion feature extraction. Existing visual Mamba architectures usually use a preset, fixed spatial scanning order, lacking awareness of the actual direction of target movement. When the direction of the scanning path is contrary to or orthogonal to the target's trajectory (e.g., the target moves upward while the scan is downward), SSM cannot continuously accumulate the target's energy on the time axis, causing the model to misjudge continuously moving targets as discrete flickering noise, making it difficult to form effective feature enhancement.

[0007] In summary, the urgent technical challenge is to design a method for detecting small targets that can compensate for the limitations of local perception, adaptively match target motion trajectories, and overcome the problem of aligning textureless targets, while maintaining the linear computational complexity and global modeling advantages of the Mamba architecture. Summary of the Invention

[0008] To address the technical challenges of existing Mamba architectures, such as signal overload when processing small targets, lack of motion direction awareness, and difficulty in accurately aligning textureless targets, this invention provides a small target detection method based on a spatiotemporal adaptive resonant Mamba network. This method integrates the local contrast characteristics and motion continuity of small targets into a state-space model, captures target trajectories by constructing a bidirectional temporal scanning mechanism, and designs a motion resonance mechanism where the scanning direction aligns with the motion direction. This significantly suppresses random flicker noise while achieving robust detection of small targets.

[0009] To achieve the above objectives, the present invention adopts the following technical solution:

[0010] In a first aspect, the present invention provides a method for detecting weak targets based on a spatiotemporal adaptive resonant Mamba network, wherein the spatiotemporal adaptive resonant Mamba network includes a visual state-space encoder, a spatiotemporal adaptive resonant fusion module, and a decoder; the method includes:

[0011] A sequence of images to be detected is obtained, and an input image sequence is determined from the sequence of images to be detected using a sliding time window, and an input image sequence tensor is constructed; the input image sequence includes at least the current image to be detected, as well as the previous frame image and the next frame image adjacent to the current image to be detected;

[0012] The input image sequence tensor is input into the visual state space encoder to extract the spatial features of each frame of the input image sequence; the visual state space encoder is constructed based on the VMamba model.

[0013] The spatial features of each frame image are extracted and input into the spatiotemporal adaptive resonance fusion module for feature fusion to obtain spatiotemporal enhanced features; the spatiotemporal adaptive resonance fusion module is used to perform implicit motion alignment, motion resonance perception, bidirectional temporal scanning and local contrast adaptive spatial scanning.

[0014] The spatiotemporal enhancement features are input into the decoder to obtain the target detection result.

[0015] In a second aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned weak target detection method based on a spatiotemporal adaptive resonant Mamba network.

[0016] Thirdly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned weak target detection method based on a spatiotemporal adaptive resonant Mamba network.

[0017] The beneficial effects of this invention are as follows:

[0018] (1) Extremely high detection sensitivity: In view of the defect that the Mamba architecture easily ignores extremely small targets, this invention proposes a Local Contrast Adaptation (LCA) mechanism, which cleverly transforms the physical prior of the "local high-frequency mutation" of infrared small targets into a mathematical constraint of the state equation, dynamically increases the state update step size of the target area, thereby significantly improving the ability to capture extremely dark and weak targets.

[0019] (2) Significantly reduce false alarm rate: This invention innovatively constructs a bidirectional temporal scanning mechanism and a motion resonance mechanism, which makes full use of the spatiotemporal characteristics that "the target is continuous in time and has a trajectory, while the noise flashes randomly in time". It only enhances the signal that conforms to the potential motion direction, effectively filtering out the bright random noise and static background clutter in a single frame, and realizing low false alarm detection.

[0020] (3) Solving the problem of textureless alignment: This invention proposes an alignment strategy based on a zero-initialization Deformable Convolutional Network (DCN), which overcomes the problem of computational failure of traditional optical flow methods when weak targets lack texture information, avoids the risk of image distortion in the early stage of training, and can achieve accurate inter-frame alignment in the feature space without additional optical flow supervision.

[0021] (4) Computationally efficient and suitable for deployment: Compared with video detection methods based on 3D convolution or RNN, this invention utilizes the linear computational complexity advantage of the Mamba architecture to significantly reduce memory usage and inference latency while maintaining powerful multi-frame spatiotemporal modeling capabilities, making it more suitable for deployment in infrared systems with high real-time requirements. Attached Figure Description

[0022] Figure 1 This is a flowchart of the weak target detection method based on spatiotemporal adaptive resonant Mamba network of the present invention.

[0023] Figure 2 This is a diagram illustrating the overall architecture of the spatiotemporal adaptive resonant Mamba network according to an embodiment of the present invention.

[0024] Figure 3 This is a schematic diagram of the spatiotemporal adaptive resonance fusion module according to an embodiment of the present invention.

[0025] Figure 4 This is a schematic diagram illustrating the principle of the motion resonance mechanism in an embodiment of the present invention.

[0026] Figure 5 This is a schematic diagram comparing the mechanism and effect of bidirectional timing scanning according to an embodiment of the present invention; wherein, the first part is a schematic diagram of the mechanism of bidirectional timing scanning, and the second part is a schematic diagram comparing the effect of bidirectional timing scanning.

[0027] Figure 6 This is a schematic diagram of the local contrast adaptive spatial scanning processing flow according to an embodiment of the present invention.

[0028] Figure 7 This is a schematic diagram comparing the detection result image obtained by the weak target detection method of this embodiment with the real target image, wherein (a) is the detection result image obtained by the weak target detection method of this embodiment, and (b) is the real target image. Detailed Implementation

[0029] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0030] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0031] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.

[0032] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.

[0033] Furthermore, to better illustrate the present invention, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that the present invention can be practiced without certain specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order to highlight the spirit of the invention.

[0034] This invention proposes a spatiotemporal adaptive resonant Mamba network, which includes a visual state space encoder, a spatiotemporal adaptive resonant fusion module, and a decoder. Figure 1 The flowchart of the weak target detection method based on spatiotemporal adaptive resonant Mamba network of the present invention is as follows: Figure 1 As shown, the method includes:

[0035] Step 1: Obtain the image sequence to be detected, and use a sliding time window to determine the input image sequence from the image sequence to be detected and construct the input image sequence tensor; the input image sequence includes at least the current image to be detected and the previous frame image and the next frame image adjacent to the current image to be detected.

[0036] For example, the dimension of the input image sequence tensor is ;in, For batch size, The number of image frames contained in the input image sequence (i.e., the length of the sliding time window). For the number of channels, The height of the input image. The width of the input image. The center frame of the sliding time window is the current frame of the image to be detected.

[0037] For example, during the training phase of the spatiotemporal adaptive resonant Mamba network, the same random rotation angle and flip parameters are applied to rotate and flip each frame of sample images and their corresponding labels within the same sliding time window. The random rotation angle is 0 degrees, 90 degrees, 180 degrees, or 270 degrees.

[0038] Step 2: Input the input image sequence tensor into the visual state space encoder to extract the spatial features of each frame in the input image sequence; the visual state space encoder is constructed based on the VMamba model.

[0039] Step 3: Input the spatial features of each frame image extracted into the spatiotemporal adaptive resonance fusion module for feature fusion to obtain spatiotemporal enhanced features; the spatiotemporal adaptive resonance fusion module is used to perform implicit motion alignment, motion resonance perception, bidirectional temporal scanning and local contrast adaptive spatial scanning.

[0040] For example, implicit motion alignment is implemented using a deformable convolutional network based on zero initialization, specifically including:

[0041] (1) The spatial features of the current image to be detected are concatenated with the spatial features of the neighboring images (i.e., the images adjacent to the current image to be detected) in the channel dimension. The concatenated features are then input into a lightweight convolutional network to predict the offset field used to indicate the spatial displacement of the features and the modulation mask used to adjust the amplitude of the features.

[0042] (2) Based on the predicted offset field and modulation mask, the spatial features of adjacent images are resampled by bilinear interpolation using deformable convolution operators so that the spatial features of adjacent images are aligned with the current image to be detected in spatial position.

[0043] In the training phase of the spatiotemporal adaptive resonant Mamba network, the weights and biases of the last convolutional layer of this lightweight convolutional network are initialized to zero to prevent weak target features from being destroyed by random offsets in the early stages of training.

[0044] For example, motion resonance sensing specifically includes:

[0045] (1) Based on multiple preset translation scales and multiple translation directions, perform translation operations on the spatial feature map of the previous frame image to obtain multiple translated spatial feature maps;

[0046] (2) For each translated spatial feature map, the local cross-correlation feature map is obtained by calculating the local cross-correlation coefficient between the translated spatial feature map and the spatial feature map of the current image to be detected at each pixel position;

[0047] (3) After stitching together all the calculated local cross-correlation feature maps, they are aggregated through a convolutional layer, and the Softmax function is used to generate directional resonance weights; the directional resonance weights are used for subsequent local contrast adaptive spatial scanning.

[0048] (4) Input the directional resonance weights into the motion encoder for feature mapping to generate motion position codes; the motion position codes are injected into the spatial features of the current image to be detected in the form of residuals to enhance the salience of the moving target.

[0049] For example, bidirectional timing scan specifically includes:

[0050] (1) The spatial features of each frame image after implicit motion alignment are rearranged in dimension to obtain the rearranged feature sequence;

[0051] (2) The rearranged feature sequence is processed along the forward time axis using a selective scanning mechanism to obtain the forward scanning result;

[0052] (3) The rearranged feature sequence is flipped along the time axis, and the flipped feature sequence is processed by a selective scanning mechanism to obtain the reverse scanning result;

[0053] (4) The forward scanning results and the reverse scanning results are fused to obtain the temporal fusion features.

[0054] For example, local contrast adaptive spatial scanning specifically includes:

[0055] (1) The temporal fusion features are expanded into sequences in four directions; the four directions are from top left to bottom right, from bottom right to top left, from top right to bottom left, and from bottom left to top right;

[0056] (2) Selective scanning based on local contrast adaptive mechanism is performed on the sequences in the four directions to obtain the scanning results corresponding to the four directions;

[0057] (3) Using directional resonance weights, the scanning results corresponding to the four directions are weighted and fused to obtain spatiotemporal enhancement features.

[0058] The local contrast adaptation mechanism includes:

[0059] (1) Convolve the input features using a fixed Laplacian operator and take the absolute value to obtain a local contrast map;

[0060] (2) The local contrast map is mapped to gating coefficients through a learnable gating network. , ;

[0061] (3) Using the gating coefficient The discretization step size parameter of the state-space model is modulated to obtain the modulated discretization step size:

[0062] ;

[0063] in, The step size is the discretization step size after modulation. The basic discretization step size is obtained by mapping the input features using a linear projection layer; This is a learnable scaling factor.

[0064] When a region of high local contrast is detected The increase in size makes the state-space model pay more attention to the input information at the current moment, thus preserving the high-frequency pulse characteristics of weak targets.

[0065] Step 4: Input the spatiotemporal enhancement features into the decoder to obtain the target detection result.

[0066] The method for detecting weak targets based on spatiotemporal adaptive resonant Mamba networks of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0067] Figure 2 This is a diagram illustrating the overall architecture of the spatiotemporal adaptive resonant Mamba network according to an embodiment of the present invention. Figure 2 As shown, the weak target detection method based on spatiotemporal adaptive resonant Mamba network in this embodiment of the invention may include the following steps:

[0068] Step 1, Data Preparation and Preprocessing: Obtain the image sequence to be detected, determine the input image sequence from the image sequence to be detected using a sliding time window, and construct the input image sequence tensor. Specifically, this includes:

[0069] Step 1.1: Constructing the sliding time window: Set the length of the sliding time window. (i.e., using a sliding time window to determine continuity) (Frame images as input image sequences) ≥3, Preferably, the time window is 3 or 5. The center frame of the sliding time window is the current image frame to be detected, and the input image sequence determined by the sliding time window must include at least the current image to be detected (i.e., (Image to be detected at a given time) The previous frame image (i.e.) (Image to be detected at a given time) and the next frame image (i.e. (Image to be detected at a given time) Construct an input image sequence tensor from the input image sequence. ,in, For batch size, The number of image frames contained in the input image sequence. For the number of channels, The height of the input image. The width of the input image.

[0070] Step 1.2, Synchronous Enhancement Strategy: Labeled infrared images of weak targets can be used as training samples to train the spatiotemporal adaptive resonant Mamba network. During the training phase of the spatiotemporal adaptive resonant Mamba network, this embodiment enhances the training samples through random geometric transformations (including random rotations and random flips). To prevent data augmentation from disrupting the spatial correspondence between frames, this embodiment adopts a "parameter generation-unified application" strategy during the training phase. Specifically, during the training phase, for the same sliding time window... The frame sample image and its corresponding label are rotated and flipped using the same set of random rotation angles and flip parameters.

[0071] Considering that small targets often occupy only sub-pixels or a few pixels, conventional bilinear interpolation rotation can cause target energy dissipation. This embodiment limits the random rotation angle to 0 degrees, 90 degrees, 180 degrees, or 270 degrees to ensure that the rotation operation is a precise pixel-level shift, avoiding blurring caused by interpolation operations and energy attenuation of sub-pixel-level small targets caused by interpolation operations.

[0072] Step 1.3, Normalization: Normalize the mean and variance of the input image. In this embodiment, normalization is a preprocessing step for the input image. It is necessary to normalize the mean and variance of the input image during both the training and practical application phases of the spatiotemporal adaptive resonant Mamba network to maintain the input distribution consistent with that during network training, thereby ensuring the stability and accuracy of the detection results.

[0073] Step 2: Extract multi-scale spatial features: Input the tensor of the input image sequence into the visual state space encoder to extract the spatial features of each frame in the input image sequence; the visual state space encoder is constructed based on the VMamba model. Specifically, this includes:

[0074] Step 2.1, Input: Input the image sequence tensor obtained in Step 1. Merging along the batch and time dimensions yields the deformed tensor. To adapt to the input requirements of 2D encoders.

[0075] Step 2.2, Feature Calculation: The deformed input image sequence tensor is input into a shared-weight visual state space encoder. Shared weights mean that all frames in the input image sequence share the same visual state space encoder; that is, each frame uses the same network structure parameters and the same set of model weights during the encoding process. The visual state space encoder uses multiple internally stacked visual state space blocks to model the global context of the image, and progressively reduces the feature map resolution and increases the number of channels through downsampling layers.

[0076] Step 2.3, Output: After each frame of the input image sequence has been processed independently as described above, multi-scale deep spatial features of each frame are extracted, resulting in the final output. Frame space features. The current image to be detected... The corresponding spatial feature map is denoted as ,in, This represents the number of channels in the spatial feature map. The height of the spatial feature map, Width of the spatial feature map; previous frame image and the next frame image The corresponding spatial feature maps are denoted as follows: , .

[0077] Step 3, Spatiotemporal Adaptive Resonance Fusion: The spatial features of each extracted frame image are input into the spatiotemporal adaptive resonance fusion module for feature fusion to obtain spatiotemporal enhanced features.

[0078] This step utilizes the spatiotemporal adaptive resonance fusion module to process the results obtained in step 2. Frame space features are processed. Figure 3 This is a schematic diagram of the spatiotemporal adaptive resonance fusion module according to an embodiment of the present invention, as shown below. Figure 3As shown, the spatiotemporal adaptive resonance fusion module mainly consists of a zero-initialization implicit alignment unit (for performing implicit motion alignment), a motion resonance sensing unit (for performing motion resonance sensing), a bidirectional temporal scanning unit (for performing bidirectional temporal scanning), and a local contrast adaptive spatial scanning unit (for performing local contrast adaptive spatial scanning). Step 3 specifically includes:

[0079] Step 3.1, Implicit Motion Alignment:

[0080] To address the difficulty in optical flow calculation caused by the lack of texture in small targets, this invention employs feature-level implicit alignment, using the spatial features of the center frame (i.e., the current image frame to be detected). Using anchor points, spatial features of adjacent frames (i.e., image frames adjacent to the center frame) Alignment, such as Figure 3 As shown, the specific process is as follows:

[0081] (1) Offset field prediction: Features of adjacent frames With center frame features The concatenation is performed along the channel dimension, and the concatenated features are input into a lightweight convolutional network to predict the offset field used to indicate the spatial displacement of the features and the modulation mask used to adjust the feature amplitude.

[0082] Specifically, to ensure training stability, the last convolutional layer in this lightweight convolutional network (i.e., the convolutional layer with the output offset field and modulation mask) is zero-initialized. This means the weights and biases of this layer are initialized to 0, ensuring that the output offset is zero in the initial training phase. The implicit motion alignment unit is equivalent to an identity mapping. This strategy effectively prevents drastic distortion of the feature map caused by random parameter initialization, thus avoiding the overwhelming of fragile, weak target features by noise in the early stages of training.

[0083] (2) Deformable convolution resampling: Based on the predicted offset field and modulation mask, deformable convolution operators are used to resample features of adjacent frames. Perform bilinear interpolation resampling to output features spatially aligned with the center frame. .

[0084] like Figure 3 As shown, , , The alignment features obtained after implicit motion alignment are denoted as follows: , , .

[0085] Step 3.2, Motion Resonance Sensing:

[0086] In order to utilize the target's motion directionality to suppress background clutter, this invention constructs a motion resonance mechanism. Figure 4 This is a schematic diagram illustrating the principle of the motion resonance mechanism according to an embodiment of the present invention. Figure 4 Part A shows the input features, Part B shows the processing steps for multi-scale translation and correlation calculation, and Part C shows the aggregation and output process, as shown below. Figure 4 As shown, the specific process of realizing motion resonance sensing using the motion resonance mechanism includes:

[0087] (1) Multi-scale translation: Set multiple translation scales (e.g., translation scale) (corresponding to small target micro-motion and background shaking respectively) and four translation directions (top left to bottom right, bottom right to top left, top right to bottom left, bottom left to top right), with different translation scales and directions for the previous frame image. The spatial feature map is translated to obtain multiple translated spatial feature maps. Figure 4 The image above shows the previous frame. Spatial feature map A schematic diagram of a rightward and leftward translation of the features from the previous frame (i.e., features at a scale of 1). The spatial feature map after the rightward translation is denoted as... The spatial feature diagram after being translated to the left is denoted as The handling of upward and downward translation operations, as well as translation operations with a scale of 3, is the same as that of translation operations with a scale of 1. For simplicity, this is not included in the text. Figure 4 As shown in the image. It should be noted that... Figure 4 The pair shown The diagrams illustrating right and left translations with a scale of 1 are for illustrative purposes only. In actual operation, translations in four directions are required: from top left to bottom right, from bottom right to top left, from top right to bottom left, and from bottom left to top right.

[0088] (2) Local cross-correlation calculation (i.e. Figure 4 Correlation calculation in (e.g.) Figure 4 As shown, for each translated spatial feature map, the dot product between the translated spatial feature map and the current image to be detected is calculated. Spatial feature map The local cross-correlation coefficients at each pixel location yield the local cross-correlation feature map (i.e., Figure 4 (Correlation map in the image); Local cross-correlation feature map is used to reflect the previous frame image. The possibility of each pixel moving in different directions and scales. Figure 4 In the text, "high response (match)" refers to the spatial feature map of the previous frame after translation. Spatial feature map of the current image to be detected A high local cross-correlation response at the corresponding location indicates that the translation direction matches the inter-frame motion trend of the potential target; a "low response (mismatch)" indicates that the translation... and The local cross-correlation response at the corresponding position is low, meaning that the translation direction does not match the target response of the current frame, which usually corresponds to background clutter, random noise, or incorrect motion assumptions.

[0089] (3) Weight generation: such as Figure 4 As shown, after concatenating all the calculated local cross-correlation feature maps, they are aggregated through a convolutional layer (using 1×1 convolution aggregation) and normalized using the Softmax function to generate normalized directional resonance weights. (i.e., four-directional weights), where 4 represents four translation directions (upper left to lower right, lower right to upper left, upper right to lower left, lower left to upper right); directional resonance weights are used to guide the directional weighting of subsequent local contrast adaptive spatial scanning, so as to achieve resonance enhancement of signals that are consistent with the target motion direction.

[0090] Figure 4 The diagram illustrates the weights for the top-left to bottom-right, bottom-right to top-left, top-right to bottom-left, and bottom-left to top-right directions. The strength of the weights in each direction represents the degree of motion matching of the potential target in that direction. The black arrows in the diagram indicate directions with stronger weights in the current example, indicating that the features of the previous frame after translation in that direction have a high local cross-correlation response with the features of the current frame, meaning that this direction is more likely to be consistent with the inter-frame motion trend of the potential target. The white arrows indicate directions with weaker weights, indicating that this direction has a lower degree of matching with the target response in the current frame, which may correspond to background clutter, random noise, or incorrect motion assumptions.

[0091] (4) Motion position encoding generation: directional resonance weights Input the motion encoder for feature mapping to generate motion position codes. The motion encoder is used to map the directional resonance weights, which represent the strength of the response in the four translation directions, to motion position codes that match the feature channel dimensions of the current image to be detected. The motion position codes are used to represent the motion direction information and motion saliency information of the potential target at each spatial location.

[0092] (5) Motion position coding injection: Motion position coding is injected into the spatial features (i.e., center frame features) of the current image to be detected, and the center frame features are adaptively enhanced to highlight the response of the moving target with temporal continuity and suppress background clutter and random noise that are inconsistent with the target motion.

[0093] Step 3.3, Bidirectional Timing Scan:

[0094] To fully utilize temporal context information to distinguish moving targets from random noise, this invention constructs a bidirectional temporal scanning mechanism, employing a selective scanning mechanism based on a state-space model. The selective scanning mechanism refers to a mechanism that recursively processes input features step-by-step along the sequence direction using a state-space model. In each scan step, the model updates its state based on the current input features and existing states, and adaptively controls the degree to which current information is written into the state through relevant modulation parameters, thereby achieving cumulative enhancement of responses to continuous targets and suppression of irrelevant noise. Through bidirectional temporal scanning, the features of the currently detected image can simultaneously perceive the spatiotemporal evolution of both the "past" and the "future." For real, weak targets, a continuous "spatiotemporal pipeline" is formed on the time axis, and the signal is enhanced in both bidirectional temporal scanning; however, sudden random flicker noise, due to its discontinuity on the time axis, cannot form an effective state transfer and is thus suppressed. The specific process of bidirectional temporal scanning in this embodiment includes:

[0095] (1) Sequence rearrangement: This involves rearranging the sequence after implicit motion alignment. The spatial feature maps of the frame images undergo dimensionality rearrangement, transforming from a two-dimensional spatial feature map representation organized by frame to a pixel-level time-series representation organized by spatial location. The dimensionality of the spatial feature maps then becomes... , This represents the total number of pixels in the spatial feature map.

[0096] (2) Forward state space scanning: Using a selective scanning mechanism, the rearranged feature sequence is recursively processed along the forward time axis. In this process, the state update of each frame aggregates the historical information of each pixel at all past moments.

[0097] (3) Reverse state space scan: The rearranged feature sequence is flipped along the time axis, that is, the feature order in the time dimension is reversed. For example, if the time order of the original feature sequence is [t-1, t, t+1], then the time order of the flipped feature sequence is [t+1, t, t-1]. Subsequently, the flipped feature sequence is recursively processed using a selective scanning mechanism to obtain the reverse scan result, which corresponds to the reverse temporal modeling of the original feature sequence. In this process, the state update of each frame can aggregate the temporal information of each pixel at future times.

[0098] (4) Feature fusion: The features output by the forward state space scan and the reverse state space scan are added and fused element by element to obtain the temporal fusion features. In this way, the continuous motion trajectory of the target is captured by the temporal causal relationship and the transient background clutter is suppressed, thereby realizing the bidirectional capture of the temporal continuity of the target and the suppression of transient noise.

[0099] Figure 5 This is a schematic diagram comparing the mechanism and effect of bidirectional timing scanning according to an embodiment of the present invention. The first part is a schematic diagram of the mechanism of bidirectional timing scanning, and the second part is a schematic diagram comparing the effect of bidirectional timing scanning. Figure 5 As shown, the first part uses three frames of temporal features as an example to illustrate the processing procedure of bidirectional temporal scanning. Figure 5 On the middle time axis , and These represent the time before the current time, the current time, and the time after the current time, respectively. , and These respectively represent locations in the same spatial position, corresponding to the above. , and The input timing characteristics at time 10:00 will , and The input temporal feature sequence is formed by arranging the features in chronological order. The upper branch represents the forward scan branch, which selectively scans the input temporal feature sequence (i.e., forward state space scan) according to the original chronological order. The scanning direction is along the 0-T direction on the time axis to gradually aggregate historical information before the current time to obtain the forward scan result; its position in... The state formed at time t is denoted as (i.e., historical memory), used to characterize the memory of historical time-series information for the features of the current moment. The lower branch represents the reverse scan branch, that is, first flipping the input time-series feature sequence along the time axis and then performing a selective scan (i.e., reverse state-space scan), with the scan direction along the 0-T direction on the time axis, thereby realizing the reverse modeling of time-series information after the current moment and obtaining the reverse scan result; it is in The state formed at time t is denoted as (i.e., future memory) is used to represent the memory of future temporal information based on the characteristics of the current moment. Figure 5 In the first part, "time flip" means reversing the input time-series feature sequence in the time dimension; "sum" means... The forward and reverse scan results are continuously fused element by element. This indicates that the temporal fusion features are obtained after fusion.

[0100] The process described in Part 1 is as follows: First, the multi-frame spatial features, after implicit motion alignment, are rearranged into a pixel-level time series organized by spatial location. Second, in the forward scan branch, historical information is accumulated step by step from the previous moment to the next moment to obtain the forward temporal response (i.e., the forward scan result). Simultaneously, in the backward scan branch, the feature sequence is first flipped, and then a selective scan is performed to obtain the backward temporal response (i.e., the backward scan result), so that the features at the current moment can simultaneously perceive the preceding and following temporal context. Finally, the scan results from both directions are... By performing fusion at different times, temporal fusion features can be obtained. This is to improve the ability to characterize continuously moving targets and suppress transient disturbances that are discontinuous in time.

[0101] like Figure 5 As shown, the second part illustrates a comparative diagram of the effects of bidirectional temporal scanning on the target and noise, respectively. Case A illustrates the response of a moving target (a target with a continuous trajectory in adjacent time intervals) undergoing bidirectional temporal scanning. Because the target signal has temporal continuity between time intervals 1, 2, and 3 (i.e., a continuous signal), the state information can be stably accumulated and form a strong response at the current time interval, regardless of whether it is forward or backward transmission. This results in enhanced target energy after fusion, leading to high-energy output (i.e., signal enhancement when the spatiotemporal channel is connected). The "ON" in Case A indicates that, in this example, the target response remains present and has a continuous correspondence between adjacent time intervals, i.e., it persists in the time dimension; therefore, the target signal can be continuously transmitted and form a stable state accumulation during both forward and backward temporal scanning, ultimately resulting in an enhanced response at the current time interval. Scenario B illustrates the response to a bidirectional temporal scan of transient noise (or flickering / isolated signals). These signals typically appear only briefly at the current moment and lack continuous responses in adjacent moments (i.e., they are isolated signals). Therefore, they struggle to form stable state accumulation during both forward and reverse propagation, resulting in a weak fusion response at the current moment, hindered propagation, and ultimately low-energy output. This suppresses transient noise (i.e., the signal is suppressed in the event of a spatiotemporal link break). The "OFF" in Scenario B indicates that, in this example, the response of transient noise or isolated signals typically appears only briefly at the current moment and lacks continuous corresponding responses in adjacent moments, meaning it does not persist in the time dimension. Therefore, these signals struggle to form stable state accumulation during both forward and reverse temporal scans, ultimately being weakened or suppressed in the fusion output. Thus, bidirectional temporal scanning can leverage the continuity of the target in the time dimension to enhance realistic moving targets while suppressing random noise lacking temporal consistency.

[0102] Step 3.4, Local Contrast Adaptive Spatial Scan:

[0103] Rearrange temporal fusion features back into the spatial dimension Selective scanning of the spatial dimension based on a local contrast adaptive mechanism is performed. This step modulates the discretization step size parameter of the state-space model by introducing physical prior dynamics. Figure 6 This is a schematic diagram of the local contrast adaptive spatial scanning processing flow according to an embodiment of the present invention. Figure 6 Part A illustrates the input features (features of weak targets) and the weak signal profile (a profile of the weak target signal); Part B illustrates the workflow of the physical prior branch (used to implement prior extraction); Part C illustrates the workflow of the network branch (used to implement basic parameter generation); and Part D illustrates the output flow, as shown below. Figure 6 As shown, the specific process of local contrast adaptive spatial scanning includes:

[0104] (1) Physical prior extraction: using a fixed Laplacian operator for the input features Perform convolution and take the absolute value to obtain a local contrast map that reflects the physical local contrast.

[0105] (2) Gating coefficient generation: Local contrast maps are mapped to normalized gating coefficients through a learnable gating network (including 1×1 convolutional layers) and a sigmoid activation function. .

[0106] (3) Step size modulation: using the gating coefficient Discretization step size parameters for the dynamically modulated state-space model. First, the input features are processed through a linear projection layer. Mapping is based on the discretization step size (i.e. Figure 6 (Basic step size) This process follows the native Mamba mechanism, and the calculation formula is as follows:

[0107] ;

[0108] in, , These are the weights and biases of the linear projection layer, respectively. This indicates that the input features are processed through a linear projection layer. The result obtained by performing a linear mapping; The Softplus activation function is used to transform the linear mapping result into a non-negative output, thus obtaining a basic discretization step size greater than 0. .

[0109] Subsequently, physical priors (i.e., gating coefficients) are introduced. ) the basic discretization step size Perform adaptive scaling modulation to obtain the modulated discretized step size (i.e. Figure 6 (final step size) The calculation formula is as follows:

[0110] ;

[0111] in, This is a learnable scaling factor, and its initial value can be set to a small value, such as 0.1. When a high local contrast region (i.e., a potential target region) is detected, Approaching 1, leading to Increasing the size allows the model to quickly update its state to "remember" the current target features; however, in flat background regions, The smaller the noise level, the more likely the model is to preserve historical states to smooth out noise.

[0112] like Figure 6 As shown, the bar chart in section C is used to illustrate the basic discretization step size for network branch generation. The relative size, The input features are obtained through linear mapping and Softplus activation. The overall change is relatively gradual, lacking significant emphasis on the location of weak targets. The histogram in Part D illustrates the relative size of the final discretization step size after modulation. When the target region has high local contrast, the gating coefficient increases, significantly enhancing the corresponding position and thus improving the state-space model's ability to update the state of the current input, preserving and enhancing the local high-frequency pulse features of weak targets. This local contrast adaptive mechanism makes the state-space model pay more attention to the input information at the current moment, thereby forcibly preserving the high-frequency pulse features of infrared weak targets.

[0113] (4) Weighted fusion: When performing selective scanning, there are usually four scanning directions (from top left to bottom right, from bottom right to top left, from top right to bottom left, and from bottom left to top right). After obtaining the scanning results corresponding to the four directions, this embodiment utilizes the directional resonance weights generated in step 3.2. The scan results from these four directions are weighted and summed to enhance the scan signal that aligns with the target's motion direction, ultimately yielding the spatiotemporal enhancement features. For example, when a target is detected moving from the upper left to the lower right, the weight of the "from upper left to lower right" scanning direction is amplified, so that the scanning path resonates with the target's motion trajectory, maximizing the signal-to-noise ratio of the target signal.

[0114] After steps 3.1-3.4, the spatiotemporal adaptive resonance fusion module outputs spatiotemporal enhancement features. .

[0115] like Figure 3As shown, in the zero-initialized implicit alignment unit, the frame space features obtained in step 2 (including...) , , After stitching, offset field prediction, and deformable convolution resampling, the corresponding Frame alignment features ( , , The corresponding alignment features are respectively , , In the motion resonance sensing unit, the alignment features described above are subjected to multi-scale translation, local cross-correlation calculation, aggregation, and normalization to obtain the directional resonance weights. ,Will Input the motion encoder to obtain the motion position code ,Will The features of the current frame are adaptively enhanced by injecting them into the current frame features. In the bidirectional temporal scan unit, the output of the zero-initialized implicit alignment unit is... Frame alignment features are rearranged to obtain the input temporal feature sequence. The input temporal feature sequence is then scanned forward along the 0-T direction on the time axis to obtain the forward scan result. The input temporal feature sequence is then flipped along the time axis and scanned backward along the 0-T direction to obtain the backward scan result. The forward and backward scan results are then fused to obtain the temporal fusion feature. In the local contrast adaptive spatial scanning unit, a fixed Laplacian operator is used to convolve the temporal fusion feature (i.e., Laplacian convolution), and the absolute value is taken. This is then passed through a learnable gating network (including 1×1 convolutional layers) and a Sigmoid activation function to obtain normalized gating coefficients. The temporal fusion features are processed through linear mapping and the Softplus activation function to obtain the basic discretization step size. ; through gating coefficient For the basic discretization step size Dynamic modulation is performed to obtain the modulated discretized step size. ; This information is input into the core of the state-space model as an adaptive discretization step size parameter during selective scanning, used to adjust the state update intensity of the state-space model at different scanning positions. For potential target regions with high local contrast, The larger size allows the state-space model to focus more on the current input features and enhance the preservation of local impulse features of weak targets; for flat background regions, The smaller size makes the state-space model tend to preserve historical states and suppress background noise. Utilizing... The scan results from the four scanning directions (top left to bottom right, bottom right to top left, top right to bottom left, and bottom left to top right) are weighted and summed to obtain the spatiotemporal enhancement features. .

[0116] Step 4, Decoding and Output: Input the spatiotemporal enhancement features into the decoder to obtain the target detection result.

[0117] The spatiotemporal enhancement features output from step 3 The input is fed into the decoder. The decoder is constructed as a symmetrical structure mirroring the encoder, aiming to progressively recover the spatial resolution of the feature maps and accurately locate weak targets. The specific execution process is as follows:

[0118] (1) Step-by-step upsampling and detail recovery: The decoder contains multiple cascaded decoding units, each consisting of an upsampling layer and a visual state space block. During each decoding stage, a skip connection mechanism is used to extract the shallow features of the corresponding level of the central frame branch extracted by the encoder and fuse them with the deep features of the current decoder. This step utilizes the rich high-resolution spatial information in the shallow features to effectively compensate for the loss of sub-pixel-level target position information caused by the encoder during downsampling.

[0119] (2) Detection head mapping and output: After multi-level decoding, the feature map is restored to the same spatial resolution as the original input image. Finally, a 1×1 convolutional layer is used to form the detection head, which maps the high-dimensional feature channels into a single-channel target probability response map; after Sigmoid activation function and thresholding, the final binarized target mask is generated.

[0120] Figure 7 This is a schematic diagram comparing the detection result image obtained by using the weak target detection method of this invention with the real target image. Figure 7 (a) is a detection result diagram obtained by using the weak target detection method of the present invention, wherein the smaller box is the detected weak target area, and the larger box in the upper right corner is the local magnified result of the weak target area; Figure 7 (b) is the real target image, where the smaller box contains the real target region, and the larger box in the upper right corner contains a magnified view of the real target region. Figure 7 As can be seen, the weak target detection method based on spatiotemporal adaptive resonant Mamba network in this embodiment of the invention can accurately detect weak targets in complex dynamic scenes.

[0121] This invention presents a method for detecting weak targets based on a spatiotemporal adaptive resonant Mamba network. First, it acquires the image sequence to be detected and constructs an input image sequence tensor containing the current frame and its preceding and following frames. Then, it extracts spatial features from each frame of the input image using a shared-weight visual state-space encoder. Next, the extracted spatial features are fed into a spatiotemporal adaptive resonant fusion module. This module first uses a zero-initialization deformable convolutional network for feature-level implicit motion alignment and utilizes a motion resonant perception unit to calculate multi-scale local cross-correlation coefficients to generate directional resonant weights, which are then used to weight and enhance the spatial scanning path. Then, a bidirectional temporal scanning unit is constructed to capture the continuous motion trajectory of the target and suppress transient background clutter using temporal causality. Simultaneously, a local contrast adaptive mechanism is introduced, using the physical prior extracted by the Laplacian operator to dynamically modulate the discretized step size parameters of the state-space model, forcing the model to retain weak high-frequency pulse signals. Finally, the features are reconstructed by a decoder, and a target detection mask is output. This invention effectively solves the problems of easy loss of extremely small targets and high false alarm rates in complex dynamic scenes, significantly improving the detection accuracy and robustness of weak targets.

[0122] The present invention also provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the above-described weak target detection method based on a spatiotemporal adaptive resonant Mamba network.

[0123] The present invention also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned weak target detection method based on a spatiotemporal adaptive resonant Mamba network.

[0124] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0125] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0128] The contents not described in detail in this specification are existing technologies known to those skilled in the art.

[0129] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. The above descriptions are exemplary and not exhaustive. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting weak targets based on a spatiotemporally adaptive resonant Mamba network, characterized in that, The spatiotemporal adaptive resonant Mamba network includes a visual state-space encoder, a spatiotemporal adaptive resonant fusion module, and a decoder; the method includes: A sequence of images to be detected is obtained, and an input image sequence is determined from the sequence of images to be detected using a sliding time window, and an input image sequence tensor is constructed; the input image sequence includes at least the current image to be detected, as well as the previous frame image and the next frame image adjacent to the current image to be detected; The input image sequence tensor is input into the visual state space encoder to extract the spatial features of each frame of the input image sequence; the visual state space encoder is constructed based on the VMamba model. The spatial features of each frame image are extracted and input into the spatiotemporal adaptive resonance fusion module for feature fusion to obtain spatiotemporal enhanced features; the spatiotemporal adaptive resonance fusion module is used to perform implicit motion alignment, motion resonance perception, bidirectional temporal scanning and local contrast adaptive spatial scanning. The spatiotemporal enhancement features are input into the decoder to obtain the target detection result.

2. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 1, characterized in that, The dimension of the input image sequence tensor is ;in, For batch size, The number of image frames contained in the input image sequence. For the number of channels, The height of the input image. The width of the input image is denoted as ; the center frame of the sliding time window is the current image frame to be detected.

3. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 1, characterized in that, During the training phase of the spatiotemporal adaptive resonant Mamba network, the same random rotation angle and flipping parameters are applied to rotate and flip each frame sample image and its corresponding label within the same sliding time window; the random rotation angle is 0 degrees, 90 degrees, 180 degrees or 270 degrees.

4. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 1, characterized in that, The implicit motion alignment specifically includes: The spatial features of the current image to be detected are concatenated with the spatial features of neighboring images along the channel dimension. The concatenated features are then input into a lightweight convolutional network to predict the offset field and modulation mask. The neighboring images are those adjacent to the current image to be detected. The offset field is used to indicate the spatial displacement of the features. The modulation mask is used to adjust the feature amplitude. Based on the offset field and the modulation mask, the spatial features of the adjacent images are resampled by bilinear interpolation using deformable convolution operators so that the spatial features of the adjacent images are aligned with the current image to be detected in spatial position. Specifically, during the training phase of the spatiotemporal adaptive resonant Mamba network, the weights and biases of the last convolutional layer of the lightweight convolutional network are initialized to zero to prevent weak target features from being destroyed by random offsets in the early stages of training.

5. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 4, characterized in that, The motion resonance sensing specifically includes: Based on multiple preset translation scales and multiple translation directions, the spatial feature map of the previous frame image is translated to obtain multiple translated spatial feature maps. For each translated spatial feature map, the local cross-correlation feature map is obtained by calculating the local cross-correlation coefficients between the translated spatial feature map and the spatial feature map of the current image to be detected at each pixel position. After concatenating all the calculated local cross-correlation feature maps, they are aggregated through a convolutional layer, and directional resonance weights are generated using the Softmax function; these directional resonance weights are used for subsequent local contrast adaptive spatial scanning. The directional resonance weights are input into the motion encoder for feature mapping to generate motion position codes; the motion position codes are injected into the spatial features of the current image to be detected in the form of residuals to enhance the salience of moving targets.

6. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 5, characterized in that, The bidirectional timing scan specifically includes: The spatial features of each frame image after implicit motion alignment are rearranged in dimensions to obtain the rearranged feature sequence. The rearranged feature sequence is processed along the forward time axis using a selective scanning mechanism to obtain the forward scanning result; The rearranged feature sequence is flipped along the time axis, and the flipped feature sequence is processed using a selective scanning mechanism to obtain the reverse scanning result; The forward scan results and the reverse scan results are fused to obtain the temporal fusion features.

7. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 6, characterized in that, The local contrast adaptive spatial scanning specifically includes: The temporal fusion features are expanded into sequences in four directions: top left to bottom right, bottom right to top left, top right to bottom left, and bottom left to top right. Selective scanning based on a local contrast adaptive mechanism is performed on the sequences in the four directions to obtain the scanning results corresponding to the four directions; Using the directional resonance weights, the scanning results corresponding to the four directions are weighted and fused to obtain the spatiotemporal enhancement features.

8. The weak target detection method based on spatiotemporal adaptive resonant Mamba network according to claim 7, characterized in that, The local contrast adaptive mechanism includes: By convolving the input features with a fixed Laplacian operator and taking the absolute value, a local contrast map is obtained. The local contrast map is mapped to gating coefficients using a learnable gating network. , ; Using the gating coefficient The discretization step size parameter of the state-space model is modulated to obtain the modulated discretization step size: ; in, The step size is the discretization step size after modulation. The basic discretization step size is obtained by mapping the input features using a linear projection layer; A learnable scaling factor; when a high local contrast region is detected, The increase in size makes the state-space model pay more attention to the input information at the current moment, thus preserving the high-frequency pulse characteristics of weak targets.