A mobile robot target detection method based on improved YOLOv4

Through improvements to YOLOv4, including data enhancement, Ghostnet replacement and depth-separable convolution, the problem of insufficient computing power on mobile robot devices is solved, efficient target detection is achieved, and detection accuracy and speed are significantly improved.

CN115082751BInactive Publication Date: 2024-10-22CHANGCHUN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210496122.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2024-10-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing target detection algorithms have limited computing capabilities on mobile robot devices, resulting in poor detection performance. In particular, lightweight network models are difficult to complete complex target detection tasks in terms of recognition accuracy.

Method used

By improving YOLOv4, using data enhancement and Ghostnet to replace the CSPDarknet53 backbone feature extraction network, using depth separable convolution in the enhanced feature extraction network, and performing post-training static quantization processing, the amount of model parameters and calculations are reduced, and the detection accuracy is improved. and reasoning speed.

Benefits of technology

While maintaining detection accuracy, the model volume is compressed to 1/8 of the size of YOLOv4, which significantly improves the running speed. It is suitable for deployment on mobile robot devices and achieves good target detection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082751B_ABST
    Figure CN115082751B_ABST
Patent Text Reader

Abstract

The present invention discloses a mobile robot target detection method based on improved YOLOv4, wherein the target detection model comprises: (1) obtaining a DJI ROCO data set, performing data enhancement processing on the data set and dividing it into a training set and a test set; (2) inputting the training set into an improved YOLOv4 network model for model training; (3) quantizing the best model after training; (4) inputting the test set into the quantized best model for testing, thereby obtaining a trained mobile robot target detection model. When performing target detection, a moving robot image is collected in real time, and robot target detection is performed on the robot image according to the trained mobile robot target detection model based on improved YOLOv4.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision and image processing, and more specifically, to a target detection method for a movable robot based on an improved YOLOv4. Background Art

[0002] As an emerging robotics academic platform, DJI's RoboMaster competition organizing committee has launched the RoboMaster AI Challenge specifically for the field of mobile robots since 2017. The RoboMaster AI Challenge allows enthusiasts around the world to study robotics technology based on deep neural networks, and is expected to apply the results to industries such as field rescue, unmanned driving, and automatic logistics to benefit human life. In the RoboMaster AI Challenge jointly organized by DJI, a single robot needs to have the ability to detect, track, and shoot targets, which requires mobile robots to be able to detect target objects correctly and quickly. How to implement a target detection algorithm that combines detection effect and performance on a wheeled mobile robot has become the key to victory. As target detection algorithms are deployed on devices with mobile wheeled robots, limited computing power becomes a key factor limiting detection performance.

[0003] In recent years, target detection algorithms have been developing continuously. They can be roughly divided into two categories. One is the two-stage target detection algorithm, mainly represented by R-CNN, Fast R-CNN, and Faster R-CNN. This type of algorithm will first generate a series of candidate boxes based on the candidate region generation network. The candidate box will first frame the position of the part that needs to be detected, and then use the convolutional neural network to specifically locate and classify the framed position. This method first generates candidate regions, and then performs classification and regression, resulting in high detection accuracy and long detection time; the other is the single-stage target detection algorithm, mainly represented by the YOLO series and SSD. This type of algorithm does not need to generate candidate regions, and uses a convolutional neural network to directly extract the input image features and predict the location information of the detection target. It is an end-to-end detection method. Although the detection time is reduced, the detection accuracy is also sacrificed.

[0004] Both two-stage and single-stage target detection algorithms have made good progress on high-performance devices, but running these methods requires a lot of computing resources, so the effect is poor on some mobile robot devices. Although some lightweight target detection algorithms have been proposed, such as YOLOv3_tiny and YOLOv4_tiny, these lightweight networks have excellent performance on mobile robot devices, but the recognition accuracy is also much lower than that of non-lightweight network models, and cannot complete complex target detection tasks. Summary of the invention

[0005] In view of the defects of the prior art, the first aspect of the present invention provides a mobile robot target detection method based on improved YOLOv4, comprising:

[0006] (1) Obtain the DJI ROCO dataset, perform data enhancement on it, and divide it into a training set and a test set;

[0007] (2) Input the training set into the improved YOLOv4 network model for model training;

[0008] (3) Quantify the best model after training;

[0009] (4) The test set is input into the quantized best model for testing, thus obtaining the trained mobile robot target detection model.

[0010] The second aspect of the present invention provides a mobile robot target detection device based on improved YOLOv4: real-time acquisition of moving robot images, and robot target detection of the robot images according to a trained mobile robot target detection method based on improved YOLOv4.

[0011] A third aspect of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the mobile robot target detection method based on improved YOLOv4.

[0012] A fourth aspect of the present invention provides a mobile robot, wherein the mobile robot target detection method based on improved YOLOv4 is mounted on a miniPC device of the mobile robot;

[0013] When the mobile robot is moving, the mobile robot target detection device based on the improved YOLOv4 is used to realize target detection.

[0014] Compared with the prior art, the present invention has the following characteristics:

[0015] (1) Data augmentation is used to expand the amount of data, making the trained target detection model more robust;

[0016] (2) By replacing the YOLOv4 backbone feature extraction network with Ghostnet, the model size is compressed, and the GhostNet feature layer is introduced into the enhanced feature extraction network to maintain accuracy;

[0017] (3) In the enhanced feature extraction network, the method of using deep separable convolution instead of the original ordinary convolution greatly reduces the number of parameters, thereby reducing the amount of calculation, improving the model performance and retaining the detection accuracy;

[0018] (4) The post-training static quantization method is adopted to further reduce floating-point operations, speed up inference, and make deployment on robot devices friendly. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Flow chart of the method of the present invention.

[0020] Figure 2 This is the structure diagram of the improved YOLOv4 model of the present invention.

[0021] Figure 3 It is a schematic diagram of the detection results of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0023] Example 1

[0024] The operating system of the training environment selected in this embodiment is Ubuntu 18.04, the deep learning framework of the network model is Pytorch, and the hardware environment is Intel(R) Core(TM) i5-11260H @ 2.60GHz, Nvidia GTX 1070 graphics card, configured with 6GB video memory and 16GB memory. The operation of the selected test environment is a miniPC device Dell OptiPlex 3060 that can be mounted on a mobile robot, the CPU processor is Intel(R) Pentium(R) Gold G5400TCPU@ 3.10GHz, and Winows10 is the operating system and Pytorch framework deployment.

[0025] like Figure 1 As shown, a mobile robot target detection method based on improved YOLOv4 includes:

[0026] (1) Obtain the DJI ROCO dataset, perform data enhancement on it, and divide it into a training set and a test set;

[0027] Specifically, the images in the DJI ROCO dataset are expanded three times by adding Gaussian noise, changing brightness, image translation, image rotation, image flipping, and random combination of image scaling;

[0028] The expanded data set is divided into a training set and a test set in a ratio of 9:1.

[0029] (2) Input the training set into the improved YOLOv4 network model for model training;

[0030] like Figure 2 As shown, the method for improving the YOLOv4 network model is:

[0031] Delete the original backbone feature extraction network CSPDarknet53 of the YOLOv4 network model and use Ghostnet instead; specifically, first find the valid feature layers with the same height and width as CSPDarknet53 in GhostNet, and then use these feature layers to replace the original CSPDarknet53 feature layers;

[0032] The GhostNet feature layer is introduced into the enhanced feature extraction network PANet of the YOLOv4 network model.

[0033] (3) Quantify the best model after training:

[0034] Step 3.1, add QuantStub and DeQuantStub modules to specify where to perform explicit quantization and dequantization of activation values;

[0035] Step 3.2, combine the Ghost module operation in G-bneck with the Batch Normalization operation:

[0036] First, the input value of the BN layer is normalized, and then the normalized result is scaled and shifted. At this time, the BN layer is regarded as a 1x1 convolution layer; secondly, the input values ​​and weight values ​​in all convolution layers are explicitly quantized and mapped to integers in the value range of (0,255). After the convolution calculation is completed, the calculation result is dequantized; finally, the weight of the quantized convolution layer is multiplied by the weight of the quantized BN layer to form the fused weight; then the weight of the BN layer is multiplied by the bias of the Ghost module and added to the bias of the BN layer to form the fused bias. At this point, the fusion operation is completed;

[0037] Step 3.3, select asymmetric quantization and L2Norm calibration technology for calibration;

[0038] In step 3.4, the model is converted using the torch.quantization.convert() module; specifically, each activation tensor is quantized by converting them from FP32 to INT using the corresponding scale and bias values.

[0039] (4) Input the test set into the quantized best model for testing, thus obtaining the trained mobile robot target detection model;

[0040] During specific training, the image input size is 416, the maximum number of iterations for epoch is set to 300, the initial learning rate is set to 8-3, and the learning rate is set to decay 10 times when the number of iterations is 30 epochs to make the loss function converge further. After repeated training, the parameters with the best effect are selected.

[0041] In order to comprehensively analyze the model detection performance, the improved YOLOv4 model after training was compared with the YOLOv4_tiny and YOLOv4 models under the same experimental conditions. The detection results of different models are shown in Table 1:

[0042]

[0043] Through experimental comparison, the improved YOLOv4 model has good overall performance. When the model size is compressed to only about 1 / 8 of the size of YOLOv4, the mAP value does not lose much and is much higher than YOLOv4_tiny, and even surpasses YOLOv4 in the mAP (0.75) indicator. At the same time, it can be clearly seen that the running time performance of the improved YOLOv4 is far better than YOLOv4, and is at the same level as YOLOv4_tiny. The inference speed after quantization obviously catches up with the lightweight network YOLOv4_tiny. In general, the improved YOLOv4 has greatly compressed the model size while basically retaining the accuracy, making the model convenient to deploy on robots.

[0044] Figure 3 The improved YOLOv4 model detects and recognizes the test set images in the DJI ROCO dataset. It can be seen from the figure that the invention has good detection performance for small targets, low light conditions, and multiple targets.

[0045] Example 2

[0046] This embodiment provides a mobile robot target detection device based on improved YOLOv4:

[0047] The images of the moving robot are collected in real time, and the robot target detection is performed on the robot images according to the mobile robot target detection method based on the improved YOLOv4 described in Example 1 after training.

[0048] Example 3

[0049] This embodiment provides a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the mobile robot target detection method based on the improved YOLOv4 described in Example 1 is implemented.

[0050] Example 4

[0051] This embodiment provides a mobile robot: the mobile robot target detection method based on improved YOLOv4 described in Embodiment 1 is mounted on a miniPC device of the mobile robot;

[0052] When the mobile robot is moving, the mobile robot target detection device based on the improved YOLOv4 described in Example 2 is used to realize target detection.

[0053] It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer non-transient readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer program code.

[0054] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0055] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0057] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A mobile robot target detection method based on improved YOLOv4, characterized in that: include: (1) Obtain the DJI ROCO dataset, perform data enhancement on it, and divide it into a training set and a test set; The method of dividing the data set into training set and test set after data enhancement is: The images in the DJI ROCO dataset are expanded three times by adding Gaussian noise, changing brightness, image translation, image rotation, image flipping and image scaling in random combinations; The expanded data set is divided into a training set and a test set in a ratio of 9:1; (2) Input the training set into the improved YOLOv4 network model for model training; The method to improve the YOLOv4 network model is: Delete the original backbone feature extraction network CSPDarknet53 of the YOLOv4 network model and use Ghostnet instead; specifically, first find the valid feature layers with the same height and width as CSPDarknet53 in GhostNet, and then use these feature layers to replace the original CSPDarknet53 feature layers; Introduce the GhostNet feature layer into the enhanced feature extraction network PANet of the YOLOv4 network model; (3) Quantify the best model after training; Step 3.1, add QuantStub and DeQuantStub modules to specify where to perform explicit quantization and dequantization of activation values; Step 3.2, combine the Ghost module operation in G-bneck with the Batch Normalization operation: First, the input values ​​of the BN layer are normalized, and then the normalized results are scaled and shifted. At this time, the BN layer is regarded as a 1x1 convolution layer; secondly, the input values ​​and weight values ​​in all convolution layers are explicitly quantized and mapped to integers in the value range of (0,255). After the convolution calculation is completed, the calculation results are dequantized; finally, the weights of the quantized convolution layer are multiplied by the weights of the quantized BN layer to form the fused weights; Then multiply the weight of the BN layer by the bias of the Ghost module and add the bias of the BN layer to form the fused bias, and the fusion operation is completed; Step 3.3, select asymmetric quantization and L2Norm calibration technology for calibration; Step 3.4, use the torch.quantization.convert() module to convert the model; (4) The test set is input into the quantized best model for testing, thus obtaining the trained mobile robot target detection model.

2. A mobile robot target detection device based on improved YOLOv4, characterized in that: Collect images of the moving robot in real time, and perform robot target detection on the robot images according to the trained movable robot target detection method based on improved YOLOv4 described in claim 1.

3. A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the mobile robot target detection method based on improved YOLOv4 as described in claim 1.

4. A mobile robot, characterized in that: During the movement of the mobile robot, the mobile robot target detection device based on improved YOLOv4 as described in claim 2 is used to realize target detection.