An underwater target detection and reconstruction method based on single-pixel imaging
Patent Information
- Application Number
- CN202611242940.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-10-27
AI Technical Summary
第一,无目标桶信号仍需执行完整图像重构,造成后端计算资源浪费;
本发明提出的一种基于单像素成像的水下目标检测与重构方法,本发明构建包括多个串联的选择性状态空间单元的目标检测编码器。每个选择性状态空间单元通过输入线性映射和一维深度卷积提取桶信号的局部时序特征,通过选择性状态空间建模获取桶信号的长距离依赖关系,并通过门控融合和输出线性映射得到编码输出特征。
Smart Images

Figure CN122990446A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computational imaging, photoelectric detection and underwater target perception technology, and relates to an underwater target detection and reconstruction method based on single-pixel imaging; specifically, it relates to a method for directly detecting the presence of underwater targets using one-dimensional bucket signals collected by a single-pixel detector, and selectively initiating target image reconstruction based on the detection results.
[0002] This invention particularly relates to an underwater target detection and reconstruction method that uses multiple cascaded selective state-space units to extract prior features of bucket signals, employs a gating mechanism to control the start and stop of image reconstruction branches, and uses the prior features of the targets to modulate the residual reconstruction network. Background Technology
[0003] Underwater environments commonly present challenges such as light absorption, light scattering, interference from suspended particles, changes in ambient light, uneven illumination, and transmission attenuation. As detection distance increases and water turbidity rises, traditional area array imaging equipment is prone to phenomena such as decreased image contrast, blurred target edges, and shortened effective detection distance.
[0004] Single-pixel imaging encodes the target light field using a spatial light modulator and acquires total light intensity measurements under different modulation states using a single-pixel detector. The total light intensity measurements are arranged in the order the modulation mask is loaded to form a one-dimensional bucket signal sequence, which contains the correlation information between the modulation mask and the spatial distribution of the target.
[0005] Existing underwater single-pixel target detection methods typically employ a sequential processing approach of "image reconstruction first, target detection later." This approach first reconstructs each group of bucket signals into a two-dimensional image, and then uses image detection algorithms to determine whether a target exists in the two-dimensional image.
[0006] During the above processing, even if the current detection area only contains empty water background, suspended particles, bubbles, or other non-target interference, a complete image reconstruction of the corresponding bucket signal is still required. Therefore, a large amount of backend computing resources are used to process targetless bucket signals, resulting in increased system computational load, increased average processing latency, and increased equipment power consumption.
[0007] Furthermore, existing methods typically only use bucket signals as input to the image reconstruction network, failing to fully utilize the one-dimensional sequence structure of the bucket signals for direct target presence detection. While some methods can extract detection features from the bucket signals, these features are usually only used for target classification and not further used to guide subsequent image reconstruction, resulting in an information gap between the target detection task and the image reconstruction task.
[0008] Under low sampling rate and strong scattering conditions, relying solely on bucket signals for two-dimensional spatial mapping can easily lead to problems such as missing target contours, blurred edges, block artifacts, and residual background noise.
[0009] Therefore, a method is needed that can directly determine the existence of a target in a single-pixel measurement domain, initiate image reconstruction only when a target is detected, and use the target structure information extracted during the target detection stage to guide image reconstruction.
[0010] In summary, existing underwater single-pixel imaging methods have the following problems: First, even without a target bucket signal, a complete image reconstruction still needs to be performed, resulting in a waste of backend computing resources; Second, the serial processing method of "reconstructing first and then detecting" results in a large system processing delay; Third, the local correlations and long-distance dependencies in one-dimensional bucket signals are not fully utilized; Fourth, the features obtained in the object detection stage were not further used for image reconstruction; Fifth, under conditions of low sampling rate and water scattering interference, the reconstructed target image is prone to incomplete contours, blurred edges, and random artifacts. Summary of the Invention
[0011] Technical problems to be solved To avoid the shortcomings of existing technologies, this invention proposes an underwater target detection and reconstruction method based on single-pixel imaging.
[0012] To more accurately describe the technical solution of this invention, the relevant terms are explained as follows: Single-pixel imaging (SPI) refers to a computational imaging method that uses a spatial light modulator to sequentially load multiple modulation masks to spatially encode the light field of the target scene, and uses a single-pixel detector without spatial resolution to collect the total light intensity measurement value under each modulation state. Then, the spatial information of the target is obtained according to the correspondence between the modulation mask and the total light intensity measurement value.
[0013] Bucket signal: A bucket signal is a one-dimensional sequence of total light intensity measurements collected by a single-pixel detector under different modulation masks, arranged according to the order in which the modulation masks are applied. The bucket signal itself does not possess a directly observable two-dimensional spatial structure, but it contains information about the correlation between the modulation masks and the spatial distribution of the target. In underwater environments, the bucket signal is also superimposed with disturbances caused by factors such as light absorption, light scattering, ambient light, detector noise, and suspended particles.
[0014] Underwater target detection: Underwater target detection, as referred to in this invention, means directly determining whether a preset target exists in the current detection area based on the one-dimensional bucket signal collected by a single-pixel detector. The target detection result includes two cases: the presence of a target and the absence of a target. The target detection in this invention is a target presence detection; it does not require outputting the target's position coordinates in a two-dimensional image, nor does it require further determination of the target's specific category.
[0015] Selective State Space Unit: The selective state space unit is a network unit used for local feature extraction and long-distance dependency modeling of one-dimensional bucket signal sequences.
[0016] Each selective state space unit includes an input linear mapping, channel partitioning, a main feature branch, a gated branch, gated fusion, an output linear mapping, and a residual connection; the main feature branch sequentially includes one-dimensional deep convolution, nonlinear activation, and selective state space modeling. Specifically, the input linear mapping is used to map the unit input to the main feature branch and the gated branch; the one-dimensional depth convolution is used to extract the local correlation between the sampling positions of adjacent bucket signals; the selective state space modeling is used to capture the long-distance dependencies in the bucket signal sequence through recursive state updates; the gated fusion is used to adjust the state space output according to the gated branch; and the output linear mapping is used to map the gated fusion result to the output features of the selective state space unit.
[0017] One-dimensional depthwise convolution: One-dimensional depthwise convolution is a channel-wise convolution operation performed in the order of sampling the bucket signals.
[0018] For an input sequence with multiple feature channels, one-dimensional depthwise convolution extracts the local variation relationship between adjacent sampling positions in each feature channel, without performing feature mixing between different channels during the convolution stage.
[0019] Selective scanning mechanism: The Selective Scan Mechanism is an input-dependent state update mechanism in a selective state-space unit.
[0020] This mechanism dynamically generates or adjusts the discretization step size, input parameters, and output parameters during the state update process based on the current input features, so that different bucket signal sampling positions contribute to the hidden state to different degrees, thereby enhancing the information related to the target structure and reducing the impact of water scattering noise and background redundancy.
[0021] Target prior feature vector: The target prior feature vector is a one-dimensional feature vector obtained by aggregating the complete feature sequence output by the target detection encoder.
[0022] The target prior feature vector is used to characterize the information in the bucket signal related to the overall structure, contour, edge, contrast and background distribution of the target, and is also used for target presence detection and subsequent image reconstruction.
[0023] In one implementation, the encoded output feature corresponding to the last sampling position is used as the target prior feature vector; in other implementations, average pooling, max pooling, or weighted pooling can also be used to aggregate all encoded output features.
[0024] Gating control: Gating control refers to controlling whether an image reconstruction branch is run based on the confidence level of the target.
[0025] When the confidence level of the target is lower than the preset gating threshold, the image reconstruction branch is not activated; when the confidence level of the target reaches or exceeds the preset gating threshold, the image reconstruction branch is activated.
[0026] Triggered reconstruction: Triggered reconstruction means that the back-end image reconstruction branch is only started when the target detection module determines that there is a preset target to be detected in the current bucket signal.
[0027] This approach differs from the processing mode that performs image reconstruction on all bucket signals, and can reduce redundant calculations in targetless scenes.
[0028] Feature modulation: Feature modulation refers to generating scaling and offset parameters based on the target prior feature vector, and using the scaling and offset parameters to adjust the numerical distribution of intermediate features in the image reconstruction network.
[0029] The feature modulation is used to introduce the target structure information obtained in the target detection stage into the image reconstruction network to enhance the target contour and suppress low sampling rate artifacts and underwater scattering background.
[0030] Technical solution A method for underwater target detection and reconstruction based on single-pixel imaging, characterized by the following steps: Step 1: Acquire the raw barrel signal sequence of the underwater scene to be detected using a single-pixel imaging system:
[0031] in, Represents a single set of raw bucket signal sequences, superscript Indicates matrix transpose; Then, the original bucket signal sequence is subjected to normalization preprocessing to obtain the normalized bucket signal sequence. :
[0032] in: This represents the normalized measurement value of the t-th bucket signal. Step 2: Normalize the bucket signal sequence As input to the object detection encoder For normalized bucket signal sequences Extract the target prior feature vector; The target detection encoder includes A series of selective state-space units, wherein, Indicates the number of selective state space units; No. The input feature sequence of each selective state-space unit is:
[0033] in, Indicates the first The selective state-space unit in the th ... Input features at each sampling location; The first sample is composed of the unit outputs corresponding to all sampling positions. Output feature sequence of each selective state-space unit:
[0034] After all After selecting state space units, the final output feature sequence of the target detection encoder is obtained:
[0035] The final output feature sequence of the object detection encoder Aggregation is performed to obtain the target prior feature vector. :
[0036] in, Represents the prior feature vector of the target; This represents a feature sequence aggregation operation; Step 3: Convert the target prior feature vector As input for calculating the confidence level of the target; Target prior feature vector Input the target detection head, and calculate the target presence confidence using a fully connected mapping and a sigmoid activation function:
[0037] in, and These represent the weights and biases of the target detection head, respectively. This represents the Sigmoid activation function; This indicates the confidence level that the current bucket signal contains a preset target to be detected; Step 4: Determine the confidence level of the target. With preset gate threshold By comparing the results, the gating control signal is obtained:
[0038] in, Indicates the preset gate threshold. Indicates the gate control signal; When the target has confidence level Less than the preset threshold At that time, the gate control signal If the system determines that there is no preset target to be detected in the current bucket signal, it outputs a no-target detection result, does not start the image reconstruction branch, and terminates the subsequent reconstruction processing of the current bucket signal. When the target has confidence level Greater than or equal to the preset gate threshold At that time, the gating control signal The system determines that there is a preset target to be detected in the current bucket signal, outputs the target detection result, and starts the image reconstruction branch to proceed to step 5; Step 5, Image Reconstruction Branch: For the normalized bucket signal sequence of step 1 Perform bucket signal spatial mapping: normalize the bucket signal sequence The input spatial mapping module maps the M-dimensional bucket signal to a spatially bounded array of lengths using a fully connected layer. A one-dimensional vector:
[0039] in, and These represent the weights and biases of the spatial mapping module, respectively. This represents a one-dimensional vector output by the space mapping module; Perform dimension reorganization on a one-dimensional vector:
[0040] We obtain the initial two-dimensional spatial feature tensor:
[0041] in, This represents the number of channels in the initial two-dimensional spatial feature tensor. and These represent the height and width of the initial two-dimensional spatial feature tensor, respectively; The target prior feature vector obtained in step 2 Generate prior parameters: target prior feature vector Input prior parameter generation module:
[0042] in, , Indicates the number of characteristic modulation residual reconstruction blocks; Indicates the relationship with the first Multilayer perceptrons corresponding to feature modulation residual reconstruction blocks; Indicates the first Scaling parameters corresponding to each feature modulation residual reconstruction block; This indicates the corresponding offset parameter; We obtain the initial two-dimensional spatial feature tensor and the modulation parameters corresponding to each feature modulation residual reconstruction block:
[0043] Step 6: Residual image reconstruction based on feature modulation: The initial two-dimensional spatial feature tensor and modulation parameters A residual reconstruction network modulated by common input features is used to obtain an underwater target contour reconstruction image. The feature-modulated residual reconstruction network includes Nr A series of cascaded feature modulation residual reconstruction blocks: Indicates the first The output features of the modulated residual reconstruction block are also used as the first feature. The input of each feature-modulated residual reconstruction block; After all feature modulation residual reconstruction blocks are processed, the final reconstructed features are obtained. The final reconstructed features are then input into the reconstruction output header:
[0044] in, This indicates the reconstruction of the output convolutional layer; This represents an image reconstructed from the outline of an underwater target. and These represent the height and width of the reconstructed image, respectively.
[0045] Step 1 utilizes a single-pixel imaging system to acquire the raw barrel signal sequence of the underwater scene to be detected: For the underwater scene to be detected, the single-pixel imaging system sequentially loads a set of preset modulation masks via a spatial light modulator.
[0046] in, Represents the set of modulation masks. Indicates the first A modulation mask, and Represents two-dimensional spatial coordinates. This indicates the number of modulation masks and the number of times the signal in a single bucket is sampled. ; Loading the When using a modulation mask, a single-pixel detector is used to collect the total light intensity after propagation through the water body and reflection or transmission from the underwater scene, obtaining the signal measurement value of the t-th bucket:
[0047] in This represents the barrel signal measurement value corresponding to the t-th modulation mask; This represents the two-dimensional spatial light intensity distribution of the underwater scene to be detected; This represents the spatial integration region corresponding to a single-pixel detector. This represents the water scattering noise, ambient light noise, detector noise, and other interference in the t-th sampling. Arrange all bucket signal measurements according to the loading order of the modulation mask to obtain the original bucket signal sequence:
[0048] in, Represents a single set of raw bucket signal sequences, superscript This indicates the matrix transpose.
[0049] The one-dimensional bucket signal preprocessing in step 1 is as follows: The normalized bucket signal sequence is composed of all normalized measurements: ,in, This represents the normalized measurement value of the t-th bucket signal. Represents the original bucket signal sequence The mean; Represents the original bucket signal sequence Standard deviation; This represents a preset positive number that avoids zero denominators and maintains numerical stability.
[0050] In the r-th selective state space unit of the selective state space unit in step 2, the input features are first processed... Perform linear mapping to expand feature dimensions and blend channels, and divide the linear mapping result into inputs for the main feature branch and the gated branch:
[0051] in, and Let represent the input linear mapping weights and biases of the r-th selective state space unit, respectively; This represents the feature of the main feature branch at the t-th sampling position; This represents the feature of the gated branch at the t-th sampling position; This indicates division along the direction of the feature channel; All main branch features are assembled into a main branch feature sequence according to the sampling order of the bucket signals:
[0052] One-dimensional depthwise convolution and non-linear activation are performed on the main branch feature sequence. The one-dimensional depthwise convolution is used to extract the local variation relationship between the sampling positions of adjacent bucket signals.
[0053] in, This represents a one-dimensional depthwise convolution with a kernel size of k; Represents a nonlinear activation function; Represents the local temporal feature sequence obtained by the r-th selective state-space unit:
[0054] in, This represents the local temporal feature corresponding to the t-th sampling position; Local temporal features at the t-th sampling position Generate the discretization step size:
[0055] in, This represents the discretization step size of the r-th selective state-space unit at the t-th sampling position; and These represent the weights and biases of the discretization step-size generation layer, respectively. Used to keep the discretization step size positive; Simultaneously, input and output parameters are generated based on the current local temporal features:
[0056] in, This represents the corresponding continuous input parameters. This indicates the corresponding output parameters; and Generate the weights and biases of the layer for the corresponding parameters; Based on the discretization step size, the continuous state parameters are discretized as follows:
[0057] in, The continuous state transition parameters of the r-th selective state space unit are used to describe the internal evolution of the hidden state along the sampling order of the bucket signal. Represents discrete state transition parameters; Represents discrete input parameters; Represents the identity matrix; Indicates matrix exponentiation; Update the hidden state using discrete state parameters:
[0058] in, Let represent the hidden state of the r-th selective state space unit at the t-th sampling position; Indicates the hidden state at the previous sampling position; initial hidden state In one implementation, it is set as an all-zero vector; The state space output is obtained based on the hidden state:
[0059] in, This represents the state-space output of the r-th selective state-space unit at the t-th sampling position; This represents the skip connection parameter, used to preserve direct information in the current local temporal features; By inputting relevant information and Different sampling positions contribute to the hidden state to varying degrees, thereby enabling the selective retention of effective information from the bucket signal. The gated branch feature is non-linearly activated:
[0060] in, This represents the gating feature of the r-th selective state-space unit at the t-th sampling position; Multiply the gated features element-wise with the state space output:
[0061] in, ⊙ represents gated fusion features; ⊙ represents element-wise multiplication. Gated fusion is used to adjust the degree of preservation of different features in the state space output according to the current input content; Gating fusion features Input-output linear mapping layer:
[0062] in, Indicates the first The selective state-space unit in the th ... Intermediate output features obtained by linearly mapping each sampling location; and These represent the output mapping weights and biases of the r-th selective state-space unit, respectively. Under the condition that the input and output feature dimensions are consistent, the output mapping result is added to the unit input as a residual:
[0063] When the input and output feature dimensions are inconsistent, the input feature dimensions are first adjusted through linear mapping, and then the residuals are summed. The output feature sequence of the r-th selective state space unit is composed of the unit outputs corresponding to all sampling positions: .
[0064] Step 2 involves aggregating the final output feature sequence of the target detection encoder:
[0065] Alternatively, average pooling can be used:
[0066] Alternatively, weighted pooling can be used:
[0067] in, Let represent the normalized aggregate weight corresponding to the t-th sampling position, and satisfy: .
[0068] The first Each feature-modulated residual reconstruction block, input features First, it goes through the first two-dimensional convolutional layer, then through the activation layer:
[0069] in, Indicates the first The input features of a modulated residual reconstruction block; This represents the intermediate spatial features obtained after the first two-dimensional convolution and nonlinear activation. This represents the first two-dimensional convolution operation with a kernel size of 3×3; Represents a nonlinear activation function; Features of intermediate space Perform channel normalization:
[0070] in, This represents the characteristics of the intermediate space after normalization; and respectively represent Intermediate space features Mean and standard deviation for the corresponding channel; This represents a preset positive number that maintains numerical stability. The normalized intermediate spatial features are then modulated by a feature modulation layer:
[0071] in, This represents the intermediate spatial characteristics after modulation. This indicates element-wise multiplication performed along the channel; The modulated intermediate spatial features are input into the second two-dimensional convolutional layer and added to the input features of the modulated residual reconstruction block:
[0072] in, This represents a second two-dimensional convolution operation with a kernel size of 3×3; Indicates the first The output features of the modulated residual reconstruction block are also used as the first feature. The input of a feature-modulated residual reconstruction block.
[0073] The threshold The threshold is determined based on the allowable false negative rate, false trigger rate, and system computing resources; first, a minimum target recall rate is set on the validation dataset, and then a threshold with a higher background interception rate is selected from the candidate thresholds that meet the target recall rate requirement; the gating threshold is set as follows: .
[0074] A network system for underwater target detection and reconstruction based on single-pixel imaging, characterized in that: the target detection encoder in step 2 includes R cascaded selective state space units; each selective state space unit includes an input linear mapping, channel partitioning, a main feature branch, a gated branch, a gated fusion, an output linear mapping, and a residual connection; the input linear mapping is used to perform dimensional transformation and channel mixing on the input feature sequence, and forms a main feature branch and a gated branch through channel partitioning; the main feature branch obtains the state space output through one-dimensional depth convolution, nonlinear activation, and selective state space modeling in sequence, wherein the selective state space modeling generates a discretized step size, input parameters, and output parameters based on the current local temporal features, and establishes a long-distance dependency relationship between different sampling positions of the bucket signal through recursive state updates; the gated branch obtains gated features through nonlinear activation, and multiplies them element-wise with the state space output to obtain gated fusion features; the gated fusion features are added to the input features of the selective state space unit through a residual connection after output linear mapping to obtain the output feature sequence of the selective state space unit.
[0075] The network system is trained as follows: Data sets containing both target samples and target-free samples are used to train the target detection branch and the image reconstruction branch. Target samples include normalized bucket signal sequences, target presence labels, and corresponding reference target images; target-free samples include normalized bucket signal sequences and target presence labels. Training samples are uniformly represented as follows:
[0076] in, Represents a normalized bucket signal sequence; Indicates the existence of the target; This indicates a reference target image corresponding to the target sample; The existence label of a target is defined as:
[0077] The object detection loss uses binary cross-entropy loss:
[0078] in, Indicates the target detection loss. This indicates the confidence level of the target existence output by the target detection head; For training samples with a target existence label of 1, the mean squared error loss is used to calculate the difference between the reconstructed image and the reference target image:
[0079] in, Indicates the image reconstruction loss; Indicates the pixel position of the reference target image. Pixel value at; This represents the pixel value at the corresponding pixel position in the reconstructed image; and These represent the height and width of the reference target image, respectively. The joint loss is expressed as:
[0080] in, This represents the joint loss during model training; Indicates the weights of the target detection loss; Represents the image reconstruction loss weights; labels This is used to exclude target-free samples from image reconstruction loss calculation; The target detection and reconstruction network with solidified parameters obtained after training is used to perform the underwater target detection and reconstruction process described in steps 2 to 6.
[0081] In network system training
[0082] The model is trained in the following three stages: In the first stage, the target detection encoder, feature aggregation module and target detection head are trained using target bucket signals and target bucket-free signals, so that the target detection branch can obtain the target presence detection capability. In the second stage, the spatial mapping module, the prior parameter generation module, and the feature modulation residual reconstruction network are trained using the target bucket signal and the corresponding reference target image, so that the image reconstruction branch can obtain the target contour reconstruction capability. In the third stage, joint loss is used to fine-tune the target detection branch and the image reconstruction branch end-to-end, so that the target prior feature vector can be applied to both target existence detection and image reconstruction feature modulation. During the training phase, labels are based on the existence of real targets. The decision to calculate the image reconstruction loss is made by directly shutting down the image reconstruction branch without considering the target existence confidence in the current output of the model, in order to avoid affecting the parameter updates of the image reconstruction network due to detection errors in the early stages of training. The targetless training samples include empty water background, water background with different turbidity, suspended particles, bubbles, light source fluctuations, ambient light changes, aquatic plants, rocks, ropes, floating debris and other bucket signals generated by non-preset targets. Bucket signals that are actually classified as having no target but are incorrectly identified as having a target by the model are identified as difficult negative samples. These difficult negative samples are then added back to the training set for iterative training to reduce the false trigger rate caused by complex underwater backgrounds. The target detection and reconstruction network with solidified parameters obtained after training is used to perform the underwater target detection and reconstruction process described in steps 2 to 6.
[0083] Beneficial effects This invention proposes an underwater target detection and reconstruction method based on single-pixel imaging. The method constructs a target detection encoder comprising multiple cascaded selective state space units. Each selective state space unit extracts local temporal features of the bucket signal through input linear mapping and one-dimensional depth convolution, obtains the long-range dependencies of the bucket signal through selective state space modeling, and obtains the encoded output features through gated fusion and output linear mapping.
[0084] The complete feature sequence output by the target detection encoder is aggregated to obtain the target prior feature vector, and the target existence confidence is calculated based on the target prior feature vector.
[0085] The system compares the target presence confidence with a preset gating threshold. When it is determined that there is no target in the current bucket signal, the image reconstruction branch is not initiated; when it is determined that there is a target in the current bucket signal, the bucket signal is mapped to two-dimensional spatial features, and the target prior feature vector is converted into feature modulation parameters to guide subsequent residual image reconstruction.
[0086] Through the above methods, the present invention forms a complete processing closed loop of "bucket signal acquisition - target detection - gating judgment - on-demand reconstruction", which reduces redundant calculations in targetless scenarios and improves the quality of underwater target contour reconstruction under low sampling rate and water scattering conditions.
[0087] The innovative technologies address five types of problems existing in current technologies, and their key technical points and corresponding beneficial effects are as follows: 1. Bucket signal target detection encoder composed of multiple selective state space units: Each selective state space unit sequentially sets up input linear mapping, one-dimensional depth convolution, selective state space modeling, gated fusion and output linear mapping, integrating local feature extraction and long-distance dependency modeling in the same unit.
[0088] This structure avoids redundant settings among linear layers, convolutional layers, and state space units, and can simultaneously extract local correlations between adjacent sampling locations and long-range structural information of the complete bucket signal sequence.
[0089] 2. Input-related selective state space update: Dynamically generate discretization step size, input parameters and output parameters based on the current local temporal features, so that different sampling positions have different degrees of influence on the hidden state.
[0090] This approach helps to enhance measurement features related to the target contour and reduce the impact of scattering background and noise information.
[0091] 3. Optional aggregation methods for the output feature sequence: Aggregate the complete feature sequence output by the object detection encoder to obtain the target prior feature vector. Aggregation methods include last-position output feature extraction, average pooling, max pooling, or weighted pooling.
[0092] This setting avoids limiting the protection scope to the internal last hidden state and improves the adaptability of the target prior feature extraction method.
[0093] 4. Reconstruct on demand based on target existence confidence: The image reconstruction branch is activated only when the target existence confidence reaches or exceeds the gating threshold.
[0094] This approach can reduce redundant image reconstruction tasks corresponding to target bucket signals and lower the average processing latency of the system.
[0095] 5. Reusing target detection features for image reconstruction: The same target prior feature vector is input into the target detection head and the prior parameter generation module respectively, so that the target structure information extracted in the target detection stage can be further used to guide image reconstruction.
[0096] 6. Feature-modulated residual reconstruction based on target prior: Scaling and offset parameters are generated using target prior features to normalize, scale, and offset the intermediate spatial features in the reconstruction network, thereby suppressing background artifacts and enhancing the target contour. Attached Figure Description
[0097] Figure 1 : Overall flowchart of the underwater target detection and reconstruction method of the present invention Figure 2: Detailed structural diagram of the module of the present invention, wherein: Figure 2(a) shows the selective state-space unit structure diagram. Figure 2(b) shows the characteristic modulation residual reconstruction block structure. Figure 3 : A schematic diagram of the structure of a bucket signal acquisition device according to one embodiment of the present invention Figure 4 : Underwater target reconstruction result diagram of the present invention Detailed Implementation The present invention will now be further described in conjunction with the embodiments and accompanying drawings: Application scenarios of this invention: This invention can be applied to scenarios such as long-term underwater target monitoring, underwater safety inspection, underwater unmanned platform target detection, and low-light imaging in turbid water.
[0098] In underwater frogman monitoring scenarios, the system can continuously collect bucket signals from the underwater detection area and prioritize the target detection branch. Only when a target is detected based on the bucket signal will the system activate the image reconstruction branch to restore the underwater target outline.
[0099] In port, dock, and underwater facility inspection scenarios, the system can be used to detect underwater foreign objects, personnel, propellers, and mechanical structures. When there is no preset target to be detected in the detection area, the image reconstruction branch remains closed, thereby reducing computational overhead during long-term monitoring.
[0100] In underwater unmanned vehicle platforms, this invention can be used to quickly filter barrel signals within the detection field of view. When a suspected target is detected, target contour reconstruction is then performed to provide image information for subsequent navigation, obstacle avoidance, and target confirmation.
[0101] Embodiments of the present invention: This invention proposes an underwater target detection and reconstruction method based on single-pixel imaging. The method takes a one-dimensional bucket signal acquired by a single-pixel detector as input, extracts a priori feature vector of the target through a target detection encoder comprising multiple selective state space units, and determines whether a preset target exists in the current bucket signal based on the priori feature vector.
[0102] When the detection result indicates that no target exists, the system outputs a no-target detection result and stops the subsequent reconstruction processing of the current bucket signal; when the detection result indicates that a target exists, the system starts the image reconstruction branch.
[0103] The image reconstruction branch maps the bucket signal into an initial two-dimensional spatial feature tensor on the one hand, and converts the target prior feature vector into scaling and offset parameters on the other hand. It then uses the scaling and offset parameters to modulate the intermediate features in the residual reconstruction network, and finally outputs the underwater target contour reconstruction image.
[0104] The overall data flow of this invention is as follows:
[0105] When no target is detected: output "No target detected" and stop image reconstruction. When the existence of a target is determined:
[0106] Steps 1 to 6 constitute the underwater target detection and reconstruction process after model deployment; Step 7 is used to explain the training process of the target detection and reconstruction network before deployment.
[0107] Network modules and their connections in this invention: like Figure 1As shown in Figure 2, the underwater target detection and reconstruction network used in this invention includes a target detection encoder, a feature aggregation module, a target detection head, a gating control module, a spatial mapping module, a priori parameter generation module, a feature modulation residual reconstruction network, and a reconstruction output head.
[0108] The object detection encoder comprises one or more cascaded selective state space units (SSUs). Each SSU contains, in sequence, an input linear mapping, a one-dimensional depthwise convolution, selective state space modeling, gated fusion, and an output linear mapping. The output feature sequence of the preceding SSU serves as the input feature sequence of the following SSU. The complete feature sequence output by the last SSU is input to a feature aggregation module to obtain a target prior feature vector. This target prior feature vector is then input to both the object detection head and the prior parameter generation module. The object detection head calculates the target presence confidence; the gated control module compares the target presence confidence with a preset gate threshold and controls whether the image reconstruction branch operates based on the comparison result.
[0109] In the image reconstruction branch, the normalized bucket signal sequence is input into the spatial mapping module to obtain the initial two-dimensional spatial feature tensor; the target prior feature vector is input into the prior parameter generation module to obtain the scaling parameters and offset parameters corresponding to each feature modulation residual reconstruction block.
[0110] The initial two-dimensional spatial feature tensor is sequentially passed through multiple feature modulation residual reconstruction blocks and reconstruction output heads to obtain an underwater target contour reconstruction image.
[0111] Step 1: Bucket signal acquisition and preprocessing: like Figure 3 As shown, firstly, a single-pixel imaging system is used to acquire the raw barrel signal sequence of the underwater scene to be detected. Then, the raw barrel signal sequence is preprocessed by normalization to obtain the normalized barrel signal sequence. The specific process is as follows: For underwater scenes to be detected, the single-pixel imaging system sequentially loads a set of preset modulation masks using a spatial light modulator:
[0112] in, Represents the set of modulation masks. Indicates the first A modulation mask, and Represents two-dimensional spatial coordinates. This indicates the number of modulation masks and the number of times the signal in a single bucket is sampled. .
[0113] Loading the When using a modulation mask, a single-pixel detector is used to collect the total light intensity after propagation through the water body and reflection or transmission from the underwater scene, obtaining the signal measurement value of the t-th bucket:
[0114] in This represents the barrel signal measurement value corresponding to the t-th modulation mask; This represents the two-dimensional spatial light intensity distribution of the underwater scene to be detected; This represents the spatial integration region corresponding to a single-pixel detector. This represents the water scattering noise, ambient light noise, detector noise, and other interference in the t-th sampling.
[0115] Arrange all bucket signal measurements according to the loading order of the modulation mask to obtain the original bucket signal sequence:
[0116] in, Represents a single set of raw bucket signal sequences, superscript This indicates the matrix transpose.
[0117] In one implementation, the spatial light modulator employs a digital micromirror device, and the modulation mask is a Hadamard mask. In other implementations, random binary masks, Fourier modulation modes, or other modulation modes capable of spatially encoding the target light field can also be used. The modulation frequency of the spatial light modulator is synchronized with the sampling frequency of the single-pixel detector, ensuring a one-to-one correspondence between each bucket signal measurement and a modulation mask. Subsequently, the original bucket signal sequence is mean-reduced and normalized to unit variance.
[0118] in, This represents the normalized measurement value of the t-th bucket signal. Represents the original bucket signal sequence The mean; Represents the original bucket signal sequence Standard deviation; This represents a preset positive number that avoids zero denominators and maintains numerical stability.
[0119] The normalized bucket signal sequence is composed of all normalized measurements:
[0120] Through the above processing, the normalized bucket signal sequence is obtained. This is then used as the input to the target detection encoder in step two. The normalization process reduces the impact of light source power fluctuations, detector gain drift, and changes in overall water transmittance on subsequent target detection and image reconstruction.
[0121] Step 2: Target detection encoding based on multiple selective state space units The normalized bucket signal sequence obtained in step 1 Input target detection encoder.
[0122] The target detection encoder comprises R cascaded selective state space units, where R represents the number of selective state space units. In one specific embodiment, R = 4.
[0123] The input feature sequence of the r-th selective state space unit is represented as:
[0124] in, Let represent the input feature of the r-th selective state space unit at the t-th sampling position. For the first selective state space unit, let:
[0125] That is, the first selective state space unit directly processes the normalized bucket signal sequence obtained in step one.
[0126] 1. Input linear mapping In the r-th selective state space unit, the input features are first processed. Perform a linear mapping and divide the result into a main feature branch and a gated branch:
[0127] in, and Let represent the input linear mapping weights and biases of the r-th selective state space unit, respectively; This represents the feature of the main feature branch at the t-th sampling position; This represents the feature of the gated branch at the t-th sampling position; This indicates that the division is performed along the direction of the feature channel.
[0128] The input linear mapping is used to complete feature dimension expansion and channel blending, and provides input for subsequent local feature extraction and gated fusion.
[0129] 2. One-dimensional depthwise convolution All main branch features are assembled into a main branch feature sequence according to the sampling order of the bucket signals:
[0130] Perform one-dimensional depthwise convolution and non-linear activation on the main branch feature sequence:
[0131] in, This represents a one-dimensional depthwise convolution with a kernel size of k; Represents a nonlinear activation function; Let represent the local temporal feature sequence obtained by the r-th selective state-space unit.
[0132] in, This represents the local temporal feature corresponding to the t-th sampling position. In one implementation, k=3.
[0133] The one-dimensional depthwise convolution is used to extract the local variation relationship between the sampling positions of adjacent bucket signals.
[0134] 3. Selective state-space modeling Local temporal features at the t-th sampling position Generate the discretization step size:
[0135] in, This represents the discretization step size of the r-th selective state-space unit at the t-th sampling position; and These represent the weights and biases of the discretization step-size generation layer, respectively. This is used to keep the discretization step size positive. Input and output parameters are generated based on the current local temporal features.
[0136] in, This represents the corresponding continuous input parameters. This indicates the corresponding output parameters; and Generate the weights and biases of the layer for the corresponding parameters.
[0137] Based on the discretization step size, the continuous state parameters are discretized as follows:
[0138] in, The continuous state transition parameters of the r-th selective state space unit are used to describe the internal evolution of the hidden state along the sampling order of the bucket signal. Represents discrete state transition parameters; Represents discrete input parameters; Represents the identity matrix; This represents matrix exponentiation. The hidden state is updated using discrete state parameters:
[0139] in, Let represent the hidden state of the r-th selective state space unit at the t-th sampling position; Indicates the hidden state at the previous sampling position; initial hidden state In one implementation, it is set as an all-zero vector.
[0140] The state space output is obtained based on the hidden state:
[0141] in, This represents the state-space output of the r-th selective state-space unit at the t-th sampling position; This represents the skip connection parameter, used to preserve direct information in the current local temporal features.
[0142] By inputting relevant information and Different sampling positions contribute to the hidden state to varying degrees, thereby enabling the selective retention of effective information from the bucket signal.
[0143] 4. Gating Fusion Nonlinear activation is applied to the gated branch features generated by the input linear mapping:
[0144] in, Let represent the gating feature of the r-th selective state space unit at the t-th sampling position.
[0145] The gated feature is then multiplied element-wise with the state space output:
[0146] in, ⊙ represents gating fusion features, and ⊙ represents element-wise multiplication.
[0147] Gated fusion is used to adjust the degree of preservation of different features in the state space output based on the current input content.
[0148] 5. Output linear mapping Gated fused features are input to and output as a linear mapping layer:
[0149] in, and Let represent the output mapping weights and biases of the r-th selective state space unit, respectively.
[0150] Under the condition that the input and output feature dimensions are consistent, the output mapping result is added to the unit input as a residual:
[0151] When the input and output feature dimensions are inconsistent, the input feature dimensions can be adjusted first through linear mapping, and then the residuals can be summed. The output feature sequence of the r-th selective state space unit is formed by the unit outputs corresponding to all sampling positions.
[0152] in, Indicates the first The output feature sequence of the _th selective state-space unit, and used as the _th The input of a selective state-space unit.
[0153] After passing through all R selective state space units, the final output feature sequence of the target detection encoder is obtained:
[0154] 6. Target Prior Feature Aggregation Aggregate the final output feature sequence of the object detection encoder:
[0155] in, Represents the prior feature vector of the target; This indicates a feature sequence aggregation operation.
[0156] In one specific implementation, aggregation is performed using the last output feature:
[0157] In other implementations, average pooling can be used:
[0158] Alternatively, weighted pooling can be used:
[0159] in, Let represent the normalized aggregate weight corresponding to the t-th sampling position, and satisfy:
[0160] Through the above processing, the target prior feature vector is obtained. The prior feature vector of the target is used as the input for calculating the confidence of the target's existence in step three. When the gating judgment result is that the target exists, the prior feature vector of the target is also used as the input for the prior parameter generation module in step five.
[0161] Step 3: Calculate the confidence level of the target's existence The target prior feature vector obtained in step 2 Input the target detection head, and calculate the target presence confidence using a fully connected mapping and a sigmoid activation function:
[0162] in, and These represent the weights and biases of the target detection head, respectively. This represents the Sigmoid activation function; This represents the confidence level that a preset target to be detected exists in the current bucket signal. A higher confidence level indicates a higher probability that the current bucket signal contains the preset target to be detected. The target presence confidence level is obtained through the above processing. The confidence level of the target's existence is used as the input for the gating judgment in step 4.
[0163] Step 4: Gating Trigger Control The target obtained in step 3 has a confidence level. With preset gate threshold By comparing the results, the gating control signal is obtained:
[0164] in, Indicates the preset gate threshold. This indicates a gating control signal.
[0165] when:
[0166] At that time, a gating control signal is received. If the system determines that there is no preset target to be detected in the current bucket signal, it will output a no-target detection result, not start the image reconstruction branch, and terminate the subsequent reconstruction processing of the current bucket signal.
[0167] when:
[0168] At that time, a gating control signal is received. The system determines that a preset target exists in the current bucket signal, outputs a target detection result, and initiates the image reconstruction branch. (Gating threshold) The threshold can be determined based on the allowable false negative rate, false trigger rate, and system computing resources. In one implementation, a minimum target recall rate is first set on the validation dataset, and then a threshold with a higher background interception rate is selected from candidate thresholds that meet the target recall rate requirement. In a specific embodiment, the gating threshold is set as follows:
[0169] When the gate control signal is At that time, the normalized bucket signal sequence obtained in step 1 is... and the target prior feature vector obtained in step 2 Together they serve as input for step 5.
[0170] Step 5: Bucket Signal Spatial Mapping and Prior Parameter Generation When the gating control signal obtained in step 4 is S=1, the normalized bucket signal sequence is processed respectively. and target prior feature vector Process it.
[0171] First, the normalized bucket signal sequence is input into the spatial mapping module, and the M-dimensional bucket signal is mapped to a sequence of length M through a fully connected layer. A one-dimensional vector:
[0172] in, and These represent the weights and biases of the spatial mapping module, respectively. This represents a one-dimensional vector output by the spatial mapping module. A dimension reorganization operation is then performed on this one-dimensional vector:
[0173] We obtain the initial two-dimensional spatial feature tensor:
[0174] in, This represents the number of channels in the initial two-dimensional spatial feature tensor. and These represent the height and width of the initial two-dimensional spatial feature tensor, respectively.
[0175] At the same time, the target prior feature vector Input prior parameter generation module:
[0176] in, , Indicates the number of characteristic modulation residual reconstruction blocks; Indicates the relationship with the first Multilayer perceptrons corresponding to feature modulation residual reconstruction blocks; Indicates the first Scaling parameters corresponding to each feature modulation residual reconstruction block; This indicates the corresponding offset parameter. Scaling parameter. and offset parameters Dimensions and the first The number of channels in the intermediate features of each feature-modulated residual reconstruction block remains consistent, and they are expanded in the spatial dimension to act on all spatial locations of the corresponding channels. The scaling parameter is used to adjust the response amplitude of the intermediate features of different channels, and the offset parameter is used to adjust the distribution reference of the intermediate features of different channels.
[0177] Through the above processing, the initial two-dimensional spatial feature tensor and the modulation parameters corresponding to each feature modulation residual reconstruction block are obtained:
[0178] The initial two-dimensional spatial feature tensor and modulation parameters are then used as inputs for step 6.
[0179] Step 6: Residual Image Reconstruction Based on Feature Modulation The initial two-dimensional spatial feature tensor obtained in step 5 and modulation parameters A common input feature modulation residual reconstruction network is used to obtain an underwater target contour reconstruction image. In one embodiment, the feature modulation residual reconstruction network includes eight cascaded feature modulation residual reconstruction blocks, namely:
[0180] For the Each feature-modulated residual reconstruction block, input features First, it passes through the first two-dimensional convolutional layer (with a kernel size of 3×3), and then through the activation layer:
[0181] in, Indicates the first The input features of a modulated residual reconstruction block; This represents the intermediate spatial features obtained after the first two-dimensional convolution and nonlinear activation. This represents the first two-dimensional convolution operation with a kernel size of 3×3; This represents a non-linear activation function.
[0182] Subsequently, the characteristics of the intermediate space were analyzed. Perform channel normalization:
[0183] in, This represents the characteristics of the intermediate space after normalization; and respectively represent Intermediate space features Mean and standard deviation for the corresponding channel; This represents a preset positive number that maintains a stable value.
[0184] The normalized intermediate spatial features are then modulated by a feature modulation layer:
[0185] in, This represents the intermediate spatial characteristics after modulation. This indicates element-wise multiplication performed along the channel.
[0186] The modulated intermediate spatial features are input into the second two-dimensional convolutional layer (with a kernel size of 3×3), and then added to the input features of the modulated residual reconstruction block:
[0187] in, This represents a second two-dimensional convolution operation with a kernel size of 3×3; Indicates the first The output features of the modulated residual reconstruction block are also used as the first feature. The input of a feature-modulated residual reconstruction block.
[0188] Each feature-modulated residual reconstruction block has the same spatial dimensions and number of channels for both its input and output features to meet the dimensionality requirements of residual addition. After processing all feature-modulated residual reconstruction blocks, the final reconstructed features are obtained. The final reconstructed features are then input into the reconstruction output header:
[0189] in, This indicates the reconstruction of the output convolutional layer; This represents an image reconstructed from the outline of an underwater target. and These represent the height and width of the reconstructed image, respectively.
[0190] Therefore, the present invention ultimately outputs the target presence detection result; when the detection result indicates the presence of a target, it further outputs an underwater target contour reconstruction image. This enables the underwater target detection and reconstruction described in the invention title.
[0191] With the above structure, the target prior feature vector is used both for target existence detection and for adjusting the intermediate space features in the image reconstruction network, thereby realizing the reuse of target detection features and image reconstruction features.
[0192] Joint training of object detection and image reconstruction before model deployment: Obtain the parameters of each network module from steps 2 to 6. Before model deployment, train the object detection branch and the image reconstruction branch using a dataset containing both target samples and non-target samples. Target samples include normalized bucket signal sequences, target presence labels, and corresponding reference target images; non-target samples include normalized bucket signal sequences and target presence labels. Training samples are uniformly represented as follows:
[0193] in, Represents a normalized bucket signal sequence; Indicates the existence of the target; This represents a reference target image corresponding to a target sample. When... hour, This represents the reference target image corresponding to the normalized bucket signal sequence; when At that time, it is not required to provide a corresponding reference target image, and It is not involved in the calculation of image reconstruction loss.
[0194] The existence label of a target is defined as:
[0195] The object detection loss uses binary cross-entropy loss:
[0196] in, Indicates the target detection loss. This indicates the confidence level of the target's existence as output by the target detection head.
[0197] For training samples with a target existence label of 1, the mean squared error loss is used to calculate the difference between the reconstructed image and the reference target image:
[0198] in, Indicates the image reconstruction loss; Indicates the pixel position of the reference target image. Pixel value at; This represents the pixel value at the corresponding pixel position in the reconstructed image; and These represent the height and width of the reference target image, respectively.
[0199] The joint loss is expressed as:
[0200] in, This represents the joint loss during model training; Indicates the weights of the target detection loss; Represents the image reconstruction loss weights; labels This is used to exclude target samples from the image reconstruction loss calculation.
[0201] In one implementation:
[0202] The model is trained in the following three stages: In the first stage, the target detection encoder, feature aggregation module and target detection head are trained using target bucket signals and target bucket-free signals, so that the target detection branch can obtain the target presence detection capability. In the second stage, the spatial mapping module, the prior parameter generation module, and the feature modulation residual reconstruction network are trained using the target bucket signal and the corresponding reference target image, so that the image reconstruction branch can obtain the target contour reconstruction capability. In the third stage, joint loss is used to fine-tune the target detection branch and the image reconstruction branch end-to-end, so that the target prior feature vector can be applied to both target existence detection and image reconstruction feature modulation.
[0203] During the training phase, labels are based on the existence of real targets. The decision to calculate the image reconstruction loss is made by directly shutting down the image reconstruction branch without considering the target existence confidence in the current output of the model, in order to avoid affecting the parameter updates of the image reconstruction network due to detection errors in the early stages of training.
[0204] The targetless training samples include empty water background, water background with different turbidity, suspended particles, bubbles, light source fluctuations, ambient light changes, aquatic plants, rocks, ropes, floating debris and other bucket signals generated by non-preset targets.
[0205] Bucket signals that are actually classified as having no target but are incorrectly identified as having a target by the model are identified as difficult negative samples. These difficult negative samples are then added back to the training set for iterative training to reduce the false trigger rate caused by complex underwater backgrounds.
[0206] Through the above training process, a target detection and reconstruction network with solidified parameters is obtained. The network is used to perform the underwater target detection and reconstruction process described in steps 1 to 6.
[0207] Experimental hardware and software environment in specific embodiments: like Figure 3As shown, this embodiment uses a 532 nm continuous-wave laser as the active illumination source, utilizes a digital micromirror device to load a Hadamard modulation mask sequence, and employs photomultiplier tubes to construct a single-pixel detector. The barrel signal acquisition device includes a laser source, a beam adjustment component, a spatial light modulator, an underwater target scene, an optical collection component, a single-pixel detector, a signal acquisition module, and an edge computing platform; wherein, the beam adjustment component includes a static diffuser and a collimating lens, and the optical collection component includes a collection lens and a polarizing beam splitter. The edge computing platform is used to control the spatial light modulator to load the modulation mask in a predetermined order and to receive the barrel signal sequence output by the signal acquisition module. The spatial light modulator, single-pixel detector, and signal acquisition module work synchronously according to a preset timing sequence, so that the measured value of each barrel signal establishes a one-to-one correspondence with the corresponding modulation mask. The software environment is built on PyTorch 2.1 and CUDA 11.8, and an NVIDIA GeForce RTX 3090 GPU is used for model training and inference. The target image resolution is 128×128, the number of barrel signal samples M=410, and the corresponding sampling rate is approximately:
[0208] The object detection encoder comprises four cascaded selective state space units, a feature aggregation module, and an object detection head. Each selective state space unit internally includes an input linear mapping, a one-dimensional deep convolution, selective state space modeling, gated fusion, and an output linear mapping, where the one-dimensional deep convolution has a kernel size of 3. The image reconstruction branch includes a spatial mapping module, a prior parameter generation module, eight cascaded feature modulation residual reconstruction blocks, and a reconstruction output head. The model is trained using the Adam optimizer, with the learning rate adjusted using cosine annealing.
[0209] Data objects and input preparation: Targeted samples include underwater target barrel signals collected under different water depths, target attitudes, lighting conditions, and water scattering levels. Targetless samples include barrel signals generated by empty water backgrounds, water backgrounds of varying turbidity, suspended particles, bubble interference, light source fluctuations, ambient light changes, aquatic plants, rocks, floating debris, and other objects not pre-defined for detection. Targeted and targetless samples are preferably collected at similar water depths, turbidity levels, with the same lighting equipment, and under the same detector operating conditions to reduce the possibility of the model using environmental differences rather than target structure to complete target detection. Training data is divided according to collection batches, underwater scenes, or target instances, ensuring that data from the same consecutive collection batch only enters a subset of the training, validation, or test sets to reduce inflated test results due to data similarity. During training, barrel signals that are actually classified as targetless but incorrectly identified as target by the model can be treated as difficult negative samples and re-added to the training data for iterative training.
[0210] Underwater target reconstruction comparison experiment: Under the conditions of image resolution of 128×128 and sampling rate of 2.5%, the method of this invention is compared with DGI, DnCNN, and GIDC methods. DGI is a differential ghost imaging method that reduces the influence of light source fluctuations and background noise by performing differential correlation operations on the bucket signal; DnCNN is a convolutional neural network based on residual learning, used to suppress noise in the image; GIDC introduces a deep neural network as a structured constraint into the ghost imaging reconstruction process to assist in restoring the target structure. Experimental subjects included a turtle at a depth of 26 m, a propeller at a depth of 50 m, a propeller at a depth of 52 m, and a frogman at a depth of 52 m. Since it is difficult to obtain noise-free real images that strictly correspond to the bucket signal in actual underwater experiments, this embodiment uses pseudo-ground value images as an approximate evaluation benchmark. The pseudo-ground value images are obtained by performing background subtraction, total variational regularization, BM3D denoising, and morphological processing on the original acquired data, and then fusing the processing results. The pseudo-ground value is only used to compare the relative performance between different methods and is not equivalent to a strictly real target image.
[0211] The experimental results for peak signal-to-noise ratio (PSNR) of different methods are as follows:
[0212] The experimental results of structural similarity (SSIM) using different methods are as follows:
[0213] The average PSNR of the method in this invention is 15.370 dB, which is approximately 8.501 dB, 6.204 dB, and 3.534 dB higher than DGI, DnCNN, and GIDC, respectively; the average SSIM of the method in this invention is 0.5340. Experimental results show that the present invention can recover the target outline relatively completely under low sampling rate and actual underwater scattering conditions, and improve the target edge integrity and target background contrast.
[0214] Among them, PSNR (Peak Signal-to-Noise Ratio) is used to evaluate the pixel error between the reconstructed image and the reference target image. The larger the PSNR value, the smaller the difference between the reconstructed image and the reference target image, and the better the reconstruction quality. The unit is dB.
[0215] SSIM (Structural Similarity Index) is used to evaluate the similarity between a reconstructed image and a reference target image in terms of brightness, contrast, and structural information. The higher the SSIM value, the higher the structural similarity between the two images, and the better the reconstruction effect.
[0216] Target detection and gating efficiency experiment: Construct a test set containing 1000 bucket signals, including 400 target bucket signals and 600 non-target bucket signals. Each bucket signal contains 410 sample values, and the gating threshold is set to 0.5.
[0217]
[0218] The target detection accuracy was 93.2%, the target recall rate was 98.0%, the target precision was 86.7%, the background interception rate was 90.0%, the false negative rate was 2.0%, and the false trigger rate was 10.0%. Of the 1000 bucket signals, 452 triggered image reconstruction. Compared to processing all bucket signals for image reconstruction, this invention reduces redundant image reconstruction tasks by 54.0%.
[0219] Inference latency and overall computational efficiency experiment
[0220] With image reconstruction performed on all bucket signals, the average processing delay is:
[0221] After adopting gating control, the reconfiguration branch triggering ratio is 45.2%, and the average processing delay is:
[0222] Average processing latency was reduced by approximately 52.2%.
[0223] in, This represents the average processing delay when all bucket signals are used for image reconstruction. This represents the average processing delay after gating control; 0.452 represents the proportion of bucket signals that trigger the image reconstruction branch in the test set.
Claims
1. A method for underwater target detection and reconstruction based on single-pixel imaging, characterized in that... The steps are as follows: Step 1: Acquire the raw barrel signal sequence of the underwater scene to be detected using a single-pixel imaging system: in, Represents a single set of raw bucket signal sequences, superscript Indicates matrix transpose; Then, the original bucket signal sequence is subjected to normalization preprocessing to obtain the normalized bucket signal sequence. : in: This represents the normalized measurement value of the t-th bucket signal. Step 2: Normalize the bucket signal sequence As input to the object detection encoder For normalized bucket signal sequences Extract the target prior feature vector; The target detection encoder includes A series of selective state-space units, wherein, Indicates the number of selective state space units; No. The input feature sequence of each selective state-space unit is: in, Indicates the first The selective state-space unit in the th ... Input features at each sampling location; The first sample is composed of the unit outputs corresponding to all sampling positions. Output feature sequence of each selective state-space unit: in: Indicates the first The output feature sequence of the _th selective state-space unit, and used as the _th Input to a selective state-space unit; After all After selecting state space units, the final output feature sequence of the target detection encoder is obtained: The final output feature sequence of the object detection encoder Aggregation is performed to obtain the target prior feature vector. : in, Represents the prior feature vector of the target; This represents a feature sequence aggregation operation; Step 3: Transfer the target prior feature vector As input for calculating the confidence level of the target; Target prior feature vector Input the target detection head, and calculate the target presence confidence using a fully connected mapping and a sigmoid activation function: in, and These represent the weights and biases of the target detection head, respectively. This represents the Sigmoid activation function; This indicates the confidence level that the current bucket signal contains a preset target to be detected; Step 4: Assess the confidence level of the target. With preset gate threshold By comparison, the gating control signal is obtained: in, Indicates the preset gate threshold. Indicates the gate control signal; When the target has confidence level Less than the preset threshold At that time, the gate control signal If the system determines that there is no preset target to be detected in the current bucket signal, it outputs a no-target detection result, does not start the image reconstruction branch, and terminates the subsequent reconstruction processing of the current bucket signal. When the target has confidence level Greater than or equal to the preset gate threshold At that time, the gating control signal The system determines that there is a preset target to be detected in the current bucket signal, outputs the target detection result, and starts the image reconstruction branch to proceed to step 5; Step 5, Image Reconstruction Branch: For the normalized bucket signal sequence of step 1 Perform bucket signal spatial mapping: normalize the bucket signal sequence The input spatial mapping module maps the M-dimensional bucket signal to a spatially bounded array of lengths using a fully connected layer. A one-dimensional vector: in, and These represent the weights and biases of the spatial mapping module, respectively. This represents a one-dimensional vector output by the space mapping module; Perform dimension reorganization on a one-dimensional vector: We obtain the initial two-dimensional spatial feature tensor: in, This represents the number of channels in the initial two-dimensional spatial feature tensor. and These represent the height and width of the initial two-dimensional spatial feature tensor, respectively; The target prior feature vector obtained in step 2 Generate prior parameters: target prior feature vector Input prior parameter generation module: in, , Indicates the number of characteristic modulation residual reconstruction blocks; Indicates the relationship with the first Multilayer perceptrons corresponding to feature modulation residual reconstruction blocks; Indicates the first Scaling parameters corresponding to each feature modulation residual reconstruction block; This indicates the corresponding offset parameter; We obtain the initial two-dimensional spatial feature tensor and the modulation parameters corresponding to each feature modulation residual reconstruction block: Step 6: Residual image reconstruction based on feature modulation: The initial two-dimensional spatial feature tensor and modulation parameters A residual reconstruction network modulated by common input features is used to obtain an underwater target contour reconstruction image. The feature-modulated residual reconstruction network includes Nr A series of cascaded feature modulation residual reconstruction blocks: Indicates the first The output features of the modulated residual reconstruction block are also used as the first feature. The input of each feature-modulated residual reconstruction block; After all feature modulation residual reconstruction blocks are processed, the final reconstructed features are obtained. The final reconstructed features are then input into the reconstruction output header: in, This indicates the reconstruction of the output convolutional layer; This represents an image reconstructed from the outline of an underwater target. and These represent the height and width of the reconstructed image, respectively.
2. The underwater target detection and reconstruction method based on single-pixel imaging according to claim 1, characterized in that: Step 1 utilizes a single-pixel imaging system to acquire the raw barrel signal sequence of the underwater scene to be detected: For the underwater scene to be detected, the single-pixel imaging system sequentially loads a set of preset modulation masks via a spatial light modulator. in, Represents the set of modulation masks. Indicates the first A modulation mask, and Represents two-dimensional spatial coordinates. This indicates the number of modulation masks and the number of times the signal in a single bucket is sampled. ; Loading the When using a modulation mask, a single-pixel detector is used to collect the total light intensity after propagation through the water body and reflection or transmission from the underwater scene, obtaining the signal measurement value of the t-th bucket: in This represents the barrel signal measurement value corresponding to the t-th modulation mask; This represents the two-dimensional spatial light intensity distribution of the underwater scene to be detected; This represents the spatial integration region corresponding to a single-pixel detector. This represents the water scattering noise, ambient light noise, detector noise, and other interference in the t-th sampling. Arrange all bucket signal measurements according to the loading order of the modulation mask to obtain the original bucket signal sequence: in, Represents a single set of raw bucket signal sequences, superscript This indicates the matrix transpose.
3. The underwater target detection and reconstruction method based on single-pixel imaging according to claim 1, characterized in that: The one-dimensional bucket signal preprocessing in step 1 is as follows: The normalized bucket signal sequence is composed of all normalized measurements: ,in, This represents the normalized measurement value of the t-th bucket signal. Represents the original bucket signal sequence The mean; Represents the original bucket signal sequence Standard deviation; This represents a preset positive number that avoids zero denominators and maintains numerical stability.
4. The underwater target detection and reconstruction method based on single-pixel imaging according to claim 1, characterized in that: In the r-th selective state space unit of the selective state space unit in step 2, the input features are first processed... Perform linear mapping to expand feature dimensions and blend channels, and divide the linear mapping result into inputs for the main feature branch and the gated branch: in, and Let represent the input linear mapping weights and biases of the r-th selective state space unit, respectively; This represents the feature of the main feature branch at the t-th sampling position; This represents the feature of the gated branch at the t-th sampling position; This indicates division along the direction of the feature channel; All main branch features are assembled into a main branch feature sequence according to the sampling order of the bucket signals: One-dimensional depthwise convolution and non-linear activation are performed on the main branch feature sequence. The one-dimensional depthwise convolution is used to extract the local variation relationship between the sampling positions of adjacent bucket signals. in, This represents a one-dimensional depthwise convolution with a kernel size of k; Represents a non-linear activation function; Represents the local temporal feature sequence obtained by the r-th selective state-space unit: in, This represents the local temporal feature corresponding to the t-th sampling position; Local temporal features at the t-th sampling position Generate the discretization step size: in, This represents the discretization step size of the r-th selective state-space unit at the t-th sampling position; and These represent the weights and biases of the discretization step-size generation layer, respectively. Used to keep the discretization step size positive; Simultaneously, input and output parameters are generated based on the current local temporal features: in, This represents the corresponding continuous input parameters. This indicates the corresponding output parameters; and Generate the weights and biases of the layer for the corresponding parameters; Based on the discretization step size, the continuous state parameters are discretized as follows: in, The continuous state transition parameters of the r-th selective state space unit are used to describe the internal evolution of the hidden state along the sampling order of the bucket signal. Represents discrete state transition parameters; Represents discrete input parameters; Represents the identity matrix; Indicates matrix exponentiation; Update the hidden state using discrete state parameters: in, Let represent the hidden state of the r-th selective state space unit at the t-th sampling position; Indicates the hidden state at the previous sampling position; initial hidden state In one implementation, it is set as an all-zero vector; The state space output is obtained based on the hidden state: in, This represents the state-space output of the r-th selective state-space unit at the t-th sampling position; This represents the skip connection parameter, used to preserve direct information in the current local temporal features; By inputting relevant information and Different sampling positions contribute to the hidden state to varying degrees, thereby enabling the selective retention of effective information from the bucket signal. The gated branch feature is non-linearly activated: in, This represents the gating feature of the r-th selective state-space unit at the t-th sampling position; Multiply the gated features element-wise with the state space output: in, ⊙ represents gated fusion features; ⊙ represents element-wise multiplication. Gated fusion is used to adjust the degree of preservation of different features in the state space output according to the current input content; Gating fusion features Input-output linear mapping layer: in, Indicates the first The selective state-space unit in the th ... Intermediate output features obtained by linearly mapping each sampling location; and These represent the output mapping weights and biases of the r-th selective state-space unit, respectively. Under the condition that the input and output feature dimensions are consistent, the output mapping result is added to the unit input as a residual: When the input and output feature dimensions are inconsistent, the input feature dimensions are first adjusted through linear mapping, and then the residuals are summed. The output feature sequence of the r-th selective state space unit is composed of the unit outputs corresponding to all sampling positions: 。 5. The underwater target detection and reconstruction method based on single-pixel imaging according to claim 1, characterized in that: Step 2 involves aggregating the final output feature sequence of the target detection encoder: Alternatively, average pooling can be used: Alternatively, weighted pooling can be used: in, Let represent the normalized aggregate weight corresponding to the t-th sampling position, and satisfy: .
6. The underwater target detection and reconstruction method based on single-pixel imaging according to claim 1, characterized in that: The first Each feature-modulated residual reconstruction block, input features First, it goes through the first two-dimensional convolutional layer, then through the activation layer: in, Indicates the first The input features of a modulated residual reconstruction block; This represents the intermediate spatial features obtained after the first two-dimensional convolution and nonlinear activation. This represents the first two-dimensional convolution operation with a kernel size of 3×3; Represents a non-linear activation function; Features of intermediate space Perform channel normalization: in, This represents the characteristics of the intermediate space after normalization; and respectively represent Intermediate space features Mean and standard deviation for the corresponding channel; This represents a preset positive number that maintains numerical stability. The normalized intermediate spatial features are then modulated by a feature modulation layer: in, This represents the intermediate spatial characteristics after modulation. This indicates element-wise multiplication performed along the channel; The modulated intermediate spatial features are input into the second two-dimensional convolutional layer and added to the input features of the modulated residual reconstruction block: in, This represents a second two-dimensional convolution operation with a kernel size of 3×3; Indicates the first The output features of the modulated residual reconstruction block are also used as the first feature. The input of a feature-modulated residual reconstruction block.
7. The underwater target detection and reconstruction method based on single-pixel imaging according to claim 1, characterized in that: The threshold The minimum target recall rate is determined based on the allowable false negative rate, false trigger rate, and system computing resources. First, a minimum target recall rate is set on the validation dataset, and then a threshold with a higher background interception rate is selected from the candidate thresholds that meet the target recall rate requirements. The gating threshold is set as follows: .
8. A network system for underwater target detection and reconstruction based on single-pixel imaging as described in any one of claims 1 to 7, characterized in that: The target detection encoder in step 2 comprises R cascaded selective state space units. Each selective state space unit includes an input linear mapping, channel partitioning, a main feature branch, a gated branch, a gated fusion, an output linear mapping, and a residual connection. The input linear mapping is used to transform the dimension and mix the channels of the input feature sequence, and forms the main feature branch and the gated branch through channel partitioning. The main feature branch obtains the state space output through one-dimensional deep convolution, nonlinear activation, and selective state space modeling. The selective state space modeling generates a discretized step size, input parameters, and output parameters based on the current local temporal features, and establishes a long-distance dependency between different sampling positions of the bucket signal through recursive state updates. The gated branch obtains gated features through nonlinear activation, and multiplies them element-wise with the state space output to obtain gated fusion features. The gated fusion features are added to the input features of the selective state space unit through a residual connection after output linear mapping to obtain the output feature sequence of the selective state space unit.
9. The network system according to claim 8, characterized in that: The network system is trained as follows: A dataset containing both target samples and non-target samples is used to train the target detection branch and the image reconstruction branch. Target samples include normalized bucket signal sequences, target presence labels, and corresponding reference target images; non-target samples include normalized bucket signal sequences and target presence labels. Training samples are uniformly represented as follows: in, This represents a normalized bucket signal sequence; Indicates the existence of the target; This indicates a reference target image corresponding to the target sample; The existence label of a target is defined as: The object detection loss uses binary cross-entropy loss: in, Indicates the target detection loss. This indicates the confidence level of the target existence output by the target detection head; For training samples with a target existence label of 1, the mean squared error loss is used to calculate the difference between the reconstructed image and the reference target image: in, Indicates the image reconstruction loss; Indicates the pixel position of the reference target image. Pixel value at; This represents the pixel value at the corresponding pixel position in the reconstructed image; and These represent the height and width of the reference target image, respectively. The joint loss is expressed as: in, This represents the joint loss during model training; Indicates the weights of the target detection loss; Represents the image reconstruction loss weights; labels This is used to exclude target-free samples from image reconstruction loss calculation; The target detection and reconstruction network with solidified parameters obtained after training is used to perform the underwater target detection and reconstruction process described in steps 2 to 6.
10. The network system according to claim 9, characterized in that: In network system training The model is trained in the following three stages: In the first stage, the target detection encoder, feature aggregation module and target detection head are trained using target bucket signals and target bucket-free signals, so that the target detection branch can obtain the target presence detection capability. In the second stage, the spatial mapping module, the prior parameter generation module, and the feature modulation residual reconstruction network are trained using the target bucket signal and the corresponding reference target image, so that the image reconstruction branch can obtain the target contour reconstruction capability. In the third stage, joint loss is used to fine-tune the target detection branch and the image reconstruction branch end-to-end, so that the target prior feature vector can be applied to both target existence detection and image reconstruction feature modulation. During the training phase, labels are based on the existence of real targets. The decision to calculate the image reconstruction loss is made by directly shutting down the image reconstruction branch without considering the target existence confidence in the current output of the model, in order to avoid affecting the parameter updates of the image reconstruction network due to detection errors in the early stages of training. The targetless training samples include empty water background, water background with different turbidity, suspended particles, bubbles, light source fluctuations, ambient light changes, aquatic plants, rocks, ropes, floating debris and other bucket signals generated by non-preset targets. Bucket signals that are actually classified as having no target but are incorrectly identified as having a target by the model are identified as difficult negative samples. These difficult negative samples are then added back to the training set for iterative training to reduce the false trigger rate caused by complex underwater backgrounds. The target detection and reconstruction network with solidified parameters obtained after training is used to perform the underwater target detection and reconstruction process described in steps 2 to 6.