Cross-domain generalization target detection method for high domain shift scenarios and related devices

CN121708401BActive Publication Date: 2026-09-08SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610168774.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-05
Publication Date
2026-09-08
Estimated Expiration
2046-02-05

AI Technical Summary

Technical Problem

[0005]鉴于上述问题,本发明实施例提供了一种面向高域偏移场景的跨域泛化目标检测方法、面向高域偏移场景的跨域泛化目标检测装置、计算机设备及计算机可读存储介质,用于解决现有技术中存在的目标检测领域泛化较差、检测精度较低的问题

Benefits of technology

[0016] This invention provides an embodiment of the invention that acquires an image to be detected; inputs the image to be detected into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. This invention aims to alleviate the problem of foreground and background fusion caused by light absorption in images by using ultra-lightweight online density peak clustering to highlight salient targets and providing domain-invariant priors. Secondly, a density-aware sequence modulation mechanism is used to adaptively adjust the sampling step size and state gain to integrate this density information into the Mamba (state-space model), thereby preserving the high-frequency structure of dense regions while suppressing noise background. Finally, semantic enhancement instance normalization performs density weighting calibration in the spatial and channel dimensions to enhance foreground saliency and suppress noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121708401B_ABST
    Figure CN121708401B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of artificial intelligence, and disclose a cross-domain generalization target detection method for high domain offset scenarios and a related device. The method comprises: acquiring an image to be detected; inputting the image to be detected into a semantic density driven target detection model to obtain a target detection result; the target detection model is obtained by training an image sample; the training process comprises: dynamically adjusting weight parameters of the state space model according to semantic density information of the image sample, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density information to output a prediction result; adjusting model parameters of the state space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. In the above manner, high precision, compact structure and ultra-high throughput of image detection in a high domain offset scenario are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a cross-domain generalized target detection method for high-domain offset scenarios, a cross-domain generalized target detection device for high-domain offset scenarios, a computer device, and a computer-readable storage medium. Background Technology

[0002] Currently, domain generalization in object detection aims to improve detector performance in unknown scenarios. Many existing domain generalization methods for underwater object detection fail to effectively separate foreground objects from noisy backgrounds because they neglect semantic density cues, which are crucial for distinguishing salient structures under severe visual degradation conditions.

[0003] Domain generalization aims to train models capable of generalizing to unseen target domains, without access to target domain data during training. Existing methods can be categorized into three types: domain expansion through synthetic domains, representation alignment, or style normalization. In recent years, domain generalization in object detection has gained increasing attention, with frameworks improving robustness through cue-driven attention adaptation or phrase-grounded style transfer. Despite these advances, CNN- and Transformer-based detectors still face limitations in handling underwater degradation problems such as light absorption, scattering, and domain-specific noise.

[0004] To overcome these limitations, state-space models have emerged as a promising alternative. Unlike CNNs and Transformers that rely on local convolutions or quadratic attention, SSMs efficiently capture long-range dependencies through linear-time global scanning. Recent variants, such as Mamba, introduce input-adaptive state updates and dynamic parameterization mechanisms, providing content-relevant modeling capabilities and controllable memory. These mechanisms help preserve structural cues in the foreground region while attenuating low-frequency and domain-specific interference. By replacing static local aggregation operations with adaptive global modeling and explicit memory control, Mamba has become ideal for robust domain-generalized object detection in underwater environments. Although such designs have demonstrated excellence in vision tasks, their direct application to object detection generalization without adaptation still faces significant limitations. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention provide a cross-domain generalized target detection method, a cross-domain generalized target detection device, a computer device, and a computer-readable storage medium for high-domain offset scenarios, to solve the problems of poor target detection domain generalization and low detection accuracy in the prior art.

[0006] According to one aspect of the present invention, a cross-domain generalized target detection method for high-domain offset scenarios is provided, the method comprising: Acquire the image to be detected; The image to be detected is input into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; Output the target detection results of the image to be detected.

[0007] In one alternative approach, the step of dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map, includes: Extract the initial feature map of the image sample; Online density peak clustering is performed on the initial feature map to generate a semantic density map; The weight parameters of the state space model are dynamically adjusted based on the semantic density map to obtain the modulated feature map; wherein, the semantic density map is used to highlight the foreground target region and suppress background noise; Based on the semantic density map, the modulated feature map is subjected to semantic enhancement instance normalization processing to obtain the feature map after semantic enhancement instance normalization processing. The prediction result is obtained based on the feature map after normalization of the semantically enhanced instance.

[0008] In one alternative approach, the step of performing online density peak clustering on the initial features to generate a semantic density map further includes: Flatten the shallow feature map into a sequence of feature vectors; Calculate the Euclidean distance between each feature vector in the feature vector sequence and all historical feature vectors in the memory bank; the memory bank includes historical feature vector samples. Based on the Euclidean distance, the local density of each feature vector is calculated using Gaussian weighted proximity. The top K feature vectors with the highest local density are selected as cluster centers, and the similarity between each feature vector and the cluster center is calculated using a temperature-scaled probability normalization function. Calculate the density prior weights of the cluster centers, and obtain the semantic strength of each feature vector through weighted aggregation; The semantic intensity is reshaped into a semantic density map with the same size as the initial feature map.

[0009] In one alternative approach, calculating the local density of each feature vector based on Gaussian weighted proximity according to the Euclidean distance includes: The local density is calculated using the following formula: ; in, Representing the eigenvector Local density, Representing the eigenvector The Euclidean distance to the j-th historical feature sample in the memory bank; This is the preset cutoff distance; The process of selecting the top K feature vectors with the highest local density as cluster centers, and calculating the similarity between each feature vector and the cluster centers using a temperature-scaled softmax function, includes: Similarity is calculated using the following formula: ; in, Representing the eigenvector With cluster center Similarity; For the first l Cluster centers ; The density prior weights for calculating cluster centers are used to obtain a set of semantic strengths for each feature vector through weighted aggregation, including: ; in, Density prior weights are denoted as ; Cluster center The density; The semantic density map is obtained based on the set of semantic strengths of each feature vector.

[0010] In an alternative approach, the step of dynamically adjusting the weight parameters of the state space model based on the semantic density map to obtain the modulated feature map further includes: The basic parameters are mapped using lightweight convolutional layers to generate the initial modulation signal. The initial modulation signal is constrained by a bounded, centered, nonlinear function to obtain the modulation factor; The basic parameters are scaled element by element to obtain the modulated parameters; The discrete state equations of the state space model are updated based on the modulated parameters, and the initial features are modeled to output the modulated feature map.

[0011] In one optional approach, the step of performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to obtain a semantic enhancement instance normalized feature map further includes: The modulated feature map is then normalized to obtain the instance-normalized feature map. A spatial mask is generated based on the semantic density map; The structure-enhanced features are extracted from the normalized feature map of the instance through depthwise separable convolution, and the channel weights are calculated by squeezing and activation operations. The semantically reweighted features are obtained by element-wise multiplication. The instance-normalized feature map is concatenated with the semantically reweighted feature map, and then processed by convolution, batch normalization and activation function. The semantically enhanced instance-normalized feature map is output through residual fusion.

[0012] According to another aspect of the present invention, a cross-domain generalized target detection device for high-domain offset scenarios is provided, comprising: The acquisition module is used to acquire the image to be detected; An object detection module is used to input the image to be detected into a semantic density-driven object detection model to obtain object detection results; wherein, the object detection model is based on a state-space model; the object detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and preset loss weights, and iteratively training to obtain the object detection model; The output module is used to output the target detection results of the image to be detected.

[0013] In one alternative approach, the step of dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map, includes: Extract the initial feature map of the image sample; Online density peak clustering is performed on the initial feature map to generate a semantic density map; The weight parameters of the state space model are dynamically adjusted based on the semantic density map to obtain the modulated feature map; wherein, the semantic density map is used to highlight the foreground target region and suppress background noise; Based on the semantic density map, the modulated feature map is subjected to semantic enhancement instance normalization processing to obtain the feature map after semantic enhancement instance normalization processing. The prediction result is obtained based on the feature map after normalization of the semantically enhanced instance.

[0014] According to another aspect of the present invention, a computer device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the cross-domain generalized target detection method for high-domain offset scenarios.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the cross-domain generalized target detection method for high-domain offset scenarios.

[0016] This invention provides an embodiment of the invention that acquires an image to be detected; inputs the image to be detected into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. This invention aims to alleviate the problem of foreground and background fusion caused by light absorption in images by using ultra-lightweight online density peak clustering to highlight salient targets and providing domain-invariant priors. Secondly, a density-aware sequence modulation mechanism is used to adaptively adjust the sampling step size and state gain to integrate this density information into the Mamba (state-space model), thereby preserving the high-frequency structure of dense regions while suppressing noise background. Finally, semantic enhancement instance normalization performs density weighting calibration in the spatial and channel dimensions to enhance foreground saliency and suppress noise.

[0017] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0018] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating the cross-domain generalized target detection method for high-domain offset scenarios provided by an embodiment of the present invention is shown. Figure 2 This diagram illustrates the structure of the target detection model in the cross-domain generalized target detection method for high-domain offset scenarios provided in this embodiment of the invention. Figure 3 This diagram illustrates the structure of the semantic enhancement instance normalization processing module in the target detection model of the cross-domain generalized target detection method for high-domain offset scenarios provided in this embodiment of the invention. Figure 4 This diagram illustrates the structure of a cross-domain generalized target detection device for high-domain offset scenarios provided in an embodiment of the present invention. Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0019] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. Although exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein.

[0020] Figure 1 The flowchart illustrates a cross-domain generalized target detection method for high-domain offset scenarios provided by an embodiment of the present invention. This method is executed by a computer device. The computer device can be a desktop computer, laptop computer, tablet computer, smart terminal, distributed device, etc., and the embodiments of the present invention do not impose specific limitations. Figure 1 As shown, the method includes the following steps: Step 110: Obtain the image to be detected.

[0021] The image to be detected is a high-domain offset scene image acquired in advance. In high-domain offset environment images, high-frequency details, textures, edges and other high-frequency domain information are offset, distorted or missing, or the image has a significant distribution offset from the reference sample in high-dimensional feature space, which manifests as blurred image edges, broken textures, loss of details, abnormal high-frequency noise, etc. It is a typical difficult scene for density perception, object detection and semantic segmentation in computer vision.

[0022] Since the images to be detected may include complex underwater scenes with domain shifts such as illumination, turbidity, and debris interference, the foreground details of the images are smoothed and background noise is accumulated.

[0023] Step 120: Input the image to be detected into the semantic density-driven target detection model to obtain the target detection result.

[0024] The target detection model is based on a state-space model. The target detection model is trained using image samples. The training process includes: dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples; performing semantic enhancement instance normalization on the modulated feature map based on the semantic density map and then outputting a prediction result; adjusting the model parameters of the state-space model based on the prediction result and preset loss weights, and iteratively training to obtain the target detection model.

[0025] Among them, such as Figure 2 As shown, the target detection model in this embodiment of the invention includes a feature extraction module, a density-aware sequence modulation module, a feature enhancement and normalization module, and a detection head module. During training, the feature extraction module extracts an initial feature map of the image to be detected; the density-aware sequence modulation module performs online density peak clustering on the initial feature map to generate a semantic density map, and dynamically adjusts the weight parameters of the state-space model based on the semantic density map to obtain a modulated feature map; the semantic density map is used to highlight the foreground target region and suppress background noise; the feature enhancement and normalization module performs semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to obtain a semantically enhanced instance normalized feature map; the detection head module obtains a prediction result based on the semantically enhanced instance normalized feature map. In this embodiment of the invention, the target detection model includes multiple scales connected sequentially. The model comprises three scales: the first scale includes a 3-layer feature extraction module, a 3-layer density-aware sequence modulation module, and a 1-layer feature enhancement and normalization module; the second scale includes a 9-layer density-aware sequence modulation module and a 1-layer feature enhancement and normalization module; and the third scale includes a 3-layer density-aware sequence modulation module and a 1-layer feature enhancement and normalization module. The target detection model also includes a multi-scale feature fusion module, where the outputs from the three scales are fused before being output by the detection head module. The detection head module can be a YOLO-v8 detection head.

[0026] Specifically, the density-aware sequence modulation module dynamically adjusts the weight parameters of the state-space model based on the semantic density information of the image samples, and outputs the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map, including the following steps: Step 210: Extract the initial feature map of the image sample.

[0027] In this embodiment of the invention, the feature extraction module is implemented using the visual state space block of the original state space model. The initial feature map of the image sample, i.e. the shallow feature map, is extracted through the visual state space block.

[0028] Step 220: Perform online density peak clustering on the initial feature map to generate a semantic density map.

[0029] In order to achieve stable differentiation of semantic information between foreground and background while suppressing noise interference, this embodiment of the invention sets up a density-aware sequence modulation module, which generates a semantic density map through online density peak clustering to highlight salient regions, suppress irrelevant regions, and guide subsequent processing, thereby enhancing cross-domain robustness.

[0030] Streaming memory is used to provide diverse historical context for robust density estimation. Specifically, this includes the following steps: Step 2201: Flatten the shallow feature map into a sequence of feature vectors.

[0031] Given an input that is a shallow feature map In this embodiment of the invention, it is flattened into a set of feature vectors. ,in, For the first 1 eigenvector The number of feature vectors, .

[0032] Step 2202: Calculate the Euclidean distance between each feature vector in the feature vector sequence and all historical feature vectors in the memory.

[0033] The memory bank includes historical feature vector samples. The historical feature vectors of the samples are maintained and updated cyclically to ensure diversity. Historical feature samples are maintained through a streaming memory, which is updated cyclically and has a capacity of M=1000 features.

[0034] For each Calculate each feature vector The Euclidean distance to all historical feature vectors in the memory bank.

[0035] Step 2203: Calculate the local density of each feature vector based on the Euclidean distance and Gaussian weighted proximity.

[0036] To adaptively handle different data distributions, this invention sets a cutoff distance. This cutoff distance is used to normalize the distance, ensuring consistency in density calculations across different batches. The local density is calculated using the following formula: ; in, Representing the eigenvector Local density, Representing the eigenvector With the first in the memory bank Euclidean distance of historical feature samples; This is the preset cutoff distance.

[0037] Step 2204: Select the top K feature vectors with the highest local density as cluster centers, and calculate the similarity between each feature vector and the cluster center using a temperature-scaled probability normalization function.

[0038] This invention identifies dense regions that may represent semantic clusters by summing Gaussian-weighted proximity. Then, to form a prototype, the region with the highest density is selected... Each sample is used as a cluster center. Each cluster center is associated with its density. These peaks effectively capture key semantic patterns. Subsequently, soft assignment uses a temperature-scaled softmax function to measure the similarity of each feature to these centers: ; in, Representing the eigenvector With the Cluster centers Similarity; For the first Cluster centers ; Parameters used to control the sharpness of the distribution.

[0039] In this way, fuzzy cluster membership relationships are achieved, while parameters... Control the sharpness of the distribution to increase flexibility.

[0040] Step 2205: Calculate the density prior weights of the cluster centers and obtain the semantic strength of each feature vector through weighted aggregation.

[0041] To further emphasize denser and more representative prototypes, this embodiment of the invention introduces density-based prior weights. Then, semantic strength is calculated by aggregating these weighted assignments: ; in, Density prior weights are denoted as ; Cluster center The density. This yields a score for a semantically significant point.

[0042] Step 2206: Reshape the semantic intensity into a semantic density map with the same size as the initial feature map.

[0043] Among them, semantic intensity is reshaped into a semantic density map. Among them, semantic density map semantic strength of each feature vector The set of semantic density maps. The semantic density map is used to highlight foreground target regions and suppress background noise.

[0044] By combining adaptive density estimation from the memory bank with weighted calculation based on prototype priors, this invention enables the gradual construction of reliable prototypes and ensures that the semantic density map effectively captures meaningful structures.

[0045] Step 230: Dynamically adjust the weight parameters of the state space model according to the semantic density map to obtain the modulated feature map.

[0046] In this embodiment of the invention, the weight parameters of the state-space model are dynamically adjusted through the following steps: Step 2301: Map the basic parameters using lightweight convolutional layers to generate the initial modulation signal.

[0047] Among them, the discrete state update formula is constructed based on the state-space model in Mamba: ; in, and From continuous parameters and Through time scale parameters The zero-order preserved discretization is obtained, specifically as follows: and . Here is the state transition matrix. This is the output mapping matrix. Here, It controls the size of the memory window, and This affects input weights. In original Mamba, the weights are fixed. and This limits the model's ability to adapt to complex underwater scenes with domain shifts such as illumination, turbidity, and debris interference, often resulting in smoothing of foreground details and accumulation of background noise.

[0048] To address this issue, embodiments of the present invention utilize semantic density graphs. To highlight high-density regions. Based on semantic density maps. The exported modulation signal dynamically adjusts the parameters corresponding to each token. Similarly, a parallel branch generation pair with independent parameters The modulated signal. The semantic density map is constructed using lightweight convolutional layers. and For the basic parameters respectively and The mapping is performed to generate the initial modulation signal.

[0049] Step 2302: Constrain the initial modulation signal using a bounded centralized nonlinear function to obtain the modulation factor; To ensure stability, these initial modulation signals are constrained by a bounded, centered nonlinear function: ; in, These are the modulation factors. For modulation scale and ,make sure .

[0050] Step 2303: Scale the basic parameters element by element to obtain the modulated parameters.

[0051] Among them, the basic parameters and Element-wise scaling is performed to obtain the modulated parameters: .

[0052] in, These are the modulated parameters.

[0053] In this embodiment of the invention, dynamic adjustment It can change the memory window to preserve high-frequency details in prominent regions; while modulation This enhances the focus on foreground features and suppresses background noise. By setting this adaptive mechanism, the model's cross-domain robustness and small target localization ability in challenging underwater scenarios are significantly improved.

[0054] Step 2304: Update the discrete state equation of the state space model based on the modulated parameters, model the initial features, and output the modulated feature map.

[0055] In this embodiment of the invention, the final state is... By outputting the mapping matrix Transformed into dimensions and basic features Figure 1 Modulated feature map .in, The modulated feature map has been processed... Preserving the high-frequency structure of the high-density foreground region, through Suppress noise interference in low-density background areas.

[0056] Step 240: Perform semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to obtain the feature map after semantic enhancement instance normalization processing.

[0057] Among them, such as Figure 3 As shown, the embodiment of the present invention obtains the feature map after semantic enhancement instance normalization through the following steps: Step 2401: Perform instance normalization on the modulated feature map to obtain the instance normalized feature map.

[0058] Instance normalization involves calculating uniform single-sample, single-channel statistics in the spatial domain and applying affine rescaling. : ; in, and Feature maps in channels The mean and standard deviation of the above. and For learnable affine coefficients, For numerical stability parameters; In order to be in The modulated feature map on the channel.

[0059] Step 2402: Generate a spatial mask based on the semantic density map.

[0060] Despite feature enhancement and normalization modules It can effectively mitigate cross-domain color changes, but it treats the foreground and background equally, resulting in random noise being included in the statistical calculations of the image.

[0061] To overcome these limitations, embodiments of the present invention employ semantic enhancement instance normalization. Semantic prior information from ODPC (the semantic density map) is simultaneously integrated into both spatial and channel dimensions, and density-weighted saliency recalibration is performed.

[0062] like Figure 3 As shown, embodiments of the present invention utilize semantic density maps. Generate a spatial mask to encode pixel-level saliency and focus on salient regions: ; in, It consists of three layers of non-linearly stacked convolutions. The Sigmoid function is used for normalization. Gaussian smoothing is used to ensure spatial consistency and reduce transitions.

[0063] Step 2403: Extract structure-enhanced features from the normalized feature map of the instance through depthwise separable convolution, and calculate channel weights by squeezing and excitation operations. Obtain semantically reweighted features by multiplying element by element.

[0064] In this embodiment of the invention, in order to supplement spatial recalibration through channel attention, from the normalized Efficiently capture details and obtain structural enhancement features through depthwise separable convolution. Subsequently, Channel weights are calculated using squeeze-excitation operations. Dynamically prioritizing information-rich channels enhances discriminative power and semantic selectivity in underwater scenarios. These components collectively generate semantic reweighting, combining spatial saliency, structural enhancement, and channel importance. Structural enhancement features are extracted from instance-normalized feature maps using depthwise separable convolutions. Channel weights are calculated using a squeeze-excitation operation. By multiplying element by element, we obtain the semantically reweighted features: ; in, This represents a feature map that has undergone semantic reweighting.

[0065] Step 2404: Concatenate the instance-normalized feature map with the semantically reweighted features through channels, and process it through convolution, batch normalization and activation function. Output the semantically enhanced instance-normalized feature map through residual fusion.

[0066] To preserve the advantages of destylization and ensure optimization stability, this embodiment of the invention employs residual fusion to obtain a feature map after semantically enhanced instance normalization: ; in Indicates channel splicing. This indicates batch normalization.

[0067] In this embodiment of the invention, the instance-normalized feature map is combined with the semantically reweighted feature map. Channel splicing is performed, followed by 1×1 convolution, batch normalization, and... The activation function is used to process the data, and the final recalibrated feature map is output through residual fusion. Guided by the semantic prior of the semantic density map, the instance normalization process amplifies the response of high-density regions while suppressing background noise.

[0068] Step 250: Obtain the prediction result based on the feature map after normalization of the semantically enhanced instance.

[0069] Specifically, after the modulated feature maps at each scale undergo semantic enhancement and instance normalization, multi-scale feature fusion is performed, and the prediction result is output by the detection head module.

[0070] After outputting the prediction results, the model parameters of the state-space model are adjusted based on the prediction results and preset loss weights, and the target detection model is obtained through iterative training. This training process can employ existing supervised training methods, which will not be elaborated upon here.

[0071] In this embodiment of the invention, after obtaining the target detection model, experiments are conducted to verify the effectiveness of the target detection model compared to existing target detection models. The dataset used is the S-UODAC2020 dataset, which contains 5542 underwater images from seven different domains. Following previous research, images of types 1 to 6 are used as the source domain, and images of type 7 are used as the target domain. Evaluation metrics: Generalization ability is measured through comprehensive evaluation, including detection accuracy (mAP@50), inference efficiency (frames per second, FPS), and model complexity (number of parameters), to ensure the proposed method is both effective and practical. Implementation details: All experiments were performed on the same GPU. The input image size, batch size, and initial learning rate were set to 640×640, 4, and 0.01, respectively, and momentum and weight decay were set to 0.937 and 0.0005, respectively, for a total of 200 training rounds. Hyperparameter settings: Specifically, ODPC uses a cluster center number K=8 and a truncation ratio r=0.02 to calculate... The memory capacity is M=1000 features, and it is updated every 10 iterations. The DSM uses a modulation scale. To constrain the modulation factor The range of values ​​is SD2-Mamba was compared with previous mainstream methods on the S-UODAC2020 dataset. SD2-Mamba achieved 63.9% mAP@50, significantly exceeding the second-place method (61.9%) by 2.0 percentage points. More importantly, the model of this embodiment is extremely lightweight, containing only 6.9M parameters, nearly 6 times fewer than the closest method's 41.1M parameters. In terms of efficiency, the inference speed of this invention reaches 147.1 frames per second, far exceeding the second-place method's 21.8 frames per second, a speedup of more than 7 times, enabling true real-time deployment. This combination of high precision, compact structure, and ultra-high throughput demonstrates its significant advantages in practical underwater detection tasks.

[0072] After obtaining the target detection model, the image to be detected is input into the target detection model. The feature extraction module of the target detection model extracts the initial feature map of the image to be detected, and modulates and normalizes the initial feature map of the image to be detected through a density-aware sequence modulation module at different scales and a feature enhancement and normalization module, outputting a normalized feature map. After feature fusion by a multi-scale feature fusion module, the detection head module outputs the target detection result. This target detection result is the predicted bounding box and category of the target.

[0073] Step 130: Output the target detection results of the image to be detected.

[0074] After obtaining the target detection result, the result is output to the user so that the user can obtain the target and its corresponding category in the image to be detected.

[0075] This invention provides an embodiment of the invention that acquires an image to be detected; inputs the image to be detected into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. This invention aims to alleviate the problem of foreground and background fusion caused by light absorption in images by using ultra-lightweight online density peak clustering to highlight salient targets and providing domain-invariant priors. Secondly, a density-aware sequence modulation mechanism is used to adaptively adjust the sampling step size and state gain to integrate this density information into the Mamba (state-space model), thereby preserving the high-frequency structure of dense regions while suppressing noise background. Finally, semantic enhancement instance normalization performs density weighting calibration in the spatial and channel dimensions to enhance foreground saliency and suppress noise.

[0076] Figure 4 A schematic diagram of the cross-domain generalized target detection device for high-domain offset scenarios provided in an embodiment of the present invention is shown. Figure 4 As shown, the device 300 includes: The acquisition module 310 is used to acquire the image to be detected; The object detection module 320 is used to input the image to be detected into a semantic density-driven object detection model to obtain an object detection result; wherein, the object detection model is based on a state-space model; the object detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the object detection model; Output module 330 is used to output the target detection results of the image to be detected.

[0077] The working process of each module in the cross-domain generalized target detection device 300 for high-domain offset scenarios in this embodiment of the invention is largely the same as the specific steps of the aforementioned cross-domain generalized target detection method for high-domain offset scenarios, and will not be repeated here.

[0078] This invention provides an embodiment of the invention that acquires an image to be detected; inputs the image to be detected into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. This invention aims to alleviate the problem of foreground and background fusion caused by light absorption in images by using ultra-lightweight online density peak clustering to highlight salient targets and providing domain-invariant priors. Secondly, a density-aware sequence modulation mechanism is used to adaptively adjust the sampling step size and state gain to integrate this density information into the Mamba (state-space model), thereby preserving the high-frequency structure of dense regions while suppressing noise background. Finally, semantic enhancement instance normalization performs density weighting calibration in the spatial and channel dimensions to enhance foreground saliency and suppress noise.

[0079] Figure 5 The diagram shows a structural schematic of a computer device provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.

[0080] like Figure 5As shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0081] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements, such as clients or other servers. Processor 402 executes program 410, specifically performing the relevant steps described in the embodiment of the cross-domain generalized target detection method for high-domain offset scenarios.

[0082] Specifically, program 410 may include program code, which includes computer-executable instructions.

[0083] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0084] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0085] Specifically, program 410 can be called by processor 402 to cause the computer device to perform the following operations: Acquire the image to be detected; The image to be detected is input into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; Output the target detection results of the image to be detected.

[0086] In one alternative approach, the step of dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map, includes: Extract the initial feature map of the image sample; Online density peak clustering is performed on the initial feature map to generate a semantic density map; The weight parameters of the state space model are dynamically adjusted based on the semantic density map to obtain the modulated feature map; wherein, the semantic density map is used to highlight the foreground target region and suppress background noise; Based on the semantic density map, the modulated feature map is subjected to semantic enhancement instance normalization processing to obtain the feature map after semantic enhancement instance normalization processing. The prediction result is obtained based on the feature map after normalization of the semantically enhanced instance.

[0087] In one alternative approach, the step of performing online density peak clustering on the initial features to generate a semantic density map further includes: Flatten the shallow feature map into a sequence of feature vectors; Calculate the Euclidean distance between each feature vector in the feature vector sequence and all historical feature vectors in the memory bank; the memory bank includes historical feature vector samples. Based on the Euclidean distance, the local density of each feature vector is calculated using Gaussian weighted proximity. The top K feature vectors with the highest local density are selected as cluster centers, and the similarity between each feature vector and the cluster center is calculated using a temperature-scaled probability normalization function. Calculate the density prior weights of the cluster centers, and obtain the semantic strength of each feature vector through weighted aggregation; The semantic intensity is reshaped into a semantic density map with the same size as the initial feature map.

[0088] In one alternative approach, calculating the local density of each feature vector based on Gaussian weighted proximity according to the Euclidean distance includes: The local density is calculated using the following formula: ; in, Representing the eigenvector Local density, Representing the eigenvector The Euclidean distance to the j-th historical feature sample in the memory bank; This is the preset cutoff distance; The process of selecting the top K feature vectors with the highest local density as cluster centers, and calculating the similarity between each feature vector and the cluster centers using a temperature-scaled softmax function, includes: Similarity is calculated using the following formula: ; in, Representing the eigenvector With cluster center Similarity; For the first Cluster centers ; The density prior weights for calculating cluster centers are used to obtain a set of semantic strengths for each feature vector through weighted aggregation, including: ; in, Density prior weights are denoted as Cluster center The density; The semantic density map is obtained based on the set of semantic strengths of each feature vector.

[0089] In an alternative approach, the step of dynamically adjusting the weight parameters of the state space model based on the semantic density map to obtain the modulated feature map further includes: The basic parameters are mapped using lightweight convolutional layers to generate the initial modulation signal. The initial modulation signal is constrained by a bounded, centered, nonlinear function to obtain the modulation factor; The basic parameters are scaled element by element to obtain the modulated parameters; The discrete state equations of the state space model are updated based on the modulated parameters, and the initial features are modeled to output the modulated feature map.

[0090] In one optional approach, the step of performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to obtain a semantic enhancement instance normalized feature map further includes: The modulated feature map is then normalized to obtain the instance-normalized feature map. A spatial mask is generated based on the semantic density map; The structure-enhanced features are extracted from the normalized feature map of the instance through depthwise separable convolution, and the channel weights are calculated by squeezing and activation operations. The semantically reweighted features are obtained by element-wise multiplication. The instance-normalized feature map is concatenated with the semantically reweighted feature map, and then processed by convolution, batch normalization and activation function. The semantically enhanced instance-normalized feature map is output through residual fusion.

[0091] This invention provides an embodiment of the invention that acquires an image to be detected; inputs the image to be detected into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. This invention aims to alleviate the problem of foreground and background fusion caused by light absorption in images by using ultra-lightweight online density peak clustering to highlight salient targets and providing domain-invariant priors. Secondly, a density-aware sequence modulation mechanism is used to adaptively adjust the sampling step size and state gain to integrate this density information into the Mamba (state-space model), thereby preserving the high-frequency structure of dense regions while suppressing noise background. Finally, semantic enhancement instance normalization performs density weighting calibration in the spatial and channel dimensions to enhance foreground saliency and suppress noise.

[0092] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a computer device, causes the computer device to perform the cross-domain generalized target detection method for high-domain offset scenarios in any of the above method embodiments.

[0093] Executable instructions can be used to cause a computer device to perform the following operations: Acquire the image to be detected; The image to be detected is input into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; Output the target detection results of the image to be detected.

[0094] In one alternative approach, the step of dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map, includes: Extract the initial feature map of the image sample; Online density peak clustering is performed on the initial feature map to generate a semantic density map; The weight parameters of the state space model are dynamically adjusted based on the semantic density map to obtain the modulated feature map; wherein, the semantic density map is used to highlight the foreground target region and suppress background noise; Based on the semantic density map, the modulated feature map is subjected to semantic enhancement instance normalization processing to obtain the feature map after semantic enhancement instance normalization processing. The prediction result is obtained based on the feature map after normalization of the semantically enhanced instance.

[0095] In one alternative approach, the step of performing online density peak clustering on the initial features to generate a semantic density map further includes: Flatten the shallow feature map into a sequence of feature vectors; Calculate the Euclidean distance between each feature vector in the feature vector sequence and all historical feature vectors in the memory bank; the memory bank includes historical feature vector samples. Based on the Euclidean distance, the local density of each feature vector is calculated using Gaussian weighted proximity. The top K feature vectors with the highest local density are selected as cluster centers, and the similarity between each feature vector and the cluster center is calculated using a temperature-scaled probability normalization function. Calculate the density prior weights of the cluster centers, and obtain the semantic strength of each feature vector through weighted aggregation; The semantic intensity is reshaped into a semantic density map with the same size as the initial feature map.

[0096] In one alternative approach, calculating the local density of each feature vector based on Gaussian weighted proximity according to the Euclidean distance includes: The local density is calculated using the following formula: ; in, Representing the eigenvector Local density, Representing the eigenvector The Euclidean distance to the j-th historical feature sample in the memory bank; This is the preset cutoff distance; The process of selecting the top K feature vectors with the highest local density as cluster centers, and calculating the similarity between each feature vector and the cluster centers using a temperature-scaled softmax function, includes: Similarity is calculated using the following formula: ; in, Representing the eigenvector With cluster center Similarity; For the first Cluster centers ; The density prior weights for calculating cluster centers are used to obtain a set of semantic strengths for each feature vector through weighted aggregation, including: ; in, Density prior weights are denoted as Cluster center The density; The semantic density map is obtained based on the set of semantic strengths of each feature vector.

[0097] In an alternative approach, the step of dynamically adjusting the weight parameters of the state space model based on the semantic density map to obtain the modulated feature map further includes: The basic parameters are mapped using lightweight convolutional layers to generate the initial modulation signal. The initial modulation signal is constrained by a bounded, centered, nonlinear function to obtain the modulation factor; The basic parameters are scaled element by element to obtain the modulated parameters; The discrete state equations of the state space model are updated based on the modulated parameters, and the initial features are modeled to output the modulated feature map.

[0098] In one optional approach, the step of performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to obtain a semantic enhancement instance normalized feature map further includes: The modulated feature map is then normalized to obtain the instance-normalized feature map. A spatial mask is generated based on the semantic density map; The structure-enhanced features are extracted from the normalized feature map of the instance through depthwise separable convolution, and the channel weights are calculated by squeezing and activation operations. The semantically reweighted features are obtained by element-wise multiplication. The instance-normalized feature map is concatenated with the semantically reweighted feature map, and then processed by convolution, batch normalization and activation function. The semantically enhanced instance-normalized feature map is output through residual fusion.

[0099] This invention provides an embodiment of the invention that acquires an image to be detected; inputs the image to be detected into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training to obtain the target detection model; and outputting the target detection result of the image to be detected. This invention aims to alleviate the problem of foreground and background fusion caused by light absorption in images by using ultra-lightweight online density peak clustering to highlight salient targets and providing domain-invariant priors. Secondly, a density-aware sequence modulation mechanism is used to adaptively adjust the sampling step size and state gain to integrate this density information into the Mamba (state-space model), thereby preserving the high-frequency structure of dense regions while suppressing noise background. Finally, semantic enhancement instance normalization performs density weighting calibration in the spatial and channel dimensions to enhance foreground saliency and suppress noise.

[0100] This invention provides a cross-domain generalized target detection device for high-domain offset scenarios, used to execute the aforementioned cross-domain generalized target detection method for high-domain offset scenarios.

[0101] This invention provides a computer program that can be called by a processor to enable a computer device to execute the cross-domain generalized target detection method for high-domain offset scenarios in any of the above method embodiments.

[0102] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed on a computer, cause the computer to perform the cross-domain generalized target detection method for high-domain offset scenarios in any of the above method embodiments.

[0103] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0104] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0105] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0106] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0107] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A cross-domain generalized target detection method for high-domain offset scenarios, characterized in that, The method includes: Acquire the image to be detected; The image to be detected is input into a semantic density-driven target detection model to obtain a target detection result; wherein, the target detection model is based on a state-space model; the target detection model is trained using image samples; the training process of the target detection model includes: dynamically adjusting the weight parameters of the state-space model according to the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density information to output a prediction result; adjusting the model parameters of the state-space model according to the prediction result and a preset loss weight, and iteratively training; Wherein, the semantic density information is a semantic density map; the step of dynamically adjusting the weight parameters of the state space model based on the semantic density information of the image sample, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density information, includes: extracting the initial feature map of the image sample; performing online density peak clustering on the initial feature map to generate a semantic density map; dynamically adjusting the weight parameters of the state space model based on the semantic density map to obtain the modulated feature map; wherein, the semantic density map is used to highlight the foreground target region and suppress background noise; The step of dynamically adjusting the weight parameters of the state space model based on the semantic density map to obtain the modulated feature map further includes: mapping the basic parameters in the discrete state equation of the state space model through lightweight convolutional layers to generate an initial modulation signal; constraining the initial modulation signal with a bounded centered nonlinear function to obtain a modulation factor; scaling the basic parameters element-wise to obtain modulated parameters; updating the discrete state equation of the state space model based on the modulated parameters, and modeling the initial features to output the modulated feature map. Output the target detection results of the image to be detected.

2. The method according to claim 1, characterized in that, The step of dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density information, includes: Based on the semantic density map, the modulated feature map is subjected to semantic enhancement instance normalization processing to obtain the feature map after semantic enhancement instance normalization processing. The prediction result is obtained based on the feature map after normalization of the semantically enhanced instance.

3. The method according to claim 2, characterized in that, The step of performing online density peak clustering on the initial features to generate a semantic density map further includes: Flatten the initial features into a sequence of feature vectors; Calculate the Euclidean distance between each feature vector in the feature vector sequence and all historical feature vectors in the memory; the memory includes historical feature vector samples. Based on the Euclidean distance, the local density of each feature vector is calculated using Gaussian weighted proximity. The top K feature vectors with the highest local density are selected as cluster centers, and the similarity between each feature vector and the cluster center is calculated using a temperature-scaled probability normalization function. Calculate the density prior weights of the cluster centers, and obtain the semantic strength of each feature vector through weighted aggregation; The semantic intensity is reshaped into a semantic density map with the same size as the initial feature map.

4. The method according to claim 3, characterized in that, The step of calculating the local density of each feature vector based on the Euclidean distance and Gaussian weighted proximity includes: The local density is calculated using the following formula: ; in, Representing the eigenvector Local density, Representing the eigenvector The Euclidean distance to the j-th historical feature sample in the memory bank; This is the preset cutoff distance; The process of selecting the top K feature vectors with the highest local density as cluster centers, and calculating the similarity between each feature vector and the cluster centers using a temperature-scaled softmax function, includes: Similarity is calculated using the following formula: ; in, Representing the eigenvector With cluster center Similarity; For the first l Cluster centers ; The density prior weights for calculating cluster centers are used to obtain a set of semantic strengths for each feature vector through weighted aggregation, including: ; in, Density prior weights are denoted as ; Cluster center The density; The semantic density map is obtained based on the set of semantic strengths of each feature vector.

5. The method according to claim 2, characterized in that, The step of performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map to obtain a semantic enhancement instance normalized feature map further includes: The modulated feature map is then normalized to obtain the instance-normalized feature map. A spatial mask is generated based on the semantic density map; The structure-enhanced features are extracted from the normalized feature map of the instance through depthwise separable convolution, and the channel weights are calculated by squeezing and activation operations. The semantically reweighted features are obtained by element-wise multiplication. The instance-normalized feature map is concatenated with the semantically reweighted feature map, and then processed by convolution, batch normalization and activation function. The semantically enhanced instance-normalized feature map is output through residual fusion.

6. A cross-domain generalized target detection device for high-domain offset scenarios, characterized in that, The device includes: The acquisition module is used to acquire the image to be detected; An object detection module is used to input the image to be detected into a semantic density-driven object detection model to obtain object detection results. The object detection model is based on a state-space model and is trained using image samples. The training process of the object detection model includes: dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples, and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density information before outputting a prediction result; adjusting the model parameters of the state-space model based on the prediction result and preset loss weights, and iteratively training the model. The semantic density information is a semantic density map. The step of dynamically adjusting the weight parameters of the state-space model based on the semantic density information of the image samples and performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density information before outputting a prediction result includes: extracting an initial feature map of the image samples; performing online density peak clustering on the initial feature map to generate a semantic density map; and dynamically adjusting the weight parameters of the state-space model based on the semantic density map to obtain a modulated feature map. The semantic density map is used to highlight the foreground target region and suppress background noise. The step of dynamically adjusting the weight parameters of the state space model based on the semantic density map to obtain the modulated feature map further includes: mapping the basic parameters in the discrete state equations of the state space model through lightweight convolutional layers to generate an initial modulation signal; constraining the initial modulation signal with a bounded centered nonlinear function to obtain a modulation factor; scaling the basic parameters element-wise to obtain modulated parameters; updating the discrete state equations of the state space model based on the modulated parameters, modeling the initial features, and outputting the modulated feature map. The output module is used to output the target detection results of the image to be detected.

7. The apparatus according to claim 6, characterized in that, The step of dynamically adjusting the weight parameters of the state space model based on the semantic density information of the image samples, and outputting the prediction result after performing semantic enhancement instance normalization processing on the modulated feature map based on the semantic density map, includes: Based on the semantic density map, the modulated feature map is subjected to semantic enhancement instance normalization processing to obtain the feature map after semantic enhancement instance normalization processing. The prediction result is obtained based on the feature map after normalization of the semantically enhanced instance.

8. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the cross-domain generalized target detection method for high-domain offset scenarios as described in any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the cross-domain generalized target detection method for high-domain offset scenarios as described in any one of claims 1-5.