A two-stage key part identification method for rotorcraft UAV control
Through the dual-stage identification method, combined with YOLO v4 and Res18 networks, the problem of component identification in the prevention and control of rotor UAVs is solved, the precise identification and accurate positioning of key parts of rotor UAVs is achieved, and the recognition rate and reliability are improved.
Patent Information
- Application Number
- CN202210740974.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-06-27
AI Technical Summary
It is difficult to accurately identify the motor, arm and battery components in the power system in the prevention and control of rotor drones with existing technology. Especially when the components are close together or small in size, they are easily missed, and the detection results have relatively large errors.
A two-stage key part identification method is adopted. First, a rotor UAV frame detection network and a key part center point detection network based on heat map regression are constructed. Through the offline training and online identification process, YOLO v4 and Res18 networks are used to realize the detection of rotor UAV. Fine detection of borders and center points of key parts, combined with data enhancement and loss function optimization, and finally obtaining accurate part locations and categories through post-processing.
It achieves fine identification of key parts of the rotor UAV, improves the recognition rate of small-scale parts, avoids the situation where the detection results are suppressed when parts are close to each other, and enhances the reliability and accuracy of component detection.
Smart Images

Figure CN115019064B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and more specifically, relates to a two-stage key part identification method for the prevention and control of rotary-wing unmanned aerial vehicles. Background Art
[0002] Therefore, drone prevention and control has very important safety significance. Among them, laser damage is an important means with the advantages of sensitive response, no electromagnetic pollution, and long effective distance. Rotary-wing drone component identification is an important way to improve the damage rate.
[0003] When destroying a rotary-wing drone, destroying the power system is an efficient means of attack, mainly including the motor, arm and battery. The motor is a power device located under the rotor and is the source of power for the rotor to rotate; the arm is a mechanical device connecting the motor and the fuselage, with a power transmission line hidden inside; the battery is located in the middle of the rotor drone fuselage and is a power supply device. Therefore, destroying any of the motor, arm or battery parts can paralyze the power system of the rotary-wing drone.
[0004] Due to the ever-changing postures of drones, it is common for drone parts to be close to each other or even occlude each other. The non-maximum suppression (NMS) strategy of bounding boxes commonly used in the field of target detection will suppress detection results with high bounding box overlap, which can easily lead to the situation where only one of the two parts can be identified when the distance between the two parts is close or partially occluded.
[0005] Since the sizes of the above three parts in the image are often very small, it is difficult to detect them with one-stage detection technology. Wuhan University directly marked the aircraft component bounding box and trained the improved YOLO algorithm network in its patent application "A component-based multi-layer parallel network SAR image aircraft target detection method" (patent application number: CN201710852460.0, patent publication number: CN107657224A). This method takes into account that "the aircraft target in the image is small, usually composed of dozens or hundreds of pixels. After the sub-components are too subdivided, the pixels of each component are smaller, which brings great difficulty to detection." Therefore, the aircraft is only divided into two sub-components (the number of pixels of each component is about 50% of the aircraft). Therefore, it is difficult to achieve fine recognition of components with one-stage detection technology.
[0006] In addition, if only the prediction performance of the component center point is considered, the smaller the component is, the greater the relative error of the one-stage detection method is. For example, assuming that the network's recognition deviation for components of all scales is Δ, and the component scale is s, then the relative error of component recognition is Therefore, the reliability of the one-stage detection method decreases as the component becomes smaller.
[0007] In summary, it is necessary to improve the recognition performance of key parts of rotorcraft UAVs to solve the technical problems that missed detection is easy to occur when the components are close and small in size, and the smaller the component size, the greater the relative error of the detection result. Summary of the invention
[0008] In response to the above defects or improvement needs of the prior art, the present invention provides a two-stage key part identification method for rotorcraft UAV prevention and control, which aims to achieve high-precision rotorcraft UAV key part identification performance and provide accurate component position information for rotorcraft UAV prevention and control, thereby solving the technical problems that missed detection is prone to occur when components are close in distance and small in size, and the smaller the component size, the greater the relative error of the detection result.
[0009] To achieve the above objectives, the present invention provides a two-stage key part identification method for the prevention and control of rotary-wing UAVs, comprising:
[0010] S1. Build database;
[0011] Label the drone borders and key parts center points in the collected drone images;
[0012] The marking contents of the key parts center point include coordinates and categories; the categories of the key parts center point include motor, arm and battery;
[0013] S2. Offline training;
[0014] Construct a rotor UAV border detection network and train it using UAV images and UAV border annotation information to obtain a rotor UAV border detection model.
[0015] A key part center point detection network based on heat map regression is constructed, and it is trained using drone images, drone bounding box annotation information, and key part center point annotation information to obtain a key part center point detection model.
[0016] S3. Online identification;
[0017] Collect the drone image to be identified, input it into the rotor drone border detection model, obtain the rotor drone border, and use the area within the border as the target area for key part identification;
[0018] After scaling the target area to a fixed size, the key part center point detection model is input to obtain a key part center point heat map, and the heat map is post-processed to obtain the position and category of the key part center point.
[0019] Furthermore, the rotor UAV border detection network adopts Res50 as the backbone network, SPP and PAN as the feature fusion modules, and YOLO head as the detection head of the network based on the YOLO v4 target detection network; wherein the number of detection categories of the YOLO head is set to 1.
[0020] Furthermore, the key part center point detection network based on heat map regression adopts Res18 and deconvolution network as the feature extraction network, and uses 1×1 convolution as the detection head; the deconvolution network contains 3 deconvolution modules, and each deconvolution module is composed of ConvTransposed2d, ReLU, and BatchNorm.
[0021] Furthermore, during the training of the key part center point detection network, the following data preprocessing is performed:
[0022] Randomly flip the drone image left and right;
[0023] Data enhancement for the drone border: randomly rotate the drone border around the center of the border, with a rotation angle range of [-45°, 45°], randomly translate the drone border horizontally and vertically, with a translation range of [-w*0.2, w*0.2] and [-h*0.2, h*0.2], where w and h represent the width and height of the border, respectively, and randomly scale the drone border, with a scaling ratio range of [0.7-1.3];
[0024] The drone area within the data enhancement frame is scaled to 256*256 resolution.
[0025] Furthermore, during the training of the key part center point detection network, the label map of network supervision is obtained through the following process:
[0026] Calculate the coordinates of the center point of each key part on the input image;
[0027] For each center point coordinate (x0, y0), generate according to formula (1): Label map of size, where D is the downsampling rate of the feature extraction module;
[0028]
[0029] The label maps of the same part type are summed according to formula (2) to obtain the label maps of three types of key parts for network supervision;
[0030] f1(x,y)+f2(x,y)=max{f1(x,y),f2(x,y)} (2)
[0031] f1(x,y),f2(x,y) represent different label graphs, (x,y) are the coordinates on the label graph
[0032] Furthermore, the loss function used to train the key part center point detection network is:
[0033]
[0034] D represents the network downsampling rate, i represents the number of rows, j represents the number of columns, k represents the number of channels, x(i,j,k) represents the network output value, and y(i,j,k) represents the label value.
[0035] Furthermore, the post-processing process is specifically as follows:
[0036] The output of the key part center point detection network is calculated by the formula Convert to probability and get the probability map in and are the length and width of the probability map, respectively, and 3 is the number of channels of the probability map;
[0037] Perform neighborhood suppression processing on the probability map on each channel: if the probability value of a point is greater than the probability values of the remaining points in the 8 neighborhoods, keep its probability value unchanged, otherwise assign its probability value to 0;
[0038] The points in each channel with a probability greater than the threshold T are used as the relative predicted positions of the center points of the key parts;
[0039] The relative predicted position is passed through The prediction result of the key part center point on the original image is obtained by processing; r ,y r ) represents the relative predicted position, D represents the downsampling rate of the feature extraction network, (x′, y′, w′, h′) represents the drone border, (x′, y′) represents the center coordinates of the drone border, w′ and h′ represent the width and height of the drone border, respectively.
[0040] In general, compared with the prior art, the above technical solution conceived by the present invention can achieve the following beneficial effects.
[0041] The present invention can realize the fine recognition of the key parts of the rotary-wing UAV; the present invention adopts a two-stage method of first detecting the rotary-wing UAV and then detecting its key components, wherein in the second stage, the rotary-wing UAV area is first scaled to a fixed scale and then detected, which can greatly improve the recognition rate of small-scale components;
[0042] The present invention transforms the key part identification problem into a key part center point detection task, abandons the border NMS process commonly used in the target detection field, alleviates the situation where the correct detection results are suppressed when the parts are close, and improves the overall component detection recognition rate.
[0043] The method proposed in the present invention utilizes the powerful structural modeling ability of the key point detection network, which can not only accurately identify blurred parts caused by motion, defocus, low resolution and other factors, but also give reliable predictions for parts that are completely occluded by themselves. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is the overall flow chart of the method of the present invention;
[0045] Figure 2 is a labeling example of the rotary-wing UAV of the present invention;
[0046] Figure 3 It is a realization method of the reasoning process and key part center point identification network of the present invention;
[0047] Figure 4 This is the deconvolution module used in the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions 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. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0049] The present invention proposes a two-stage key part identification method for the prevention and control of rotary-wing unmanned aerial vehicles, comprising three parts: database construction, offline training, and online identification. In the database construction stage, the key part categories are defined according to the prevention and control requirements of the rotary-wing unmanned aerial vehicles, and the key part center points are used as the identification targets of the present invention, and data annotation rules are designed, and data are collected and annotated. In the offline training stage, a YOLO v4-based rotary-wing unmanned aerial vehicle detection network and a key part center point detection network based on heat map regression are respectively constructed and trained independently. In the online identification stage, a two-stage detection method of first detecting the rotary-wing unmanned aerial vehicle and then identifying its key parts is adopted. The YOLO v4 network model is used to detect the border of the rotary-wing unmanned aerial vehicle, and then the rotary-wing unmanned aerial vehicle area is scaled to a fixed size, and the key part center detection network is used to locate the components. The drone cropping and scaling process of the second stage of online detection of the present invention transforms the drone to a fixed scale. On the one hand, it can avoid the difficulty in identifying the drone parts due to their small size. On the other hand, it reduces the input complexity and ensures the performance of the part center point detection network. In addition, the present invention adopts a key point detection network instead of a border detection network to realize part detection. On the one hand, it can abandon the NMS process and alleviate the situation where the correct detection results are suppressed when the parts are close. On the other hand, it benefits from the powerful structural modeling ability of the key point detection network. The network can accurately identify the blurred parts caused by factors such as motion, defocus, and low resolution, and can give reliable predictions for the parts that are completely blocked by themselves.
[0050] refer to Figure 1 The present invention provides a two-stage key part identification method for the prevention and control of rotary-wing UAVs, comprising the following steps:
[0051] S1. Build database;
[0052] S11. Define the key parts of the drone and set identification targets;
[0053] Specifically, the key parts of the drone are defined as the motor, the arm and the battery; the definition of the key parts of the drone in the present invention is based on the purpose of destroying the power system of the drone: the lift of the drone comes from the rotation of the motor driving the rotor, and the rotation of the motor requires the battery located in the fuselage to be powered through the wires in the arm, so destroying any one of the motor, arm and battery parts can paralyze the power system of the rotor drone;
[0054] The present invention uses the center point of the key part as the recognition target because: on the one hand, when performing a part attack, the center point of the part is usually used as the attack target; on the other hand, although most part recognition algorithms use the part border as the detection target, since the rotor UAV has multiple rotors and arm parts, and the part borders often overlap, the border non-maximum suppression (NMS) strategy commonly used in the border detection method is likely to cause the overlapping part detection frame to be suppressed, resulting in a decrease in the part recognition rate. When the center point of the part is used as the detection target, in most cases, the situation where the overlapping part detection results suppress each other can be avoided, thereby improving the recognition rate;
[0055] S12. Design annotation content and annotation rules;
[0056] Design annotation content: The annotation content is divided into the drone border and the center point of key parts. The drone border to be annotated is a horizontal or vertical rectangular frame. The center point of the key parts to be annotated includes three parts: coordinates, category, and visibility. The coordinates are the coordinates of the center point of the part relative to the upper left corner of the image. The category is the type of key parts. The visibility includes visible, occluded, and out of the image.
[0057] Border annotation rules: The annotated rotorcraft border is a horizontal or vertical rectangular frame. The border must contain all the rotorcraft parts in the image and the background in the frame should be as small as possible.
[0058] Design key point annotation rules: When the key part is visible on the image, record the coordinates and category of the center point of the key part, and set the part visibility to "visible"; when the key part is in the image but is occluded, record the coordinates and category of the center point of the key part estimated by the naked eye, and set the part visibility to "occluded"; when the key part is outside the image range, select any point on the rotorcraft as the center point of the key part and record its coordinates and category, and set the part visibility to "out"; when annotating, for the same part, first annotate the center point of the part at the upper left of the image (if there is no part in the image, select the top), and then annotate one by one in a clockwise direction;
[0059] Annotation examples are Figure 2 As shown; the rectangular box is the marking of the rotor UAV frame; the circle is the marking of the motor center point, the marking order is ①②③④, the hexagonal star is the marking of the arm center point, the marking order is ⑤⑥⑦⑧, and the diamond is the marking of the battery center point;
[0060] S13, collect image data and annotate images using VGG Image Annotator;
[0061] S2, offline training;
[0062] S21, obtaining training images and their annotations from a database;
[0063] S22. Construct a YOLO v4-based rotorcraft UAV detection network and perform training. The rotorcraft UAV border detection network uses Res50 as the backbone network, SPP and PAN as feature fusion modules, and YOLO head as the detection head of the network based on the YOLO v4 target detection network; the number of detection categories of the YOLO head is set to 1; the reason for using Res50 as the backbone network is that Res50 has a simpler network structure, which is convenient for adjusting network parameters according to actual applications. At the same time, since the detection target is single, using Res50 can achieve better or similar performance than CSPDarknet53;
[0064] S23. Construct a key part center point detection network based on heat map regression and perform training;
[0065] Network construction: Figure 3 As shown in Figure 1, a series of Res18 network and deconvolution network are used as feature extractors; Res18 downsamples the input image five times, and the size of the generated feature map becomes 1 / 32 of the input image; the deconvolution network consists of three deconvolution modules, and the structure of the deconvolution module is as follows: Figure 4 As shown in the figure, ConvTransposed2d represents the deconvolution kernel, ReLU is the activation function, and BatchNorm is the batch normalization layer; the first ConvTransposed2d has an input channel of 2048, an output channel of 256, a convolution kernel size of 4, and a step size of 2; the second and third ConvTransposed2d have an input channel of 256, an output channel of 256, a convolution kernel size of 4, and a step size of 2; the number of features of BatchNorm is set to 256; the downsampling rate of the feature extraction network is D=4; a 1×1 convolution layer with an input channel number of 256 and an output channel number of 3 is used as the output layer;
[0066] Network training: Data preprocessing: randomly flip the image left and right; perform data enhancement on the border of the rotorcraft drone; obtain the drone area within the border after data enhancement and scale it to 256*256 resolution as the input image of the network;
[0067] The data enhancement method of the rotor UAV border includes: randomly rotating the rotor UAV border around the center of the border, and the rotation angle range is (-45°-45°); randomly translating the rotor UAV border in the horizontal and vertical directions, and the translation ranges are (-w*0.2, w*0.2) and (-h*0.2, h*0.2), respectively, where w and h represent the width and height of the border respectively; randomly scaling the rotor UAV border, and the scaling ratio range is (0.7-1.3);
[0068] Label generation: According to the annotation data and image enhancement and scaling process, the coordinates of the center point of each part on the input image are calculated. Assume that the calculated center point sets of the motor, arm, and battery are Where P is the number of motors and rotors; for each center point (x0, y0), generate according to formula (1): Label map of size;
[0069]
[0070] Assume that the label graph sets of motor, arm, and battery are The label maps of the same part type are summed according to formula (2) to obtain the label maps f for network supervision of the three types of parts. M , f A , f B ;
[0071] f1(x,y)+f2(x,y)=max{f1(x,y),f2(x,y)} (2)
[0072] Formula (1) is a normalized discrete Gaussian kernel function, and its physical meaning is that the closer the point is to the marked point, the greater the probability that it is the center point of the key part, and the maximum probability is 1. The farther the point is from the marked point, the smaller the probability that it is the center point of the key part, and the minimum probability is 0. The reason why the present invention adopts formula (1) is that in general, the marking personnel's marking of the center point of the key part is Gaussian distributed around the real position, that is, the marked point is not necessarily the real center point of the key part, but the real center point of the key part is near the key point, and the closer to the marked point, the higher the probability that it is the real center point of the key part.
[0073] Formula (2) represents the process of adding label graphs f1 and f2, where (x, y) represents the coordinates of the points on the label graph, and its physical meaning is that when the label graph is summed, the maximum value of the probability value of the points at the same position is retained. The reason why the present invention adopts formula (2) is that the usual single-target key point detection (such as problem posture estimation, face landmark point detection) does not require label graph summation, because there is only one key point of each type of human body and face, so each key point can be predicted separately. However, since there are multiple rotors and arm components of the rotor UAV, and there is no special difference between the components of the same type, it is impossible to treat each component as a separate category. The same type of components need to share network parameters to achieve stable optimization during the training process. Therefore, the present invention fuses the labels between the components of the same category to prompt the network to output the prediction results of all key points of the same type with the same parameters.
[0074] Loss function: Assume that the output of the network is f M , f A , f B Concatenate in the channel dimension to get As the supervision of the network, the loss is calculated using formula (3);
[0075]
[0076] D represents the network downsampling rate, i represents the number of rows, j represents the number of columns, k represents the number of channels, x(i,j,k) represents the network output value, and y(i,j,k) represents the label value. The physical meaning of the above formula is: the closer the label value y(i,j,k) is to 1, the larger x(i,j,k) is, and the smaller the loss is; the closer the label value y(i,j,k) is to 0, the smaller x(i,j,k) is, and the smaller the loss is. Therefore, the above formula can guide the network to output large values at the center of the key parts and output small values at non-key points. The advantage of using this formula as the loss function is that the output value range of the network is (-∞,+∞), and further through the formula It can be converted into a probability value in the interval (0,1). Compared with the MSE loss commonly used in the field of key point detection, it avoids the situation where the probability value is less than 0 and greater than 1, and can provide more reliable guidance information for practical applications.
[0077] S3, online identification;
[0078] S31, collect drone images and process them through the rotary-wing drone detection model, perform non-maximum suppression (NMS) on the predicted borders output by the network, and use the borders with a detection score greater than 0.5 as drone detection results, and the area within the borders is the rotary-wing drone target area;
[0079] S32, scale the target area of the rotary wing drone to a fixed size (256*256);
[0080] S33, obtaining a key part center point heat map through a key part center point detection network model;
[0081] S34, obtaining sparse key part center point recognition results through heat map post-processing;
[0082] The post-processing of the heat map includes:
[0083] The output of the network Converted into probability by formula (4)
[0084]
[0085] Perform non-maximum suppression on y, that is, if the score of a pixel is larger than the score of other positions in the 8-neighborhood, the score is retained, otherwise the score is set to 0;
[0086] Record the points in each channel whose scores are greater than the threshold T as the relative predicted positions of the motor, arm, and battery center points, corresponding to the point set M respectively. R , A R , B R ;
[0087] Assume that the detection frame of the rotorcraft drone is (x′, y′, w′, h′), where (x′, y′) represents the center position of the detection frame, and w′ and h′ represent the width and height of the drone frame respectively; R , A R , B R The points in are processed according to formula (5) to obtain the predicted point set M on the original image. O , A O , B O ;
[0088]
[0089] 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 two-stage key part identification method for the prevention and control of rotary-wing UAVs, characterized in that: include: S1. Build database; Label the drone borders and key parts center points in the collected drone images; The marking contents of the key parts center point include coordinates and categories; The categories of key parts center points include motors, arms and batteries; S2. Offline training; Construct a rotor UAV border detection network and train it using UAV images and UAV border annotation information to obtain a rotor UAV border detection model. A key part center point detection network based on heat map regression is constructed, and it is trained using drone images, drone bounding box annotation information, and key part center point annotation information to obtain a key part center point detection model. During the training of the key part center point detection network, the following data preprocessing is performed: Randomly flip the drone image left and right; Data enhancement for the drone border: randomly rotate the drone border around the center of the border, with a rotation angle range of [-45°, 45°], randomly translate the drone border horizontally and vertically, with a translation range of [-w*0.2, w*0.2] and [-h*0.2, h*0.2], where w and h represent the width and height of the border, respectively, and randomly scale the drone border, with a scaling ratio range of [0.7-1.3]; Scale the drone area within the data enhancement frame to 256*256 resolution; During the training of the key part center point detection network, the label map of network supervision is obtained through the following process: Calculate the coordinates of the center point of each key part on the input image; For each center point coordinate (x0, y0), generate according to formula (1): Label map of size, where D is the downsampling rate of the feature extraction module; The label maps of the same part type are summed according to formula (2) to obtain the label maps of three types of key parts for network supervision; f1(x,y)+f2(x,y)=max{f1(x,y),f2(x,y)} (2) f1(x,y),f2(x,y) represent different label graphs, (x,y) are the coordinates on the label graph; S3. Online identification; Collect the drone image to be identified, input it into the rotor drone border detection model, obtain the rotor drone border, and use the area within the border as the target area for key part identification; After scaling the target area to a fixed size, the key part center point detection model is input to obtain a key part center point heat map, and the heat map is post-processed to obtain the position and category of the key part center point.
2. A two-stage key part identification method for the prevention and control of rotary-wing UAVs according to claim 1, characterized in that: The rotor UAV bounding box detection network is based on the YOLO v4 target detection network, adopts Res50 as the backbone network, SPP and PAN as the feature fusion modules, and YOLO head as the detection head of the network; the number of detection categories of YOLOhead is set to 1.
3. A two-stage key part identification method for the prevention and control of rotary-wing UAVs according to claim 1, characterized in that: The key part center point detection network based on heat map regression uses Res18 and deconvolution network as the feature extraction network, and 1×1 convolution as the detection head; the deconvolution network contains 3 deconvolution modules, each of which is composed of ConvTransposed2d, ReLU, and BatchNorm.
4. A two-stage key part identification method for the prevention and control of rotary-wing UAVs according to claim 1, characterized in that: The loss function used to train the key part center point detection network is: D represents the network downsampling rate, i represents the number of rows, j represents the number of columns, k represents the number of channels, x(i,j,k) represents the network output value, and y(i,j,k) represents the label value.
5. A two-stage key part identification method for the prevention and control of rotary-wing UAVs according to claim 4, characterized in that: The post-processing process is as follows: The output of the key part center point detection network is calculated by the formula Convert to probability and get the probability map in and are the length and width of the probability map, respectively, and 3 is the number of channels of the probability map; Perform neighborhood suppression processing on the probability map on each channel: if the probability value of a point is greater than the probability values of the remaining points in the 8 neighborhoods, keep its probability value unchanged, otherwise assign its probability value to 0; The points in each channel with a probability greater than the threshold T are used as the relative predicted positions of the center points of the key parts; The relative predicted position is passed through The prediction result of the center point of the key part on the original image is obtained by processing; r ,y r ) represents the relative predicted position, D represents the downsampling rate of the feature extraction network, (x′, y′, w′, h′) represents the drone border, (x′, y′) represents the center coordinates of the drone border, w′ and h′ represent the width and height of the drone border, respectively.
