A kind of unmanned plane optics based on YOLO deep learning network frame quickly detects identification
Method
Technical field
The invention belongs to technical field of image processing, are related to a kind of unmanned plane detection recognition method based on optical imagery,
More particularly to a kind of unmanned plane optics for being based on YOLO (You Only Look Once, only have a look at) deep learning network frame
Quick detection recognition method.
Background technique
In recent years, unmanned air vehicle technique is grown rapidly, and is widely used to take photo by plane, agricultural plant protection, traffic monitoring, calamity
Area's detection, power-line patrolling, quickly numerous Military and civil fields such as investigation, surprise attack.But spreading unchecked for unmanned plane market also brings various peaces
Full hidden danger, the unmanned plane that especially do not abide by supervision regulation, surmount the flight of regulation airspace, gives airport airline carriers of passengers safety, emphasis
The security protection of area peripheral edge causes great threat.Therefore, need to develop China's critical facility periphery, crowd massing place, important
The monitoring of aerial unmanned plane and the Prevention-Security measure of the key areas such as military district periphery.
Currently, the air surveillance of unmanned plane and defence be mainly based on radar, GPS signal, as ThaleSA (method),
DroneShield (beauty), JAMMER (ink) company are monitored unmanned plane using radar, big vast electronics technology invention behind Shanghai
Portable unmanned machine interference unit, which then passes through no-manned machine distant control signal and the compacting of GPS positioning signal, makes unmanned plane fall or make a return voyage.
But the method based on radar or GPS signal is mainly used for remote quick discovery, capture and the tracking of unmanned plane, still difficult at present
To realize that efficient, high-accuracy the detection to unmanned plane type identifies.And detection knowledge is carried out to unmanned plane using optical instrument
It does not have the advantage that 1) compared to radar, it is thin that optical imagery can obtain the targets such as gray scale more abundant, texture, structure
Information is saved, the high-accuracy identification of unmanned plane type is more suitable for;2) compared to GPS, optical instrument belongs to passive mode, is not required to
Target is wanted actively to receive signal.Therefore the unmanned machine testing identification based on optical imagery has become important trend.Traditional
Optical detection recognition methods is the first artificial suitable classifier of construction feature reselection, background is simple, target invariant features
It is showed in metastable situation good.And unmanned plane, in the sky in flight course, relative position, posture become constantly
Change, is difficult to find the characteristics of image for meeting Scale invariant, angle invariability, and the background during unmanned plane during flying is equally
Movement, and it is likely to complicated and changeable.
Summary of the invention
The present invention is difficult to realize using means such as radar, GPS to the high-accuracy identification of unmanned plane classification, biography for current
The problems such as artificial constructed process of the optical signature of system is cumbersome, generalization ability is not strong proposes a kind of based on YOLO deep learning net
The quick detection recognition method of unmanned plane optics of network frame.This method can utilize actual test flight data, learning training
Network, directly output recognition result are avoided compared to traditional detection identification process to unmanned plane and complex background feature people
The problems such as work modeling is complicated, applicability is not strong can greatly improve under complex background the speed of moving-target detection identification and accurate
Rate.
The purpose of the present invention is what is be achieved through the following technical solutions:
A kind of quick detection recognition method of unmanned plane optics based on YOLO deep learning network frame, including walk as follows
It is rapid:
Step 1: carrying out flight test acquisition optical imaging experiments data for five kinds of unmanned planes of existing market mainstream,
And it is handled according to optical imaging experiments data of the standard VOC data format to acquisition;
Step 2: building YOLO network frame, is improved using residual error network module to YOLO network frame, to improvement
YOLO network frame afterwards is trained, and obtains detection identification model;
Step 3: choosing the real scene shooting flight optical imaging experiment data comprising five kinds of unmanned planes, resulting using step 2
Detection identification model carries out detection identification.
Compared with the prior art, the present invention has the advantage that
(1) present invention in view of the target detection recognition methods based on deep learning be by feature construction and fusion for classification at
One entirety, i.e. input are initial data, direct output category result, do not need artificial constructed feature, are more suitable for solving multiple
The automatic detection identification problem of moving-target under miscellaneous dynamic background, proposes a kind of unmanned plane light based on YOLO deep learning network frame
Learn quick, autonomous detection recognition method.
(2) method of the invention is answered suitable for various complexity such as airport, stadium, concert, important military district peripheries
Quick discovery, high-accuracy detection and the identification invaded with unmanned plane under scene are the effective supervision and defense in the air of unmanned plane
It provides and supports.
(3) present invention is in unmanned plane in the sky flight course, and relative position, posture are constantly changing, very
Difficulty finds the characteristics of image for meeting scale invariability, angle invariability, and the background during unmanned plane during flying is usually complicated
It is the problems such as changeable, theoretical based on deep learning, using heterogeneous networks layer (convolutional layer, pond layer, recurrence layer etc.) function, in conjunction with spy
Different network configuration design, realizes automation, the abstract expression of target signature under complex situations, and is automatically performed target point
Class.Compared to traditional target detection identification process, this method can greatly improve moving-target detection identification under complex background
Speed and accuracy rate.
(4) present invention selects YOLO network frame, which, which will test, appoints to realize that the quick detection of unmanned plane identifies
Business is handled as regression problem, directly obtains bounding box coordinates and setting comprising object by all pixels of entire image
Reliability and class probability are significantly better than R-CNN, Fast R-CNN even deep learning network frame in detection speed.And it utilizes
Residual error network module improves YOLO network, reduces a possibility that gradient explosion or gradient disappear in training process,
To effectively improve the usable probability of training pattern, identification is quickly detected to the unmanned plane based on YOLO deep learning network frame
The practical application of method is of great significance.
Detailed description of the invention
Fig. 1 is that the present invention is based on the quick detection recognition method processes of the unmanned plane optics of YOLO deep learning network frame
Figure;
Fig. 2 is VOC standard data format example;
Fig. 3 is network structure;
Fig. 4 is the sample image in database;
Fig. 5 is real image test result.
Specific embodiment
Further description of the technical solution of the present invention with reference to the accompanying drawing, and however, it is not limited to this, all to this
Inventive technique scheme is modified or replaced equivalently, and without departing from the spirit and scope of the technical solution of the present invention, should all be covered
Within the protection scope of the present invention.
The present invention provides a kind of quick detection recognition method of unmanned plane optics based on YOLO deep learning network frame,
As shown in Figure 1, step specific as follows:
Step 1: carrying out flight test acquisition optical imaging experiments data for five kinds of unmanned planes of existing market mainstream,
And it is handled according to optical imaging experiments data of the standard VOC data format to acquisition.Specific step is as follows:
Big boundary M100, Phantom-3, Inspire-1, agricultural plant protection unmanned plane, police unmanned plane is selected to carry out flight examination
It tests acquisition experimental data, and operations is labeled etc. to experimental data and comply with VOC data format, treated specific format
As shown in Figure 2.
Step 2: building YOLO network frame, is improved using residual error network module to YOLO network frame, to improvement
YOLO network frame afterwards is trained, and obtains detection identification model.Specific step is as follows:
The detection method of YOLO is single order detection method, input picture is divided into S × S grid, each grid is responsible for inspection
Survey the object of " falling into " grid.If the coordinate of the center of some object drops into some grid, then this grid is just
It is responsible for detecting this object.The output information of each grid includes two large divisions, is comprising object rectangular area information respectively
B boundingbox (bounding box) information and C object belong to the probabilistic information of certain classification.
Bounding box information includes 5 values, is x, y, w, h and confidence (confidence level) respectively.Wherein x, y
Refer to deviant of the center of the bounding box for the object that current grid is predicted relative to current grid position,
And it is normalized to the coordinate of [0,1].W, h are the width of bounding box with height and using the width and height of image
It is normalized in [0,1].
Confidence reflect current bounding box whether include object and object space accuracy, calculating side
Formula is as follows:
Confidence=P (object) IOU.
Wherein, it indicates that bounding box includes object (target object) as P (object)=1, does not include then P
(object)=0;IOU (hand over and compare) is the intersection area for predicting bounding box and object real estate, and area is with pixel
As a result areal calculation is normalized in [0,1] section with real estate area elemental area.
It builds YOLO network (shown in network structure such as Fig. 3 (a)), network includes 24 convolutional layers and 2 full articulamentums, volume
Lamination is used for future position and class probability for extracting characteristics of image, full articulamentum.The loss function definition of network is such as
Under:
Each meaning of parameters of above-mentioned formula is as follows: S2Indicate that image segmentation is the number of grid, value is 13 × 13;B is indicated
The number of anchor point frame in each grid, value 5;X, y, w, h are the centre coordinate and wide height of predicted boundary frame;Indicate the centre coordinate and wide height of actual boundary frame;C indicates the confidence level in predicted boundary frame comprising target;Indicate the friendship of realistic objective and realistic objective bounding box and ratio;P (c) indicates the prediction probability for belonging to a certain classification;Table
Show the actual probabilities for belonging to a certain classification, belonging to then value is 1, and otherwise value is 0;IobjIndicate anchor point frame in whether inclusion
Otherwise body is 0 comprising being then 1;λcoordIndicate that position prediction loses weight, value 3;λnoobjMesh when indicating without target
Mark confidence weight, value 0.7.
First two of function are coordinate prediction loss, and the confidence that Section 3 is the box comprising object predicts damage
It loses, Section 4 is that the confidence not comprising object predicts loss, and Section 5 is class prediction loss.
Activation primitive is defined as follows in network:
Gradient explosion is generated when to avoid training or gradient disappears, and the present invention changes this network using residual error module
Into after improvement shown in network structure such as Fig. 3 (b), specific location is as follows: the 3rd layer of pond layer output steering and the 9th layer of convolutional layer are defeated
It merges out, the 12nd layer of convolutional layer output steering is merged with the 15th layer of convolutional layer output, the 4th layer of pond layer output steering
It is merged with the 18th layer of convolutional layer output, the 19th layer of convolutional layer output steering is merged with the 22nd layer of convolutional layer output.?
It is added at 4 after short circuit connects and composes residual unit, the gradient explosion or gradient when effectively alleviating trained disappear.Residual error at 4
Unit part gradient circulation way is as follows:
Loss=F (xi,Wi)
In formula, loss indicates loss function, xi、WiFor i-th layer of network input and i-th layer of weight, loss function is expressed as defeated
Enter the function F (x with weighti,Wi), xLIndicate the output of residual error module shunting layer, xlIt indicates to export at the merging of residual error module, first
A factorIndicate that loss function reaches L layers of gradient, 1 in round bracket shows that short-circuit mechanism can be propagated nondestructively
Gradient, and an other residual error gradient then needs the layer by having weight.
Hyper parameter setting is carried out to network, sets 0.0003 for initial learning rate, it is (i.e. every using stochastic gradient descent method
Secondary update using sample size is 1, and update times are 50000) to train network in total, obtain detection identification model.
Step 3: choosing the real scene shooting flight optical imaging experiment data comprising five class unmanned planes, resulting using step 2
Identification model is detected, testing image is inputted, feature, pond layer downscaled images size, finally by connecting entirely are extracted by convolutional layer
Layer output target prodiction value and target category probabilistic forecasting value are connect, it is identification that target category maximum probability value, which corresponds to classification,
As a result.As shown in Figure 5 known to each classification detection recognition correct rate statistical result: M100 91.96%, Inspire-1 are
91.74%, Phantom-3 89.78%, agriculture unmanned plane are 94.13%, and police unmanned plane is 89.84%, have reached higher
Detection recognition correct rate, and in the case where being accelerated using GPU, every frame processing speed can reach a millisecond rank, realize quick
Detection identification.