A fast target detection method based on convolutional neural network

Through the lightweight design and improved algorithm of FastDet network, the problem of difficult deployment of existing models on mobile and edge devices is solved, and fast and efficient object detection is achieved, which is suitable for practical applications such as intelligent robots, public safety, and smart transportation.

CN116091892BActive Publication Date: 2025-08-08NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310104561.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2025-08-08
Estimated Expiration
2043-02-13

AI Technical Summary

Technical Problem

Due to its high complexity, existing object detection models cannot be effectively deployed on mobile and edge devices, which limits their application scenarios.

Method used

The lightweight convolutional neural network FastDet is adopted, combining the FastLayer module, ECA attention mechanism, cross FPN structure and decoupled detection head, and network training and feature extraction are optimized through the improved SimOTA* positive sample matching strategy and SIOU border loss function.

Benefits of technology

It realizes fast and high-precision object detection on low-computing equipment, improves the training stability and generalization capabilities of the model, and is suitable for more practical application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091892B_ABST
    Figure CN116091892B_ABST
Patent Text Reader

Abstract

This application discloses a fast target detection method based on convolutional neural networks. The FastDet network backbone network includes channel splitting, cross-stage channel splicing, residual connection and channel shuffling operations; the neck network is improved on YOLOv4Tiny, and the original FPN is changed to a cross-FPN, which further strengthens feature fusion. At the same time, the ECA attention module is introduced to strengthen the focus on key channels; the detection head draws on the design concept of YOLOX to decouple category prediction and confidence and regression prediction, accelerate network training convergence speed, and improve final accuracy; the positive sample matching part adopts an improved version of the SimOTA* strategy to ensure that appropriate positive samples can be matched in the early stage of training and when dealing with difficult samples, and stabilize network training; the loss function part adopts SIOU loss, while considering the overlapping area, center point distance, width, height and angle of the border, and finally optimizes the border regression accuracy. As a general lightweight target detector, this method is applied to many computer vision tasks after training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a fast target detection method based on convolutional neural networks. Background Art

[0002] Object detection has always been an important and challenging topic in the field of computer vision. Its task is to determine whether an object or target of a given category, such as a pedestrian, vehicle, or teacup, is present in an image. If an object of a given category is present, its location and category are returned. The returned location information is usually represented by the coordinates of a rectangular bounding box that tightly encloses the object. In recent years, with the development of deep learning, object detection has been widely used in real-world scenarios, including intelligent robotics, public safety, smart transportation, defect detection, autonomous driving, human-computer interaction, medical image assistance, and intelligent video surveillance. As a popular keyword in various top computer conferences and journals in recent years, object detection is also the prerequisite and foundation for many complex and high-level vision tasks, including image segmentation, object tracking, scene understanding, and image saliency detection.

[0003] However, to address the challenge of detecting complex objects, mainstream object detection models often employ complex network architectures, often stacking hundreds of convolutional layers and connecting multiple branches in parallel. This results in the current state-of-the-art object detection networks being deployed only on laboratory servers and preventing them from being deployed in real-world applications. This has limited the development of convolutional neural network-based object detection on edge devices. Consequently, the concept of model lightweighting has been proposed. In recent years, model lightweighting has rapidly developed, with commonly used approaches including neural network model compression, neural architecture search (NAS), and manually designed lightweight modules. Model compression often employs methods such as pruning, weight sharing, and parameter quantization, effectively reducing model memory consumption. Neural architecture search typically employs reinforcement learning, evolutionary algorithms, and gradient representations to search within a given search space, typically finding a range of highly accurate and fast models. Manually designed lightweight modules include 1×1 convolutions, global average pooling (GAP), group convolutions, and depthwise separable convolutions, reducing the number of parameters and improving execution speed. Summary of the Invention

[0004] This paper aims to address the problem that existing object detection models, driven by the pursuit of high accuracy, have extremely high algorithmic complexity, making them unsuitable for deployment on mobile devices and edge devices. This paper proposes a fast object detection algorithm based on convolutional neural networks. This algorithm is faster than mainstream lightweight object detection models and can be applied to a wider range of low-computing-power devices in the future.

[0005] To achieve the purpose of the present invention, a fast target detection method based on a convolutional neural network is provided, comprising the following steps:

[0006] Step 1: Preprocess the image to be detected;

[0007] Step 2: The preprocessed image is fed into the FastDet network, which is a lightweight convolutional neural network consisting of a lightweight convolutional module FastLayer, an ECA attention mechanism, a cross-FPN structure, and a decoupled detection head. The preprocessed image passes through the backbone network, the neck network, and the detection head in sequence, and after feature extraction from the network, two predicted feature maps are output.

[0008] Step 3: Train the FastDet network, calculate the loss by using the feature map output by the FastDet network and the image label, and update the network weights step by step through back propagation, so that the network has the ability to detect specific targets;

[0009] Step 4: Based on the trained model, the two feature maps output by the FastDet network are decoded to obtain the detected target category and border information, and non-maximum suppression filtering is performed to repeat the prediction frame; the final prediction frame is restored to the original image scale, and the prediction border is drawn to complete the target detection.

[0010] Furthermore, step 1 is specifically to scale the image to be detected to a preset size and normalize each pixel value to between 0 and 1 by dividing it by 255; since the network performs a total of 5 halving of the width and height dimensions, it is necessary to ensure that the side length of the scaled image is a multiple of 32.

[0011] Furthermore, step 2 is specifically to send the preprocessed image into the FastDet network, passing through the backbone network, neck network and detection head in sequence; the backbone network includes channel splitting, cross-stage local splicing, residual connection and channel shuffling operations, with excellent feature extraction capabilities and execution speed; the neck network includes ECA attention mechanism and cross FPN structure, which can enhance feature fusion capabilities; the detection head is designed in a decoupled form and anchor-free framework process to accelerate the convergence speed of network training.

[0012] Furthermore, the backbone feature network adopts an independently designed FastLayer convolution module for feature extraction. The FastLayer convolution module is a convolution module that includes channel splitting, cross-stage local splicing, residual connection and channel shuffling. Specifically, the FastLayer module first reduces the width and height of the feature map by half through a 3×3 convolution with a stride of 2. It then contains two branches. The left branch does not perform any processing, and the right branch first saves the temporary value, and then passes through a series of 3×3 convolutions with a stride of 1 and then adds it to the temporary value to simplify the learning process, prevent gradient disappearance and reduce repeated calculations. Subsequently, the two branches perform channel dimension splicing to perform channel dimensionality increase operation to avoid introducing too many parameters. Finally, a channel shuffling operation with a grouping number of 4 is performed to fully integrate the channels without introducing additional parameters. It should be noted that the convolution described above refers to a set of standard operations, namely convolution plus activation function plus batch normalization.

[0013] Furthermore, the neck network includes an ECA attention mechanism and a cross-FPN structure design; the neck network is based on YOLOv4Tiny, and an additional 26×26 feature map is added on its basis through a convolution with a stride of 2 and a 13×13 feature map spliced together to form a cross-FPN structure, which is used to enable the position information of shallow features and the semantic information of deep features to be integrated with each other, thereby enhancing the feature extraction capability; in addition, four ECA attention modules are inserted at key positions of the neck network, which refers to the transition from the backbone network to the neck network and from the neck network to the detection head; the ECA attention mechanism is an improvement on the SE module, using one-dimensional convolution instead of full connection to achieve efficient local cross-channel interaction and extract the dependency between channels, where the size of the one-dimensional convolution kernel is dynamically determined by the input channel, using the formula:

[0014]

[0015] Among them, C represents the number of channels of the input tensor, and k represents the one-dimensional convolution kernel size.

[0016] Furthermore, the decoupled detection head decouples the category prediction of the detection target from the bounding box and confidence prediction, and is designed into an anchor-free framework. The decoupling of the detection head separates the two distinct components of category and confidence and bounding box regression, which is used to accelerate network convergence and training accuracy. The anchor-free design is used to simplify network prediction, remove the tedious anchor box clustering steps, enhance the model's generalization ability, and improve the model's execution speed.

[0017] Furthermore, step 3 is as follows: during training, the two feature maps will use the improved SimOTA* positive sample matching strategy to determine the positive and negative samples, and then calculate the bounding box regression loss, confidence loss and category loss. The bounding box regression loss uses the SIOU method, and the confidence loss and category loss both use binary cross entropy loss; finally, the network weights are updated through backpropagation.

[0018] Furthermore, the improved SimOTA* positive sample matching strategy refers to the randomness problem of positive sample selection generated in the early stage of training and when facing difficult targets to detect. That is, when the number of dynamic positive samples determined by the original algorithm is less than 1, appropriate positive samples are manually assigned to it according to the target size and center point position. Specifically, the detection target is first assigned to the corresponding feature map according to the pre-set area threshold. After confirming the assigned feature map, multiple feature points on the feature map are assigned to it, and a threshold T between 0 and 1 is selected (networks with strong learning ability, such as some complex networks, can choose a lower threshold, which can allocate more positive samples to accelerate network learning and improve network detection ability; networks with weak learning ability, such as lightweight networks, can choose a higher threshold to avoid allocating too many positive samples and exceeding the upper limit of network learning ability). When the x-coordinate of the target is mapped to the feature map, it satisfies:

[0019]

[0020] Then the feature point in the upper right corner of the mapped feature map grid is additionally assigned to it. When the y coordinate of the target is mapped to the feature map, it satisfies:

[0021]

[0022] Then the feature point at the lower left corner of the mapped feature map grid is additionally allocated to it; when the above two equations are satisfied at the same time, the feature point at the lower right corner of the mapped feature map grid is additionally allocated to it; where x gt and y gt Represents the x and y coordinate values of the target center point when it is mapped to the feature map; according to the learning ability of the model, adjust the appropriate threshold T to always assign appropriate positive samples to the model to promote network learning.

[0023] Furthermore, SIOU border loss is used during training; SIOU border loss considers four parts: center point distance, overlapping area, width and height, and angle. Its calculation formula is as follows:

[0024]

[0025] IOU represents the overlap, which is:

[0026]

[0027] Where B represents the prediction box, B GT represents the target box;

[0028] Δ measures the distance and angle loss between two bounding boxes, which is:

[0029]

[0030]

[0031] γ=2-sin(2×α)

[0032] Among them, γ incorporates the angle situation into the distance loss according to the relative position of the target box and the prediction box; ρ x and ρ y Respectively reflect the x-axis distance and y-axis distance between the center point of the target box and the predicted box;

[0033] Represents the x and y of the center point of the target box and the x and y of the center point of the prediction box respectively; c w and c h is the width and height of the minimum bounding rectangle of the target box and the prediction box; α represents the angle between the center point of the prediction box and the target box on the x-axis or y-axis, whichever angle is smaller is selected;

[0034] Ω represents the shape loss, that is, the similarity between the width and height of the predicted box and the width and height of the target box, which is:

[0035]

[0036]

[0037]

[0038] Among them, w gt ,h gt ,w,h represent the width and height of the target frame and the width and height of the predicted frame respectively, ω w and ω h They respectively reflect the closeness between the width and height values of the target box and the predicted box.

[0039] Furthermore, step 4 is specifically as follows: during prediction, the two feature maps are directly decoded; for each prediction point in the feature map, the confidence is multiplied by the maximum category prediction, the prediction point whose product is greater than the preset threshold is selected, and non-maximum suppression filtering is performed to repeat the prediction frame; the final prediction frame is restored to the original image scale, the prediction border is drawn, and the target detection is completed.

[0040] Compared with the existing technology, the significant progress of the present invention is as follows: 1) The present invention adopts an independently designed backbone feature extraction network, which has a high execution speed while effectively extracting image features; 2) Combining the ECA attention module and the cross-FPN structure, the model feature fusion capability is improved; 3) The decoupled detection head and anchor-free detection framework can accelerate network training convergence, improve network accuracy and generalization; 4) The application of the improved version of SimOTA* makes network training more stable and improves the final accuracy; the SIOU bounding box regression loss is adopted to further improve the bounding box regression effect.

[0041] In order to more clearly illustrate the functional characteristics and structural parameters of the present invention, further description is given below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0043] Figure 1 This is a diagram of the backbone network structure in the present invention;

[0044] Figure 2 This is a diagram of the neck network structure in the present invention;

[0045] Figure 3 This is the structure diagram of the ECA attention mechanism in the present invention;

[0046] Figure 4 This is a structural diagram of the detection head in the present invention;

[0047] Figure 5 Schematic diagram of the improved SimOTA* positive sample matching mechanism in the present invention;

[0048] Figure 6 A flowchart of a fast target detection method based on convolutional neural network. DETAILED DESCRIPTION

[0049] 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 part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0050] like Figure 6 As shown in FIG, a fast target detection method based on a convolutional neural network includes the following steps:

[0051] 1) Preprocess the image to be detected;

[0052] 2) The preprocessed image is fed into the FastDet network, a lightweight convolutional neural network that includes a lightweight convolutional module FastLayer, an ECA attention mechanism, a cross-FPN structure, and a decoupled detection head. The preprocessed image passes through the backbone network, the neck network, and the detection head in sequence, and after feature extraction by the network, two predicted feature maps are output.

[0053] 3) During the training phase, the loss is calculated using the FastDet network's output feature maps and image labels. This loss is then used to gradually update the network weights through backpropagation, enabling the network to detect specific objects. During training, the two feature maps are used to determine positive and negative samples using an improved version of the SimOTA* positive sample matching strategy. The bounding box regression loss, confidence loss, and classification loss are then calculated. The bounding box regression loss uses the more accurate SIOU method, while the confidence loss and classification loss both use binary cross-entropy loss. Finally, the network weights are updated through backpropagation.

[0054] 4) Based on the trained model, the two feature maps output by the FastDet network are decoded to obtain the detected target category and bounding box information, and non-maximum suppression is performed to filter the repeated prediction box; the final prediction box is restored to the original image scale, the prediction bounding box is drawn, and the target detection is completed. During prediction, the two feature maps are directly decoded. For each prediction point in the feature map, the confidence score is multiplied by the maximum category prediction, and the prediction points whose product is greater than the set threshold (for example, 0.3) are selected, and non-maximum suppression is performed to filter the repeated prediction box. The final prediction box is restored to the original image scale, the prediction bounding box is drawn, and the target detection is completed.

[0055] Example

[0056] Figure 1 This paper proposes a lightweight and fast backbone network based on a convolutional neural network. For an input image of size 416×416, the first two convolutions of the network will reduce the width and height of the image to 104×104, while expanding the channel to 64. The feature map then enters three FastLayer convolution blocks in sequence for further feature extraction, and finally outputs two feature maps of different scales: 26×26 and 13×13.

[0057] FastLayer's design combines the structures of ResNet and CSPNet with the four principles of efficient network design from ShuffleNetv2. In FastLayer, the first convolution halves its width and height before splitting into two branches. The left branch undergoes no processing, while the right branch performs a series of standard 3×3 convolutions, adding the pre-convolution values. Finally, the left and right branches are concatenated according to the channel dimension.

[0058] This network structure meets the four design criteria mentioned in ShuffleNetv2: 1. Keep the number of input and output channels the same. The backbone network contains a total of 15 convolutional layers, of which 13 convolutional layers meet this criterion, accounting for 86.7% of the total convolution of the backbone network, thereby minimizing the memory access cost; 2. Group convolution is not used because group convolution has not been optimized at the hardware level. Although the number of parameters is reduced, the speed has not been significantly improved; 3. The network branch structure is very simple to prevent the problem of slowdown caused by too many branches; 4. Frequent residual connections are not used, but are only introduced after the convolution block of the right branch of FastLayer. The entire backbone network has only 3 residual connections in total to prevent delays caused by too many element-level operations.

[0059] Figure 2 This is the cross-FPN structure proposed in this paper, combined with the ECA attention mechanism. For the two feature map outputs, conventional methods only use a simple FPN structure consisting of an upsampled 13×13 feature map and a concatenated 26×26 feature map. FastDet's neck network additionally adds a 26×26 feature map, concatenated with a 13×13 feature map via a stride-2 convolution. This structure can be formally considered a cross-FPN. This allows the positional information of shallow features and the semantic information of deep features to be integrated, further enhancing feature extraction capabilities.

[0060] Figure 3 This is the structural diagram of the ECA attention mechanism. In order to enhance the network's ability to focus on key channels, four ECA attention mechanisms are added to the neck structure design of FastDet, which are placed in the output part of the backbone network and the part after cross-FPN splicing, so as to achieve efficient local cross-channel interaction and extract channel dependencies. In order to extract channel dependencies, a design of global average pooling followed by a fully connected layer is often adopted. In order to cope with the huge amount of parameters brought by the fully connected layer, the dimension is reduced and then expanded. However, this structure is not conducive to learning channel dependencies. Based on this, ECA uses one-dimensional convolution to replace the fully connected layer to implement the operation of integrating channel information, and does not introduce excessive parameters. It has a fast execution speed and is a commonly used component in lightweight convolutional neural networks. The size of the one-dimensional convolution kernel is dynamically determined by the input channel, using the formula:

[0061]

[0062] Among them, C represents the number of channels of the input tensor, and k represents the one-dimensional convolution kernel size.

[0063] Figure 4 For the FastDet detection head, the format remains consistent for both 26×26 and 13×13 output feature maps. The detection head first undergoes a 1×1 convolution to reduce the channel dimension to an appropriate size. It then splits into two branches: the left branch responsible for category prediction and the right branch responsible for regression and confidence prediction. Both branches first undergo a 3×3 convolution for final feature extraction, followed by a final convolution layer to output the corresponding prediction information. The decoupling of the detection head separates the distinct components of category classification from confidence and regression prediction, accelerating network convergence and training accuracy. The anchor-free design simplifies network predictions, eliminates the tedious anchor box clustering step, enhances algorithm generalization, and improves model execution speed.

[0064] FastDet outputs feature maps at two scales. The number of channels for each feature point in each feature map is 4+1+C, where 4 represents the bounding box offset prediction, 1 represents the confidence prediction, and C represents the category prediction. The formula for bounding box decoding is as follows:

[0065] b x =t x +c x #(2)

[0066] b y =t y +c y #(3)

[0067]

[0068]

[0069] Where t represents the value output by the network, and b represents the corresponding decoded value.

[0070] When calculating the loss, the confidence loss uses binary cross entropy loss:

[0071]

[0072] where c i Represents the confidence output value of the i-th feature point on the feature map, It represents whether the feature point is selected as a positive sample, the positive sample is 1, otherwise it is 0. The category loss also uses binary cross entropy loss, and adopts the soft label strategy, multiplying the label by the IOU of the predicted box and the real box responsible for the prediction. The formula is as follows:

[0073]

[0074] in Indicates the prediction point selected as the positive sample, p i (c) represents the output of the i-th feature point on the feature map for category c, Indicates whether the feature point is indeed of the corresponding category, with the corresponding category being 1 and the opposite being 0. For the bounding box loss, FastDet uses the SIOU loss function. SIOU introduces angle loss, expecting the predicted box to first regress to the coordinate axis closest to the target box, and then only need to continue regressing along the other axis, effectively reducing the degrees of freedom of regression and greatly improving the regression speed and accuracy of the results.

[0075] Specifically, SIOU considers four parts: center point distance, overlapping area, width and height, and angle. Its calculation formula is as follows:

[0076]

[0077] IOU represents the overlap, which is:

[0078]

[0079] Where B represents the prediction box, B GT Represents the target box.

[0080] Δ measures the distance and angle loss between two bounding boxes, which is:

[0081]

[0082]

[0083] γ=2-sin(2×α)#(13)

[0084] in, Represents the x and y of the center point of the target box and the x and y of the center point of the prediction box respectively; c w and c h is the width and height of the minimum bounding rectangle of the target box and the prediction box; α represents the angle between the center point of the prediction box and the target box on the x-axis or y-axis, whichever angle is smaller is selected.

[0085] Ω represents the shape loss, that is, the similarity between the width and height of the predicted box and the width and height of the target box, which is:

[0086]

[0087]

[0088]

[0089] Among them, w gt ,h gt ,w,h represent the width and height of the target box and the width and height of the predicted box respectively.

[0090] The overall loss of the border is:

[0091]

[0092] Finally, the overall loss of FastDet is as follows, where N pos Represents the number of prediction points selected as positive samples:

[0093]

[0094] In response to the randomness problem of positive sample selection exhibited by SimOTA in the early stages of training and in dealing with difficult-to-detect samples, the present invention improves SimOTA and obtains an improved version of SimOTA*. Specifically, when the dynamic k value obtained by SimOTA for a certain target is less than 1, feature points are no longer allocated according to the original algorithm, but multiple positive samples are dynamically allocated according to the target area size and the specific position of the center coordinates. In order to determine which feature map targets of different sizes should be assigned to, inspired by the statistical information obtained in the experiment, the present invention adopts the idea of k-means clustering, performs k-means clustering on the data set according to the IOU matching criterion, obtains two cluster centers, and then performs weighted average of the areas of the cluster centers to obtain a threshold T that meets the conditions. f , the weighted average formula is as follows:

[0095]

[0096] Where n represents the number of elements in the cluster, and S represents the mean area of the cluster.

[0097] The target area is smaller than the threshold T f When the target area is larger than the threshold T, the 26×26 feature map is responsible for it. f When the assigned feature map is confirmed, SimOTA* will assign multiple positive samples according to the specific location of the target center point, as shown in the diagram. Figure 5 In specific implementation, it is necessary to determine a threshold T between 0 and 1 based on the learning ability of the network. When the x-coordinate of the target is mapped to the feature map, it satisfies:

[0098]

[0099] Then the feature point in the upper right corner of the mapped feature map grid is additionally assigned to it. When the y coordinate of the target is mapped to the feature map, it satisfies:

[0100]

[0101] Then the feature point at the lower left corner of the mapped feature map grid is additionally allocated to it. When the above two equations are satisfied at the same time, the feature point at the lower right corner of the mapped feature map grid is additionally allocated to it. gt and y gt Represents the x and y coordinates of the target center point when it is mapped to the feature map. In experiments, T = 0.75 is often used.

[0102] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0103] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A fast target detection method based on convolutional neural network, characterized in that: The following steps are involved: Step 1: Preprocess the image to be detected; Step 2: The preprocessed image is fed into the FastDet network, which is a lightweight convolutional neural network that includes a lightweight convolutional module FastLayer, an ECA attention mechanism, a cross FPN structure, and a decoupled detection head. The preprocessed image passes through the backbone network, the neck network, and the detection head in sequence, and after feature extraction by the network, two predicted feature maps are output. Step 3: Train the FastDet network, calculate the loss by using the feature map output by the FastDet network and the image label, and update the network weights step by step through back propagation, so that the network has the ability to detect specific targets; Step 4: Based on the trained model, the two feature maps output by the FastDet network are decoded to obtain the detected target category and border information, and non-maximum suppression filtering is performed to repeat the prediction frame; the final prediction frame is restored to the original image scale, and the prediction border is drawn to complete the target detection; Step 1 specifically involves scaling the image to be tested to a preset size and normalizing each pixel value to between 0 and 1 by dividing it by 255. Since the network halves the width and height dimensions five times in total, it is necessary to ensure that the side length of the scaled image is a multiple of 32. Specifically, step 2 feeds the preprocessed image into the FastDet network, passing through the backbone network, neck network, and detection head in sequence. The backbone network includes channel splitting, cross-stage local splicing, residual connection, and channel shuffling operations; the neck network includes the ECA attention mechanism and cross-FPN structure to enhance feature fusion capabilities; the detection head is designed in a decoupled form and an anchor-free framework process to accelerate network training convergence. The backbone network uses an independently designed FastLayer convolution module for feature extraction. The FastLayer convolution module is a convolution module that includes channel splitting, cross-stage local splicing, residual connection, and channel shuffling. The FastLayer module first reduces the width and height of the feature map by half through a 3×3 convolution with a stride of 2. It then contains two branches. The left branch does not perform any processing, and the right branch first stores a temporary value. It then undergoes a series of 3×3 convolutions with a stride of 1 and then adds the temporary value to it. This is used to simplify the learning process, prevent gradient vanishing, and reduce repeated calculations. Subsequently, the two branches are spliced in the channel dimension to perform a channel dimension increase operation to avoid introducing too many parameters; finally, a channel shuffling operation with a grouping number of 4 is performed to fully integrate the channels without introducing additional parameters; Specifically, during training, the two feature maps will use the improved SimOTA* positive sample matching strategy to determine the positive and negative samples, and then calculate the bounding box regression loss, confidence loss, and category loss. The bounding box regression loss uses the SIOU method, and the confidence loss and category loss both use binary cross entropy loss. Finally, the network weights are updated through backpropagation.

2. A fast target detection method based on convolutional neural network according to claim 1, characterized in that: The neck network includes an ECA attention mechanism and a cross-FPN structure design. The neck network is based on YOLOv4 Tiny, with an additional 26×26 feature map convolved with a stride of 2 and concatenated with a 13×13 feature map to form a cross-FPN structure. This structure is used to integrate the positional information of shallow features with the semantic information of deep features, enhancing feature extraction capabilities. In addition, four ECA attention modules are inserted at key locations in the neck network, namely the transition between the backbone network and the neck network, and between the neck network and the detection head. The ECA attention mechanism is an improvement to the SE module. It uses one-dimensional convolution instead of full connection to achieve efficient local cross-channel interaction and extract the dependencies between channels. The size of the one-dimensional convolution kernel is dynamically determined by the input channel, using the formula: ; Among them, C represents the number of channels of the input tensor, and k represents the one-dimensional convolution kernel size.

3. The fast target detection method based on convolutional neural network according to claim 1, characterized in that: The decoupled detection head decouples the category prediction of the detected object from the bounding box and confidence prediction, and is designed into an anchor-free framework. The decoupling of the detection head separates the two distinct components of category and confidence and bounding box regression, which is used to accelerate network convergence speed and training accuracy. The anchor-free design is used to simplify network prediction, remove the tedious anchor box clustering steps, enhance the model generalization ability, and improve the model execution speed.

4. The fast target detection method based on convolutional neural network according to claim 1, characterized in that: The improved SimOTA* positive sample matching strategy refers to the randomness problem of positive sample selection generated in the early stage of training and when facing difficult targets to detect. That is, when the number of dynamic positive samples determined by the original algorithm is less than 1, appropriate positive samples are manually assigned to it according to the target size and center point position. Specifically, the detection target is first assigned to the corresponding feature map according to the pre-set area threshold. After confirming the assigned feature map, multiple feature points on the feature map are assigned to it, and a threshold T between 0 and 1 is selected. When the x-coordinate of the target is mapped to the feature map, it satisfies: ; Then the feature point in the upper right corner of the mapped feature map grid is additionally assigned to it. When the y coordinate of the target is mapped to the feature map, it satisfies: ; Then it is additionally assigned the feature point at the lower left corner of the mapped feature map grid; when the above two equations are satisfied at the same time, it is additionally assigned the feature point at the lower right corner of the mapped feature map grid; and Represents the x and y coordinate values of the target center point when it is mapped to the feature map; according to the learning ability of the model, adjust the appropriate threshold T to always assign appropriate positive samples to the model to promote network learning.

5. The fast target detection method based on convolutional neural network according to claim 1, characterized in that: SIOU border loss is used during training; SIOU border loss considers four parts: center point distance, overlapping area, width and height, and angle. Its calculation formula is as follows: ; Indicates overlapping situations: ; in B represents the prediction box, represents the target box; △ measures the distance and angle loss between the two borders, which are: ; Among them, γ incorporates the angle situation into the distance loss according to the relative position of the target box and the prediction box; and Respectively reflect the x-axis distance and y-axis distance between the center point of the target box and the predicted box; Represent the x and y of the center point of the target box and the x and y of the center point of the prediction box respectively; and is the width and height of the minimum bounding rectangle of the target box and the prediction box; α represents the angle between the center point of the prediction box and the target box on the x-axis or y-axis, whichever angle is smaller is selected; Represents the shape loss, that is, the similarity between the width and height of the predicted box and the width and height of the target box, which is: ; in, Represent the width and height of the target frame and the width and height of the predicted frame respectively. and They respectively reflect the closeness between the width and height values of the target box and the predicted box.

6. The fast target detection method based on convolutional neural network according to claim 1, characterized in that: Specifically, step 4 is as follows: during prediction, the two feature maps are directly decoded; for each prediction point in the feature map, the confidence is multiplied by the maximum category prediction, and the prediction point whose product is greater than the preset threshold is selected, and non-maximum suppression filtering is performed to repeat the prediction box; the final prediction box is restored to the original image scale, and the prediction border is drawn to complete the target detection.

Citation Information

Patent Citations

  • Text processing method and device

    CN113362026A

  • Method and system for detecting artificial small target in SAR (Synthetic Aperture Radar) image

    CN113567984A