An improved G-Yolov4 mobile robot target detection method
Through the improved G-Yolov4 mobile robot object detection method, using GhostNet and feature fusion module, the problems of high computing power and low detection accuracy in the existing technology are solved, and high accuracy and high real-time performance on embedded platforms are achieved Object detection.
Patent Information
- Application Number
- CN202210287022.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-03-23
AI Technical Summary
The existing high-precision object detection algorithms require high computing power when deployed on embedded weak platforms, low real-time detection frame rates, and excessively lightweight networks may lead to false detection, multiple noise and missed detection in small spaces, resulting in detection accuracy Low.
Using the improved G-Yolov4 mobile robot object detection method, the image is grayscale preprocessed and feature extraction and fusion is performed in GhostNet. Ghost Bottlenecks and feature fusion module are used to reduce the network parameter amount and computing power and improve detection. Accuracy and real-time frame rate.
While ensuring high detection accuracy, the calculation power requirement of the algorithm is reduced and the real-time object detection frame rate is improved. It is suitable for mobile robots and real-time accuracy on embedded platforms.
Smart Images

Figure CN114648700B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of target detection, and in particular relates to an improved G-Yolov4 mobile robot target detection method. Background Art
[0002] In recent years, target detection technology has developed rapidly, and mobile robot detection algorithms for pedestrians, vehicles, traffic lights, lane lines, etc. have also become a key research direction. However, most of the current high-precision target detection algorithms are usually accompanied by too deep networks, large parameters, and higher computing power requirements, making it difficult to complete the deployment of embedded weak platforms, and the real-time detection frame rate is low. The overly lightweight network may cause false detection, multiple noise points, and missed detection of dark targets in a small space, resulting in low detection accuracy. To address these problems, this paper proposes an improved G-Yolov4 mobile robot target detection method that balances the algorithm detection accuracy and computing power consumption. While ensuring high detection accuracy, it reduces the network parameters and required computing power, optimizes the current mainstream deep target detection algorithm, which has a long running time and occupies many resources, improves the real-time target detection frame rate, and is better applied to mobile robot target detection. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide an improved G-Yolov4 mobile robot target detection method that balances algorithm detection accuracy and computing power consumption.
[0004] Technical solution: An improved G-Yolov4 mobile robot target detection method, comprising the following steps:
[0005] (1) The images captured by the high-definition camera on the mobile robot are preprocessed into grayscale and sent to the G-Yolov4 network. When the image is input into the improved GhostNet, a 16-channel ordinary 1×1 convolution block is first performed, and the convolution block performs convolution, normalization, and activation function operations;
[0006] (2) Perform multiple Ghost Bottlenecks operations. During the process, Ghost Bottlenecks is used to obtain effective feature layers A1 and A2 in the stacking process. At this point, the two preliminary effective features are extracted. The above steps obtain feature A j ,j=1,2;
[0007] (3) Concat the obtained feature A1 once to increase the number of channels, perform five 1×1 convolutions, perform a 1×1 convolution and an upsampling on the obtained feature A2, and then stack and pool it with the operated A1 feature to obtain feature B1, then downsample A1 once and stack it with A2 to obtain B2;
[0008] (4) Feature B1 undergoes a Concat channel increase and performs five 1×1 convolutions to obtain feature C1. The obtained feature B2 is stacked and pooled with the downsampled feature C1 to obtain feature C2. The final effective features C1 and C2 are output as Yolo head.
[0009] In the step (1), the size of the collected images is unified, and the input 224×224×3 images are batch normalized, standardized, and activated in sequence.
[0010] The step (2) is:
[0011] (2.1) Perform a Ghost Bottlenecks with a step size of 1 on the 112×112×16 feature map output in step (1) to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution;
[0012] (2.2) Perform a Ghost Bottlenecks with a step size of 1 on the 56×56×24 feature map output in the previous step to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution;
[0013] (2.3) Perform a Ghost Bottlenecks with a step size of 1 on the 28×28×40 feature map output in the previous step to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution;
[0014] (2.4) Perform three GhostBottlenecks with a step size of 1 on the 14×14×80 feature map output in the previous step to perform feature concentration and depth-wise separable convolution;
[0015] (2.5) Perform a GhostBottlenecks with a step size of 1 on the 14×14×112 feature map output in the previous step to perform feature concentration and depth-wise separable convolution;
[0016] (2.6) Perform three GhostBottlenecks with a step size of 2 on the 7×7×160 feature map output in the previous step to perform feature concentration and depth-wise separable convolution;
[0017] (2.7) The output feature map is subjected to a Ghost Bottlenecks with a step size of 1 for feature concentration and depthwise separable convolution, and the output feature map is adjusted for the number of channels using a 1×1 convolution block;
[0018] (2.8) Perform average pooling on the 7×7×960 feature map output in the previous step;
[0019] (2.9) Perform a 1×1 convolution with a step size of 1 on the 1×1×960 output of the previous step to adjust the number of channels;
[0020] (2.10) The features extracted by (2.5) and (2.9) are sent to the feature fusion module for enhanced feature extraction. Let the backbone initial extraction feature, i.e., the input of the feature fusion module, be A j ,j=1,2, obtain the effective feature layers A1, A2.
[0021] The step (3) is:
[0022] Entering the feature fusion module, A1 output from the previous stage is subjected to a Concat channel increase and five 1×1 convolutions, A2 is subjected to a 1×1 convolution and an upsampling, and the two are stacked to obtain B1. Feature A2 is subjected to a 1×1 convolution and a downsampling and stacked with A2 to obtain B2.
[0023] The step (4) is:
[0024] The B1 obtained in the previous stage is concat-ed once to increase the number of channels and perform five 1×1 convolutions to obtain C1. C1 is downsampled and stacked with B2 to increase the number of channels and perform five 1×1 convolutions to obtain C2. Then the output of the feature fusion module is set to C i , i=1,2, and obtain the effective features C1 and C2 as Yolo head outputs, and finally get the detection results.
[0025] The calculation formulas of B1 and B2 in step (3) are as follows:
[0026]
[0027] Among them, τ1 and τ2 are the weights of the corresponding stacked features.
[0028]
[0029] Where σ1 and σ2 are the weights of the corresponding stacked features.
[0030] The calculation formulas of C1 and C2 in step (4) are as follows:
[0031] C1=conv(B2)
[0032]
[0033] Where θ1 and θ2 are the weights of the corresponding stacked features.
[0034] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: the image processing algorithm has high detection accuracy and low computing power consumption, and detects moving targets based on a new algorithm to ensure target detection accuracy and meet the real-time requirements of some embedded platform transplantation and deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is the overall framework diagram of the method of the present invention
[0036] Figure 2 It is an improved GhostNet
[0037] Figure 3 (a) is Ghost Bottlenecks with a step size of 1; (b) is Ghost Bottlenecks with a step size of 2
[0038] Figure 4 It is the feature fusion module
[0039] Figure 5 (a) is the loss of the network model on the validation set; (b) is the detection accuracy graph
[0040] Figure 6 It is the algorithm verification hardware platform, i.e. mobile robot
[0041] Figure 7 This is the grayscale image of the data acquisition image.
[0042] Figure 8 This is the mobile robot detection result diagram DETAILED DESCRIPTION
[0043] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0044] like Figure 1 As shown, the improved G-Yolov4 mobile robot target detection method of the present invention comprises the following steps:
[0045] (1) The image captured by the high-definition camera on the mobile robot is preprocessed into grayscale and sent to the G-Yolov4 network. The image is input into Figure 2 In the improved GhostNet shown in the figure, a 16-channel ordinary 1×1 convolution block is first performed, and the convolution block performs convolution, normalization, and activation function operations;
[0046] (2) Conduct Figure 3 The operation of Ghost Bottlenecks shown in the figure, in the process, using Ghost Bottlenecks in the stacking process, obtains the effective feature layers A1 and A2. At this point, the two preliminary effective features are extracted. The above steps obtain feature A j ,j=1,2;
[0047] (3) Conduct Figure 4 The feature fusion shown in the figure increases the number of channels of feature A1 by one Concat operation, performs five 1×1 convolutions, performs one 1×1 convolution and one upsampling on feature A2, and then stacks and pools it with the operated feature A1 to obtain feature B1. Then, A1 is downsampled once and stacked with A2 to obtain B2.
[0048] (4) Feature B1 undergoes a Concat channel increase and performs five 1×1 convolutions to obtain feature C1. The obtained feature B2 is stacked and pooled with the downsampled feature C1 to obtain feature C2. The final effective features C1 and C2 are output as Yolo head.
[0049] In the step (1), the size of the collected images is unified, and the input 224×224×3 images are batch normalized, standardized, and activated in sequence.
[0050] The step (2) is:
[0051] (2.1) Perform a Ghost Bottlenecks with a step size of 1 on the 112×112×16 feature map output in step (1) to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution;
[0052] (2.2) Perform a Ghost Bottlenecks with a step size of 1 on the 56×56×24 feature map output in the previous step to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution;
[0053] (2.3) Perform a GhostBottlenecks with a step size of 1 on the 28×28×40 feature map output in the previous step to perform feature concentration and depth-wise separable convolution, and then perform a GhostBottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution;
[0054] (2.4) Perform three GhostBottlenecks with a step size of 1 on the 14×14×80 feature map output in the previous step to perform feature concentration and depth-wise separable convolution;
[0055] (2.5) Perform a GhostBottlenecks with a step size of 1 on the 14×14×112 feature map output in the previous step to perform feature concentration and depth-wise separable convolution;
[0056] (2.6) Perform three GhostBottlenecks with a step size of 2 on the 7×7×160 feature map output in the previous step to perform feature concentration and depth-wise separable convolution;
[0057] (2.7) The output feature map is subjected to a Ghost Bottlenecks with a step size of 1 for feature concentration and depthwise separable convolution, and the output feature map is adjusted for the number of channels using a 1×1 convolution block;
[0058] (2.8) Perform average pooling on the 7×7×960 feature map output in the previous step;
[0059] (2.9) Perform a 1×1 convolution with a step size of 1 on the 1×1×960 output of the previous step to adjust the number of channels;
[0060] (2.10) The features extracted by (2.5) and (2.9) are sent to the feature fusion module for enhanced feature extraction. Let the backbone initial extraction feature, i.e., the input of the feature fusion module, be A j ,j=1,2, obtain the effective feature layers A1, A2.
[0061] The step (3) is:
[0062] Entering the feature fusion module, A1 output from the previous stage is subjected to a Concat channel increase and five 1×1 convolutions, A2 is subjected to a 1×1 convolution and an upsampling, and the two are stacked to obtain B1. Feature A2 is subjected to a 1×1 convolution and a downsampling and stacked with A2 to obtain B2.
[0063] The step (4) is:
[0064] The B1 obtained in the previous stage is concat-ed once to increase the number of channels and perform five 1×1 convolutions to obtain C1. C1 is downsampled and stacked with B2 to increase the number of channels and perform five 1×1 convolutions to obtain C2. Then the output of the feature fusion module is set to C i , i=1,2, and obtain the effective features C1 and C2 as Yolo head outputs, and finally get the detection results.
[0065] The calculation formulas of B1 and B2 in step (3) are as follows:
[0066]
[0067] Among them, τ1 and τ2 are the weights of the corresponding stacked features.
[0068]
[0069] Where σ1 and σ2 are the weights of the corresponding stacked features.
[0070] The calculation formulas of C1 and C2 in step (4) are as follows:
[0071] C1=conv(B2)
[0072]
[0073] Where θ1 and θ2 are the weights of the corresponding stacked features.
[0074] in Figure 5 (a) is the loss of the network model on the validation set; (b) is the detection accuracy graph. Figure 7 It is the grayscale image of the data acquisition image. Figure 8 This is the mobile robot detection result diagram.
Claims
1. An improved G-Yolov4 mobile robot target detection method, characterized in that: The following steps are involved: (1) The images captured by the high-definition camera on the mobile robot are preprocessed into grayscale and sent to the G-Yolov4 network. When the image is input into the improved GhostNet, a 16-channel ordinary 1×1 convolution block is first performed, and the convolution block performs convolution, normalization, and activation function operations; (2) Perform multiple Ghost Bottlenecks operations. During the process, Ghost Bottlenecks is used to obtain effective feature layers A1 and A2 in the stacking process. At this point, the two preliminary effective features are extracted. The above steps obtain feature A j ,j=1,2; (3) Concat the obtained feature A1 once to increase the number of channels, perform five 1×1 convolutions, perform a 1×1 convolution and an upsampling on the obtained feature A2, and then stack and pool it with the operated A1 feature to obtain feature B1, then downsample A1 once and stack it with A2 to obtain B2; (4) Feature B1 is concat-ed once to increase the number of channels and is convoluted five times with 1×1 to obtain feature C1. The obtained feature B2 is stacked and pooled with the downsampled feature C1 to obtain feature C2. The final effective features C1 and C2 are output as Yolo head. The step (2) is: (2.1) Perform a GhostBottlenecks with a step size of 1 on the 112×112×16 feature map output in step (1) to perform feature concentration and depthwise separable convolution, and then perform a GhostBottlenecks with a step size of 2 on the output feature map to perform feature concentration and depthwise separable convolution; (2.2) Perform a Ghost Bottlenecks with a step size of 1 on the 56×56×24 feature map output in the previous step to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution; (2.3) Perform a Ghost Bottlenecks with a step size of 1 on the 28×28×40 feature map output in the previous step to perform feature concentration and depth-wise separable convolution, and then perform a Ghost Bottlenecks with a step size of 2 on the output feature map to perform feature concentration and depth-wise separable convolution; (2.4) Perform three Ghost Bottlenecks with a step size of 1 on the 14×14×80 feature map output in the previous step to perform feature concentration and depth-wise separable convolution; (2.5) Perform a Ghost Bottlenecks with a step size of 1 on the 14×14×112 feature map output in the previous step to perform feature concentration and depth-wise separable convolution; (2.6) Perform three Ghost Bottlenecks with a step size of 2 on the 7×7×160 feature map output in the previous step to perform feature concentration and depth-wise separable convolution; (2.7) The output feature map is subjected to a Ghost Bottlenecks with a step size of 1 for feature concentration and depthwise separable convolution, and the output feature map is adjusted for the number of channels using a 1×1 convolution block; (2.8) Perform average pooling on the 7×7×960 feature map output in the previous step; (2.9) Perform a 1×1 convolution with a step size of 1 on the 1×1×960 output of the previous step to adjust the number of channels; (2.10) The features extracted by (2.5) and (2.9) are sent to the feature fusion module for enhanced feature extraction. Let the backbone initial extraction feature, i.e., the input of the feature fusion module, be A j ,j=1,2, obtain the effective feature layers A1, A2.
2. An improved G-Yolov4 mobile robot target detection method according to claim 1, characterized in that: In the step (1), the size of the collected images is unified, and the input 224×224×3 images are batch normalized, standardized, and activated in sequence.
3. The improved G-Yolov4 mobile robot target detection method according to claim 1, characterized in that: The step (3) is: Entering the feature fusion module, A1 output from the previous stage is subjected to a Concat channel increase and five 1×1 convolutions, A2 is subjected to a 1×1 convolution and an upsampling, and the two are stacked to obtain B1. Feature A2 is subjected to a 1×1 convolution and a downsampling and stacked with A2 to obtain B2.
4. The improved G-Yolov4 mobile robot target detection method according to claim 1, characterized in that: The step (4) is: The B1 obtained in the previous stage is concat-ed once to increase the number of channels and perform five 1×1 convolutions to obtain C1. C1 is downsampled and stacked with B2 to increase the number of channels and perform five 1×1 convolutions to obtain C2. Then the output of the feature fusion module is set to C i , i=1,2, and obtain the effective features C1 and C2 as Yolo head outputs, and finally get the detection results.
5. The improved G-Yolov4 mobile robot target detection method according to claim 1, characterized in that: The calculation formulas of B1 and B2 in step (3) are as follows: Among them, τ1 and τ2 are the weights of the corresponding stacked features. Where σ1 and σ2 are the weights of the corresponding stacked features.
6. The improved G-Yolov4 mobile robot target detection method according to claim 1, characterized in that: The calculation formulas of C1 and C2 in step (4) are as follows: C1=conv(B2) Where θ1 and θ2 are the weights of the corresponding stacked features.
