Target detection method and system based on improved YOLOv8n algorithm

CN118628891BActive Publication Date: 2024-10-25BEIJING JIAXING FENGXING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411088057.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-10-25
Estimated Expiration
2044-08-09

Smart Images

  • Figure CN118628891B_ABST
    Figure CN118628891B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of electronic digital data processing technology, and in particular to a target detection method and system based on an improved YOLOv8n algorithm. The target detection method comprises the following steps: S10, real-time acquisition of autonomous driving scene images; S20, inputting the acquired images into a target detection model, and outputting a detection result; the target detection model comprises a backbone network unit, a neck network unit and a head network unit, the backbone network unit comprises a convolution to fully connected deformable convolutional network module, the neck network unit comprises a global attention module, and the head network unit comprises a dynamic head module. The target detection system comprises an image acquisition module and a target detection module. The present invention has higher detection accuracy on the basis of ensuring detection speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a target detection method and system based on an improved YOLOv8n algorithm. Background Art

[0002] In recent years, with the changes in market demand and the rapid development of the automotive industry, autonomous driving has become a research hotspot in the automotive field. Object detection is one of the key algorithms of autonomous driving systems. It is a challenge to design an efficient object detection algorithm for object occlusion and small targets in the distance in complex scenes.

[0003] Traditional target detection methods usually rely on HOG or vector machine algorithms, mainly detecting targets through a sliding window mechanism. However, this method is time-consuming and has poor robustness, and is not suitable for large-scale applications. In order to improve the recognition rate, Zha H et al. conducted an in-depth study on the image information of parking vehicles, extracted features manually to train the classifier, and tried to match vehicle features to obtain more accurate recognition results. Algorithms based on deep learning are divided into two-stage target detection and one-stage target detection. The two-stage algorithm first generates target candidate regions, and then extracts features from the target regions through neural networks to achieve classification and positioning. Representative algorithms in this field include Faster-CNN and Fast R-CNN. The advantage of the one-stage target detection algorithm is that it uses regression models to solve positioning problems. Since the YOLO algorithm was proposed by Redmon et al. in 2016, many innovative algorithms have been introduced. The SSD algorithm was proposed by Liu et al. Its principle is to use feature maps of different scales to predict targets of various scales, and introduce prior boxes of various aspect ratios to improve detection accuracy. Yang's team optimized the YOLOv5 algorithm, using the EIOU loss function instead of the original CIOU loss function to accelerate the convergence of regression prediction. In 2022, Wang et al. also proposed the YOLOv7 network, which showed excellent detection accuracy and speed in target detection. However, when the network is applied to autonomous driving scenarios, due to the small size of the targets and mutual occlusion between targets, insufficient feature extraction is prone to occur, resulting in poor detection accuracy. Summary of the invention

[0004] The purpose of the present invention is to provide a target detection method and system based on the improved YOLOv8n algorithm, so as to further improve the detection accuracy while ensuring that the detection speed meets the application requirements.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] The target detection method based on the improved YOLOv8n algorithm includes the following steps:

[0007] S10, real-time collection of autonomous driving scene images;

[0008] S20, inputting the collected image into a target detection model, and outputting a detection result; the target detection model includes a backbone network unit, a neck network unit and a head network unit, the backbone network unit includes a convolution to fully connected-deformable convolution network module, the neck network unit includes a global attention module, and the head network unit includes a dynamic detection head module;

[0009] The convolution to fully connected-deformable convolutional network module includes a Conv module 1, a Split module, n Bottleneck-DCNv2 modules, a Concat module, and a Conv module 2 connected in sequence, each Bottleneck-DCNv2 module is formed by stacking two DCNv2 modules, and n is an integer greater than 1;

[0010] The global attention module includes a channel attention submodule and a spatial attention submodule. 1 After being processed by the global attention module, the output image F is obtained 3 , then:

[0011]

[0012] Denotes the input image F 1 The image obtained after processing by the channel attention submodule, represents the multiplication calculation of the element method, Denotes the input image F 2 The image obtained after processing by the spatial attention submodule;

[0013] The dynamic detection head module is composed of m Dyhead submodules in series, each Dyhead submodule is integrated by a scale attention submodule, a spatial attention submodule and a task attention submodule, and the output of each Dyhead submodule for:

[0014]

[0015] F is the input three-dimensional tensor L×S×C, They represent the task attention acting on the C dimension of the input F, the spatial attention acting on the S dimension of the input F, and the scale attention acting on the L dimension of the input F. Represents a multiplication operation, where m is an integer greater than 1.

[0016] The target detection system based on the improved YOLOv8n algorithm includes:

[0017] Image acquisition module, used to collect images of autonomous driving scenes in real time;

[0018] A target detection module is used to input the collected image into a target detection model and output a detection result; the target detection model includes a backbone network unit, a neck network unit and a head network unit, the backbone network unit includes a convolution to fully connected-deformable convolution network module, the neck network unit includes a global attention module, and the head network unit includes a dynamic detection head module;

[0019] The convolution to fully connected-deformable convolutional network module includes a Conv module 1, a Split module, n Bottleneck-DCNv2 modules, a Concat module, and a Conv module 2 connected in sequence, each Bottleneck-DCNv2 module is formed by stacking two DCNv2 modules, and n is an integer greater than 1;

[0020] The global attention module includes a channel attention submodule and a spatial attention submodule. 1 After being processed by the global attention module, the output image F is obtained 3 , then:

[0021]

[0022] Denotes the input image F 1 The image obtained after processing by the channel attention submodule, represents the multiplication calculation of the element method, Denotes the input image F 2 The image obtained after processing by the spatial attention submodule;

[0023] The dynamic detection head module is composed of m Dyhead submodules in series, each Dyhead submodule is integrated by a scale attention submodule, a spatial attention submodule and a task attention submodule, and the output of each Dyhead submodule for:

[0024]

[0025] F is the input three-dimensional tensor L×S×C, They represent the task attention acting on the C dimension of the input F, the spatial attention acting on the S dimension of the input F, and the scale attention acting on the L dimension of the input F. Represents a multiplication operation, where m is an integer greater than 1.

[0026] Compared with the prior art, the present invention has the following beneficial effects: firstly, the present invention introduces the deformable convolutional network DCNv2 into the backbone network, constructs the C2f-DCNv2 network module, better focuses on the small vehicle targets, and enhances the learning ability of the model; secondly, the global attention GAM module is introduced into the Neck network, so that the feature information on the feature map is more easily highlighted, and the feature extraction ability of the network is enhanced; finally, the detection head is replaced with the dynamic detection head Dynamic Head, which improves the detection performance of the detection head in complex backgrounds. Experimental results show that the mAP value of the improved YOLOv8n algorithm on the KITTI dataset reaches 91.0%, which is 3.7% higher than the traditional YOLOv8n algorithm, and achieves better detection accuracy and effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 Flow chart of the target detection method based on the YOLOv8n improved algorithm in the embodiment.

[0028] Figure 2 This is the structural diagram of the traditional YOLOv8n model.

[0029] Figure 3 : This is a structural diagram of the improved YOLOv8n model in this embodiment.

[0030] Figure 4 2 is a structural diagram of the C2f-DCNv2 network module in the embodiment.

[0031] Figure 5 2 is a structural diagram of the Bottleneck-DCNv2 module in the embodiment.

[0032] Figure 6 4 is a structural diagram of the GAM module in the embodiment.

[0033] Figure 7 Schematic diagram of the Dynamic Head module in the embodiment.

[0034] Figure 8 4 is a structural diagram of the Dyhead submodule in the embodiment.

[0035] Figure 9a , Figure 9b These are the training result graphs for the traditional YOLOv8n algorithm and the improved YOLOv8n algorithm in this paper.

[0036] Fig.10 It is a block diagram of the composition of the target detection system based on the YOLOv8n improved algorithm in the embodiment. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0038] Please refer to Figure 1 , the target detection method based on the improved YOLOv8n algorithm provided in this embodiment includes the following steps:

[0039] S10, real-time collection of autonomous driving scene images.

[0040] This method is mainly proposed for autonomous driving scenarios, where the targets may be pedestrians or vehicles. Of course, since this method is particularly suitable for target occlusion and small targets in the scene, this method can also be applied to other target detection scenarios.

[0041] S20, input the collected image into the target detection model, and output the detection result.

[0042] The target detection model is a network model trained based on the YOLOv8n improved algorithm, including a backbone network unit Backbone, a neck network unit Neck and a head network unit Head, the backbone network unit includes a convolution to fully connected-deformable convolution (C2f-DCNv2) network module, the neck network unit includes a global attention (GAM) module, and the head network unit includes a dynamic detection head (Dynamic Head) module.

[0043] like Figure 2 As shown in the figure, the traditional YOLOv8n model includes the backbone network unit Backbone, the neck network unit Neck and the head network unit Head. The backbone network unit consists of the CBS module, the C2f module and the SPPF module. The CBS module is the convolution Conv, batch normalization and SiLU activation function. This combination can improve the stability of the model, speed up the convergence speed and prevent the gradient from disappearing. The C2f module adds skip layer connections and additional Split operations to make the gradient flow of the model richer. In the SPPF module, feature fusion is performed through pooling and convolution operations, and feature information of various scales is adaptively fused, thereby enhancing the feature extraction capability of the model.

[0044] The Neck part processes the features extracted from the backbone network unit, and uses PAN and FPN to integrate the features more fully through top-down and bottom-to-top cross-layer connections. The Head part uses a decoupled head structure to separate detection from classification, and determines positive and negative samples based on the weighted scores of classification and regression, effectively improving model performance.

[0045] However, in this embodiment, in view of the characteristics of target occlusion and small targets in the autonomous driving scene, relevant improvements are made on the basis of YOLOv8n, and an improved YOLOv8n network model is proposed, the structure of which is as follows: Figure 3 As shown in the figure. Firstly, the deformable convolutional network DCNv2 is introduced into the backbone network unit, and the C2f-DCNv2 network module is constructed to better focus on the small vehicle targets and enhance the learning ability of the model; secondly, the GAM attention mechanism module is introduced into the Neck network to make the feature information on the feature map more easily highlighted and enhance the feature extraction ability of the network; finally, the detection head is replaced with the Dynamic Head to improve the detection performance of the detection head in complex backgrounds.

[0046] See also Figure 3 The backbone network unit Backbone includes an input module, a Conv module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, and an SPPF module, which are connected in sequence.

[0047] The neck network unit Neck includes a first module and a second module, wherein the first module includes an Upsample module, a Contat module, a C2f module, an Upsample module, a Contat module, and a C2f module connected in sequence, and the second module includes a GAM module, a Conv module, a Contat module, a C2f module, a GAM module, a Conv module, a Contat module, a C2f module, and a GAM module connected in sequence. The outputs of the SPPF module and a C2f module in the first module are respectively used as inputs of a Contat module in the second module, and the output of another C2f module in the first module is used as the input of the first GAM module in the second module; the output of the SPPF module is also used as the input of the first Upsample module, and the outputs of the second and fourth C2f-DCNv2 network modules are respectively used as the inputs of the first and second Contat modules in the first module.

[0048] The head network unit Head includes three Dynamic Head modules, and the output of a GAM module serves as the input of a Dynamic Head module.

[0049] like Figure 4 As shown, the C2f-DCNv2 network module includes a Conv module 1, a Split module, n Bottleneck-DCNv2 modules, a Concat module, and a Conv module 2 connected in sequence. The n Bottleneck-DCNv2 modules are connected in sequence, the output of the previous Bottleneck-DCNv2 module is used as the input of the next Bottleneck-DCNv2 module, and the output of the Split module and each Bottleneck-DCNv2 module is used as the input of the Concat module. n is an integer greater than 1.

[0050] like Figure 5 As shown in the figure, each Bottleneck-DCNv2 module is composed of two stacked deformable convolutional network DCNv2 modules. Deformable convolution refers to adding an offset of the sampling position to the standard convolution operation. First, the input feature map is processed according to the usual convolution operation to generate a bias domain with 2N channels. Each pixel in the bias domain corresponds to a code offset information Matrix, then the deformable convolution is based on The value of the matrix controls the offset or deformation of the input feature map at each point, thereby expanding the range of the convolution kernel, realizing deformable convolution operations, and enhancing feature extraction capabilities. Deformable convolution adds an offset to each sampling point on the basis of standard convolution. This embodiment uses deformable convolution DCNv2. DCNv2 adds a weight coefficient on the basis of DCNv1, and calculates the weight of the offset of the sampling point on the convolution input feature map, so that the model can distinguish between relevant and irrelevant information, and reduce the negative impact of irrelevant background content on feature extraction. The calculation formula for the output eigenvalue of DCNv2 is

[0051] ;

[0052] Among them, R={(-1,-1),(-1,0),…,(0,1),(1,1)}, is the sampling point weight, For The convolution kernel weight value of the position, is the feature map to be detected, is the position on the output feature map, is the position element in R, is the offset, For any position in the region, is the introduced weight coefficient.

[0053] This embodiment introduces a global attention mechanism, so that the model can better understand the important information in the image, thereby achieving accurate vehicle and pedestrian detection in a complex background. The GAM global attention mechanism is introduced into the neck of the YOLOv8n model structure, which improves the model performance and the ability to express the characteristics of vehicles and pedestrians by reducing information dispersion and amplifying the interactive features of the global dimension.

[0054] See also Figure 6 The GAM module includes a channel attention submodule and a spatial attention submodule. GAM is given a feature map F 1 , first correct the original feature map through the channel attention submodule to obtain the intermediate state F 2 , and then corrected again by the spatial attention submodule to obtain the final feature map F 3 The intermediate state variable F 2 And the final output F 3 It is expressed as follows:

[0055]

[0056] Denotes the input image F 1 The image obtained after processing by the channel attention submodule, represents the multiplication calculation of the element method, Denotes the input image F 2 The image after processing by the spatial attention submodule.

[0057] like Figure 7 and Figure 8 As shown, in this embodiment, the Dynamic Head module is composed of m Dyhead submodules connected in series, each Dyhead submodule is integrated by a scale attention submodule, a spatial attention submodule and a task attention submodule, and the output of each Dyhead submodule for:

[0058]

[0059] F is the input three-dimensional tensor L×S×C, They represent the task attention acting on the C dimension of the input F, the spatial attention acting on the S dimension of the input F, and the scale attention acting on the L dimension of the input F. Represents a multiplication operation, where m is an integer greater than 1.

[0060] In order to verify the progress of the improved YOLOv8n model, a comparative experiment was conducted. This experiment uses the open source dataset KITTI, which contains real-life scenes such as urban intersections, rural roads, and highways. There are many small targets and target-occluded images in the dataset, which meet the requirements of the experimental scene. The experiment classified and sorted the data in data preprocessing, classified Van, Truck, and Tram into the Car class, classified Person_sitting into the Pedestrian class, retained the Cyclist class, and deleted other class labels. The KITTI dataset contains 7481 2D images. This experiment divides the dataset into training set, test set, and validation set in a ratio of 8:1:1.

[0061] The experimental environment is run on a computer with Windows 11 operating system, Intel i5-13400F processor, 32G memory, and a 16G NVIDIA GeForce RTX 4060ti graphics card to accelerate training. The development tool is PyCharm, the development language is Python 3.7.0, the deep learning framework is Pytorch 1.13.1, and the CUDA version is 11.6. The experimental training parameters are shown in Table 1.

[0062] Table 1: Experimental parameter settings

[0063]

[0064] The experiment will evaluate the performance differences of different models from the following aspects: mean average precision (mAP) and frames per second (FPS) are used as evaluation indicators, and the calculation formula is as follows:

[0065]

[0066] Where AP refers to the average precision of a certain class of targets, m refers to the number of target categories, Num refers to the number of detected images, and Time refers to the detection time.

[0067] With the same number of network layers, different attention mechanisms were introduced, and a comparative test of the mAP@0.5 evaluation index was conducted. The test results are shown in Table 2. As can be seen from Table 2, when the GAM attention mechanism is embedded, the comprehensive performance of the detection target is improved, and the mAP@0.5 value is higher than that of other attention mechanisms. Therefore, YOLOv8n-GAM performs best in terms of effect.

[0068] Table 2: Comparative test results of attention mechanism

[0069]

[0070] In order to verify the effectiveness of the improved algorithm in this paper, the traditional YOLOv8n algorithm and the improved YOLOv8n algorithm in this paper are trained on the KITTI dataset respectively while ensuring that all parameter indicators remain unchanged. The training results are shown as follows: Figure 9a and Figure 9b shown.

[0071] From the comparison of training results, it can be seen that the improved YOLOv8n algorithm in this paper has improved the detection efficiency of each target category, and the mAP has increased from 87.3% to 91.0%, an increase of 3.7 percentage points.

[0072] In order to compare the impact of the changes on the performance one by one, the C2f-DCNv2 module, GAM attention mechanism and Dynamic Head detection head are added to the basic model in turn. The experimental results are shown in Table 3.

[0073] Table 3: Ablation experiment results

[0074]

[0075] Table 3 analyzes the four groups of experiments from the two indicators of mAP and FPS. From the comparison between Group 1 and Group 2, it can be seen that after adding the C2f-DCNv2 module, the mAP increased by 1.8%, and the FPS decreased by 12. After introducing the GAM attention mechanism, it increased by another 1.4%, indicating that the two modules can improve the overall accuracy of the network, but the detection speed of the model is slightly reduced. Compared with Group 3, Group 4 increased mAP by 0.5% to 91.0% after adding Dynamic Head. The above experimental results show that the strategy of the algorithm proposed in this paper can effectively improve the detection accuracy while sacrificing a small part of the detection speed without affecting the real-time performance, proving the rationality of the improvement.

[0076] To further verify the improvement effect and performance advantages, the algorithm is compared with other mainstream Faster R-CNN, SSD, YOLOv4, YOLOv5, YOLOv7, and YOLOv8n. The experiments all use the same training parameters. The experimental results are shown in Table 4. “Ours” in Table 4 is the improved YOLOv8n in this paper.

[0077] It can be seen that SSD is not sensitive to cyclist detection and has low overall accuracy. Faster R-CNN has a slow detection speed and the YOLO series algorithms are not accurate enough. Compared with other mainstream networks, the method proposed in this paper has the highest detection accuracy of 91.0%, which is 3.7% higher than the original network and significantly higher than other algorithms. The detection accuracy of vehicles reaches 97.5%, and the detection speed is relatively high, with an FPS of 105. In general, the improved YOLOv8n algorithm in this paper takes into account both accuracy and detection speed. It has a faster detection speed and higher detection accuracy, which can better cope with pedestrian and vehicle detection tasks.

[0078] Table 4: Comparison results of different models

[0079]

[0080] In order to solve the problem of missed detection caused by target occlusion in autonomous driving scenarios and meet the requirements of high-precision detection, the target detection algorithm proposed in this paper is based on the YOLOv8n network. The C2f-DCNv2 module is built on the backbone network to more effectively extract the feature information of small targets in the image. At the same time, the GAM attention mechanism is added to improve the detection accuracy of the model. Finally, the detection head is replaced with the Dynamic Head to enhance the dynamic learning and expression capabilities of the detection head. The experimental results show that the detection speed of the improved model meets the requirements of autonomous driving detection, and the detection accuracy is increased to 91.0%, which is 3.7% higher than the original network, and the missed detection has been significantly improved.

[0081] See also Fig.10 Based on the same inventive concept, this embodiment also provides a target detection system based on the improved YOLOv8n algorithm, including an image acquisition module and a target detection module, wherein the image acquisition module is used to acquire images containing targets in real time; the target detection module is used to input the acquired images into the target detection model, and output the detection results. The target detection model is the improved YOLOv8n network model described above, which will not be described here.

[0082] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. The target detection method based on the improved YOLOv8n algorithm is characterized by: The following steps are involved: S10, real-time acquisition of autonomous driving scene images; S20, input the collected image into the target detection model, and output the detection result; the target detection model includes a backbone network unit, a neck network unit and a head network unit, the backbone network unit includes an input module, a Conv module, a Conv module, a convolution to fully connected-deformable convolution C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, and an SPPF module connected in sequence, the neck network unit includes a first module and a second module, wherein the first module includes an Upsample module, a Contat module, a C2f module, an Upsample module, a Contat module, C2f module, the second module includes a global attention GAM module, a Conv module, a Contat module, a C2f module, a GAM module, a Conv module, a Contat module, a C2f module, and a GAM module connected in sequence, the output of the SPPF module and a C2f module in the first module are respectively used as inputs of a Contat module in the second module, and the output of another C2f module in the first module is used as the input of the first GAM module in the second module; the output of the SPPF module is also used as the input of the first Upsample module, and the outputs of the second and fourth C2f-DCNv2 network modules are respectively used as the inputs of the first and second Contat modules in the first module, the head network unit includes three dynamic detection head Dynamic Head modules, and the output of a GAM module is used as the input of a Dynamic Head module; The convolution to fully connected-deformable convolutional network module includes a Conv module 1, a Split module, n Bottleneck-DCNv2 modules, a Concat module, and a Conv module 2 connected in sequence. The n Bottleneck-DCNv2 modules are connected in sequence, and the output of the previous Bottleneck-DCNv2 module is used as the input of the next Bottleneck-DCNv2 module. The output of the Split module and each Bottleneck-DCNv2 module is used as the input of the Concat module. Each Bottleneck-DCNv2 module is formed by stacking two DCNv2 modules, and n is an integer greater than 1. The calculation formula of the output eigenvalue of DCNv2 is: ; Among them, R={(-1,-1),(-1,0),…,(0,1),(1,1)}, is the sampling point weight, For The convolution kernel weight value of the position, is the feature map to be detected, is the position on the output feature map, is the position element in R, is the offset, For any position in the region, is the introduced weight coefficient; The global attention module includes a channel attention submodule and a spatial attention submodule. After the input image F1 is processed by the global attention module, the output image F3 is obtained. Then: ; ; represents the image obtained after the input image F1 is processed by the channel attention submodule, represents the multiplication calculation of the element method, represents the image obtained after the input image F2 is processed by the spatial attention submodule; The dynamic detection head module is composed of m Dyhead submodules in series, each Dyhead submodule is integrated by a scale attention submodule, a spatial attention submodule and a task attention submodule, and the output of each Dyhead submodule for: ; F is the input three-dimensional tensor L×S×C, They represent the task attention acting on the C dimension of the input F, the spatial attention acting on the S dimension of the input F, and the scale attention acting on the L dimension of the input F. Represents a multiplication operation, where m is an integer greater than 1.

2. The target detection system based on the improved YOLOv8n algorithm is characterized by: include: Image acquisition module, used to collect images of autonomous driving scenes in real time; The target detection module is used to input the collected image into the target detection model and output the detection result; the target detection model includes a backbone network unit, a neck network unit and a head network unit, the backbone network unit includes an input module, a Conv module, a Conv module, a convolution to fully connected-deformable convolution C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, a Conv module, a C2f-DCNv2 network module, and an SPPF module connected in sequence, the neck network unit includes a first module and a second module, wherein the first module includes an Upsample module, a Contat module, a C2f module, an Upsample module, a Contat module, Module, C2f module, the second module includes a global attention GAM module, a Conv module, a Contat module, a C2f module, a GAM module, a Conv module, a Contat module, a C2f module, and a GAM module connected in sequence, the output of the SPPF module and a C2f module in the first module are respectively used as the input of a Contat module in the second module, and the output of another C2f module in the first module is used as the input of the first GAM module in the second module; the output of the SPPF module is also used as the input of the first Upsample module, and the output of the second and fourth C2f-DCNv2 network modules are respectively used as the input of the first and second Contat modules in the first module, the head network unit includes three dynamic detection head Dynamic Head modules, and the output of a GAM module is used as the input of a Dynamic Head module; The convolution to fully connected-deformable convolutional network module includes a Conv module 1, a Split module, n Bottleneck-DCNv2 modules, a Concat module, and a Conv module 2 connected in sequence. The n Bottleneck-DCNv2 modules are connected in sequence, and the output of the previous Bottleneck-DCNv2 module is used as the input of the next Bottleneck-DCNv2 module. The output of the Split module and each Bottleneck-DCNv2 module is used as the input of the Concat module. Each Bottleneck-DCNv2 module is formed by stacking two DCNv2 modules, and n is an integer greater than 1. The calculation formula of the output eigenvalue of DCNv2 is: ; Among them, R={(-1,-1),(-1,0),…,(0,1),(1,1)}, is the sampling point weight, For The convolution kernel weight value of the position, is the feature map to be detected, is the position on the output feature map, is the position element in R, is the offset, For any position in the region, is the introduced weight coefficient; The global attention module includes a channel attention submodule and a spatial attention submodule. After the input image F1 is processed by the global attention module, the output image F3 is obtained. Then: ; ; represents the image obtained after the input image F1 is processed by the channel attention submodule, represents the multiplication calculation of the element method, represents the image obtained after the input image F2 is processed by the spatial attention submodule; The dynamic detection head module is composed of m Dyhead submodules in series, each Dyhead submodule is integrated by a scale attention submodule, a spatial attention submodule and a task attention submodule, and the output of each Dyhead submodule for: ; F is the input three-dimensional tensor L×S×C, They represent the task attention acting on the C dimension of the input F, the spatial attention acting on the S dimension of the input F, and the scale attention acting on the L dimension of the input F. Represents a multiplication operation, where m is an integer greater than 1.