Target detection method and system based on multi-path feature fusion adaptation, electronic equipment and storage medium

By employing a multi-path feature fusion and adaptation method, the feature mismatch problem between ViT and CNN detection heads is solved, achieving a synergistic improvement in semantic understanding capability and spatial detail accuracy, thereby enhancing detection accuracy and efficiency. This method is applicable to scenarios such as autonomous driving, industrial quality inspection, remote sensing monitoring, and medical image analysis.

CN121811019AInactive Publication Date: 2026-04-07BEIJING QINGMU RUISI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-04-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing technologies, there is a feature mismatch problem between the Visual Transformer (ViT) backbone network and the Convolutional Neural Network (CNN) detection head, which leads to decreased detection accuracy, reduced computational efficiency and weakened robustness, especially when dealing with small targets, deformed objects or regions with blurred edges.

Method used

A multi-path feature fusion and adaptation method is adopted, which processes the features of the ViT backbone network in parallel through semantic enhancement path and detail reconstruction path, respectively enhancing semantic information and detail information, and generating a unified feature representation adapted to CNN detection head through adaptive path interaction and attention guidance mechanism.

Benefits of technology

It significantly improves detection accuracy, inference speed, and cross-scene generalization performance, enhances the detection accuracy of small targets and robustness in complex scenarios, meets real-time requirements, and reduces overall training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811019A_ABST
    Figure CN121811019A_ABST
Patent Text Reader

Abstract

The invention provides a target detection method and system based on multi-path feature fusion adaptation, electronic equipment and a storage medium, and the method comprises the steps: obtaining a first feature of a to-be-recognized target based on an extraction function of a first target detection model; respectively inputting the first feature to at least two different feature processing paths; the at least two feature processing paths process the first feature in a parallel mode and correspondingly generate different intermediate features; fusing the different intermediate features to generate a second feature matched with a second target detection model; and the second target detection model outputs a detection result of the to-be-identified target based on the second feature. According to the method, the problem of feature mismatching between the ViT and the CNN architecture is effectively improved, the detection precision, speed and robustness are improved, and the method is suitable for multi-scene application such as automatic driving, industry, remote sensing and medical imaging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and artificial intelligence, specifically to a target detection method, system, electronic device, and storage medium based on multi-path feature fusion and adaptation. Background Technology

[0002] Object detection is one of the core technologies in computer vision, widely used in scenarios such as autonomous driving, industrial quality inspection, remote sensing monitoring, and medical image analysis. In recent years, with the development of deep learning, detection frameworks based on convolutional neural networks (CNNs) and visual transformers (ViTs) have become mainstream. CNNs achieve efficient feature extraction through local receptive fields and hierarchical structures, offering advantages such as high computational efficiency and deployment friendliness; while ViTs model global context through self-attention mechanisms, demonstrating superior performance in semantic understanding and occlusion handling. Current research trends are beginning to explore technical paths that combine ViTs as the backbone network with CNN detection heads, aiming to integrate the advantages of both.

[0003] However, directly incorporating ViT output features into CNN detection heads like YOLO leads to feature representation mismatch issues, including semantic and detail conflicts, receptive field differences, and misaligned location information. This results in decreased detection accuracy, reduced computational efficiency, and weakened model robustness. Existing hybrid architectures lack effective feature adaptation mechanisms, making it difficult to achieve synergistic optimization between ViT's strong semantic capabilities and CNN's efficient decoding, thus limiting overall performance improvement. Summary of the Invention

[0004] This invention provides a target detection method, system, electronic device, and storage medium based on multi-path feature fusion and adaptation, which can solve the technical problems of low detection accuracy, poor computational efficiency, and weak robustness caused by feature mismatch between the ViT backbone network and the CNN detection head.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A first aspect of the present invention provides a target detection method based on multi-path feature fusion and adaptation, comprising: obtaining a first feature of a target to be identified based on the extraction function of a first target detection model; inputting the first feature to at least two different feature processing paths respectively; the at least two feature processing paths processing the first feature in parallel and generating different intermediate features accordingly; fusing the different intermediate features to generate a second feature adapted to a second target detection model; and the second target detection model outputting the detection result of the target to be identified based on the adapted second feature.

[0006] In one optional embodiment, the at least two different feature processing paths include a semantic enhancement path and a detail reconstruction path; the semantic enhancement path is used to process the first feature to enhance semantic information and generate semantic features, and the detail reconstruction path is used to process the first feature to enhance detail information and generate detail features.

[0007] In one optional embodiment, the first feature includes high-level features and mid-level features. The semantic enhancement path is used to process the high-level features to enhance semantic information and generate semantic features. The detail reconstruction path is used to process the mid-level features in the first feature to enhance detail information and generate detail features.

[0008] In one optional embodiment, the semantic enhancement path generates semantic features by processing high-level features in the first feature through global context modulation and semantic-space processing; the detail reconstruction path generates detail features by processing mid-level features in the first feature through local detail enhancement and edge-aware attention processing.

[0009] In one optional embodiment, the semantic enhancement path processes high-level features in the first feature through global context modulation and semantic-spatial alignment to generate semantic features, including: processing the high-level features through a lightweight Transformer block based on dynamic position encoding to capture global long-distance dependencies and output semantically enhanced features; and processing the semantically enhanced features through semantic-spatial alignment to adapt to target deformation and complex spatial layout, outputting the final spatially aligned and semantically enhanced semantic features.

[0010] In an optional embodiment, the detail reconstruction path generates detailed features by processing mid-level features in the first feature through local detail enhancement and edge-aware attention processing, including: obtaining edge information of the first feature through a specific operator, generating channel attention weights using the edge information, and guiding feature detail enhancement.

[0011] In one optional embodiment, fusing the different intermediate features to generate a second feature adapted to the second object detection model includes: using an adaptive path interaction and attention-guided feature fusion mechanism to fuse the semantic features and detail features across scale residuals to generate a second feature adapted to the second object detection model.

[0012] A second aspect of the present invention provides a target detection system based on multi-path feature fusion and adaptation, comprising: a feature acquisition module for acquiring a first feature of a target to be identified based on the extraction function of a first target detection model; a multi-path processing module for inputting the first feature to at least two feature processing paths respectively to generate at least two intermediate features in parallel; at least one fusion and adaptation module for fusing the at least two intermediate features to generate an adapted second feature; and a detection module for generating a detection result based on a second target detection model and the second feature.

[0013] A third aspect of the present invention provides an electronic device comprising: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform the target detection method based on multi-path feature fusion adaptation as described in any one of claims 1 to 7.

[0014] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that causes a processor to perform the target detection method based on multi-path feature fusion adaptation as described in any one of claims 1 to 7.

[0015] Therefore, the advantage of this invention lies in the following: by introducing a dual-path parallel processing mechanism, the multi-scale features extracted from the ViT backbone are first fed into the semantic enhancement path and the detail reconstruction path for differentiated optimization, and then a unified feature representation adapted to the CNN detection head is generated through a fusion strategy. This design effectively improves the mismatch problem caused by differences in feature representation methods, receptive field characteristics, and positional encoding mechanisms between heterogeneous models, achieving a synergistic improvement in semantic understanding ability and spatial detail accuracy, and significantly improving detection accuracy, inference speed, and cross-scene generalization performance. Attached Figure Description

[0016] The accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, are not intended to limit the invention.

[0017] Figure 1 This is a flowchart illustrating the steps of a target detection method based on multi-path feature fusion and adaptation according to an embodiment of the present invention. Figure 2 This is a flowchart of the steps of a target detection method based on multi-path feature fusion and adaptation according to another embodiment of the present invention; Figure 3 This is a structural block diagram of a target detection system based on multi-path feature fusion and adaptation according to an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] In existing object detection technologies, Vision Transformer (ViT) backbone networks excel in semantic modeling and possess powerful global contextual understanding capabilities, while Convolutional Neural Network (CNN)-based detection heads are renowned for their efficiency, lightweight nature, and deployment friendliness. However, when combining ViT-like models as feature extractors with CNN-like detection heads, a significant feature mismatch arises: the two differ significantly in feature representation methods, receptive field characteristics, and positional information encoding mechanisms. This makes effective collaboration difficult through direct concatenation or simple mapping, leading to decreased detection accuracy, reduced computational efficiency, and insufficient robustness to complex scenes. This contradiction is particularly pronounced when dealing with small targets, deformed objects, or regions with blurred edges. Therefore, a technical solution is urgently needed to bridge the feature gap between ViT and CNN to fully leverage the advantages of both architectures.

[0020] Against this backdrop, the present invention provides a target detection method based on multi-path feature fusion adaptation. Its core lies in constructing an adaptation framework of "feature extraction - parallel enhancement - fusion output". By differentially processing the semantic and detail components in the initial features and performing intelligent fusion, a high-quality feature representation adapted to the input requirements of downstream detection models is finally generated.

[0021] The following specific embodiments disclose a target detection method based on multi-path feature fusion and adaptation according to the present invention, including the following steps: S101: Based on the extraction function of the first target detection model, obtain the first feature of the target to be identified; In this embodiment of the invention, a first object detection model is used to extract preliminary visual representations from the input image and output a feature map with a multi-level structure, i.e., a first feature. This first feature is typically in tensor form, containing spatial dimensions (height H, width W) and channel dimensions (C), carrying response information of the original image at different levels of abstraction. The first object detection model can be selected from various mainstream visual backbone networks, including but not limited to self-supervised visual Transformer models DINOv3, MAE (Masked Autoencoders), MoCo-v3 (Momentum Contrast for Unsupervised Visual Representation Learning), or supervised training ViT variants such as ViT-Base and SwinTransformer. These models all possess strong semantic modeling capabilities, especially suitable for high-order semantic understanding tasks. For example, DINOv3 learns the intrinsic structure of images through a self-distillation mechanism, achieving excellent visual representation capabilities without requiring a large amount of labeled data, making it suitable as a general feature extractor. The first feature obtained can be selected as a multi-scale output, such as F2 (stride=16), F3 (stride=32), and F4 (stride=64), which correspond to mid-level detail information and high-level semantic information, respectively, providing basic input for subsequent dual-path processing.

[0022] The first object detection model can also adopt a traditional CNN architecture (such as ResNet, EfficientNet) or other hybrid structures (such as MobileViT), as long as it can output intermediate features that can be used for subsequent multi-path processing. In addition, the method of obtaining the first feature is not limited to a single forward propagation, but can also obtain a richer hierarchical representation through a Feature Pyramid Network (FPN) or a multi-stage extraction strategy.

[0023] S102: Input the first feature into at least two different feature processing paths respectively; In this embodiment of the invention, at least two different feature processing paths refer to a set of sub-modules with clearly defined functions and heterogeneous processing logic, each focusing on optimizing a specific type of feature attribute. Typically, these include a semantic enhancement path and a detail reconstruction path: the former focuses on enhancing global semantic information in high-level features, while the latter emphasizes local detail enhancement and edge structure restoration in mid-level features. Each path receives the same first feature or its different scale versions and runs independently in parallel to avoid interference between paths and improve processing efficiency.

[0024] Parallel processing means that multiple paths simultaneously transform the input features without blocking each other, supporting hardware-level concurrent execution and facilitating real-time inference. For example, on GPU devices, the semantic enhancement path and the detail reconstruction path can complete their respective operations within the same computation cycle, significantly outperforming the time overhead of a serial structure. The number and type of each path can be flexibly configured according to actual task requirements. In addition to the aforementioned dual paths, a third path can be introduced for functions such as noise suppression, motion compensation, or illumination normalization.

[0025] In one feasible example of this invention, "separate input" refers to the orientational allocation of different scale components of the first feature to the corresponding path based on the functional positioning of the path. For example, high-level features F3 and F4 are sent to the semantic enhancement path, and mid-level feature F2 is sent to the detail reconstruction path, thereby achieving on-demand processing and improving resource utilization. This allocation strategy can be dynamically adjusted through a learnable gating mechanism or preset with fixed rules.

[0026] S103: At least two feature processing paths process the first feature in parallel and generate different intermediate features accordingly; In this embodiment of the invention, each feature processing path, based on its design goal, employs a specific combination of operators to perform nonlinear transformations on the input features, generating intermediate features with enhanced properties. For example, the semantic enhancement path applies global context modulation and semantic-spatial alignment operations to high-level features, outputting spatially aligned features rich in long-distance dependencies and adaptable to object deformation; the detail reconstruction path utilizes local detail enhancement and edge-aware attention mechanisms to reconstruct the spatial resolution and boundary sharpness lost during the ViT downsampling process, outputting high-fidelity detail features.

[0027] Intermediate features retain the spatial structure (H×W) of the original features, but the number of channels may be expanded or compressed, depending on the internal structure design of the path. Semantic decoupling is maintained between intermediate features; that is, the semantic path output mainly reflects category discriminative information, while the detail path output focuses on geometric structural information, facilitating controlled integration in subsequent fusion stages.

[0028] In one implementable example of the present invention, at least two feature processing paths can be replaced with other functional path combinations, such as frequency domain analysis path and spatial domain reconstruction path, static feature path and temporal modeling path, etc., which are suitable for video detection or multimodal scenarios. Furthermore, the number of paths is not limited to two; it can be expanded to three or more paths according to performance requirements, forming a multi-branch processing architecture.

[0029] S104: Fuse different intermediate features to generate a second feature that is adapted to the second object detection model; In this embodiment of the invention, the fusion operation aims to integrate complementary information from different paths to form a unified, compact second feature that adapts to the input interface of the downstream detection model. The fusion mechanism can employ various methods, including but not limited to attention-guided fusion, cross-scale residual fusion, and adaptive path interaction. Optionally, a combination of adaptive path interaction and attention-guided fusion can be used: first, bidirectional information exchange is achieved through cross-path convolution and multi-head attention to enhance the collaborative ability between paths; then, channel attention and spatial attention weights are calculated separately, and each intermediate feature is weighted and fused; finally, channel alignment is completed through 1×1 convolution.

[0030] In one feasible example of this invention, a cross-scale residual fusion structure is introduced. The fusion result is added to the residual term of the original first feature after a light convolution. This structure helps to retain key information in the original features, prevents information degradation caused by deep transformations, and improves training stability and convergence speed. The second feature is fully compatible with the input requirements of the second object detection model in terms of dimension, number of channels, and spatial resolution. For example, when the second model is a YOLO series detection head, the second feature should be organized into a multi-scale feature pyramid form, with a uniform number of channels of 256 at each level and spatial strides of 8, 16, and 32, respectively, to ensure seamless integration.

[0031] In another feasible example of the invention, the fusion mechanism can be simplified to weighted summation, convolutional fusion after splicing, or a gating unit can be used to control the contribution ratio of each path. Furthermore, the fusion location is not limited to the end; progressive fusion can also be performed at multiple levels to form a tower-like aligned structure.

[0032] S105: The second target detection model outputs the detection result of the target to be identified based on the adapted second feature.

[0033] In this embodiment of the invention, the second object detection model is used to receive the adapted second feature and complete the final object classification and localization task. This model can use any mainstream detection architecture, including anchor-free models such as YOLOv8, FCOS, and ATSS, or query-based end-to-end detectors such as DETR and DAB-DETR. Optionally, the YOLOv8-Ultralytics architecture is adopted because it features decoupled detection heads, dynamic label allocation, and efficient inference, making it suitable for real-time applications.

[0034] The detection results include the class label, confidence score, and bounding box coordinates (xmin, ymin, xmax, ymax or cx, cy, w, h) for each detected instance. During the training phase, an additional loss function can be introduced to constrain the consistency between the second feature distribution and the original detection head features.

[0035] In one feasible example of the present invention, the second object detection model can also be an architecture such as RetinaNet or CenterNet, or a lightweight detector deployed on mobile devices (such as YOLO-NAS or NanoDet) to meet the performance and resource constraints of different platforms.

[0036] The beneficial effects of this invention are as follows: It achieves effective transformation and enhancement of the output features of the ViT backbone. By introducing a multi-path parallel processing mechanism, it strengthens semantic understanding and spatial detail representation capabilities respectively, and then intelligently fuses them to generate standardized feature inputs adapted to CNN detection heads, solving the feature mismatch problem between heterogeneous models. Due to the design concept of semantic and detail decoupling, the conflict between semantic abstraction and detail preservation in a single path is avoided, thus significantly improving the detection accuracy of small targets and robustness in complex scenarios. Simultaneously, thanks to the parallel structure and lightweight module design, the inference speed reaches 58 FPS, meeting real-time requirements; the overall training cost is reduced by 60%, and the convergence speed is improved by 20%. In summary, this invention achieves synergistic optimization between detection accuracy, efficiency, and generalization ability, and is applicable to various practical application scenarios such as autonomous driving, industry, remote sensing, and medical imaging.

[0037] This invention provides another specific embodiment that discloses a target detection method based on multi-path feature fusion and adaptation, comprising the following steps: S201: Based on the extraction function of the first target detection model, obtain the first feature of the target to be identified; S202: Input the first feature into at least two different feature processing paths respectively; S203: The at least two different feature processing paths include a semantic enhancement path and a detail reconstruction path; the semantic enhancement path is used to process the first feature to enhance semantic information and generate semantic features, and the detail reconstruction path is used to process the first feature to enhance detail information and generate detail features; In this embodiment of the invention, "the at least two different feature processing paths include a semantic enhancement path and a detail reconstruction path" means that, within a multi-path feature processing framework, the input first feature is fed into two parallel processing paths with clearly defined functions—the semantic enhancement path and the detail reconstruction path. These two paths are structurally independent and each has its own focus in terms of information processing objectives, aiming to achieve decoupling enhancement of high-level semantic information and mid-level spatial details, avoiding information interference and representation ambiguity problems caused by traditional single-path or hybrid processing. This dual-path structure simulates the ventral (what) pathway and dorsal (where) pathway in the human visual system; the former focuses on object recognition and category judgment, while the latter is responsible for spatial localization and morphological perception, thereby improving the model's comprehensive understanding of targets in complex scenes.

[0038] The two paths described above operate in parallel without crosstalk, ensuring that semantic information and spatial details evolve independently. This prevents high-level semantics from interfering with the detail reconstruction process and avoids low-level noise contaminating the semantic representation. In subsequent stages, they interact through a fusion mechanism to achieve complementary gains.

[0039] There is a clear functional division and hierarchical correspondence among the various technical features: the semantic enhancement path acts on high-level features, focusing on target category recognition and context-based coarse localization; the detail reconstruction path acts on mid-level features, focusing on the restoration of the fine edges and shape of the target, and assisting in achieving high-precision spatial localization. This feature-hierarchical functional decoupling design allows each path to be customized and optimized for specific types of information, improving the purity and effectiveness of the overall feature representation.

[0040] In one implementable example of the present invention, the high-level features and mid-level features of the first feature are respectively input into the semantic enhancement path and the detail reconstruction path to generate semantic features and detail features in parallel.

[0041] The phrase "inputting the high-level and mid-level features of the first feature into the semantic enhancement path and the detail reconstruction path respectively" refers to the splitting of the initial features extracted from the first object detection model within the multi-path feature processing architecture. These initial features contain high-level semantic information and mid-level spatial detail information. Through replication or routing mechanisms, they are simultaneously fed into two independent and functionally specialized processing paths: the semantic enhancement path strengthens the global context and category discrimination capabilities in the high-level features; the detail reconstruction path focuses on restoring and enhancing the local structure, edge contours, and high-resolution details in the mid-level features. These two paths are based on different network module designs and have differentiated information processing preferences, thereby achieving decoupled feature optimization.

[0042] The semantic enhancement path receives high-level features with a large receptive field but low spatial resolution (such as feature maps with stride=32 or 64). Its main task is to improve the model's ability to understand complex semantic relationships, making it suitable for handling challenging scenarios such as target deformation, occlusion, and background interference. This path can employ lightweight Transformer blocks based on self-attention mechanisms, non-local operations, or deformable convolutions to model long-range dependencies and adapt to changes in spatial layout. For example, in some embodiments, a Transformer structure with dynamic positional encoding can be introduced to capture adaptive positional priors of content, improving robustness to rotation and scale changes.

[0043] The detail reconstruction path deals with mid-level features (such as feature maps with stride=16) that have high spatial resolution but shallow semantic level, aiming to compensate for the shortcomings of visual Transformers in preserving local details. This path pays particular attention to the sharpness of object boundaries and texture integrity, and often integrates edge-aware mechanisms and multi-scale context fusion strategies. For example, edge information from the original feature map can be extracted using Sobel, Canny, or Laplacian operators, and channel attention weights can be generated accordingly to guide the network to selectively enhance the response intensity of edge-related regions; dilated convolutional pyramids (ASPP) or multi-branch convolutional structures can also be used to capture local context at different granularities to further enrich the detail representation.

[0044] The two paths operate in parallel, meaning they have no sequential dependency in their computational flow and can independently complete their respective feature transformation processes within the same time step. This parallel structure avoids the gradient decay and information bottleneck problems caused by sequential stacking, while also facilitating hardware-level parallel acceleration and improving overall inference efficiency. Furthermore, the parallel design ensures that semantic and detailed information do not interfere with each other during processing, maintaining the purity of their respective feature spaces and providing a foundation for subsequent high-quality fusion.

[0045] In another possible embodiment of the present invention, the semantic enhancement path is used to process high-level features in the first feature to enhance semantic information and output semantic features, and the detail reconstruction path is used to process mid-level features in the first feature to enhance detail information and output detail features. This includes the semantic enhancement path generating semantic features by processing high-level features in the first feature through global context modulation and semantic-space processing, and the detail reconstruction path generating detail features by processing mid-level features in the first feature through local detail enhancement and edge-aware attention.

[0046] The semantic enhancement path targets high-level features in the first feature set, aiming to strengthen their semantic expressive power. High-level features typically correspond to deep network outputs, possessing a large receptive field and rich class discrimination information, but are less adaptable to spatial deformation and complex layouts. To improve their modeling ability, this path employs a "global context modulation" mechanism, utilizing structures with long-range dependency capture capabilities to enhance high-level features. Specifically, this mechanism can effectively aggregate cross-regional semantic association information without significantly increasing computational burden by introducing self-attention-based modules (such as Transformer blocks), thereby optimizing the understanding of the overall scene structure. Furthermore, to further adapt to the scale variation and pose deformation problems common in object detection tasks, a "semantic-spatial processing" operation is introduced. By dynamically adjusting the spatial response distribution of features, the model can more accurately locate semantically key regions. For example, deformable convolution or spatial attention mechanisms can be used to adaptively shift the sampling position based on the input content, thereby enhancing the representation ability of irregularly shaped objects.

[0047] Meanwhile, the detail reconstruction path focuses on mid-level features in the first feature set, aiming to restore and enhance local details and boundary clarity of the image. Because ViT-like backbone networks tend to focus on global semantics while neglecting local fine structures during feature extraction, the output features suffer from edge blurring and texture loss, particularly affecting the detection performance of small targets and complex contours. To address this, a "local detail enhancement" module is designed, capturing local contextual information at different granularities through a multi-scale dilated convolution (ASPP) structure, expanding the local receptive field while preserving high-resolution details. Building upon this, an "edge-aware attention" mechanism is further integrated, using image gradient information to guide the feature weighting process. Specifically, edge response maps of the original feature map can be extracted using the Sobel operator or other edge detection algorithms, and these are used as auxiliary signals input into the attention generation network to generate channel-dimensional or spatial-dimensional attention weights. These weights are used to adjust the importance allocation of each channel or location in the mid-level features, resulting in stronger activation responses in edge-related regions, thus effectively mitigating the inherent boundary blurring defect of ViT.

[0048] The two paths described above focus on high-level semantic modeling and mid-level detail preservation, respectively, complementing each other functionally: the semantic enhancement path ensures the model has robust semantic understanding capabilities, suitable for complex semantic scenarios such as occlusion and deformation; the detail reconstruction path guarantees spatial positioning accuracy and contour integrity, especially beneficial for the recognition of small targets and slender structures. The parallel operation of these two paths avoids the problem of semantic and detail interference in a single path, achieving decoupled feature optimization.

[0049] In another feasible embodiment of the present invention, the semantic enhancement path generates semantic features by processing high-level features in the first feature through global context modulation and semantic-spatial alignment, including: processing high-level features through a lightweight Transformer block based on dynamic position encoding to capture global long-distance dependencies and output semantically enhanced features; performing semantic-spatial alignment processing on the semantically enhanced features to adapt to target deformation and complex spatial layout, and outputting the final spatially aligned and semantically enhanced features.

[0050] Step 1: Process high-level features through a lightweight Transformer block based on dynamic positional encoding to capture global long-range dependencies and output semantically enhanced features; The purpose of step one is to enable the model to dynamically adjust its position sensitivity based on image content, maintaining stable spatial awareness even when facing rotating, scaled, or non-rigidly deformed targets. For example, in drone aerial photography scenarios, when a vehicle is tilted, fixed position encoding may lead to attention shift, while dynamic encoding can recalibrate relative position information based on local texture and structure, improving matching accuracy.

[0051] Optional embodiments include: replacing the dynamic position encoding generation network with a coordinate prediction module based on an attention mechanism, or using Fourier feature mapping combined with MLP to generate continuous position signals; or reducing the number of Transformer layers to a single layer and introducing local window attention to further reduce computational overhead, which is suitable for edge device deployment scenarios.

[0052] Step 2: Perform semantic-spatial alignment processing on the semantically enhanced features to adapt to target deformation and complex spatial layout, and output the final spatially aligned and semantically enhanced features.

[0053] Step two aims to address the issue of standard convolution having a fixed receptive field and being unable to handle large-scale deformations. For example, in pedestrian detection tasks, when a person is in a bent position, traditional convolution may not accurately cover key areas, while deformable convolution can learn dynamic sampling positions and actively focus on the limb contour area, significantly improving localization accuracy.

[0054] Optional implementations include: replacing deformable convolution with a deformable attention mechanism (such as DeformAttn in Deformable DETR), or using a spatial transformation network (STN) for global affine correction; or combining a multi-scale migration prediction strategy to perform spatial alignment operations at different resolution levels to further enhance robustness.

[0055] The synergistic relationship among the various technical features is as follows: Dynamic positional encoding first optimizes the quality of semantic modeling globally, ensuring that the attention mechanism focuses on the correct context region; on this basis, semantic-spatial alignment further refines the local geometric structure, making the spatial positioning of high-level semantic features more accurate. The two form a progressive processing flow of "global modeling first, then local calibration," which together improves the model's representation ability in complex real-world scenarios.

[0056] In another feasible embodiment of the present invention, the detail reconstruction path generates detailed features by processing the mid-level features in the first feature through local detail enhancement and edge-aware attention processing, including: obtaining the edge information of the first feature through an operator, generating channel attention weights after global average pooling, and guiding feature enhancement.

[0057] In addition, the “guided feature enhancement process” refers to dynamically adjusting feature representation through an attention weighting mechanism, so that the network pays more attention to regions with strong edge responses in subsequent processing.

[0058] Edge extraction is not limited to a single operator; it can also integrate multiple types of edge detectors (such as Canny, Laplacian, and Sobel) to generate multi-source edge maps and concatenate them into high-dimensional features (such as [B,6,H,W]). These features are then passed through an attention generation network to output a joint channel-spatial attention map, further enhancing edge perception capabilities. Alternatively, the attention generation module can be replaced by general attention structures such as CBAM (Convolutional Block Attention Module), ECA (Efficient Channel Attention), or SA (Spatial Attention), all of which can achieve similar functional results.

[0059] In another feasible example of the present invention, semantic features and detail features are fused across scale residuals through an adaptive path interaction and attention-guided fusion mechanism to generate a second feature that is adapted to the second object detection model.

[0060] Adaptive path interaction refers to establishing a bidirectional information exchange channel between the semantic features output by the semantic enhancement path and the detailed features output by the detailed reconstruction path. This allows high-level semantic information to guide local details, while simultaneously enabling the spatial fine structure to enhance the consistency of semantic expression. This mechanism can be implemented through a lightweight cross-path convolutional module or an interaction unit based on multi-head attention. For example, in one optional embodiment, two 1×1 convolutional layers are used to map semantic features to the detailed feature space dimension and detailed features to the semantic feature space dimension, respectively. Information injection is then completed through element-wise addition or non-linear activation after concatenation. In another variant, a multi-head cross-attention structure is used, with one feature path serving as the query and the other as the key and value, dynamically generating a context-aware interaction response map. This design allows semantic features to focus on key object regions, while detailed features retain edge sensitivity, thereby improving the overall feature representation capability.

[0061] Attention-guided fusion mechanisms apply channel attention and spatial attention weights to semantic and detail features separately before fusion, selectively enhancing important feature components and suppressing redundant or noisy information. Specifically, a channel attention module (such as SE Block or ECA) is used to evaluate the importance of each feature channel and generate channel weights based on statistical information after global average pooling; a spatial attention module captures the spatial dependencies of the feature maps through convolution operations and generates a two-dimensional spatial weight map.

[0062] In another embodiment of the invention, the two features are first processed by independent attention modules with weighting, and then concatenated or weighted summed. In another optional implementation, a unified joint attention network is used, with the concatenated result of the two features as input and a shared channel-space joint attention map as output, thereby synchronously adjusting the response intensity of the dual-path features. This mechanism effectively improves the fusion efficiency and reduces the computational burden caused by invalid feature propagation.

[0063] Cross-scale residual fusion refers to combining the fused features with the original input features (residual terms after upsampling and alignment) through residual connections to ensure that both low-level spatial information and high-level semantic knowledge are fully preserved during the fusion process.

[0064] Adaptive path interaction enhances the complementarity between semantic and detailed features, the attention-guided mechanism optimizes the information selection strategy during the fusion process, and cross-scale residual fusion ensures the integrity of the original feature information. Together, these three elements constitute an efficient and robust multi-path fusion paradigm, suitable for feature adaptation scenarios between ViT-type backbones and CNN-type detection heads.

[0065] S204: Fuse semantic features and detail features to generate a second feature that is compatible with the second object detection model; S205: The second target detection model outputs the detection result of the target to be identified based on the adapted second feature.

[0066] The present invention also provides a target detection system based on multi-path feature fusion and adaptation, comprising: The feature acquisition module 301 is used to acquire the first feature of the target to be identified based on the first target detection model; The multi-path processing module 302 is used to input the first feature to at least two feature processing paths respectively, so as to generate at least two intermediate features in parallel; At least one fusion adaptation module 303 fuses at least two intermediate features to generate an adapted second feature; The detection module 304 is used to generate detection results based on the second target detection model and the second feature.

[0067] In this embodiment, the system addresses the issue of feature representation mismatch in object detection tasks. Through a modular architecture design, the system decouples and adaptively fuses raw features from the visual base model via multiple paths, ultimately outputting a high-quality feature representation adapted to downstream detection heads. This improves detection accuracy and robustness while maintaining efficient inference capabilities, making it particularly suitable for heterogeneous integration scenarios between ViT-type backbones and CNN-type detection heads.

[0068] The feature acquisition module 301 is used to extract the initial feature representation of the target to be identified from the first object detection model. This first object detection model can be any visual backbone network with multi-scale feature output capabilities, such as self-supervised or supervised pre-trained models based on the Transformer architecture like DINOv3, MAE, and Swin Transformer, or traditional convolutional neural networks like ResNet and ConvNeXt. The first feature is typically a set of multi-scale feature maps, covering information at different spatial resolutions and semantic levels, such as high-level and mid-level features with stride=16, 32, and 64. The role of this module is to provide a unified input source for subsequent multi-path processing, ensuring that both semantic and detailed information are effectively captured.

[0069] The multi-path processing module 302 distributes the first feature to at least two independent and parallel feature processing paths, each path being specifically optimized for a particular type of feature attribute. These paths may include, but are not limited to, semantic enhancement paths and detail reconstruction paths, which focus on high-level semantic modeling and mid-level spatial detail restoration, respectively. There is no sequential dependency between the paths, supporting parallel computing and significantly improving processing efficiency. This module can achieve feature splitting and synchronous processing through software scheduling mechanisms or hardware pipelines, and is suitable for deployment on GPUs, NPUs, and edge computing devices. As a variant implementation, the multi-path structure can be expanded to three or more paths, for example, by adding texture enhancement paths or motion sensing paths to adapt to video detection or multimodal input requirements.

[0070] The fusion and adaptation module 303 receives multiple intermediate features from the multi-path processing module and fuses and adapts them to generate second features compatible with the input requirements of the second object detection model. The fusion process can employ attention-guided mechanisms, weighted summation, convolution after concatenation, or cross-scale residual connections, aiming to retain the advantageous features of each path while suppressing redundant information. The adaptation function is reflected in channel number adjustment, spatial scale alignment, and feature distribution calibration, ensuring that the output features fully match the requirements of the second detection model in terms of dimension, format, and semantic distribution. As an optional embodiment, this module can contain multiple sub-units, each corresponding to a feature fusion task at a different scale, forming a pyramid-shaped fusion structure.

[0071] The detection module 304 is used to complete the final target localization and classification task based on the second target detection model and the second feature. This second target detection model can be an anchor-free detector such as the YOLO series (e.g., YOLOv5, YOLOv8), RetinaNet, FCOS, or ATSS, or an end-to-end detection framework like DETR. Its structural design is independent of the aforementioned modules, allowing for flexible replacement to adapt to different application scenarios. The detection module receives the fused and adapted second feature, performs bounding box regression and class prediction, and outputs the detection results, including target location, class label, and confidence score. This module supports real-time inference and can achieve high frame rate operation on mobile or embedded platforms.

[0072] The four modules described above are connected sequentially according to the data flow, forming a complete end-to-end target detection system. The first feature output by the feature acquisition module serves as the input to the multi-path processing module. The intermediate features generated by the multi-path processing module are then fed into the fusion and adaptation module for integration, and the final second feature is input to the detection module. The entire system can be implemented as software on a single device or distributed across multiple computing nodes in a service-oriented architecture. Its modular design facilitates functional expansion and performance optimization; for example, changing the backbone network, adding or removing processing paths, or switching detection head types can all be done without refactoring the entire system.

[0073] This invention provides an electronic device, comprising: One or more processors; and one or more machine-readable media thereon storing instructions that, when executed by the one or more processors, cause the electronic device to perform the target detection method based on multi-path feature fusion adaptation as described above.

[0074] In this embodiment, the electronic device achieves the encapsulation and efficient execution of complex target detection algorithms through hardware and software co-design. One or more processors execute computer instructions to complete the entire process, including data processing, feature calculation, model inference, and result output. The processor can be any one or more combinations of a central processing unit (CPU), graphics processing unit (GPU), neural network processing unit (NPU), field-programmable gate array (FPGA), or application-specific integrated circuit (ASIC), making it suitable for various application scenarios such as servers, embedded systems, mobile terminals, drones, and in-vehicle computing platforms.

[0075] The machine-readable medium is a non-volatile or volatile storage medium storing program code, including but not limited to flash memory, solid-state drives (SSDs), random access memory (RAM), read-only memory (ROM), disks, optical discs, or cloud storage services. When the instructions are loaded and executed by the processor, they can invoke a pre-trained first object detection model to obtain the first feature of the target to be identified, and input the first feature to at least two parallel feature processing paths for independent processing to generate different intermediate features; then, through a fusion adaptation mechanism, the outputs of each path are integrated to form a second feature adapted to the input format of the second object detection model; finally, the second object detection model completes the target classification and localization based on the second feature and outputs the detection result.

[0076] In one possible embodiment of the present invention, the electronic device supports dynamic task scheduling and resource allocation strategies. It can adaptively adjust the parallelism, batch size, and memory usage strategies during the model inference process based on the input image resolution, scene complexity, and performance requirements, thereby optimizing latency and energy efficiency while ensuring detection accuracy. For example, in low-power mode, the device can enable lightweight branch paths to reduce computation; while in high-precision mode, it activates all dual-path structures to enhance feature representation capabilities.

[0077] The electronic device can also integrate an image preprocessing module for normalizing, scaling, and denoising the image to be recognized, ensuring that the input conforms to the model's expected format; it is also equipped with a post-processing module to perform non-maximum suppression (NMS), bounding box calibration, and confidence screening on the received detection results, thereby improving output stability and usability.

[0078] The present invention also provides a computer-readable storage medium storing a computer program that causes a processor to execute a target detection method based on multi-path feature fusion adaptation.

[0079] In this embodiment, a computer-readable storage medium provides a technical carrier and operational support scheme for implementing the aforementioned target detection method. By embedding a specifically designed computer program in a non-volatile storage medium, any electronic device with computing capabilities can reproduce the target detection process based on multi-path feature fusion and adaptation when the program is loaded and executed. This technology solves the problem of how to efficiently deploy, distribute, and run complex vision algorithms across different hardware platforms, and is particularly suitable for building intelligent detection systems in cross-platform, multi-scenario environments.

[0080] The computer-readable storage medium can be any physical device capable of storing data and accessed by a processor, including but not limited to solid-state drives (SSDs), flash memory, universal serial bus (USB) drives, secure digital cards (SD cards), optical discs (CD / DVDs), hard disks, embedded multimedia cards (eMMC), network-attached storage (NAS), or persistent storage areas in cloud-based distributed file systems. These media are capable of storing program code for extended periods and can be invoked and executed by one or more processors upon power-up.

[0081] A computer program contains a set of instructions that, when executed by one or more processors, guides an electronic device to perform the following operations: First, it acquires a first feature of the target to be identified based on a first object detection model; then, it inputs this first feature in parallel into at least two different feature processing paths to generate semantic features output by the semantic enhancement path and detail features output by the detail reconstruction path, respectively; next, it fuses these intermediate features to form a second feature adapted to a second object detection model; finally, it uses this second feature to output the detection result from the second object detection model. The entire process requires no manual intervention and is entirely automated, controlled by the program flow.

[0082] In another feasible embodiment of the invention, the computer program can be written in a high-level programming language (such as Python or C++) and compiled into machine code or intermediate bytecode (such as Java bytecode) that can run on a specific architecture (such as x86 or ARM). Alternatively, it can be directly interpreted and executed as a script. The program modules can be divided into a feature extraction module, a multi-path processing module, a fusion and adaptation module, and a detection output module. These modules communicate and collaborate through standard interfaces to ensure functional decoupling and maintainability. Furthermore, the program can integrate model weight files (such as .pth or .onnx formats) to achieve end-to-end integrated deployment.

[0083] In another possible embodiment of the invention, the storage medium may store only the core algorithm logic without including pre-trained model parameters, with the parameters dynamically injected via external download or online loading; alternatively, the program may be packaged as a container image (such as a Docker image) for rapid deployment and migration in heterogeneous environments such as cloud servers, edge computing nodes, or mobile terminals. In another optional embodiment, the program supports an incremental update mechanism, replacing only the modified code segments to reduce bandwidth consumption and upgrade risks.

[0084] Through the above embodiments, this invention enables the embedding of complex multi-path feature fusion and adaptation methods into a physical medium in software form, thus ensuring stable reproduction of the same algorithm behavior across different application scenarios. Because the program is independent of specific hardware environments, it can run flexibly on various platforms such as desktop computers, industrial control computers, drone flight control systems, automotive AI chips, or smartphones. Therefore, this storage medium not only effectively protects the intellectual property rights of the algorithm but also greatly improves the efficiency of commercial dissemination and engineering feasibility of the technological achievements, meeting the requirements of modern artificial intelligence systems for portability, replicability, and large-scale deployment.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. In this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.

Claims

1. A target detection method based on multi-path feature fusion and adaptation, characterized in that, Based on the extraction function of the first target detection model, the first feature of the target to be identified is obtained; The first feature is input into at least two different feature processing paths; The at least two different feature processing paths process the first feature in parallel and generate different intermediate features accordingly; By fusing the different intermediate features, a second feature adapted to the second target detection model is generated; The second target detection model outputs the detection result of the target to be identified based on the adapted second feature.

2. The method according to claim 1, characterized in that, The at least two different feature processing paths include a semantic enhancement path and a detail reconstruction path; the semantic enhancement path is used to process the first feature to enhance semantic information and generate semantic features, and the detail reconstruction path is used to process the first feature to enhance detail information and generate detail features.

3. The method according to claim 2, characterized in that, The first feature includes high-level features and mid-level features. The semantic enhancement path is used to process the high-level features to enhance semantic information and generate semantic features. The detail reconstruction path is used to process the mid-level features in the first feature to enhance detail information and generate detail features.

4. The method according to claim 3, characterized in that, The semantic enhancement path generates semantic features by processing high-level features in the first feature through global context modulation and semantic-space processing; the detail reconstruction path generates detail features by processing mid-level features in the first feature through local detail enhancement and edge-aware attention processing.

5. The method according to claim 4, characterized in that, The semantic enhancement path generates semantic features by processing high-level features in the first feature through global context modulation and semantic-spatial alignment. This includes: processing the high-level features through a lightweight Transformer block based on dynamic position encoding to capture global long-distance dependencies and output semantically enhanced features; and processing the semantically enhanced features through semantic-spatial alignment to adapt to target deformation and complex spatial layout, outputting the final spatially aligned and semantically enhanced semantic features.

6. The method according to claim 3, characterized in that, The detailed reconstruction path generates detailed features by processing the mid-level features in the first feature through local detail enhancement and edge-aware attention processing, including: obtaining edge information of the first feature through a specific operator, generating channel attention weights using the edge information, and guiding feature detail enhancement.

7. The method according to claim 1 or 2, characterized in that, The different intermediate features are fused to generate a second feature adapted to the second object detection model, including: through an adaptive path interaction and attention-guided feature fusion mechanism, the semantic features and detail features are fused across scale residuals to generate a second feature adapted to the second object detection model.

8. A target detection system based on multi-path feature fusion and adaptation, characterized in that, include: The feature acquisition module is used to acquire the first feature of the target to be identified based on the extraction function of the first target detection model; A multi-path processing module is used to input the first feature into at least two feature processing paths respectively, so as to generate at least two intermediate features in parallel; At least one fusion adaptation module fuses the at least two intermediate features to generate an adapted second feature; The detection module generates detection results using the second target detection model and the adapted second feature.

9. An electronic device, characterized in that, include: One or more processors; The electronic device and one or more machine-readable media thereon storing instructions, when executed by the one or more processors, cause the electronic device to perform the multi-processor-based task processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that... The computer program stored therein enables the processor to execute a task processing method based on multiple processing units as described in any one of claims 1 to 7.