A lightweight target detection network for complex shipyard operation scenarios

CN122821202APending Publication Date: 2026-09-25CHINA MACHINERY DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610861948.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

船厂作业场景中目标尺度差异显著,小型安全部件与大型作业设备往往同时出现,而传统基于固定池化或简单特征融合的多尺度处理方式缺乏自适应能力,难以兼顾不同尺度目标的特征表达,容易导致小目标漏检或大目标定位不准确

Benefits of technology

(1)针对YOLO11n中快速空间金字塔池化模块SPPF依赖固定池化、对复杂背景和尺度变化适应性有限的问题,提出共享金字塔双注意力融合模块SPDAF。该模块通过共享空洞卷积构建可学习的多尺度感受野,并结合轻量注意力机制增强关键区域响应。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122821202A_ABST
    Figure CN122821202A_ABST
Patent Text Reader

Abstract

The application provides a lightweight target detection network for a complex shipyard operation scene, taking YOLO11n as a benchmark model, comprising a shared pyramid dual attention fusion SPDAF module, a dynamic branch adaptive fusion DBAF module and a lightweight context awareness LCAB module. The SPDAF module in the application has better feature expression capability for small-scale components and partially occluded targets in the shipyard scene, and can inhibit complex background interference and improve the attention ability of the model to small targets. The DBAF module enhances the target detection robustness of the model in a complex environment, improves the flexibility of backbone network feature mixing and the adaptive ability to input content, and reduces the parameter quantity and computational complexity. The LCAB module provides more stable feature support for classification and positioning in a complex scene. The overall scheme improves the detection accuracy, robustness and deployment adaptability in a complex industrial environment while maintaining lightweight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of computer vision, YOLO, and object detection, and specifically to a lightweight object detection network for complex operation scenarios in shipyards. Background Technology

[0002] With the development of intelligent manufacturing and industrial digitalization, visual perception-based target detection technology has been widely applied in fields such as industrial safety supervision, equipment status recognition, and operational behavior analysis. In complex industrial scenarios such as shipbuilding, the working environment is characterized by dense structures, frequent spatial intersections, variable lighting conditions, and severe occlusion, which places higher demands on the accuracy and real-time performance of target detection algorithms.

[0003] Currently, mainstream target detection methods mainly include two-stage detection algorithms and single-stage detection algorithms. While two-stage detection algorithms offer advantages in detection accuracy, their complex model structures and high computational costs make them unsuitable for the real-time and edge deployment requirements of industrial environments. In contrast, single-stage detection algorithms, represented by the YOLO series, achieve target classification and localization in an end-to-end manner, offering higher detection speed and better engineering application performance, thus gaining widespread application in industrial scenarios.

[0004] When existing target detection technologies are applied to complex industrial scenarios such as shipyards, the following shortcomings still exist: (1) Existing detection models have limited capabilities in multi-scale target modeling. In shipyard operation scenarios, the target scales vary significantly, with small safety components and large operating equipment often appearing simultaneously. Traditional multi-scale processing methods based on fixed pooling or simple feature fusion lack adaptability and are difficult to take into account the feature representation of targets at different scales, which can easily lead to missed detection of small targets or inaccurate localization of large targets.

[0005] (2) Existing models lack the ability to express and discriminate features under complex background conditions. In shipyard environments, steel structures are dense, equipment pipelines are complex and textures are highly repetitive, and background interference is severe. Existing methods lack effective feature screening and enhancement mechanisms, making it difficult to highlight key target areas, which can easily lead to false detections and reduce detection stability.

[0006] (3) Existing detection networks mostly adopt static convolutional structures and detection head designs based on local features. The convolutional kernel remains fixed during the inference process, lacking the ability to adapt to the input content. At the same time, they do not make sufficient use of contextual information. When the target is occluded, has a different shape, or is incomplete in structure, problems such as insufficient feature extraction, classification errors, and localization deviations are likely to occur.

[0007] (4) In practical industrial applications, the model also needs to meet the deployment requirements of edge devices. However, existing methods often introduce a high number of parameters and computational complexity while improving detection accuracy, making it difficult to balance detection performance and computational efficiency. Summary of the Invention

[0008] This invention aims to address the shortcomings of existing technologies by providing a lightweight target detection network, SDLNet, for complex shipyard operation scenarios. Based on the YOLO11n framework, the model is improved in three aspects: multi-scale context modeling, backbone feature fusion, and detection head enhancement. Simultaneously, a self-made dataset for complex shipyard operation scenarios is constructed, covering nine typical target classes. Building upon this, the lightweight target detector SDLNet is proposed through collaborative optimization of key structures of the baseline network, thereby improving its detection accuracy, robustness, and deployment adaptability in complex industrial environments.

[0009] The specific plan is as follows: SDLNet, a lightweight object detection network for complex shipyard operation scenarios, is based on YOLO11n and includes a shared pyramid dual attention fusion SPDAF module, a dynamic branch adaptive fusion DBAF module, and a lightweight context-aware LCAB module. The shared pyramid dual attention fusion SPDAF module replaces the SPPF module in the baseline model. It is used to construct multi-scale receptive fields by sharing convolutional kernels and multi-dilation rate dilated convolutional branches, and to fuse channel attention and spatial attention to enhance the response of key regions. The Dynamic Branch Adaptive Fusion DBAF module replaces the C3K2 module in the backbone network of the benchmark model. It is used to extract local and directional structural features through multi-branch deep convolution and dynamically generate branch weights based on input features for adaptive weighted fusion. The lightweight context-aware LCAB module replaces the deep convolutional DWConv in the classification branch and some convolutional structures in the regression branch. It is used to collaboratively model local details and extended contextual information through local deep convolutional branches and dilated deep convolutional branches, thereby enhancing the feature representation in the classification and localization stages.

[0010] Furthermore, the shared convolutional pyramid attention fusion SPDAF module includes: After the input features are compressed by 1×1 convolution, the input shares a multi-scale convolutional structure, which uses the same set of 3×3 convolutional kernels to extract multi-scale contextual features in parallel under the conditions of dilation rates of 1, 3 and 5 respectively. After concatenating the output features of each dilation rate branch, a 1×1 convolution is performed to fuse and compress the channels, resulting in a unified feature representation. Subsequently, the channel attention branch and spatial attention branch, which are configured in parallel, are input respectively. The channel attention branch adopts an SE structure, extracts global semantic information through global adaptive average pooling and global adaptive max pooling, and generates a channel weight map through a shared mapping network to enhance the target-related semantic features. The spatial attention branch performs average pooling and max pooling along the channel dimension to generate a spatial description map, and generates a spatial weight map through 7×7 convolution and sigmoid activation function to enhance the response of the target region and suppress background interference. Finally, the output features of the channel attention branch and the output features of the spatial attention branch are fused to form an enhanced feature representation that combines semantic perception and spatial localization capabilities. The enhanced features are output after 1×1 convolution.

[0011] Furthermore, the dynamic branch adaptive fusion DBAF module includes: The input features are fed into three parallel depthwise convolution branches: a 3×3 depthwise convolution branch, a 1×11 depthwise strip convolution branch, and an 11×1 depthwise strip convolution branch. These branches are used to extract local neighborhood information, horizontal long-range information, and vertical long-range information, respectively. All three branches use depthwise convolution, and the computation is performed independently within each channel. The input features are globally averaged pooled through a dynamic kernel weight generation mechanism, and then the dynamic weights corresponding to the three branches are generated through convolution mapping and Softmax normalization. Then, the output of each branch is multiplied by its corresponding dynamic weight and summed using a dynamic weight fusion mechanism. Furthermore, spatial attention mechanisms are used to spatially reweight the weighted fused features; It also includes a residual connection structure, which is used to add the output features to the input features when the input and output dimensions are the same.

[0012] Furthermore, in the dynamic branch adaptive fusion DBAF module, after weighted summation, cross-channel information interaction is performed through a convolutional layer, and then sequentially through a batch normalization layer and a SiLU activation layer, followed by spatial reweighting in conjunction with a spatial attention mechanism.

[0013] Furthermore, the lightweight context-aware LCAB module includes: The input features are convolved with 1×1 to compress the number of channels to half of the original number; In the compressed feature space, feature modeling is performed through two parallel depthwise convolution branches; one is a 3×3 depthwise convolution and the other is a 3×3 depthwise convolution with a dilation rate of 2. The outputs of the two branches are added element-wise to achieve the fusion of local detail features and extended context features. The fused features are sequentially processed through a batch normalization BN layer and a SiLU activation layer; Then, a 1×1 convolution is used to restore the fused features to the original input channel dimension.

[0014] Furthermore, the lightweight context-aware LCAB module uses the lightweight context-aware detection head LCABDetect to replace the depthwise convolution in the classification branch and the 3×3 convolution structure in the regression branch of the YOLO11 detection head.

[0015] Furthermore, the Dynamic Branch Adaptive Fusion DBAF module, the Dynamic Branch Adaptive Fusion DBAF module, and the Lightweight Context-Aware LCAB module are used in conjunction to detect targets in complex shipyard operation scenarios, and are used to identify and locate typical targets including holes, ladders, safety locks, safety helmets, welding pliers, welding machines, cutting guns, iron buckets, and angle grinders.

[0016] The beneficial effects of this invention are as follows: (1) To address the issues of the Fast Spatial Pyramid Pooling (SPPF) module in YOLO11n relying on fixed pooling and having limited adaptability to complex backgrounds and scale changes, a shared pyramid dual attention fusion module, SPDAF, is proposed. This module constructs a learnable multi-scale receptive field through shared dilated convolutions and combines a lightweight attention mechanism to enhance the response in key regions.

[0017] (2) A dynamic branch adaptive fusion module DBAF is proposed, which uses multi-branch deep convolution and dynamic branch weighting to achieve input-driven adaptive feature mixing, thereby improving the flexibility of feature expression while controlling the complexity of the model.

[0018] (3) To address the issue of insufficient stability in classification and localization of the detection head under complex backgrounds and occlusion conditions, a lightweight context-aware detection head module, LCABDetect, is designed by replacing some convolutional structures in the original detection head with the LCAB module. This module enhances feature representation in the decision-making stage through lightweight local and contextual dual-path modeling, thereby improving detection stability in complex scenes. Attached Figure Description

[0019] Figure 1 This is a diagram of the architecture of the present invention.

[0020] Figure 2 This is a structural diagram of the SPDAF module in this invention.

[0021] Figure 3 This is a structural diagram of the DBAF module in this invention.

[0022] Figure 4 This is a structural diagram of the LCAB module in this invention.

[0023] Figure 5 This is a structural diagram of LCABDetect in this invention. Detailed Implementation

[0024] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0025] This invention uses YOLO11, released by Ultralytics, as the basic detection framework. YOLO11 offers various configurations such as n, s, m, l, and x, with YOLO11n being the most lightweight version, exhibiting lower parameter count and computational complexity. Shipyard scenarios place higher demands on model real-time performance, lightweight design, and robustness; therefore, this invention selects YOLO11n as the baseline model.

[0026] This invention makes three collaborative improvements to key structural locations in YOLO11n. First, in the multi-scale context aggregation stage, a shared pyramid dual-attention fusion module (SPDAF) replaces the original SPPF, transforming the fixed-pooling-based multi-scale feature construction method into a learnable shared dilated convolutional representation, and combining it with a lightweight attention mechanism to enhance the response in key regions. Second, in the backbone network, a dynamic branch adaptive fusion module (DBAF) replaces the original C3K2, achieving more flexible feature mixing through multi-branch deep convolutions and dynamic weighted fusion, while also considering lightweight requirements. Finally, in the detection head stage, a lightweight context-aware module (LCAB) is introduced, replacing the deep convolution (DWConv) in the classification branch and some convolutional structures in the regression branch, improving the robustness of classification and localization in complex backgrounds through collaborative modeling of local information and extended context. Based on these improvements, this invention constructs a lightweight object detection network SDLNet for complex shipyard operation scenarios, the overall structure of which is as follows: Figure 1 As shown.

[0027] In complex shipyard operation scenarios, targets such as holes, safety latches, cutting guns, and welding clamps generally exhibit characteristics such as large scale differences, slender structures, frequent occlusion, and strong background interference, which can easily lead to insufficient response to key targets and inadequate expression of contextual information. Although the SPPF module in YOLO11n can expand the receptive field through multi-scale pooling, its pooling method is preset and lacks the ability to adaptively model features at different scales. Furthermore, the semantic connections between branches at different scales are relatively limited. Therefore, in the context of complex steel structures, the recognition effect for targets at different scales is still insufficient. To address these issues, this invention replaces SPPF with a shared pyramid dual attention fusion module (SPDAF). By sharing convolutional kernels and multiple dilation rate branches, multi-scale contextual features are constructed. This enhances the perception of key structural information while maintaining cross-scale semantic consistency. Moreover, this module integrates channel attention and spatial attention modules, strengthening the selective modeling capability for key target regions and channel information. Figure 2 The module structure of SPDAF is shown.

[0028] like Figure 2 As shown, the input features are first compressed using a 1×1 convolution, which reduces the computational cost of subsequent multi-scale branches while preserving the main semantic information. Then, the compressed features are input into a shared convolutional multi-scale structure, where the same set of 3×3 convolutional kernels are used to extract multi-scale contextual features in parallel under dilation rates of 1, 3, and 5. Unlike SPPF's fixed-pooling-based multi-scale construction method, this design uses shared parameters to model features across different receptive fields, enhancing the consistency of cross-scale semantic expression while controlling parameter growth. This provides better feature representation capabilities for slender targets, small-scale components, and partially occluded targets in shipyard scenes. Subsequently, a 1×1 convolution is used to fuse and compress the concatenated features, achieving information integration and reconstruction. This process suppresses channel dimensional redundancy and enhances the interaction between features at different scales, giving the output features richer contextual expression.

[0029] Considering the complex background and strong texture interference of steel structures in shipyard scenarios, this invention introduces channel attention and spatial attention modules after multi-scale feature fusion to enhance target-related responses and suppress background noise. Channel attention borrows from the SE structure, performing global adaptive average pooling and global adaptive max pooling on the fused features, followed by two 1×1 convolutions and ReLU and Sigmoid activations to generate channel weight maps, thus adaptively enhancing key semantic channels. Spatial attention performs average pooling and max pooling along the channel dimensions to generate two spatial description maps; these are concatenated and input into a 7×7 convolutional layer, combined with Sigmoid activation to generate a spatial attention map, used to highlight potential target regions and suppress complex background interference. This design helps improve the model's ability to focus on small targets or slender tools such as safety latches, cutting guns, and welding pliers in shipyard scenarios. Finally, the attention-enhanced features are further fused using 1×1 convolutions to obtain the module output.

[0030] In object detection tasks within complex shipyard operation scenarios, the C3K2 module in the YOLO11n backbone network primarily relies on standard convolutions for feature extraction. While this structure achieves good feature extraction results in general scenarios, its static convolution approach still has limitations in spatial modeling and feature mixing in complex environments. On one hand, fixed convolution kernels are difficult to adaptively adjust based on input features; on the other hand, standard convolutions involve dense computation along the channel dimension, with the number of parameters increasing significantly with the number of channels, which is detrimental to lightweight model deployment.

[0031] To address the aforementioned issues, this invention proposes a Dynamic Branch Adaptive Fusion Module (DBAF), replacing all C3K2 structures in the YOLO11n backbone network. This module combines dynamic branch modeling with deep convolution mechanisms, improving the flexibility and adaptability of feature mixing while controlling parameter scale, thereby enhancing the model's robustness in object detection under complex environments. The DBAF module structure is as follows: Figure 3 As shown.

[0032] The dynamic branch adaptive fusion module mainly consists of three parallel deep convolutional branches, a dynamic kernel weight generation mechanism, a dynamic weight fusion mechanism, and a spatial attention mechanism. The module first feeds the input features into three parallel deep convolutional branches: a 3×3 deep convolutional branch, a 1×11 deep strip convolutional branch, and an 11×1 deep strip convolutional branch. These branches are used to extract local neighborhood information and structural features in different directions. The 3×3 deep convolutional branch captures local information, while the 1×11 and 11×1 deep strip convolutional branches aggregate long-distance information in a single direction, thereby enhancing the perception of horizontal and vertical structures. All three branches use deep convolution, and the computation is performed independently within each channel, thus effectively reducing the number of parameters and computational overhead.

[0033] Building upon multi-branch feature extraction, the module further introduces a dynamic kernel weight generation mechanism. Specifically, the input features are first subjected to global average pooling, then weight parameters corresponding to the three branches are generated through convolutional mapping, and Softmax is used to normalize the weights along the branch dimensions, resulting in dynamic weights w1, w2, and w3. Subsequently, the outputs of each branch are multiplied by their corresponding weights and summed in a weighted manner to achieve adaptive fusion of the three types of spatial features. Compared with fixed weighting or simple concatenation methods, this process can dynamically adjust the response intensity of different branches according to the input features.

[0034] After dynamic weighted fusion, the fused features are further integrated through convolution to enhance cross-channel information interaction, and batch normalization (BN) and the SiLU activation function are combined to improve nonlinear expressive power. Subsequently, a spatial attention module is introduced to reweight the fused features, generating spatial weights through channel dimension statistics, thereby strengthening the response of potential target regions and suppressing interference from complex backgrounds. In addition, the module preserves the residual connection structure. When the input and output dimensions are consistent, the output features are element-wise added to the input features to preserve low-level feature information and promote stable gradient propagation, thereby improving the convergence stability of the training process.

[0035] After completing multi-scale and adaptive modeling of the feature pyramid layer and backbone network layer, the detection head still undertakes the final classification and localization tasks. Although the aforementioned modules enhance the overall feature extraction capability, in complex scenes, the detection head is more sensitive to local details and contextual information, so it is still necessary to further enhance its context awareness capability. Traditional detection heads usually use standard 3×3 convolutions or depthwise convolutions for feature extraction. These structures mainly focus on local neighborhood modeling and have relatively limited integration of contextual information. In complex shipyard scenarios, occlusion, scale changes, and background interference can easily affect classification and localization results, and relying solely on local modeling often makes it difficult to obtain stable feature responses.

[0036] To address the aforementioned issues, this invention proposes a lightweight context-aware module (LCAB) to replace the depthwise convolutions in the classification branch and the 3×3 convolutional structures in the regression branch of the YOLO11 detector head. This module enhances the feature extraction capabilities of the detector head stage by collaboratively modeling local information and extended context while maintaining manageable computational overhead. Figure 4 The proposed LCAB module is demonstrated.

[0037] The input features are first compressed using a 1×1 convolution, reducing the number of channels to half of the original. This operation, while preserving the main semantic information as much as possible, reduces the computational cost and parameter overhead of subsequent convolution operations, providing a foundation for the lightweight design of the module.

[0038] In the compressed feature space, LCAB employs two parallel depthwise convolutional branches for feature modeling. One branch uses a standard 3×3 depthwise convolution to extract detailed information such as edges and textures within the local neighborhood; the other branch uses a 3×3 depthwise convolution with a dilation rate of 2 to introduce richer contextual information by expanding the effective receptive field. The outputs of the two branches are added element-wise to fuse local detailed features with expanded contextual features. Since both branches use depthwise convolution, their parameter count and computational complexity increase linearly with the number of channels, thus exhibiting higher parameter efficiency than standard convolution.

[0039] The fused features are sequentially activated by Batch Normalization (BN) and SiLU to enhance nonlinear representation and improve training stability. Subsequently, a 1×1 convolution is used to restore the channel dimension, enabling cross-channel information interaction and ensuring that the output features maintain dimensionality consistency with the input features. Through this design, LCAB achieves joint modeling of local and contextual information with low parameter overhead, thus completing lightweight feature enhancement.

[0040] Compared to the original detection head which directly uses depthwise convolution or standard 3×3 convolution, LCAB can improve feature quality while controlling model complexity, providing more stable feature support for classification and localization in complex scenarios. This invention replaces the original 3×3 standard convolution and depthwise convolution modules in YOLO11n Detect with LCAB modules to enhance feature discrimination capabilities and prediction stability during classification and localization. The detection head structure reconstructed based on LCAB is denoted as LCABDetect, and its overall structure is as follows: Figure 5 As shown.

[0041] To evaluate the contributions of various augmentations to model detection accuracy and lightweight optimization, ablation experiments were conducted on the complex shipyard operation scenario dataset constructed in this invention. Using YOLO11n as the baseline model, and maintaining consistency in training strategy, data augmentation, and evaluation settings, this invention introduces SPDAF, DBAF, LCAB, and their combinations for comparison, and uses Parameter, FLOPs, Precision (P), Recall (R), and mAP as evaluation metrics. The quantification results of each model are shown in Table 1.

[0042] First, the SPPF in YOLO11n was replaced with the proposed SPDAF. With a slight increase in parameters and computational cost, the improved model achieved a P-value of 90%, and R and mAP increased by 1.7% and 0.5%, respectively, indicating that this module enhances multi-scale information aggregation and improves recall performance. Introducing only DBAF reduced the model's parameter count and computational cost to 2.39M and 5.1G, respectively, while increasing P-value to 90.6% and mAP to 86.4%. Introducing only LCABDetect, with 2.46M parameters and 5.5G computational cost, the model achieved P-values ​​of 91.8% and R-values ​​of 80.8%, and mAP to 87.1%, respectively, demonstrating that local and contextual co-modeling in the detection head stage helps improve the final prediction quality.

[0043] Furthermore, combined experiments further validated the complementarity between the modules. The DBAF and SPDAF combined module improved R to 81.7%, mAP to 86.9%, and reduced computational cost to 5.2 GFLOPs. The DBAF and LCABDetect combined module improved P to 91.3%, R to 80.3%, and mAP to 86.1%. Finally, when all three modules (DBAF, SPDAF, and LCABDetect) were introduced simultaneously, the model's parameter count and computational cost decreased to 2.42M and 4.4G respectively, while P, R, and mAP improved to 92.6%, 81.3%, and 87.5% respectively. The overall performance was superior to that of a single module or a combination of two modules, as shown in Table 1. These results demonstrate that the proposed modules effectively reduce model complexity while improving detection accuracy in complex shipyard scenarios, exhibiting good potential for engineering deployment.

[0044] Table 1 Ablation experiment results on the contribution of the improved module to model performance (- indicates that the module was not used, √ indicates that the module was used).

[0045] Currently, the two most mainstream frameworks in object detection research are YOLO and DETR. This study evaluates the performance of the SDLNet model, seven basic models in the YOLO series, and RTDETR on the dataset for recognition and detection. The performance comparison results of various models are shown in Table 2.

[0046] Table 2 Performance Comparison of Different Models

[0047] As shown in Table 2, the RT-DETR model has a precision of 87.6%, a recall of 80.3%, and a mAP of 84.5%. Compared with the method proposed in this invention, RT-DETR has lower accuracy and, compared with other models, has more parameters and FLOPs. In contrast, the precision of YOLOv5n to YOLOv12n ranges from 87.1% to 89.8%, the recall ranges from 77% to 80.8%, the mAP ranges from 83.6% to 86.3%, the number of parameters ranges from 1.97M to 4.23M, and the number of FLOPs ranges from 6.3G to 11.7G. The proposed SDLNet model has a lightweight configuration with 2.42M parameters and 4.4G FLOPs, achieving an mAP of 87.5%, which is 2.3% higher than the baseline YOLO11n, and improvements in precision and recall of 2.8% and 1.5%, respectively.

[0048] The key technical point of this invention lies in: based on a lightweight target detection network, addressing the problems of large target scale variations, strong background interference, frequent occlusion, difficulty in identifying slender targets, and limited resources for edge deployment in complex shipyard operation scenarios, a target detection network is constructed that integrates multi-scale context modeling, dynamic branch feature fusion, and a lightweight context-aware detection head. Its key technologies include the following aspects: (1) Multi-scale contextual feature aggregation structure based on shared dilated convolution: To address the problem that traditional fast spatial pyramid pooling modules rely on fixed pooling and lack learnable multi-scale representation capabilities, this invention designs a shared pyramid dual-attention fusion module. This module uses a shared convolutional kernel and dilated convolutional branches with different dilation rates to construct a multi-scale receptive field, achieving semantic consistency between features at different scales while controlling parameter growth. Local, neighborhood, and larger-scale contextual information is extracted through parallel branches with different dilation rates, enhancing the model's representation capabilities for small-scale targets, slender targets, and occluded targets.

[0049] (2) Target Region Enhancement Mechanism Integrating Channel Attention and Spatial Attention: After multi-scale feature fusion, a lightweight channel attention and spatial attention mechanism is introduced. Channel attention is used to adaptively enhance semantic channels related to the target based on global statistical information, while spatial attention is used to highlight potential target regions in the image and suppress interference from complex backgrounds. This mechanism can improve the model's feature selection ability in shipyard scenarios with dense steel structures, repetitive textures, and overlapping equipment, and reduce the risk of false detection and false negative detection.

[0050] (3) Dynamic Adaptive Feature Fusion Structure Based on Multi-Branch Deep Convolution: To address the problem that traditional convolutional structures have fixed convolutional kernels and are difficult to adapt to different input content during inference, this invention proposes a dynamic branch adaptive fusion module. This module sets up local deep convolutional branches and directional strip deep convolutional branches to extract local neighborhood information and long-distance structural information in the horizontal and vertical directions, respectively. Each branch adopts deep convolution to reduce the number of parameters and computation.

[0051] (4) Input-driven dynamic branch weight generation and fusion mechanism: The dynamic branch adaptive fusion module obtains global contextual information of input features through global average pooling, and generates dynamic weights for each branch through convolutional mapping and Softmax normalization. Subsequently, the outputs of each branch are weighted and fused according to their corresponding weights, enabling the network to adaptively select the response intensity of local features, horizontal structural features, and vertical structural features based on the content of the input image. This mechanism improves the network's adaptability to different target shapes, occlusion states, and background structures.

[0052] (5) Lightweight Context-Aware Feature Enhancement Structure for Detection Head: To address the problem that the original detection head mainly relies on local convolution and lacks sufficient context modeling, this invention designs a lightweight context-aware module and constructs a context-aware detection head based on this module. This module first compresses the number of channels through convolution, then extracts local detail features using standard depthwise convolution branches, extracts extended context information using dilated depthwise convolution branches, and achieves collaborative modeling of local and context information through element-level fusion. Finally, it restores the channel dimension for classification and localization prediction.

[0053] The technical means disclosed in this invention are not limited to those disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications are also considered within the scope of protection of this invention.

Claims

1. A lightweight target detection network for complex shipyard operation scenarios, characterized in that, Based on YOLO11n, the model includes a shared pyramid dual attention fusion SPDAF module, a dynamic branch adaptive fusion DBAF module, and a lightweight context-aware LCAB module. The shared pyramid dual attention fusion SPDAF module replaces the SPPF module in the baseline model. It is used to construct multi-scale receptive fields by sharing convolutional kernels and multi-dilation rate dilated convolutional branches, and to fuse channel attention and spatial attention to enhance the response of key regions. The Dynamic Branch Adaptive Fusion DBAF module replaces the C3K2 module in the backbone network of the benchmark model. It is used to extract local and directional structural features through multi-branch deep convolution and dynamically generate branch weights based on input features for adaptive weighted fusion. The lightweight context-aware LCAB module replaces the deep convolutional DWConv in the classification branch and some convolutional structures in the regression branch. It is used to collaboratively model local details and extended contextual information through local deep convolutional branches and dilated deep convolutional branches, thereby enhancing the feature representation in the classification and localization stages.

2. The lightweight target detection network for complex shipyard operation scenarios according to claim 1, characterized in that, The shared pyramid dual attention fusion SPDAF module includes: After the input features are compressed by 1×1 convolution, the input shares a multi-scale convolutional structure, which uses the same set of 3×3 convolutional kernels to extract multi-scale contextual features in parallel under the conditions of dilation rates of 1, 3 and 5 respectively. After concatenating the output features of each dilation rate branch, a 1×1 convolution is performed to fuse and compress the channels, resulting in a unified feature representation. Subsequently, the channel attention branch and spatial attention branch, which are set in parallel, are input respectively. The channel attention branch adopts the SE structure, extracts global semantic information through global adaptive average pooling and global adaptive max pooling, and generates a channel weight map through a shared mapping network to enhance the target-related semantic features. The spatial attention branch performs average pooling and max pooling along the channel dimension to generate a spatial description map, and generates a spatial weight map through 7×7 convolution and sigmoid activation function to enhance the response of the target region and suppress background interference. Finally, the output features of the channel attention branch and the output features of the spatial attention branch are fused to form an enhanced feature representation that combines semantic perception and spatial localization capabilities. The enhanced features are output after 1×1 convolution.

3. The lightweight target detection network for complex shipyard operation scenarios according to claim 1, characterized in that, The dynamic branch adaptive fusion DBAF module includes: The input features are fed into three parallel depthwise convolution branches: a 3×3 depthwise convolution branch, a 1×11 depthwise strip convolution branch, and an 11×1 depthwise strip convolution branch. These branches are used to extract local neighborhood information, horizontal long-range information, and vertical long-range information, respectively. All three branches use depthwise convolution, and the computation is performed independently within each channel. The input features are globally averaged pooled through a dynamic kernel weight generation mechanism, and then the dynamic weights corresponding to the three branches are generated through convolution mapping and Softmax normalization. Then, the output of each branch is multiplied by its corresponding dynamic weight and summed using a dynamic weight fusion mechanism. Furthermore, spatial attention mechanisms are used to spatially reweight the weighted fused features; It also includes a residual connection structure, which is used to add the output features to the input features when the input and output dimensions are the same.

4. The lightweight target detection network for complex shipyard operation scenarios according to claim 3, characterized in that, In the dynamic branch adaptive fusion DBAF module, after weighted summation, cross-channel information interaction is performed through a convolutional layer, followed by batch normalization and SiLU activation layers, and then spatial reweighting is performed in conjunction with a spatial attention mechanism.

5. A lightweight target detection network for complex shipyard operation scenarios according to claim 1, characterized in that, The lightweight context-aware LCAB module includes: The input features are convolved with 1×1 to compress the number of channels to half of the original number; In the compressed feature space, feature modeling is performed through two parallel depthwise convolution branches; one is a 3×3 depthwise convolution, and the other is a 3×3 depthwise convolution with a dilation rate of 2. The outputs of the two branches are added together to achieve the fusion of local detail features and extended context features. The fused features are sequentially processed through a batch normalization BN layer and a SiLU activation layer; Then, a 1×1 convolution is used to restore the fused features to the original input channel dimension.

6. A lightweight target detection network for complex shipyard operation scenarios according to claim 5, characterized in that, The lightweight context-aware LCAB module uses the lightweight context-aware detection head LCABDetect to replace the depthwise convolution in the classification branch and the 3×3 convolution structure in the regression branch of the YOLO11 detection head.

7. A lightweight target detection network for complex shipyard operation scenarios according to claim 1, characterized in that, The shared pyramid dual attention fusion SPDAF module, dynamic branch adaptive fusion DBAF module, and lightweight context-aware LCAB module are used in collaboration for target detection in complex shipyard operation scenarios to identify and locate typical targets including holes, ladders, safety locks, safety helmets, welding pliers, welding machines, cutting guns, iron buckets, and angle grinders.