Lightweight real-time target detection method based on YOLO-FESD
By introducing the C2f_Faster_ELA module, VoV-GSCSP module and depth separation convolutional layer into the YOLOv8 network, the existing object detection algorithm has solved the problem of high hardware performance requirements, and the effect of lightweight and real-time object detection is achieved.
Patent Information
- Application Number
- CN202510282420.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing object detection algorithms put extremely high requirements on the hardware performance of the equipment that runs the model, and it is difficult to meet the real-time detection requirements under different application contexts.
The lightweight real-time object detection method based on YOLO-FESD, by introducing the C2f_Faster_ELA module, VoV-GSCSP module and depth separation convolution layer into the YOLOv8 network, reducing the model size and improving detection efficiency.
While ensuring detection accuracy, the number of model parameters and calculations is significantly reduced, making the model easy to deploy on vehicle-side embedded devices to achieve real-time object detection.
Smart Images

Figure CN119785184A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target detection, and in particular relates to a lightweight real-time target detection method based on YOLO-FESD. Background Art
[0002] Object detection is a core task in the field of computer vision, specifically identifying and locating objects in images. Object detection has a wide range of application backgrounds, covering multiple fields such as security monitoring, autonomous driving, industrial automation, and health care, demonstrating the strong potential and broad application prospects of object detection technology. In recent years, object detection technology has developed rapidly, especially the introduction of deep learning has greatly promoted the progress in this field. At present, object detection technology based on deep learning is divided into two categories: single-stage and two-stage object detection algorithms. For the two-stage object detection algorithm, it mainly includes the process of first generating candidate regions, and then classifying and regressing bounding boxes for each candidate region. This type of algorithm has high accuracy but slow detection speed. Typical models include RCNN, faster-RCNN, etc. For the single-stage detection algorithm, it directly predicts categories and bounding boxes on the image, eliminating the step of generating candidate regions. This type of algorithm has fast detection speed and high real-time performance, but the accuracy is reduced. Typical models include YOLO and SSD, etc.
[0003] With the in-depth application of target detection, target detection has different requirements in different application backgrounds. More and more scholars have conducted research on improving target detection algorithms based on different requirements. However, these algorithms have huge computational complexity and parameter volume, and place extremely high demands on the hardware performance of the equipment running the model. Summary of the invention
[0004] In view of this, the present invention aims to provide a lightweight real-time target detection method based on YOLO-FESD (Faster Efficient Slim Detection), which takes the YOLOv8 network as the basic model and performs lightweight improvements on its backbone network, neck network and head network, while ensuring good accuracy, reducing the model size and making it easier to deploy on a development board.
[0005] To achieve the above object, the technical solution created by the present invention is implemented as follows: A lightweight real-time target detection method based on YOLO-FESD, comprising: S1: Obtain a public object detection dataset and preprocess it to obtain a training set; S2: Build the YOLO-FESD network; The YOLO-FESD network uses the YOLOv8 network as the basic network, adds the C2f_Faster_ELA module group to the backbone network of the YOLOv8 network; adds the GSConv layer and the VoV-GSCSP module to the neck network of the YOLOv8 network; and adds the depthwise separable convolution layer to the head network of the YOLOv8 network. S3: Apply the training set obtained in step S1 to train the YOLO-FESD network obtained in step S2 to obtain a YOLO-FESD model; S4: Input the image to be detected into the YOLO-FESD model obtained in step S3 for target detection.
[0006] Further, in step S2: the C2f module in the backbone network of the YOLOv8 network is replaced with the C2f_Faster_ELA module group to obtain the backbone network of the YOLO-FESD network; the output features of the first C2f_Faster_ELA module group, the third C2f_Faster_ELA module group and the SPPF module along the feature processing direction of the backbone network of the YOLO-FESD network are input into the neck network of the YOLO-FESD network; each C2f_Faster_ELA module group includes no less than one C2f_Faster_ELA module.
[0007] Furthermore, in the C2f_Faster_ELA module: the input features are sequentially convolved and channel-split to obtain the first and second features after the split, and the first features enter no less than two Faster_ELA submodules for processing; the second features are fused with the output features of all Faster_ELA submodules to obtain the output features.
[0008] Furthermore, in the Faster_ELA submodule: after the input features are processed by convolution and efficient coordinate attention mechanism in sequence, the obtained features are combined with the input features to obtain the output features.
[0009] Furthermore, in the process of sequentially performing convolution and efficient coordinate attention mechanism processing on the input features, it includes: sequentially performing partial convolution and no less than 2 point-by-point convolution on the input features, and then performing efficient coordinate attention mechanism processing on the obtained features.
[0010] Further, in step S2: the C2f module in the neck network of the YOLOv8 network is replaced with the VoV-GSCSP module to obtain the neck network of the YOLO-FESD network; the output features of the SPPF module are input into the first GSConv layer, and the output features of the first GSConv layer are concatenated with the output features of the third C2f_Faster_ELA module after upsampling operation; the concatenated features are processed by the first VoV-GSCSP module, upsampling operation and the second GSConv layer in turn, and the obtained features are concatenated with the output features of the first C2f_Faster_ELA module. Splicing; the spliced features are processed by the third GSConv layer, the second VoV-GSCSP module and the fourth GSConv layer in sequence, and the obtained features are spliced with the output features of the second GSConv layer; the spliced features are processed by the third VoV-GSCSP module and the fifth GSConv layer in sequence, and the obtained features are spliced with the output features of the first GSConv layer; the spliced features are processed by the fourth VoV-GSCSP module, and then enter the head network of the YOLO-FESD network with the output features of the second VoV-GSCSP module and the third VoV-GSCSP module.
[0011] Furthermore, in each VoV-GSCSP module, the input features are processed by two parallel convolutions, and the features obtained by one convolution are processed by the GS bottleneck submodule and then combined with the features obtained by the other convolution to obtain the output features.
[0012] Furthermore, in each GS bottleneck submodule, the input features are processed by two GSConv layers in sequence, and the obtained features are added to the corresponding elements of the features obtained after the input features are processed by the convolution layer to obtain the output features.
[0013] Furthermore, in the process of combining the features processed by the GS bottleneck submodule with the features obtained by another convolution process to obtain the output features, the corresponding elements of the two features are first added, and then the added features are convolved to obtain the output features.
[0014] Furthermore, in step S2: the convolution module in each detection head of the head network of the YOLOv8 network is replaced with a depthwise separable convolution layer to obtain the head network of the YOLO-FESD network; in the depthwise separable convolution layer, the input features are convolved channel by channel, and then the features obtained by the channel-by-channel convolution are convolved point by point to obtain the output features.
[0015] Compared with the prior art, the invention can achieve the following beneficial effects: (1) In the lightweight real-time target detection method based on YOLO-FESD described in the invention, by introducing the C2f_Faster_ELA module with an efficient coordinate attention mechanism, as well as the VoV-GSCSP module and the depth-separable convolutional layer into the YOLOv8 network, the model is lightweight while ensuring the detection accuracy, so that the number of model parameters and the amount of calculation are greatly reduced, and it can be easily deployed on the vehicle-side embedded device to achieve real-time detection; (2) In the lightweight real-time target detection method based on YOLO-FESD created by the present invention, an innovative C2f_Faster_ELA module is constructed. By introducing a lightweight and efficient coordinate attention mechanism, an efficient C2f_Faster_ELA module is constructed to replace the C2f module of the backbone network of the YOLOv8 network, thereby improving feature extraction efficiency, enriching semantic information, and enhancing spatial feature expression capabilities; the C2f_Faster_ELA module reduces the number of model parameters and the complexity of calculation, thereby also improving model detection efficiency; (3) In the lightweight real-time target detection method based on YOLO-FESD described in the present invention, the GSConv layer and the VoV-GSCSP module are introduced into the neck network, which significantly reduces the number of parameters and the amount of calculation while ensuring accuracy, thereby achieving effective lightweighting of the feature fusion network; the deep separable convolution is introduced into the head network to replace the ordinary convolution. The deep separable convolution can not only achieve the same feature extraction capability as the ordinary convolution, but also greatly reduce the amount of calculation and the number of parameters, thereby improving the detection efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation on the present invention. In the drawings: Figure 1 A schematic diagram of a flow chart of a lightweight real-time target detection method based on YOLO-FESD according to an embodiment of the present invention; Figure 2 A schematic diagram of the network structure of YOLO-FESD described in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of the C2f_Faster_ELA module described in the embodiment of the present invention; Figure 4 A schematic diagram of the structure of the Faster_ELA module described in the embodiment of the present invention; Figure 5 A schematic diagram of the structure of the VoV-GSCSP module according to an embodiment of the present invention; Figure 6 A schematic diagram of the structure of the GS bottleneck submodule according to an embodiment of the present invention; Figure 7 A schematic diagram of the structure of a depth-wise separable convolutional layer according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the invention more clear, the invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only used to explain the invention and do not constitute a limitation of the invention.
[0018] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0019] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0020] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.
[0021] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0022] like Figure 1 and Figure 2 As shown, the lightweight real-time target detection method based on YOLO-FESD described in the embodiment of the present invention includes: S1: Obtain a public object detection dataset and preprocess it to obtain a training set.
[0023] In one embodiment, the target detection dataset is from the paper "Microsoft COCO: Common Objects in Context" published at the European Conference on Computer Vision (ECCV2014) in September 2014. The preprocessing methods include mirroring (i.e., flipping the images in the dataset from left to right with a specified probability, similar to left-right mirroring, which is very useful for learning symmetrical objects and increasing the diversity of the dataset) and RGB channel normalization (i.e., normalizing the RGB channels of the dataset images by subtracting the mean value of each channel from the values of each channel of the dataset images and dividing by the standard deviation of the channel. This helps to standardize the values in the dataset images and can improve the performance of the model.) S2: Build the YOLO-FESD network.
[0024] The YOLO-FESD network uses the YOLOv8 network (open sourced by Ultralytics on January 10, 2023) as the base network, adds the C2f_Faster_ELA module group to the backbone network of the YOLOv8 network; adds the GSConv layer and the VoV-GSCSP module to the neck network of the YOLOv8 network; and adds a depthwise separable convolutional layer to the head network of the YOLOv8 network.
[0025] Specifically, the YOLOv8 network is replaced and operated as follows to obtain the YOLO-FESD network provided by the present invention: The C2f module of the backbone network of the YOLOv8 network is replaced with the C2f_Faster_ELA module group to obtain the backbone network of the YOLO-FESD network. The output features of the first C2f_Faster_ELA module group, the third C2f_Faster_ELA module group and the SPPF module along the feature processing direction of the backbone network of the YOLO-FESD network are input into the neck network of the YOLO-FESD network; each C2f_Faster_ELA module group includes no less than one C2f_Faster_ELA module. The present invention proposes a new C2f_Faster_ELA module and replaces the C2f module of the backbone network of the YOLOv8 network with the C2f_Faster_ELA module group, which not only simplifies the network structure, reduces the amount of calculation and the amount of parameters, and improves the running time and calculation efficiency of the model, but also enhances the ability of the model to extract spatial features, thereby ensuring the high-precision detection performance of the model in the detection task. In a certain embodiment, each C2f_Faster_ELA module group includes three cascaded C2f_Faster_ELA modules, that is, the input features are processed by the three C2f_Faster_ELA modules in sequence to obtain the output features.
[0026] Replace the C2f module in the neck network of the YOLOv8 network with the VoV-GSCSP module, and add the GSConv (Grouped Spatially Convolutions) layer to the neck network of the YOLOv8 network (from the paper "Slimneck by GSConv: a better design paradigm of detector architecturesfor autonomous vehicles" published on the arXiv platform) to obtain the neck network of the YOLO-FESD network. Specifically, the output features of the SPPF module are input into the first GSConv layer, and the output features of the first GSConv layer are spliced with the output features of the third C2f_Faster_ELA module after upsampling operation; the spliced features are processed by the first VoV-GSCSP module, upsampling operation and the second GSConv layer in turn, and the obtained features are spliced with the output features of the first C2f_Faster_ELA module; the spliced features are processed by the third GSConv layer, the second VoV-GSCSP module and the fourth GSConv layer in turn, and the obtained features are spliced with the output features of the second GSConv layer; the spliced features are processed by the third VoV-GSCSP module and the fifth GSConv layer in turn, and the obtained features are spliced with the output features of the first GSConv layer; the spliced features are processed by the fourth VoV-GSCSP module, and then enter the head network of the YOLO-FESD network with the output features of the second VoV-GSCSP module and the third VoV-GSCSP module. The present invention provides a YOLO-FESD network with a GSConv layer, which replaces the standard convolution layer of the YOLOv8 network's neck network. The core idea of the GSConv layer is to divide the channels of the input feature map into multiple groups, and then independently apply the convolution operation in each group, which can reduce the number of parameters and the amount of calculation, and can also be optimized in the spatial dimension, so as to decompose the standard convolution operation into smaller operations that are easier to calculate. Then, a VoV-GSCSP (cross-stage partial network) module is used to replace the C2f module in the YOLOv8 network's neck network, which significantly reduces the number of parameters and the amount of calculation while ensuring the accuracy, thereby realizing the effective lightweighting of the feature fusion network.
[0027] Finally, the convolution module in each detection head of the head network of the YOLOv8 network is replaced with no less than one depthwise convolution layer (DSConv) to obtain the head network of the YOLO-FESD network. It should be noted that the convolution module of the head network of the YOLOv8 network includes a standard convolution layer, a block normalization layer and a SiLU layer. The present invention replaces the complete convolution module with a depthwise separable convolution layer. The present invention replaces the original convolution module with a depthwise separable convolution, which can reduce the number of parameters of the network, increase the detection speed, reduce the risk of overfitting, and improve the generalization ability of the model, while making the YOLO-FESD network easier to deploy on the development board. In a certain embodiment, the convolution module in each detection head is replaced with two depthwise separable convolution layers, that is, the input features are continuously passed through two depthwise separable convolution layers to obtain output features. In a certain embodiment, before the two-dimensional standard convolution operation in each detection head, a 1×1 convolution operation is also provided, that is, in each detection head, the input feature is first processed by two depth-separable convolution layers, and then subjected to a 1×1 convolution operation and a two-dimensional standard convolution operation to obtain the output feature.
[0028] In some embodiments, in the C2f_Faster_ELA module: the input features are sequentially convolved and channel-split to obtain the first and second features after the split, and the first features are sequentially processed in no less than 2 Faster_ELA submodules; the second features are fused with the output features of all Faster_ELA submodules to obtain the output features. In a certain embodiment, channel splitting is to split the features into two features with the same number of channels on average according to the number of channels, and the number of Faster_ELA submodules is 3, that is, the partial features obtained by channel splitting are sequentially processed in 3 Faster_ELA submodules.
[0029] Understandably, the C2f_Faster_ELA module is Figure 3 As shown, the processing process can be expressed as: Input feature X and perform standard convolution operation Conv to obtain feature X 1 ,Right now: X 1 =Conv(X); Then for feature X 1 Perform channel splitting to obtain two features X with the same number of channels 2 ,Right now: X 2 =X 1 / 2; One of the features X 2Enter the three Faster_ELA submodules in turn, namely: X 3 =Faster_ELA(X 2 ); X 4 =Faster_ELA(X 3 ); X 5 =Faster_ELA(X 4 ); Among them, X 3 , X 4 and X 5 Correspondingly represents the output features of the three Faster_ELA submodules; Another feature X 2 , Feature X 3 , Feature X 4 and feature X 5 Perform feature fusion to obtain the output feature Y, that is, Y=Conv([X 2 ,X 3 ,X 4 ,X 5 ]); Among them, the feature fusion operation is to first combine another feature X 2 , Feature X 3 , Feature X 4 and feature X 5 Perform channel splicing, [·] represents channel splicing; perform standard convolution operation Conv on the spliced features.
[0030] In some embodiments, in the Faster_ELA submodule: after the input features are sequentially convolved and processed by the efficient coordinate attention mechanism, the obtained features are combined with the input features to obtain output features. Among them, the process of sequentially convolving and processing the input features by the efficient coordinate attention mechanism specifically includes: sequentially performing partial convolution and no less than 2 point-by-point convolutions on the input features, and then performing efficient coordinate attention mechanism (ELA) (from the paper "ELA: Efficient Local Attention for Deep Convolutional Neural Networks" published on the arXiv platform) on the obtained features. The efficient coordinate attention mechanism enhances the ability to extract spatial information features and accurately locates the area of interest in the image. In a certain embodiment, the point-by-point convolution operation is performed twice, that is, after the input feature is partially convolved, two consecutive point-by-point convolution operations are performed, wherein the partial convolution is specifically a convolution operation on some channels of the input feature, so as to reduce redundant calculations and unnecessary memory accesses; the first point-by-point convolution is used to expand the number of channels of the input feature and enhance the feature expression; the second point-by-point convolution is used to adjust the number of channels, reuse the input features, and maintain the information flow; the Faster_ELA submodule combines the features obtained by the efficient coordinate attention mechanism with the input features by adding the corresponding elements of the two features.
[0031] Understandably, the Faster_ELA submodules are Figure 4 As shown, the processing process can be expressed as: Perform a partial convolution operation PConv on the input feature X to obtain feature X 1 ,Right now: X 1 =PConv(X); Perform two consecutive point-by-point convolution operations PWConv to obtain the feature X 3 ,Right now: X 2 =PWConv(X 1 ); X 3 =PWConv(X 2 ); Among them, X 2 Represents the features obtained by the first point-by-point convolution operation; Finally, for feature X 3 Perform efficient coordinate attention mechanism processing ELA, and add the processed features to the corresponding elements of the input feature X to obtain the output feature Y, that is: Y=ELA(X 3 )+X.
[0032] It should be noted that the number of partial convolution and point-by-point convolution operations in the Faster_ELA submodule, as well as the operation mode of partial convolution and point-by-point convolution (such as whether partial convolution and point-by-point convolution process input features serially or in parallel, and the processing order of partial convolution and point-by-point convolution) are adjusted according to actual conditions, and the present invention does not limit this. In addition, in the Faster_ELA submodule, the combination of the features obtained by the efficient coordinate attention mechanism with the input features can be a splicing and fusion method (i.e., splicing the two features into channels and then convolving the spliced features), as well as other processing methods that can achieve feature combination, which can be adjusted according to actual conditions, and the present invention does not limit this.
[0033] In some embodiments, in each VoV-GSCSP module, the input features are processed by two parallel convolutions, and the features obtained by one convolution are processed by the GS bottleneck submodule and then combined with the features obtained by the other convolution to obtain the output features. In a specific embodiment, the feature combination can be to add the corresponding elements of the two features, and then perform standard convolution on the added features to obtain the output features.
[0034] It is understandable that the VoV-GSCSP module is Figure 5 As shown, the processing process can be expressed as: The input features are processed by two parallel convolutions to obtain features X 1 and feature X 2 Right now: X 1 =Conv(X); X 2 =Conv(X); The feature X 1 Perform GS bottleneck submodule processing GSBottleneck to obtain feature X 3 ,Right now: X 3 =GSBottleneck(X 1 ); The feature X 2 and feature X 3 Add the corresponding elements and perform the standard convolution operation Conv on the added features to obtain the output feature Y, that is: Y=Conv(X 2 +X 3 ).
[0035] In some embodiments, in each GS bottleneck submodule, the input features are processed by two GSConv layers in sequence, and the obtained features are added to the corresponding elements of the features obtained after the input features are processed by standard convolution to obtain the output features.
[0036] Understandably, the GS bottleneck submodules such as Figure 6 As shown, the processing process can be expressed as: The input feature X is processed by two GSConv layers in turn to obtain feature X 1 ,Right now: X 1 =GSConv(GSConv(X)); The feature X 1 Add the corresponding elements of the features obtained after the standard convolution process Conv with the input feature X to get the output feature Y, that is: Y=X 1 +Conv(X).
[0037] In some embodiments, in the depthwise separable convolutional layer, channel-by-channel convolution is performed on the input features to extract spatial information in the features, and then point-by-point convolution is performed on the features obtained by the channel-by-channel convolution to extract channel information in the features to obtain output features.
[0038] It can be understood that depth-wise separable convolution is Figure 7 As shown, the processing process can be expressed as: Input feature X and perform channel-by-channel convolution DWConv to obtain feature X 1 ,Right now: X 1 =DWConv(X); For feature X 1 Perform point-by-point convolution processing PWConv to obtain the output feature Y, that is: Y = PWConv(X 1 ); Figure 7 Medium H 1 , W 1 and C 1 They represent the length, width and number of channels of the input feature X, respectively. k represents the size of the convolution kernel of the channel-by-channel convolution processing DWConv. 2 , W 2 and C 2 Represents feature X 1 The length, width and number of channels of 1 Perform point-by-point convolution, so the length, width, and number of channels of the output feature Y are the same as feature X 1 The length, width and number of channels are equal.
[0039] S3: Apply the training set obtained in step S1 to train the YOLO-FESD network obtained in step S2 to obtain the YOLO-FESD model. The loss function used during training is consistent with the loss function used to train the YOLOv8 network.
[0040] In one embodiment, the SGD optimizer is used for training, the momentum value of the SGD optimizer is 0.937, and the weight decay is ; Set epoch to 300, batch_size to 16, and the initial learning rate to The experimental environment is configured on Windows 10, using NVIDIA GeForce RTX 3090 GPU. Programming is done using Python 3.7, and the model architecture is built on the PyTorch framework.
[0041] S4: Input the image to be detected into the YOLO-FESD model obtained in step S3 for target detection.
[0042] In order to detect the performance of the lightweight real-time target detection method based on YOLO-FESD provided by the present invention, in a certain embodiment, a YOLO-FESD model provided by a parameter quantity and a calculation quantity evaluation method is used. The lower the parameter quantity and the calculation quantity of the YOLO-FESD model, the higher the degree of lightweight of the model, and the smaller the computing space occupied during use and the higher the computing rate. In addition, the mean average precision (mAP) and frames per second (FPS) are used to comprehensively evaluate the target detection method provided by the present invention. Specifically, FPS measures the amount of information used to save and display dynamic videos. The more frames per second, the smoother the displayed action will be; mAP is a comprehensive evaluation indicator commonly used in the detection field. It calculates the average precision (AP) of all detection categories to measure the overall performance of the model in all categories. mAP is obtained by the following formula: ; in, Indicates the number of samples.
[0043] AP is the detection accuracy for a single category, reflecting the detection performance of the model for various categories. Among them, AP is obtained by the following formula: ; Among them, P represents the model precision and R represents the recall rate.
[0044] The model accuracy P is calculated by the following formula: ; Among them, TP represents true positives, that is, the number of samples correctly identified, and FP represents false positives, that is, the number of samples incorrectly identified.
[0045] The recall rate R is calculated by the following formula: ; Among them, FN represents false negatives, that is, the number of samples mistakenly identified as non-targets.
[0046] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the disclosure of the present invention can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0047] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A lightweight real-time target detection method based on YOLO-FESD, characterized in that: include: S1: Obtain a public object detection dataset and preprocess it to obtain a training set; S2: construct a YOLO-FESD network, wherein the YOLO-FESD network uses the YOLOv8 network as the basic network, adds the C2f_Faster_ELA module group to the backbone network of the YOLOv8 network; adds the GSConv layer and the VoV-GSCSP module to the neck network of the YOLOv8 network; and adds a depthwise separable convolutional layer to the head network of the YOLOv8 network; S3: Apply the training set obtained in step S1 to train the YOLO-FESD network obtained in step S2 to obtain a YOLO-FESD model; S4: Input the image to be detected into the YOLO-FESD model obtained in step S3 for target detection.
2. The lightweight real-time target detection method based on YOLO-FESD according to claim 1, characterized in that: In step S2: the C2f module in the backbone network of the YOLOv8 network is replaced with the C2f_Faster_ELA module group to obtain the backbone network of the YOLO-FESD network; the output features of the first C2f_Faster_ELA module group, the third C2f_Faster_ELA module group and the SPPF module along the feature processing direction of the backbone network of the YOLO-FESD network are input into the neck network of the YOLO-FESD network; each C2f_Faster_ELA module group includes no less than one C2f_Faster_ELA module.
3. The lightweight real-time target detection method based on YOLO-FESD according to claim 2, characterized in that: In the C2f_Faster_ELA module: convolution and channel splitting are performed on the input features in sequence to obtain the first part of features and the second part of features after splitting, and the first part of features enters no less than 2 Faster_ELA sub-modules for processing; the second part of features is feature fused with the output features of all Faster_ELA sub-modules to obtain the output features.
4. The lightweight real-time target detection method based on YOLO-FESD according to claim 3, characterized in that: In the Faster_ELA submodule: after the input features are processed by convolution and efficient coordinate attention mechanism in sequence, the obtained features are combined with the input features to obtain the output features.
5. The lightweight real-time target detection method based on YOLO-FESD according to claim 4, characterized in that: The process of sequentially performing convolution and efficient coordinate attention mechanism processing on the input features includes: sequentially performing partial convolution and no less than 2 point-by-point convolution on the input features, and then performing the efficient coordinate attention mechanism processing on the obtained features.
6. The lightweight real-time target detection method based on YOLO-FESD according to claim 2, characterized in that: In step S2: Replace the C2f module in the neck network of the YOLOv8 network with the VoV-GSC-SP module to obtain the neck network of the YOLO-FESD network; The output features of the SPPF module are input into the first GSConv layer, and the output features of the first GSConv layer are spliced with the output features of the third C2f_Faster_ELA module after upsampling operation; The concatenated features are processed by the first VoV-GSCSP module, the upsampling operation, and the second GSConv layer in sequence, and the obtained features are concatenated with the output features of the first C2f_Faster_ELA module; The concatenated features are processed by the third GSConv layer, the second VoV-GSCSP module and the fourth GSConv layer in sequence, and the obtained features are concatenated with the output features of the second GSConv layer; The concatenated features are processed by the third VoV-GSCSP module and the fifth GSConv layer in turn, and the obtained features are concatenated with the output features of the first GSConv layer; After being processed by the fourth VoV-GSCSP module, the concatenated features and the output features of the second VoV-GSCSP module and the third VoV-GSCSP module enter the head network of the YOLO-FESD network.
7. The lightweight real-time target detection method based on YOLO-FESD according to claim 6, characterized in that: In each VoV-GSCSP module, the input features are processed by two parallel convolutions. The features obtained by one convolution are then processed by the GS bottleneck submodule and combined with the features obtained by the other convolution to obtain the output features.
8. The lightweight real-time target detection method based on YOLO-FESD according to claim 7, characterized in that: In each GS bottleneck submodule, the input features are processed by two GSConv layers in sequence, and the obtained features are added to the corresponding elements of the features obtained after the input features are processed by the convolution layer to obtain the output features.
9. The lightweight real-time target detection method based on YOLO-FESD according to claim 7, characterized in that: In the process of combining the features processed by the GS bottleneck submodule with the features obtained by another convolution process to obtain the output features, the corresponding elements of the two features are first added, and then the added features are convolved to obtain the output features.
10. The lightweight real-time target detection method based on YOLO-FESD according to claim 6, characterized in that: In step S2: the convolution module in each detection head of the head network of the YOLOv8 network is replaced with at least one of the depthwise separable convolution layers to obtain the head network of the YOLO-FESD network; in the depthwise separable convolution layer, the input features are convolved channel by channel, and then the features obtained by the channel-by-channel convolution are convolved point by point to obtain the output features.
Citation Information
Patent Citations
Old people falling detection method based on improved YOLOv8 model
CN118692139A
Lightweight small target pest detection method and device and electronic equipment
CN119418366A
Cited By
Construction site small-scale target detection method, system and equipment based on improved YOLO and medium
CN120808147A