Small target detection method, system and equipment based on improved YOLOv8

By introducing CDED, DPLK and CARAFE modules into the YOLOv8 model, the problem of small target detection in traffic sign recognition is solved, the detection accuracy and robustness are improved, and it is suitable for the field of intelligent transportation.

CN118552935AInactive Publication Date: 2024-08-27NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202410742548.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing traffic sign recognition technology is difficult to effectively identify small target traffic signs, especially at multiple scales and different angles, and severe weather has a greater impact, affecting the judgment speed and accuracy of the autonomous driving system.

Method used

Based on the small target detection method of improved YOLOv8, by introducing the CDED downsampling module, DPLK large kernel convolution attention module and CARAFE upsampling module into the YOLOv8 model, the model's detection ability and context awareness of small targets are enhanced, and the detection accuracy and robustness.

Benefits of technology

It effectively improves the detection accuracy of small targets, enhances the detection effect and generalization performance of the model, and improves the traffic sign detection capability in the field of intelligent transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552935A
    Figure CN118552935A
Patent Text Reader

Abstract

The invention discloses a small target detection method, system and device based on improved YOLOv8, and relates to the technical field of target detection. The method comprises the steps that a traffic sign image data set is received, 42 types of traffic sign images with the highest occurrence frequency are extracted, data enhancement is adopted, and the data set is divided into a training set, a test set and a verification set; yOLOv8 is used as a reference network, a traffic sign detection model is constructed, and the traffic sign detection model introduces a CDED down-sampling module into a backbone network of a YOLOv8 model; a DPLK large kernel convolution attention module is finally introduced into the backbone network of the YOLOv8 model; a CARAFE up-sampling module is introduced into the neck part of the YOLOv8 model; and inputting the training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model. According to the technical scheme, the detection precision is high, the detection effect, robustness and generalization performance of the model are effectively improved, and powerful support is provided for traffic sign detection in the field of intelligent traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection, and in particular to a small target detection method, system and device based on improved YOLOv8. Background Art

[0002] Traffic sign recognition technology enables vehicles to read and understand important road signs, such as speed limit signs, hazard signs, and signs before turning. This technology not only improves driver safety, but also provides a safer road environment for all users by providing important information and reminders of important regulations. The research and application of traffic sign recognition is of great significance to improving traffic safety, improving traffic efficiency, promoting the development of intelligent transportation systems and autonomous driving technologies, and promoting sustainable urban development.

[0003] However, in actual environments, traffic signs are small in size, the details of traffic signs in images are insufficient and difficult to identify, and multi-scale and angle problems require detection algorithms to adapt to the various sizes and different perspectives of traffic signs in images. In addition, traffic signs are easily affected by bad weather. These problems will affect the speed and accuracy of the autonomous driving system in judging traffic signs.

[0004] To this end, we propose a small target detection method, system and equipment based on improved YOLOv8. Summary of the invention

[0005] The purpose of the present invention is to provide a small target detection method, system and device based on improved YOLOv8 to solve the problems raised in the above background technology.

[0006] According to a first aspect of the present invention, in order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a small target detection method based on an improved YOLOv8 specifically comprises the following steps:

[0007] Receive a traffic sign image dataset, extract 42 types of traffic sign images with the highest frequency of occurrence, and use data enhancement to divide the dataset into a training set, a test set, and a validation set;

[0008] Using YOLOv8 as the benchmark network, a traffic sign detection model is constructed. The traffic sign detection model introduces a CDED downsampling module into the backbone network of the YOLOv8 model; introduces a DPLK large-core convolution attention module at the end of the backbone network of the YOLOv8 model; and introduces a CARAFE upsampling module into the neck part of the YOLOv8 model.

[0009] Input the training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model;

[0010] Evaluate the trained traffic sign detection model;

[0011] The traffic sign image to be detected is input into the trained traffic sign detection model, and the final detection result is output.

[0012] Furthermore, the CDED downsampling module replaces the downsampling convolution module of the backbone network to retain the target information in the image during downsampling. CDED slices the module to retain the image spatial information, and then uses a multi-branch architecture to splice new features in the channel dimension using local and global attention weights.

[0013] Furthermore, CDED is introduced into the backbone network of YOLOv8 for downsampling. The specific method is as follows:

[0014] (1) Assume the input feature map: X, C is the number of channels, (H, W) represents the resolution of the input image, slice the feature X, and obtain four new sub-features X by sampling in the H and W directions. 1,1 ,X 1,2 ,X 2,1 ,X 2,2 , the process can be expressed as:

[0015] X 1,1 =X[0:H:2,0:W:2]

[0016] X 1,2 =X[0:H:2,1:W:2]

[0017] X 2,1 =X[1:H:2,0:W:2]

[0018] X 2,2 =X[1:H:2,1:W:2]

[0019] (2) In order to enhance the expression of learning for each sub-feature and suppress noise, an attention factor is generated for the spatial position of each sub-feature to adjust the importance of each sub-feature, with sub-feature X 1,2 For example, the specific formula is as follows:

[0020]

[0021] in, n is the number of channels for each sub-feature;

[0022] (3) The four new sub-features X" will be generated 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2, concatenate them in the channel dimension, and use convolution with a convolution kernel size of 1 to reduce the number of channels to obtain the output y. The process is expressed as:

[0023] y = Concat(X" 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 ).

[0024] Furthermore, the DPLK large-core convolution attention module uses two consecutive large convolution kernels for feature extraction, and processes the extracted features through parallel spatial attention and channel attention mechanisms. After feature fusion, the DPLK module uses average pooling and maximum pooling operations to process the weights of the fused features, obtains the weights and performs element-by-element multiplication operations with the original feature map, and finally outputs a weighted feature map.

[0025] Furthermore, the DPLK large-core convolution attention module is introduced into the backbone network of YOLOv8. The specific method is as follows:

[0026] (1) Perform two convolution operations on the given input X to obtain features, extract two features through continuous convolution, and splice them together;

[0027] (2) Use the Shuffle Attention module on the spliced ​​features. To obtain the spatial dimension weights, use average pooling and maximum pooling operations to extract image spatial information, splice the two dimensional information, and use a convolution operation with a convolution kernel size of 1 to increase the dimension from 2 dimensions to C dimensions;

[0028] (3) Use the Sigma ID function to obtain the weight and multiply the original feature by it to obtain the new feature. The specific process is as follows:

[0029] X”=Concat(avg_pooling(X'),max_pooling(X'))

[0030] S = Sigmoid(F conv (X”))

[0031]

[0032] In the formula, Concat is the concatenation operation, Sigmoid is the activation function, avg_pool ing is the average pooling, max_pool ing is the maximum pooling, and Fconv is the convolution operation.

[0033] Furthermore, the CARAFE upsampling module is introduced into the neck part of YOLOv8. The specific method is as follows:

[0034] (1) For a feature map with shape (H, W, C), first use a convolution with a kernel size of 1 to compress its number of channels to C. m , reduce the amount of calculation;

[0035] (2) Then assume that the size of the upsampling kernel is k up , if each position of the output feature map uses a different upsampling kernel, the predicted upsampling kernel shape is 2H×2W×k up ×k up ;

[0036] (3) For the compressed input feature map, a kencoder×kencoder convolutional layer is used to predict the upsampling kernel, with the number of input channels being Cm and the number of output channels being 4(kup)2. Then, the channel dimension is expanded in the spatial dimension to obtain an upsampling kernel with a shape of 2H×2W×kup×kup.

[0037] (4) For each position in the output feature map, map it back to the input feature map and take out the k positions centered on it. up ×k up The dot product is performed between the region and the predicted upsampling kernel to obtain the output value; different channels at the same position share the same upsampling kernel.

[0038] Furthermore, the neck part of the YOLOv8 model outputs a shallow feature map, a middle feature map and a deep feature map respectively, which are used to detect the position and category of the target.

[0039] Furthermore, the head part of the YOLOv8 model is responsible for predicting the key parts of target category, position and confidence, and divides the detection task into two branches: classification and regression for processing. The classification branch includes a convolutional layer and a Softmax activation function, which is used to output the probability distribution of each pixel corresponding to each dimension.

[0040] According to a second aspect of the present invention, the present invention provides a small target detection system based on improved YOLOv8, comprising:

[0041] A receiving module is used to receive a traffic sign image dataset, extract 42 types of traffic sign images with the highest frequency of occurrence, and use data enhancement to divide the dataset into a training set, a test set, and a validation set;

[0042] An improved module is used to build a traffic sign detection model using YOLOv8 as a benchmark network. The traffic sign detection model introduces a CDED downsampling module into the backbone network of the YOLOv8 model; introduces a DPLK large-core convolution attention module at the end of the backbone network of the YOLOv8 model; and introduces a CARAFE upsampling module into the neck part of the YOLOv8 model;

[0043] A training module, used for inputting a training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model;

[0044] Evaluation module, used to evaluate the trained traffic sign detection model;

[0045] The detection output module is used to input the traffic sign image to be detected into the trained traffic sign detection model and output the final detection result.

[0046] According to a third aspect of the present invention, the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the above-mentioned small target detection method based on improved YOLOv8 is adopted.

[0047] The present invention has at least the following beneficial effects:

[0048] The present invention reduces the image size and retains the image information by expanding the downsampling module of the expansion channel through the channel dimension, thereby effectively improving the detection accuracy of small targets. At the same time, a large-kernel convolution attention module is introduced to enable the model to better understand the contextual relationship of traffic signs in the entire scene, thereby solving the problem that the original model lacks perception of the overall contextual information. In addition, the input feature map is used to predict the upsampling kernel, and the upsampling kernel at each position is different. Then, feature reorganization is performed based on the predicted upsampling kernel, which helps the model to perform feature fusion more accurately. Compared with the original YOLOv8 model, the detection accuracy is improved, and the detection effect, robustness and generalization performance of the model are effectively improved, which provides strong support for traffic sign detection in the field of intelligent transportation.

[0049] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of the process of the method of the present invention;

[0051] Figure 2 It is a structural schematic diagram of the landmark detection model of the present invention;

[0052] Figure 3 It is a structural schematic diagram of the CDED downsampling module of the present invention;

[0053] Figure 4 It is a schematic diagram of the structure of the DPLK large kernel convolution attention module of the present invention;

[0054] Figure 5It is a schematic diagram of the structure of the Shuffle Attention of the present invention;

[0055] Figure 6 It is a structural schematic diagram of the CARAFE upsampling module of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0057] Embodiment 1:

[0058] See also Figure 1-6 , the present invention provides a technical solution: a small target detection method based on an improved YOLOv8, specifically comprising the following steps:

[0059] S1. Receive a traffic sign image dataset, extract 42 types of traffic sign images with the highest frequency of occurrence, and use data enhancement to divide the dataset into a training set, a test set, and a validation set;

[0060] It should be noted that the traffic sign image dataset is the downloaded TT100K dataset;

[0061] S2. Using YOLOv8 as the benchmark network, a traffic sign detection model is constructed. The traffic sign detection model introduces a CDED downsampling module in the backbone network of the YOLOv8 model to expand and reduce the size of the image in the channel dimension and retain all the information in the image; the DPLK large-core convolution attention module is introduced at the end of the backbone network of the YOLOv8 model. The model with a large receptive field can better capture the contextual information of the target, thereby improving the detection performance; the CARAFE upsampling module is introduced in the neck part of the YOLOv8 model, which guides the recombination process according to the input features and has a larger receptive field;

[0062] It should be noted that after a series of operations, the fused features of the neck part are input into the head part of the traffic sign detection model for traffic sign detection;

[0063] Furthermore, the CDED downsampling module replaces the downsampling convolution module of the backbone network to retain the target information in the image during downsampling, so that the model can fully learn the small target features. DED slices the module to retain the image spatial information, and then uses the multi-branch architecture to splice new features in the channel dimension using local and global attention weights. CDED is introduced into the backbone network of YOLOv8 for downsampling. The specific method is as follows:

[0064] (1) Assume that the input feature map is: X, C is the number of channels, (H, W) represents the resolution of the input image, and slice the feature X. In order to make the downsampling ratio 2, this paper uses a slicing method with an interval size of 1. After interval sampling in the H and W directions, four new sub-features X are obtained. 1,1 ,X 1,2 ,X 2,1 ,X 2,2 , the process can be expressed as:

[0065] X 1,1 =X[0:H:2,0:W:2]

[0066] X 1,2 =X[0:H:2,1:W:2]

[0067] X 2,1 =X[1:H:2,0:W:2]

[0068] X 2,2 =X[1:H:2,1:W:2]

[0069] (2) In order to enhance the expression of learning for each sub-feature and suppress noise, an attention factor is generated for the spatial position of each sub-feature to adjust the importance of each sub-feature, with sub-feature X 1,2 For example, the specific formula is as follows:

[0070]

[0071] in, n is the number of channels for each sub-feature;

[0072] Furthermore, the design of the DPLK module aims to introduce global information to adjust YOLOv8's lack of perception of overall context information. The DPLK module uses two consecutive large convolution kernels for feature extraction, which can more effectively capture the target and its context information, and processes the extracted features through parallel spatial attention and channel attention mechanisms to strengthen key features and suppress irrelevant information; after feature fusion, the DPLK module uses average pooling and maximum pooling operations to process the weights of the fused features, obtains weights and performs element-by-element multiplication operations with the original feature map, and finally outputs a weighted feature map. The DPLK large-core convolution attention module is introduced in the backbone network of YOLOv8. The specific method is as follows:

[0073] (1) Perform two convolution operations on the given input X to obtain features, extract two features through continuous convolution, and splice them together;

[0074] (2) In order to improve the performance of the neural network in processing traffic sign recognition tasks, the representation ability of the model is enhanced by effectively integrating local feature information and the dependency between channels. The Shuffle Attention module is used for the spliced ​​features. In order to obtain the spatial dimension weights, the image spatial information is extracted using average pooling and maximum pooling operations respectively. The two dimensional information is spliced ​​together, and a convolution operation with a convolution kernel size of 1 is used to increase the dimension from 2 to C.

[0075] (3) Use the Sigma ID function to obtain the weight and multiply the original feature by it to obtain the new feature. The specific process is as follows:

[0076] X”=Concat(avg_pooling(X'),max_pooling(X'))

[0077] S = Sigmoid(F conv (X”))

[0078]

[0079] In the formula, Concat is the concatenation operation, Sigmoid is the activation function, avg_pooling is the average pooling, max_pooling is the maximum pooling, and F conv is the convolution operation.

[0080] (3) The four new sub-features X" will be generated 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 , concatenate them in the channel dimension, and use convolution with a convolution kernel size of 1 to reduce the number of channels to obtain the output y. The process is expressed as:

[0081] y = Concat(X" 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 );

[0082] Furthermore, the CARAFE module replaces the upsampling module in the neck, aiming to guide the recombination process according to the input features, and uses the input feature map to predict the upsampling kernel. The upsampling kernel at each position is different, and then the feature recombination is performed based on the predicted upsampling kernel. The CARAFE upsampling module is introduced in the neck part of YOLOv8. The specific method is as follows:

[0083] (1) For a feature map with shape (H, W, C), first use a convolution with a kernel size of 1 to compress its number of channels to C. m , reduce the amount of calculation;

[0084] (2) Then assume that the size of the upsampling kernel is k up , if each position of the output feature map uses a different upsampling kernel, the predicted upsampling kernel shape is 2H×2W×k up ×k up ;

[0085] (3) For the compressed input feature map, a kencoder×kencoder convolutional layer is used to predict the upsampling kernel, with the number of input channels being Cm and the number of output channels being 4(kup)2. Then, the channel dimension is expanded in the spatial dimension to obtain an upsampling kernel with a shape of 2H×2W×kup×kup.

[0086] (4) For each position in the output feature map, map it back to the input feature map and take out the k positions centered on it. up ×k up The dot product is performed between the region and the predicted upsampling kernel to obtain the output value; different channels at the same position share the same upsampling kernel;

[0087] Furthermore, the neck part of the YOLOv8 model outputs a shallow feature map, a middle feature map and a deep feature map respectively, which are used to detect the position and category of the target;

[0088] Furthermore, the head part of the YOLOv8 model is responsible for predicting the key parts of target category, position and confidence, and divides the detection task into two branches: classification and regression for processing. The classification branch includes a convolutional layer and a Softmax activation function, which is used to output the probability distribution of each pixel corresponding to each dimension;

[0089] S3. Inputting the training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model;

[0090] S4. Evaluate the trained traffic sign detection model;

[0091] S5. Input the traffic sign image to be detected into the trained traffic sign detection model and output the final detection result.

[0092] Next, the technical solution of the present invention is further described in detail with reference to specific embodiments:

[0093] As attached Figure 1 As shown, the present invention provides a small target detection method based on improved YOLOv8, and the specific steps are as follows:

[0094] Step 1: Image preprocessing: First, extract the 42 categories with the highest frequency of occurrence from the TT100K dataset. For the technical solution of this embodiment, it specifically consists of 9457 images, including 23593 instances;

[0095] (1) The image preprocessing method is as follows: the image pixel values ​​are normalized to the interval [0, 1] to reduce the differences between different images in the dataset and provide a unified learning environment for the model; then, to meet the specific requirements of the model input, the image is adjusted to a standard size (640×640) to ensure the consistency of the input image size;

[0096] Step 2: If Figure 2 As shown in the figure, a small target detection model based on improved YOLOv8 (i.e. the above-mentioned traffic sign detection model) is constructed, the preprocessed image is input into the backbone distribution of the network model, the input image is subjected to a series of CDED and CBS for sign extraction, and the DPLK attention module is introduced at the end of the backbone part;

[0097] (1) Figure 3 As shown, the CDED downsampling module performs downsampling by slicing:

[0098] First, assume that the input feature map is: X, C is the number of channels, (H, W) represents the resolution of the input image, and slice the feature X. In order to make the downsampling ratio 2, this paper uses a slicing method with an interval size of 1. After interval sampling in the H and W directions, four new sub-features X are obtained. 1,1 ,X 1,2 ,X 2,1 ,X 2,2 , the process can be expressed as:

[0099] X 1,1=X[0:H:2,0:W:2]

[0100] X 1,2 =X[0:H:2,1:W:2]

[0101] X 2,1 =X[1:H:2,0:W:2]

[0102] X 2,2 =X[1:H:2,1:W:2]

[0103] Then, in order to make each sub-feature enhance the learned expression and suppress noise, an attention factor is generated for the spatial position of each sub-feature to adjust the importance of each sub-feature, with sub-feature X 1,2 For example, the formula for this process is as follows:

[0104]

[0105] in, n is the number of channels for each sub-feature;

[0106] Finally, four new sub-features X are generated" 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 , concatenate them in the channel dimension, and use convolution with a convolution kernel size of 1 to reduce the number of channels to obtain the output y. The process is expressed as:

[0107] y = Concat(X" 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 )

[0108] (2) Figure 4 , Figure 5 As shown in the figure, the introduction of DPLK helps the model enhance its global perception ability:

[0109] First, two convolution operations are performed on the given input X to obtain features. Two features are extracted through continuous convolution and spliced ​​together. Then, in order to improve the performance of the neural network in processing traffic sign recognition tasks, the representation ability of the model is enhanced by effectively integrating local feature information and the dependency between channels. The Shuffle Attention module is used on the spliced ​​features. After the features are obtained using Shuffle Attention, in order to obtain the spatial dimension weights, the image spatial information is extracted using average pooling and maximum pooling operations to splice the two dimensional information. A convolution operation with a convolution kernel size of 1 is used to increase the dimension from 2 dimensions to C dimensions. The Sigmoid function is used to obtain the weights, and the original features are multiplied by them to obtain new features. The specific process is as follows:

[0110] X”=Concat(avg_pooling(X'),max_pooling(X'))

[0111] S = Sigmoid(F conv (X”))

[0112]

[0113] The preprocessed image is passed through the backbone part to output a series of feature maps, each feature corresponding to an image area of ​​different sizes;

[0114] Then the features after the Backbone part are input into the Neck of the network model, and the features transmitted from the backbone network are further processed to extract richer semantic information. The extracted features are upsampled by the CARAFE module; Figure 6 As shown, the CARAFE module is used in the neck for upsampling. For a feature map with shape (H, W, C), a convolution with a kernel size of 1 is first used to compress its number of channels to C. m , to reduce the amount of calculation, and then assume that the size of the upsampling kernel is k up If you want to use a different upsampling kernel for each position of the output feature map, the predicted upsampling kernel shape is 2H×2W×k up ×k up ;

[0115] For the compressed input feature map, a kencoder×kencoder convolutional layer is used to predict the upsampling kernel. The number of input channels is Cm and the number of output channels is 4(kup)2. Then the channel dimension is expanded in the spatial dimension to obtain an upsampling kernel with a shape of 2H×2W×kup×kup. For each position in the output feature map, it is mapped back to the input feature map and the k centered on it is taken out. up×k up The area of ​​​​the kernel is dot-producted with the predicted upsampling kernel to get the output value. Different channels at the same position share the same upsampling kernel;

[0116] Step 3: The different scale features obtained after a series of operations are used to detect the location and category of the target;

[0117] The features fused by the Neck part are input into the Head part of the network model to detect dangerous behaviors. The Head part is the key part of the network structure responsible for predicting the target category, position and confidence. It divides the detection task into two branches: classification and regression. The classification branch includes a convolution layer and a Sigmoid activation function to output the probability of each pixel corresponding to each category; and the regression branch includes a convolution layer and a Softmax activation function to output the probability distribution of each pixel corresponding to each dimension. This design enables the network to handle classification and regression tasks separately and finally obtain complete detection results.

[0118] Step 4: Train the small target detection network, input the image processed in step 1 into the model for training, and save the trained small target detection network weights;

[0119] The Ubuntu operating system was used, equipped with four RTX 2080Ti graphics cards with 11GB of video memory, and the Pytorch deep learning framework was selected as the main development tool, version 1.12.1, and CUDA 10.2 was used to accelerate the training process. In addition, the Python interpreter version was 3.8, and during the entire training process, a batch_size of 16 was used, the initial learning rate was 0.01, and a total of 300 training epochs were performed;

[0120] The present invention uses precision (Precision, P), recall (Recal l, R) and mean average precision (MeanAverage Precision, mAP) as the criteria for model evaluation. Among them, positive samples that are accurately identified as positive samples are recorded as True Positive (TP), negative samples that are accurately identified as negative samples are recorded as True Negative (TN), negative samples that are incorrectly identified as positive samples are recorded as False Positive (FP), and positive samples that are incorrectly identified as negative samples are recorded as False Negative (FN);

[0121] The TT100K dataset was input into the YOLOv8 model and the improved YOLOv8 model for comparative experiments, and the results were obtained as shown in the following table:

[0122]

[0123]

[0124] In summary, the detection accuracy of the technical solution of the present invention is improved, and the detection effect, robustness and generalization performance of the model are effectively improved, which provides strong support for traffic sign detection in the field of intelligent transportation and can be used for traffic sign detection in autonomous driving.

[0125] Embodiment 2:

[0126] The present invention provides a small target detection system based on improved YOLOv8, comprising:

[0127] A receiving module is used to receive a traffic sign image dataset, extract 42 types of traffic sign images with the highest frequency of occurrence, and use data enhancement to divide the dataset into a training set, a test set, and a validation set;

[0128] An improved module is used to build a traffic sign detection model using YOLOv8 as a benchmark network. The traffic sign detection model introduces a CDED downsampling module into the backbone network of the YOLOv8 model; introduces a DPLK large-core convolution attention module at the end of the backbone network of the YOLOv8 model; and introduces a CARAFE upsampling module into the neck part of the YOLOv8 model;

[0129] A training module, used for inputting a training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model;

[0130] Evaluation module, used to evaluate the trained traffic sign detection model;

[0131] The detection output module is used to input the traffic sign image to be detected into the trained traffic sign detection model and output the final detection result.

[0132] Specifically, the above-mentioned receiving module, improvement module, training module, evaluation module and detection output module can be embedded in a computer processing system, and the computer calls the above-mentioned modules to complete the task of equivalent modeling according to the small target detection method based on the improved YOLOv8 provided above; the above-mentioned receiving module, improvement module, training module, evaluation module and detection output module can perform operations according to the specific steps given in the small target detection method based on the improved YOLOv8.

[0133] It should be noted that it should be understood that the division of the various modules of the above system is only the division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated, and these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the receiving module can be a separately established processing element, or it can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and a certain processing element of the above device calls and executes the functions of the above signal processing module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.

[0134] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), or, one or more microprocessors (Digital Signal Processor, referred to as DSP), or, one or more Field Programmable Gate Arrays (Field Programmable Gate Array, referred to as FPGA), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, referred to as CPU) or other processors that can call program codes. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (System-on-a-chip, referred to as SOC).

[0135] Embodiment three:

[0136] The present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the above-mentioned small target detection method based on improved YOLOv8 is adopted.

[0137] It should be noted that the terminal device can be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device can also include input and output devices, network access devices and buses.

[0138] Furthermore, the processor may adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. may also be adopted. The general-purpose processor may adopt a microprocessor or any conventional processor, etc., and the present invention does not limit this.

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

[0140] For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on", "installed on", "fixed on" or "set on" another element, it can be directly on the other element or there can also be a centered element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be a centered element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are only for illustrative purposes and are not intended to be the only implementation method.

[0141] Although 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 the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

[0142] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

Claims

1. A small target detection method based on improved YOLOv8, characterized in that: The specific steps include: Receive a traffic sign image dataset, extract 42 types of traffic sign images with the highest frequency of occurrence, and use data enhancement to divide the dataset into a training set, a test set, and a validation set; Using YOLOv8 as the benchmark network, a traffic sign detection model is constructed. The traffic sign detection model introduces a CDED downsampling module into the backbone network of the YOLOv8 model. The DPLK large-core convolution attention module is introduced at the end of the backbone network of the YOLOv8 model; Introduce the CARAFE upsampling module in the neck part of the YOLOv8 model; Input the training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model; Evaluate the trained traffic sign detection model; The traffic sign image to be detected is input into the trained traffic sign detection model, and the final detection result is output.

2. The small target detection method based on improved YOLOv8 according to claim 1, characterized in that: The CDED downsampling module replaces the downsampling convolution module of the backbone network to retain the target information in the image during downsampling. CDED slices the module to retain the image spatial information, and then uses a multi-branch architecture to splice new features in the channel dimension using local and global attention weights.

3. The small target detection method based on improved YOLOv8 according to claim 2, characterized in that: CDED is introduced into the backbone network of YOLOv8 for downsampling. The specific method is as follows: (1) Assume the input feature map: X, C is the number of channels, (H, W) represents the resolution of the input image, slice the feature X, and obtain four new sub-features X by sampling in the H and W directions. 1,1 ,X 1,2 ,X 2,1 ,X 2,2 , the process can be expressed as: X 1,1 =X[0:H:2,0:W:2] X 1,2 =X[0:H:2,1:W:2] X 2,1 =X[1:H:2,0:W:2] X 2,2 =X[1:H:2,1:W:2] (2) In order to enhance the expression of learning for each sub-feature and suppress noise, an attention factor is generated for the spatial position of each sub-feature to adjust the importance of each sub-feature, with sub-feature X 1,2 For example, the specific formula is as follows: in, n is the number of channels for each sub-feature; (3) The four new sub-features X" will be generated 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 , concatenate them in the channel dimension, and use convolution with a convolution kernel size of 1 to reduce the number of channels to obtain the output y. The process is expressed as: y=Concat(X” 1,1 ,X” 1,2 ,X” 2,1 ,X” 2,2 )。 4. The small target detection method based on improved YOLOv8 according to claim 2, characterized in that: The DPLK large-core convolution attention module uses two consecutive large convolution kernels for feature extraction, and processes the extracted features through parallel spatial attention and channel attention mechanisms. After feature fusion, the DPLK module uses average pooling and maximum pooling operations to process the weights of the fused features, obtains the weights and performs element-by-element multiplication operations with the original feature map, and finally outputs a weighted feature map.

5. The small target detection method based on improved YOLOv8 according to claim 1, characterized in that: The DPLK large-core convolution attention module is introduced into the backbone network of YOLOv8. The specific method is as follows: (1) Perform two convolution operations on the given input X to obtain features, extract two features through continuous convolution, and splice them together; (2) The Shuffle Attention module is used on the concatenated features. To obtain the spatial dimension weights, the average pooling and maximum pooling operations are used to extract the image spatial information, and the two dimensional information is concatenated. A convolution operation with a convolution kernel size of 1 is used to increase the dimension from 2 to C. (3) Use the Sigmoid function to obtain the weight and multiply the original feature by it to obtain the new feature. The specific process is as follows: X”=Concat(avg_pooling(X'),max_pooling(X')) S=Sigmoid(F conv (X”)) In the formula, Concat is the concatenation operation, Sigmoid is the activation function, avg_pooling is the average pooling, max_pooling is the maximum pooling, and F conv is the convolution operation.

6. The small target detection method based on improved YOLOv8 according to claim 5, characterized in that: The CARAFE upsampling module is introduced in the neck part of YOLOv8. The specific method is as follows: (1) For a feature map with shape (H, W, C), first use a convolution with a kernel size of 1 to compress its number of channels to C. m , reduce the amount of calculation; (2) Then assume that the size of the upsampling kernel is k up , if each position of the output feature map uses a different upsampling kernel, the predicted upsampling kernel shape is 2H×2W×k up ×k up ; (3) For the compressed input feature map, a kencoder×kencoder convolutional layer is used to predict the upsampling kernel, with the number of input channels being Cm and the number of output channels being 4(kup)2. Then, the channel dimension is expanded in the spatial dimension to obtain an upsampling kernel with a shape of 2H×2W×kup×kup. (4) For each position in the output feature map, map it back to the input feature map and take out the k positions centered on it. up ×k up The dot product is performed between the region and the predicted upsampling kernel to obtain the output value; different channels at the same position share the same upsampling kernel.

7. The small target detection method based on improved YOLOv8 according to claim 6, characterized in that: The neck part of the YOLOv8 model outputs shallow feature maps, middle feature maps and deep feature maps respectively, which are used to detect the location and category of the target.

8. The small target detection method based on improved YOLOv8 according to claim 7, characterized in that: The head part of the YOLOv8 model is responsible for predicting the key parts of target category, position and confidence, and divides the detection task into two branches: classification and regression for processing. The classification branch includes a convolutional layer and a Softmax activation function to output the probability distribution of each pixel corresponding to each dimension.

9. Small target detection system based on improved YOLOv8, characterized by: include: A receiving module is used to receive a traffic sign image dataset, extract 42 types of traffic sign images with the highest frequency of occurrence, and use data enhancement to divide the dataset into a training set, a test set, and a validation set; An improved module, used to construct a traffic sign detection model using YOLOv8 as a baseline network, wherein the traffic sign detection model introduces a CDED downsampling module into the backbone network of the YOLOv8 model; The DPLK large-core convolution attention module is introduced at the end of the backbone network of the YOLOv8 model; Introduce the CARAFE upsampling module in the neck part of the YOLOv8 model; A training module, used for inputting a training set of the data set into the traffic sign detection model to obtain a trained traffic sign detection model; Evaluation module, used to evaluate the trained traffic sign detection model; The detection output module is used to input the traffic sign image to be detected into the trained traffic sign detection model and output the final detection result.

10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the small target detection method based on improved YOLOv8 described in any one of claims 1 to 8 is adopted.

Citation Information

Cited By

  • Scraped car nonferrous metal target detection method based on attention twin network and multi-source image fusion

    CN118918443A

  • Space target detection model and method based on YOLOv8 improved model

    CN119091223A

  • Underground small target hyperbolic echo detection method and system, electronic equipment and medium

    CN119131330A

  • Method, system, electronic equipment and medium for detecting small underground targets by hyperbolic echo

    CN119131330B

  • Deep learning iron roughneck coupling detection method and system

    CN119359624A