Small target detection method based on APAN-YOLOv8 network structure

By increasing the number of upsampling and removing the depth feature header in the YOLOv8 network, combined with the APAN-YOLOv8 structure and the ASPP-improved Neck, the performance deficiency of YOLOv8 in small target detection is solved, and the small target detection capability is significantly improved, achieving More efficient feature extraction.

CN118587410APending Publication Date: 2024-09-03浪潮智能终端有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410130548.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

There are huge challenges in the performance of the YOLOv8 model in small target detection, mainly because its Backbone network has poor processing capabilities for low-information data and is difficult to extract shallow features that are beneficial to small target detection.

Method used

Add an upsampling number to the standard YOLOv8 network structure, and remove the deep feature detection header that is not conducive to small target detection. The APAN-YOLOv8 network structure is adopted, and through additional upsampling layers and the ASPP-improved Neck structure, the low information Extract more influential features from quantitative data.

Benefits of technology

It significantly improves the ability to detect small targets, fully integrates the location and detailed information of shallow features, enhances the classification and regression feature extraction capabilities of small targets, and avoids the problem of detail information loss and information continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587410A
    Figure CN118587410A
Patent Text Reader

Abstract

The invention discloses a small target detection method based on an APAN-YOLOv8 network structure, and belongs to the field of target detection. According to the method, the number of times of up-sampling is expanded once on a standard YOLOv8 network structure so as to obtain more shallow layer features beneficial to small target detection, meanwhile, a depth feature Deect head not beneficial to small target detection is removed, and the transformed network structure is APAN-YOLOv8; according to the method, a Receptive Filed Based thought and an ASPP improved Neck structure APAN are used for reference, and features with higher influence and recognition degree are extracted from low-information-amount data as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection, and in particular to a small target detection method based on an APAN-YOLOv8 network structure. Background Art

[0002] Object detection technology has been widely used in various industries and fields, such as rapid detection and identification of targets in autonomous vehicle systems, detection and classification of crops, pests and diseases in agriculture, and facial detection in biometrics, etc., and has great production and use value. In the past 20 years, object detection technology has developed rapidly, and a large number of technical methods have emerged, including SlidingWindows, R-CNN, Fast R-CNN, FasterR-CNN, which are classified as two-stage object detection, and YOLO series and SSD, which are classified as one-stage object detection, as well as optimized and improved models based on the above basic methods.

[0003] Currently, the YOLOv8 model occupies a dominant position in target detection tasks. Its near-perfect balance between model speed and accuracy has attracted widespread attention in the industry. Although the YOLOv8 model has achieved remarkable success, its performance in small target detection (objects with a pixel area less than 32*32 pixels) is still a huge challenge. Although some practitioners have recently introduced Swin-Transformer to replace its Backbone network for efficient feature extraction, which has slightly improved its ability in small target detection tasks, its AP in large target detection is still 1.7 times that of small target detection, and there is still much room for improvement.

[0004] The difficulty in detecting small targets mainly comes from the fact that the 32*32 pixel area of ​​a small target is difficult to provide more informative features. The Neck network designed by YOLOv8 for secondary feature extraction and fusion has poor ability to process low-information data. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a small target detection method based on the APAN-YOLOv8 network structure, expand the number of upsampling times on the standard YOLOv8 network structure to obtain more shallow features that are beneficial to small target detection, and remove the deep feature Detect head that is not conducive to small target detection, so as to extract more influential and recognizable features from low-information data as much as possible.

[0006] In order to solve the technical problem, the technical solution adopted by the present invention is: a small target detection method based on the APAN-YOLOv8 network structure, comprising the following steps: S01), collect real-time monitoring images of the area to be detected, input the real-time monitoring images into the Backbone part of the APAN-YOLOv8 network, and the Backbone part extracts features from the real-time monitoring images; S02), the Neck part of the APAN-YOLOv8 network discards its 21st layer and adds an additional upsampling layer. The image after feature extraction is first repeated twice by deconvolution upsampling and fused with the shallow features of the corresponding scale as the first unidirectional FPN. Specifically, the 10th layer is fused with the 6th layer, and the 13th layer is fused with the 4th layer. The fused result is input into the additional upsampling layer to obtain the upsampling result and fused with the feature map containing position and detail information of the 2nd layer, and then brought into the C2f2 module of the 18th layer for feature map scale transformation. The result of the 18th layer is input into the CBL module of the 19th layer for dimensionality reduction and then fused with the feature map of the 15th layer. The fusion result is brought into the C2f2 module of the 21st layer for feature map scale transformation. The result of the 21st layer is input into the CBL module of the 22nd layer for dimensionality reduction and then fused with the feature map of the 12th layer. The fusion result is brought into the C2f2 module of the 24th layer for feature map scale transformation; S03) Detection is performed on the feature maps of three scales at the 18th, 21st, and 24th layers to achieve decoupling of target positioning and classification.

[0007] Furthermore, the additional upsampling layers are layers 15, 16, and 17 added after layer 14, layer 15 is a C2f2 module, layer 16 is an upsampling module, and layer 17 is a fusion module.

[0008] Furthermore, the detector of the 18th layer is modified by introducing ASPP to retain as much detail information as possible while expanding the receptive field. The modified detector includes two parallel groups, each of which includes an ABL layer, a CBL layer, and a convolutional layer. The ABL layer includes an ASPP layer, a BN layer, and an activation layer. The process of expanding the receptive field is as follows: S21), input feature map After the first 1×1 convolutional ASPP convolutional layer, we get ; S22), input feature map After a pooling pyramid consisting of three 3×3 dilated convolutions with dilation factors of 6, 12, and 18, we get , , , whose value range is ; S23) Input feature map After the ASPP pooling layer consisting of an adaptive pooling layer, a 1×1 convolution layer and an upsampling layer, ; S24) , , , , By channel concatenation , and bring it into 1×1 convolution for dimensionality reduction to get ; S25) Bring it into the CBL module to get the final output result , where the number of channels n is set according to the specific task.

[0009] Furthermore, for the MS-COCO dataset target detection task classification branch channel number , the number of regression branch channels ,in Indicates the number of categories for the classification task, is a hyperparameter.

[0010] Furthermore, the C2f module of the 18th layer outputs a feature map with a scale of 4. For small targets in the 32*32 pixel area, the representation features are 8*8 feature areas. The c2f module of the 21st layer outputs a feature map with a scale of 8. For small targets in the 32*32 pixel area, the representation features are 4*4 feature areas. The c2f module of the 24th layer outputs a feature map with a scale of 16. For small targets in the 32*32 pixel area, the representation features are 2*2 feature areas.

[0011] The beneficial effects of the present invention are as follows: the present invention expands the number of upsampling times on the standard YOLOv8 network structure to obtain more shallow features that are beneficial to small target detection, and removes the deep feature Detect head that is not conducive to small target detection. The modified network structure is APAN-YOLOv8; the Neck structure APAN (path aggregation network based on void space convolution) improved by the Receptive Filed Based idea and ASPP is used to extract more influential and recognizable features from low-information data as much as possible.

[0012] The modified APAN-YOLOv8 network structure of the present invention can fully integrate the position and detail information of shallow features and deep semantic information, extract more features that are beneficial to classification and regression for small targets, and significantly improve the detection capability of small targets.

[0013] The APAN feature extraction module fully considers the contribution of the surrounding information of small targets to distinguishing them, and the structure realizes the effective discrimination of the shallowest features, while avoiding the problems of detail information loss and loss information continuity. It is an effective collaborative module of APAN-YOLOv8. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a schematic diagram of the structure of the existing YOLOv8 network; Figure 2 It is a schematic diagram of the structure of the APAN-YOLOv8 network of the present invention; Figure 3 a is the schematic diagram of the network structure of ASPP, Figure 3 b is the schematic diagram of the modified detection head. DETAILED DESCRIPTION

[0015] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0016] First, the abbreviations and key terms appearing in the present invention are explained: APAN: Atrous Path Aggregation Network, a path aggregation network based on dilated spatial convolution.

[0017] ASPP: Atrous Spatial Pyramid Pooling, atrous spatial convolution pooling pyramid.

[0018] YOLOv8: The eighth version of the YOLO series, which can be used for classification, object detection, tracking, semantic segmentation, and pose estimation tasks.

[0019] SlidingWindows: Two-stage sliding window object detection.

[0020] R-CNN / Fast R-CNN / Faster R-CNN: 3 improved versions of regional convolutional neural networks.

[0021] SSD: Single Shot Detection, a single-stage target detection model.

[0022] Swin-Transformer: A network structure for efficient image feature extraction.

[0023] Example 1 This embodiment discloses a small target detection method based on the APAN-YOLOv8 network structure. The general network structure APAN-YOLOv8 for small target detection tasks is improved based on the YOLOv8 structure. The overall structure of YOLOv8 is as follows: Figure 1 As shown in the figure, it includes three parts: Backbone, Neck and Head. The Backbone network is Darknet53 for feature extraction, the Neck network is PAN for feature fusion, and the Head is a detector for target localization and classification decoupling. Input image Pass by Layer Output , , , , , feature size layer by layer The number of channels increases by 2 times layer by layer, and the deep semantic information is extracted from the shallow position and basic information, and the scale gradually increases. Then the deconvolution upsampling is repeated twice and fused with the shallow features of the corresponding scale as the first unidirectional FPN, specifically, the 10th layer is fused with the 6th layer feature, and the 13th layer is fused with the 4th layer feature; then the convolution operation is repeated twice and fused with the deep features of the corresponding scale as the second unidirectional FPN, specifically, the 16th layer is fused with the 12th layer feature, and the 19th layer is fused with the 9th layer feature. Finally, detection is performed on the feature maps of 15, 18, and 21 layers at three scales.

[0024] For small targets, due to their small regions of interest, after feature extraction, the optimistic scenario is that the semantic description of the small target is only 1 pixel on the 21st layer output feature map at a scale of 32 times, resulting in serious loss of detail information. After the detector is processed by 2 layers of 3×3 convolution, it is extremely difficult to detect the target and it is very likely to be regarded as a noise point. Therefore, the 21st layer of the YOLOv8 network structure should be discarded, and an additional upsampling layer should be added to obtain shallow features containing more information about small targets. The overall structure of APAN-YOLOv8 is as follows: Figure 2 shown.

[0025] After the 14th layer of YOLOv8, the 15th, 16th, and 17th layers are added to increase the upsampling once more, and are fused with the feature map containing the position and detail information of the 2nd layer. After the C2f2 module is introduced, the scale of the feature map output by the 18th layer is 4. For small targets in the 32*32 pixel area, the representation feature is an 8*8 feature area. After the CBL module is used for dimensionality reduction, it is fused with the 15th layer feature map. After the C2f2 module is used for dimensionality reduction, the scale of the feature map output by the 21st layer is 8. For small targets in the 32*32 pixel area, the representation feature is a 4*4 feature area. After the CBL module is used for dimensionality reduction again, it is fused with the 12th layer feature map. After the C2f2 module is used for dimensionality reduction, the scale of the feature map output by the 24th layer is 16. For small targets in the 32*32 pixel area, the representation feature is a 2*2 feature area. The detector of the 18th layer with 8*8 feature areas is modified, and ASPP is introduced to retain as much detail information as possible while expanding the receptive field and ensuring the continuity of information.

[0026] Figure 2The overall Neck and Head network structure in the figure constitutes APAN. For a small target with a 32*32 pixel area, the output feature area of ​​the 18th layer is 8*8. Ideally, after the first CBL module of the detection head Detect1, a 5*5 feature area is extracted, and after the second CBL module, a 3*3 feature area is extracted. The feature extraction is not complete, and the result at this time cannot be used for regression and classification constraints. In fact, the final extracted feature area is much larger than 3*3, so the receptive field needs to be expanded. There are usually three ways to expand the receptive field. First, large-scale convolution is used, but it is bound to cause a significant increase in the amount of calculation; second, it is achieved through pooling operations, but the introduction of SPP brings about the problem of loss of detail information, which is contrary to the original intention of extracting features that are beneficial to the final classification and regression results at shallow positions and detail features; third, it is achieved through dilated convolution, but the empty collection method leads to the loss of information continuity. In order to balance the capabilities of the above three methods, the ASPP pooling operation is finally adopted. It not only expands the receptive field but also ensures the full extraction of detail information and avoids the problem of continuous information loss under the premise of moderately increasing the amount of calculation.

[0027] The network structure of ASPP is as follows Figure 3 As shown in a, the modified detection head is Figure 3 As shown in b, the modified detector includes two parallel groups, each of which includes an ABL layer, a CBL layer and a convolutional layer, where the ABL layer includes an ASPP layer, a BN layer and an activation layer. The process of expanding the receptive field is: S21), input feature map After the first 1×1 convolutional ASPP convolutional layer, we get ; S22), input feature map After a pooling pyramid consisting of three 3×3 dilated convolutions with dilation factors of 6, 12, and 18, we get , , , whose value range is ;in is the mathematical symbol for real numbers; S23) Input feature map After the ASPP pooling layer consisting of an adaptive pooling layer, a 1×1 convolution layer and an upsampling layer, ; S24) , , , , By channel concatenation , and bring it into 1×1 convolution for dimensionality reduction to get ; S25) Bring it into the CBL module to get the final output result , where the number of channels n is set according to the specific task.

[0028] Taking the MS-COCO dataset object detection task as an example, the number of classification branch channels , the number of regression branch channels ,in Indicates the number of categories for the classification task, is a hyperparameter.

[0029] The above description is only the basic principle and preferred embodiments of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention belong to the protection scope of the present invention.

Claims

1. A small target detection method based on APAN-YOLOv8 network structure, characterized by: The following steps are involved: S01), collect real-time monitoring images of the area to be detected, input the real-time monitoring images into the Backbone part of the APAN-YOLOv8 network, and the Backbone part extracts features from the real-time monitoring images; S02), the Neck part of the APAN-YOLOv8 network discards its 21st layer and adds an additional upsampling layer. The image after feature extraction is first repeated twice by deconvolution upsampling and fused with the shallow features of the corresponding scale as the first unidirectional FPN. Specifically, the 10th layer is fused with the 6th layer, and the 13th layer is fused with the 4th layer. The fused result is input into the additional upsampling layer to obtain the upsampling result and fused with the feature map containing position and detail information of the 2nd layer, and then brought into the C2f2 module of the 18th layer for feature map scale transformation. The result of the 18th layer is input into the CBL module of the 19th layer for dimensionality reduction and then fused with the feature map of the 15th layer. The fusion result is brought into the C2f2 module of the 21st layer for feature map scale transformation. The result of the 21st layer is input into the CBL module of the 22nd layer for dimensionality reduction and then fused with the feature map of the 12th layer. The fusion result is brought into the C2f2 module of the 24th layer for feature map scale transformation; S03) Detection is performed on the feature maps of three scales at the 18th, 21st, and 24th layers to achieve decoupling of target positioning and classification.

2. The small target detection method based on the APAN-YOLOv8 network structure according to claim 1, characterized in that: The additional upsampling layers are layers 15, 16, and 17 added after layer 14. Layer 15 is a C2f2 module, layer 16 is an upsampling module, and layer 17 is a fusion module.

3. The small target detection method based on the APAN-YOLOv8 network structure according to claim 1, characterized in that: The detector of the 18th layer is modified, and ASPP is introduced to retain as much detail information as possible while expanding the receptive field. The modified detector includes two parallel groups, each of which includes an ABL layer, a CBL layer, and a convolutional layer. The ABL layer includes an ASPP layer, a BN layer, and an activation layer. The process of expanding the receptive field is as follows: S21), input feature map After the first 1×1 convolutional ASPP convolutional layer, we get ; S22), input feature map After a pooling pyramid consisting of three 3×3 dilated convolutions with dilation factors of 6, 12, and 18, we get , , , whose value range is ; S23) Input feature map After the ASPP pooling layer consisting of an adaptive pooling layer, a 1×1 convolution layer and an upsampling layer, ; S24) , , , , By channel concatenation , and bring it into 1×1 convolution for dimensionality reduction to get ; S25) Bring it into the CBL module to get the final output result , where the number of channels n is set according to the specific task.

4. The small target detection method based on the APAN-YOLOv8 network structure according to claim 2, characterized in that: Number of classification branch channels for the target detection task of the MS-COCO dataset , the number of regression branch channels ,in Indicates the number of categories for the classification task, is a hyperparameter.

5. The small target detection method based on the APAN-YOLOv8 network structure according to claim 1, characterized in that: The C2f module of the 18th layer outputs a feature map with a scale of 4. For small targets in the 32*32 pixel area, the representation feature is an 8*8 feature area. The c2f module of the 21st layer outputs a feature map with a scale of 8. For small targets in the 32*32 pixel area, the representation feature is a 4*4 feature area. The c2f module of the 24th layer outputs a feature map with a scale of 16. For small targets in the 32*32 pixel area, the representation feature is a 2*2 feature area.