Target detection method and system based on novel feature pyramid network
By introducing a deep attention mechanism and multi-scale feature fusion module into the feature pyramid network, the problems of missed and misdetection in dense and small object detection are solved, achieving higher detection accuracy and robustness, while maintaining fast detection speed.
Patent Information
- Application Number
- CN202311218744.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-03-21
AI Technical Summary
The traditional feature pyramid network has missed and misdetection problems in dense target and small target detection, and cannot fully retain the semantic information of small targets, and the network receptive field is small, making it difficult to effectively deal with dense targets.
A target detection method based on a new type of feature pyramid network is designed. By inserting a deep attention mechanism module and a multi-scale feature fusion module into the feature pyramid network, the feature map propagation and reuse are enhanced, and the semantic information of the target and shallow feature map information in the background are fully utilized.
It significantly improves the accuracy and robustness of target detection, especially in small target and intensive target detection, reducing missed detection and missed detection, while maintaining a faster inference speed.
Smart Images

Figure CN119672285A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a target detection method and system based on a novel feature pyramid network. Background Art
[0002] Object detection technology based on deep learning has become one of the indispensable technologies in the field of computer vision. It has a stronger ability to learn image feature maps and can significantly improve detection accuracy. In the application field of object detection technology, it is widely used in autonomous driving, traffic monitoring, and security monitoring. Although object detection technology based on deep learning has achieved remarkable results in the detection of large and medium-sized targets, there are still some challenges in the detection of dense targets, such as missed detection and false detection. Therefore, the algorithms for dense target detection and small targets still need to be further improved.
[0003] At present, target detection algorithms based on deep learning can be divided into two types: One-stage and Two-stage. Among them, the One-stage algorithms include the YOLO series, SSD, etc., which have the advantage of fast detection speed and meet the requirements of real-time detection. The Two-stage algorithms include RCNN, Fast-RCNN, etc., which have the advantage of high detection accuracy, but relatively slow detection speed. The detection method based on deep learning can learn the deep feature map of the image more deeply, and the computational overhead is relatively small, which can achieve higher recognition accuracy. Among these two algorithms, feature pyramid (FPN) is an effective multi-scale feature fusion method and is widely used in the field of target detection, which improves the detection accuracy and speed (Redmon J, Divvala S, Girshick R, et al. You only look once: Unified, real-time object detection [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2016: 779-788.).
[0004] However, traditional FPN has some problems. For example, it cannot fully retain the semantic information of small objects, and the network receptive field is small, which cannot handle the detection of dense objects well. Therefore, improving the design and structure of FPN to achieve better detection results is still an important research topic in this field. Summary of the invention
[0005] In view of the problems of the prior art, the present invention provides a target detection method and system based on a novel feature pyramid network, aiming to improve the design and structure of FPN to achieve a target detection method and system with better detection performance.
[0006] A target detection method based on a novel feature pyramid network adopts a deep learning network to achieve the target detection task. The deep learning network adopts a feature pyramid network to achieve feature extraction and fusion, and a deep attention mechanism module is inserted into the feature pyramid network.
[0007] Preferably, a multi-scale feature fusion module and a deep attention mechanism are also inserted into the feature pyramid network.
[0008] Preferably, the feature pyramid network includes:
[0009] Input the image into the backbone feature extraction network to obtain the shallow feature map C1, the second high-level feature map C2, and the highest-level feature map C3;
[0010] After the shallow feature map C1 and the second high-level feature map C2, a deep attention mechanism module is used to more accurately locate and identify the region of interest;
[0011] The highest-level feature map C3 uses a multi-scale feature fusion module to achieve the fusion of context information and obtain a high-level feature map M4;
[0012] The highest-level feature map C3 undergoes global average pooling, convolution, and upsampling operations to obtain a high-level feature map M3;
[0013] M4 and M3 are concatenated, and the concatenated feature map is resized to the same size as the highest-level feature map C3 through convolution.
[0014] Preferably, the deep attention mechanism module comprises the following steps:
[0015] Step 1: For the feature map x of size C×H×W, global average pooling is performed in the width and height directions to generate feature maps z of size C×H×1 and C×1×W respectively. h and z w , the feature map z h and z w The outputs at channel c are:
[0016]
[0017]
[0018] Among them, x cis the output of feature map x at channel c, h, w are superscripts, i is the i-th component in channel c, and j is the j-th component in channel c;
[0019] Step 2: Perform the following two processing on the feature maps of C×H×1 and C×1×W:
[0020] (1) Repeat operations are performed along the height and width directions to generate feature maps z with sizes of C×H×W and C×H×W respectively. h and z w , perform Add operation on the obtained feature map, where and Represents the output at channel c:
[0021]
[0022]
[0023] y=Z h +Z w (5)
[0024] The feature map y is obtained, and the dimension is reduced by a convolution with a size of 1×1, and a nonlinear operation is performed through normalization and the h_swish activation function:
[0025] f=δ(F1(y)) (6)
[0026] Among them, F1() is a learnable linear change function, and δ() is the h_swish activation function;
[0027] Get the feature map f∈R C / r×H×W , the size is C / r×H×W, where r is the compression factor;
[0028] Then use a convolution with a size of 1×1 to increase the dimension and activate it with the sigmoid function to obtain the feature map g∈R C ×H×W :
[0029] g = δ(F2(f)) (7);
[0030] Among them, F2() is a learnable linear change function;
[0031] (2) and The two feature maps are concat together, and the dimension is reduced using a 1×1 convolution, and nonlinear operations are performed through normalization and the h_swish activation function:
[0032]
[0033] Generate feature map m∈R C / r×(H+W)×1 , then perform the split operation to divide into m1∈R C / r×H×1 and m2∈R C / r×1×W , use a convolution with a size of 1×1 to increase the dimension, and use the Sigmiod activation function to activate the attention vector n1∈R C / r×H×1 and n2∈R C / r×1×W :
[0034] n1=δ(F h (m1)) (9)
[0035] n2=δ(F h (m2)) (10)
[0036] Among them, F h () is a 1×1 convolution transformation;
[0037] Then the initial feature map x is concatenated after maximum pooling and average pooling, and the final output feature map h is obtained through the sigmoid activation function;
[0038] Step 3: The output formula of the deep attention mechanism module is as follows:
[0039] out = h × n1 × g × n2 (11).
[0040] Preferably, the feature pyramid network further includes:
[0041] A multi-scale feature fusion module is inserted into the top-level feature map, and the multi-scale feature map is extracted from the highest-level feature map C3 and then fused to obtain the high-level feature map M4.
[0042] Preferably, the multi-scale feature fusion module comprises the following steps:
[0043] Step I: for the feature map P0 with an input size of C×H×W, four feature maps P1, P2, P3, and P4 with a size of C×H×W are obtained by convolution with dilation rates r=1, 6, 12, and 18 respectively;
[0044] Step II, concatenate the feature maps P1 and P2 of size C×H×W to obtain a feature map T1 of size 2C×H×W; then concatenate T1 and P3 to obtain a feature map T2 of size 3C×H×W; concatenate T2 and P4 to obtain a feature map T3 of size 4C×H×W;
[0045] In step III, the feature map T3 is subjected to 1×1 convolution dimension reduction, normalization, and ReLU function activation in sequence to obtain the final output feature map T4.
[0046] Preferably, the algorithm of the target detector in the deep learning network is YOLO, Faster RCNN or SSD.
[0047] Preferably, the algorithm of the target detector in the deep learning network is YOLOv7.
[0048] The present invention also provides a target detection system based on a novel feature pyramid network, comprising:
[0049] An input module, used for inputting an image to be detected;
[0050] A detection module, used to perform target detection according to the above target detection method;
[0051] The output module is used to output the results of target detection.
[0052] The present invention also provides a computer-readable storage medium storing a computer program for implementing the above-mentioned target detection method or the above-mentioned target detection system.
[0053] The present invention aims at the problem that small targets lose semantic information during downsampling and the information of the highest-level feature map of the pyramid is not fully utilized in target detection, and proposes a plug-and-play multi-scale feature pyramid network (DM_FPN) guided by a deep attention mechanism to improve the accuracy of target detection. The deep attention mechanism module designed by the present invention can enhance the propagation and reuse of feature maps, thereby making full use of the semantic information of the target, fully combining the shallow feature map information in the background, and improving the detection effect of small targets. In the preferred embodiment, the present invention also designs a new multi-scale feature fusion module, which increases the receptive field by introducing a hole convolution with different hole rates, and enables the network to accept inputs of any scale, so that the detector can better detect targets of different scales. The feature pyramid network of the present invention can overcome the defects of traditional pyramids and improve the accuracy and robustness of target detection. In addition, in order to be more suitable for industrial applications, the present invention takes into account both speed and accuracy. Compared with traditional one-stage target detection methods, such as Faster RCNN, the method of the present invention has a faster reasoning speed while maintaining similar accuracy. On the other hand, the present invention is plug-and-play and very convenient, because it allows users to simply integrate the module of the present invention into the existing detector without changing the original target detector structure, thereby improving the performance of the detector. In addition, this modular design also makes the present invention more versatile and can be applied to a variety of target detection scenarios and application fields. This brings huge advantages to practical applications.
[0054] Obviously, according to the above contents of the present invention, in accordance with common technical knowledge and customary means in the art, without departing from the above basic technical ideas of the present invention, other various forms of modification, replacement or change may be made.
[0055] The above contents of the present invention are further described in detail below through specific implementation methods in the form of embodiments. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following examples. All technologies realized based on the above contents of the present invention belong to the scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is an algorithm flow chart of the deep learning network in Example 1;
[0057] Figure 2 It is a structural diagram of the deep attention mechanism module in Example 1;
[0058] Figure 3 This is a comparison chart of complex and dense scene detection in Experimental Example 2;
[0059] Figure 4 It is a comparison chart of the number of FP and TP in Experimental Example 2;
[0060] Figure 5 This is the thermal comparison diagram in Experimental Example 2. DETAILED DESCRIPTION
[0061] It should be noted that the algorithms of data collection, transmission, storage and processing steps not specifically described in the embodiments, as well as the hardware structure, circuit connection, etc. not specifically described can all be implemented through the contents disclosed in the prior art.
[0062] Example 1 Target detection method based on a novel feature pyramid network
[0063] This embodiment uses a deep learning network to achieve the task of target detection. The algorithm flow chart is as follows: Figure 1 As shown in Figure 2, this algorithm designs a multi-scale feature pyramid algorithm guided by deep attention from two aspects: attention mechanism and multi-scale feature fusion.
[0064] Specifically:
[0065] First, the image is input into the backbone feature extraction network to obtain the shallow feature map C1, the second high-level feature map C2, and the highest-level feature map C3.
[0066] Secondly, in order to retain more contextual information during the downsampling process, a deep attention mechanism (GDA) module is designed, which enhances feature map propagation and encourages feature map reuse. It focuses on both the channel information and the spatial information of the image. It is placed after the shallow feature map C1 and the second high-level feature map C2, which helps the model locate and identify the region of interest more accurately.
[0067] Then, in order to mine more contextual information of the target from the high-level semantic feature map, a multi-scale feature fusion module (MDCF) is inserted into the top-level feature map, and the multi-scale receptive field feature map is extracted from the highest-level feature map C3. By introducing multi-scale dilated convolution, feature maps of different resolutions are spliced layer by layer to realize the fusion of contextual information and obtain the high-level feature map M4.
[0068] At the same time, a new branch is designed, which undergoes global average pooling, convolution and upsampling operations to obtain a high-level feature map M3. M4 and M3 are concatenated, and the concatenated feature map is resized to the same size as the highest-level feature map C3 through convolution. The feature map is upsampled to obtain feature map M2, and the upsampling operation is continued to obtain feature map M1.
[0069] Finally, multi-scale feature maps M1, M2 and M3 are used to achieve classification and regression of objects of different scales.
[0070] The attention mechanism in computer vision is essentially to locate the information of interest and suppress useless information. It allows focusing on a part of the image instead of seeing the entire area. This paper combines the advantages of both the channel attention mechanism and the spatial attention mechanism, and designs a new deep attention mechanism (GDA) module to enhance the network's attention to the target. GDA is a convolutional attention mechanism with a multi-branch stacked structure. This module can be extended to any layer without adding new parameters, such as Figure 2 shown.
[0071] In order to avoid compressing all spatial information into the channel, GDA does not use global average pooling, but decomposes the global average pooling operation, which is conducive to obtaining long-term dependencies along a spatial direction, thereby obtaining more accurate spatial position information.
[0072] The specific process of GDA is as follows:
[0073] Step 1: For the feature map x of size C×H×W, global average pooling is performed in the width and height directions to generate feature maps z of size C×H×1 and C×1×W respectively. h and z w , the outputs at channel c are:
[0074]
[0075]
[0076] Among them, x c is the output of feature map x at channel c, h, w are superscripts, i is the i-th component in channel c, and j is the j-th component in channel c;
[0077] Step 2: Perform the following two processing on the feature maps of C×H×1 and C×1×W:
[0078] (1) Repeat operations are performed along the height and width directions to generate feature maps z with sizes of C×H×W and C×H×W respectively. h and z w , perform Add operation on the obtained feature map, where and Represents the output at channel c:
[0079]
[0080]
[0081] y=Z h +Z w (5)
[0082] The feature map y is obtained, and the dimension is reduced by a convolution with a size of 1×1, and a nonlinear operation is performed through normalization and the h_swish activation function:
[0083] f=δ(F1(y)) (6)
[0084] Among them, F1() is a learnable linear change function, and δ() is the h_swish activation function;
[0085] Get the feature map f∈R C / r×H×W , the size is C / r×H×W, where r is the compression factor;
[0086] Then use a convolution with a size of 1×1 to increase the dimension and activate it with the sigmoid function to obtain the feature map g∈R C ×H×W :
[0087] g = δ(F2(f)) (7);
[0088] Among them, F2() is a learnable linear change function;
[0089] (2) Concat the two feature maps together, use a 1×1 convolution to reduce the dimension, and perform nonlinear operations through normalization and h_swish activation function:
[0090]
[0091] Generate feature map m∈R C / r×(H+W)×1 , then perform the split operation to divide into m1∈R C / r×H×1 and m2∈R C / r×1×W , use a convolution with a size of 1×1 to increase the dimension, and use the Sigmiod activation function to activate the attention vector n1∈R C / r×H×1 and n2∈R C / r×1×W :
[0092] n1=δ(F h (m1)) (9)
[0093] n2=δ(F h (m2)) (10)
[0094] Among them, F h () is a 1×1 convolution transformation;
[0095] Then the initial feature map x is concatenated after maximum pooling and average pooling, and the final output feature map h is obtained through the sigmoid activation function;
[0096] Step 3: The output formula of the deep attention mechanism module is as follows:
[0097] out = h × n1 × g × n2 (11).
[0098] In order to make full use of the feature map of the highest layer of FPN feature map, pooling operation is often used. Pooling layer is an important part of target detection algorithm. Its function is to increase the receptive field. Through the maximum pooling operation, the algorithm can adapt to pictures of different resolutions. However, existing studies have pointed out that the maximum pooling operation will cause the picture to lose a certain resolution, thereby reducing the detection accuracy of small targets. In order to improve this defect, this embodiment introduces dilated convolution to design a multi-scale feature fusion (MDCF) module, which consists of a series of dilated convolutions with different dilated rates and adopts a multi-branch feature pyramid splicing structure. The advantage of dilated convolution is that it increases the receptive field of the picture without pooling and captures multi-scale context information. If the parallel dilated convolution expansion rate is set improperly, the dilated convolution will produce a chessboard effect that causes local information to be lost. In order to make up for this defect, the MDCF module uses the idea of feature map layering to splice the outputs of dilated convolutions with different dilated rates layer by layer, thus making up for the chessboard effect caused by the holes.
[0099] The MDCF module design structure is as follows Figure 1 (b), the specific process is as follows:
[0100] Step I: for the feature map P0 with an input size of C×H×W, four feature maps P1, P2, P3, and P4 with a size of C×H×W are obtained by convolution with dilation rates r=1, 6, 12, and 18 respectively;
[0101] Step II, concatenate the feature maps P1 and P2 of size C×H×W to obtain a feature map T1 of size 2C×H×W; then concatenate T1 and P3 to obtain a feature map T2 of size 3C×H×W; concatenate T2 and P4 to obtain a feature map T3 of size 4C×H×W;
[0102] In step III, the feature map T3 is subjected to 1×1 convolution dimension reduction, normalization, and ReLU function activation in sequence to obtain the final output feature map T4.
[0103] In the target detection method based on the novel feature pyramid network, the highest-level feature map C3 is subjected to the multi-scale feature fusion MDCF module to realize the fusion of context information and obtain the high-level feature map M4. At this time, the output feature map T4 represents the high-level feature map M4.
[0104] Example 2 Object Detection System Based on Novel Feature Pyramid Network
[0105] The system of this embodiment includes:
[0106] An input module, used for inputting an image to be detected;
[0107] A detection module, used to perform target detection according to the target detection method of Example 1;
[0108] The output module is used to output the results of target detection.
[0109] The technical solution of the present invention is further illustrated by experiments below.
[0110] Experimental Example 1: Optimization of Deep Learning Network Algorithm
[0111] 1. Experimental Methods
[0112] This experimental example examines the target detection performance when the target detection method of Example 1 uses different target detector algorithms.
[0113] The experiment mainly selects precision, recall, mean average precision (mAP) and other indicators as the evaluation criteria of experimental performance. The calculation formulas of each indicator are as follows:
[0114]
[0115]
[0116]
[0117]
[0118] Among them, P represents precision, R represents recall, TP represents the number of positive examples correctly identified as positive examples, FP represents the number of negative examples mistakenly identified as positive examples, and FN represents the number of positive examples mistakenly identified as negative examples. AP can be understood as the area enclosed by the PR curve drawn with different precision and recall rates and the horizontal and vertical axes. mAP represents the average of AP of all categories.
[0119] 2. Experimental Results
[0120] The experimental results are shown in Table 1. The improved YOLOv7 model achieves 81.6% mAP on the PASCAL VOC2007 test set, which is 14.9%, 14.2%, 12.4%, and 4.3% higher than YOLOV7_tiny, SSD, YOLOv5s, and YOLOv3, respectively, and 3% lower than Faster RCNN. The YOLOV7+DM_FPN model has a significantly faster image reasoning speed than Faster RCNN when the accuracy gap is not large. Table 2 shows the detailed results of the proposed method, including recall, precision, mAP@0.5, mAP@0.5:0.75, and frames per second (FPS). mAP corresponds to the average value of the maximum precision under different recall values. In order to ensure fairness, all methods are performed on the PASCAL VOC2007 test set. Except for a slight decrease in the number of frames per second (FPS), all indicators are significantly improved compared with the original model YOLOv7.
[0121] Table 1: Comparison between the improved model and the mainstream model in Example 1
[0122]
[0123]
[0124] Table 2: Specific performance values of the improved model in Example 1 and the YOLOV7 model
[0125]
[0126] From the above experimental results, we can see that the DM_FPN of the present invention can indeed effectively improve the performance of target detection.
[0127] Experimental Example 2 Comparison of different improvement methods
[0128] 1. Experimental Methods
[0129] This experimental example examines the target detection performance when the target detection method of Example 1 uses different target detector algorithms.
[0130] The four control experimental groups were as follows:
[0131] 1. YOLOv7: Unmodified YOLOv7 model, including FPN module;
[0132] 2. +GDA: Insert the GDA module into the YOLOv7 model;
[0133] 3. +MDCF: Insert the MDCF module into the YOLOv7 model;
[0134] 4. +DM_FPN: insert DM_FPN into the YOLOv7 model, i.e., the method described in Example 1.
[0135] 2. Experimental Results
[0136] In order to fully verify the effectiveness of introducing the GDA attention mechanism module and the MDCF module, as well as the improvement of the DM_FPN algorithm on the original model, this paper sets up an ablation experiment to evaluate the improvement of different modules on the YOLOv7 algorithm under the same experimental conditions, as shown in Table 3.
[0137] Table 3: Improvements of YOLOv7 algorithm by different modules
[0138]
[0139]
[0140] In order to verify the effect of DM_FPN model on small and complex target detection compared with YOLOv7 (including FPN), this experiment selected the same pictures containing dense small targets and complex scenes to conduct comparative experiments on the two models. Figure 3 As shown, the results show that in complex scenes and small target scenes with dense detection targets and mutual occlusion, the recognition accuracy of the DM_FPN model is significantly improved. In contrast, YOLOv7 often has false detections and missed detections, while the number of missed detections and false detections of the DM_FPN model is significantly less than the original algorithm. This shows that DM_FPN can extract richer semantic information, thereby improving the detection accuracy, especially in the detection of small targets. In order to further verify the effectiveness of the algorithm, this experimental example also tested YOLOv7 and the YOLOv7 model with DM_FPN inserted on the PASCAL VOC2007 test set, and compared the number of misclassifications (FP) and correct classifications (TP) of 20 categories of targets. Figure 4As shown in the figure, the results show that the YOLOv7 model with DM_FPN inserted has improved the recognition rate and effect of small and dense targets. In addition, this paper also visualizes the network training heat map, showing the changes of the network after adding the GDA attention mechanism in a more intuitive way. Figure 5 This is a thermal comparison diagram of the YOLOv7 model after adding the GDA module and the original model. The results show that after adding the GDA module, the model captures the target position information more accurately and pays more attention to the target.
[0141] It can be seen from the above experimental results that after inserting DM_FPN into the YOLOv7 model, the present invention has the best improvement on the model performance.
[0142] It can be seen from the above embodiments and experimental examples that the present invention improves the design and structure of FPN for target detection tasks, and can significantly improve the target detection performance of the model by inserting GDA and MDCF. Therefore, the present invention has a good application prospect.
Claims
1. A target detection method based on a novel feature pyramid network, characterized in that: A deep learning network is used to implement the target detection task. The deep learning network uses a feature pyramid network to implement feature extraction and fusion. A deep attention mechanism module is inserted into the feature pyramid network.
2. The target detection method according to claim 1, characterized in that: A multi-scale feature fusion module and a deep attention mechanism are also inserted into the feature pyramid network.
3. The target detection method according to claim 1, characterized in that: The feature pyramid network includes: Input the image into the backbone feature extraction network to obtain the shallow feature map C1, the second high-level feature map C2, and the highest-level feature map C3; After the shallow feature map C1 and the second high-level feature map C2, a deep attention mechanism module is used to more accurately locate and identify the region of interest; The highest-level feature map C3 uses a multi-scale feature fusion module to achieve the fusion of context information and obtain a high-level feature map M4; The highest-level feature map C3 undergoes global average pooling, convolution, and upsampling operations to obtain a high-level feature map M3; M4 and M3 are concatenated, and the concatenated feature map is resized to the same size as the highest-level feature map C3 through convolution.
4. The target detection method according to claim 3, characterized in that: The deep attention mechanism module includes the following steps: Step 1: For the feature map x of size C×H×W, global average pooling is performed in the width and height directions to generate feature maps z of size C×H×1 and C×1×W respectively. h and z w , the feature map z h and z w The outputs at channel c are: Among them, x c is the output of feature map x at channel c, h, w are superscripts, i is the i-th component in channel c, and j is the j-th component in channel c; Step 2: Perform the following two processing on the feature maps of C×H×1 and C×1×W: (1) Repeat operations are performed along the height and width directions to generate feature maps z with sizes of C×H×W and C×H×W respectively. h and z w , perform Add operation on the obtained feature map, where and Represents the output at channel c: y=Z h +Z w ⑸ The feature map y is obtained, and the dimension is reduced by a convolution with a size of 1×1, and a nonlinear operation is performed through normalization and the h_swish activation function: f=δ(F1(y)) ⑹ Among them, F1() is a learnable linear change function, and δ() is the h_swish activation function; Get the feature map f∈R C / r×H×W , the size is C / r×H×W, where r is the compression factor; Then use a convolution with a size of 1×1 to increase the dimension and activate it with the sigmoid function to obtain the feature map g∈R C×H×W : g=δ(F2(f))⑺; Among them, F2() is a learnable linear change function; (2) and The two feature maps are concat together, and the dimension is reduced using a 1×1 convolution, and nonlinear operations are performed through normalization and the h_swish activation function: Generate feature map m∈R C / r×(H+W)×1 , then perform the split operation to divide into m1∈R C / r×H×1 and m2∈R C / r×1×W , use a convolution with a size of 1×1 to increase the dimension, and use the Sigmiod activation function to activate the attention vector n1∈R C / r×H×1 and n2∈R C / r×1×W : n1=δ(F h (m1)) ⑼ n2=δ(F h (m2)) ⑽ Among them, F h () is a 1×1 convolution transformation; Then the initial feature map x is concatenated after maximum pooling and average pooling, and the final output feature map h is obtained through the sigmoid activation function; Step 3: The output formula of the deep attention mechanism module is as follows: out=h×n1×g×n2⑾.
5. The target detection method according to claim 3, characterized in that: The feature pyramid network also includes: A multi-scale feature fusion module is inserted into the top-level feature map, and the multi-scale feature map is extracted from the highest-level feature map C3 and then fused to obtain the high-level feature map M4.
6. The target detection method according to claim 5, characterized in that: The multi-scale feature fusion module includes the following steps: Step I: for the feature map P0 with an input size of C×H×W, four feature maps P1, P2, P3, and P4 with a size of C×H×W are obtained by convolution with dilation rates r=1, 6, 12, and 18 respectively; Step II, concatenate the feature maps P1 and P2 of size C×H×W to obtain a feature map T1 of size 2C×H×W; then concatenate T1 and P3 to obtain a feature map T2 of size 3C×H×W; concatenate T2 and P4 to obtain a feature map T3 of size 4C×H×W; In step III, the feature map T3 is subjected to 1×1 convolution dimension reduction, normalization, and ReLU function activation in sequence to obtain the final output feature map T4.
7. The target detection method according to any one of claims 1 to 6, characterized in that: The algorithm of the target detector in the deep learning network is YOLO, Faster RCNN or SSD.
8. The target detection method according to claim 7, characterized in that: The algorithm of the target detector in the deep learning network is YOLOv7.
9. A target detection system based on a novel feature pyramid network, characterized in that: include: An input module, used for inputting an image to be detected; A detection module, used to perform target detection according to the target detection method according to any one of claims 1 to 8; The output module is used to output the results of target detection.
10. A computer-readable storage medium, characterized in that: A computer program for implementing the target detection method described in any one of claims 1 to 8, or for implementing the target detection system described in claim 8 is stored thereon.