A kind of object detecting system based on darknet frameworks
Technical field
The present invention relates to a kind of detecting system, specifically a kind of object detecting system based on darknet frameworks.
Background technology
Object identification is a research direction in computer vision, and currently more popular research field.In people
Demand ever-increasing today, object identification playing very important effect in safety, science and technology, economic aspect, pacifying
Anti- field and traffic monitoring department also propose urgent requirement to object identification, so future of the research object identification to society
There is very important meaning.
Conventional target detecting system uses deformable parts models (DPM) method, is carried by slider bar method
Go out target area, identification is then realized using grader.Recent R-CNN classes method uses region proposal
Methods, potential Bounding Box is firstly generated, the classification of object is then included using grader identification Bounding Box.Finally lead to
Later processing mode removes repetition Bounding Box to optimize.This kind of method flow is complicated, speed be present slowly and training is difficult
The problem of.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of object detecting system based on darknet frameworks, to solve
The problem of being mentioned in background technology.
To achieve the above object, the present invention provides following technical scheme:
A kind of object detecting system based on darknet frameworks, including
Model training unit, for designing darknet network models, darknet network models are convolutional layer and pond layer
Alternating connection, training parameter (including learning rate) is adjusted, trains to obtain the weight parameter of model using data set;
Pretreatment unit, for collecting suitable pictures, object mark is carried out to each pictures in pictures, so
Markup information is converted into the annotation formatting needed for darknet training afterwards, and trains, test accordingly according to certain ratio generation
Card, test pictures collection;Described in fixation and recognition unit;
Fixation and recognition unit;Processing is identified to the picture that pretreatment unit is collected into;Model training unit connects respectively
Connect pretreatment unit and fixation and recognition unit.
Preferred scheme as the present invention:The identifying processing step of the fixation and recognition unit is specifically:First by image
S*S grid is divided into, each grid predicts the value of the confidence C of B Bounding Box and Bounding Box, and the value of the confidence represents box and includes one
The confidence level of target, if without target, the value of the confidence zero.Each Bounding Box includes 5 values:X, y, w, h and
confidence.(x, y) represents the center of the box related to grid.(w, h) be the wide of the box related to full figure information and
It is high.Confidence represents IOU the and ground truth of prediction box, final output S*S* (B*5+C) dimensional vector.
Preferred scheme as the present invention:The vector is included to the Bounding Box coordinate information of picture prediction, the value of the confidence with
And the class probability of each grid, the confidence score of each Bounding Box pass through the class probability of corresponding grid and the confidence level of box
Multiplication obtains, and the fraction has weighed the category and appeared in probability and the box and the degree of agreement of target in box.For
The output box information and class probability of network, non-maximum restraining processing is carried out to it and threshold process gives up repeat block, is obtained most
Whole testing result.
Compared with prior art, the beneficial effects of the invention are as follows:The system model training is simple, and whole system is end-to-end
(input picture, export detection block), and real-time detection can be realized.The system is predicted using full figure information.With
Sliding window method is different with region proposal-based methods, and network model can profit during training and prediction
With full figure information, the positioning to target frame is more accurate.System may learn the summary information of target, and with certain pervasive
Property.Using nature picture training network model, then predicted using art pattern, it is and more accurate than for other object detection methods
True rate is much higher.The system is adapted to different application scenarios and detection target, it is only necessary to corresponding data set to being
System is trained.
Brief description of the drawings
Fig. 1 is a kind of object detecting system based on darknet frameworks and interaction platform structured flowchart.
Fig. 2 is the schematic diagram of convolutional neural networks structure.
Fig. 3 is a kind of object detecting system based on darknet frameworks and interaction platform flow chart.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Fig. 1-3 are referred to, a kind of object detecting system based on darknet frameworks, it includes pretreatment unit, model instruction
Practice unit and fixation and recognition unit.
Pretreatment unit:This step mainly includes collecting suitable pictures, and each pictures in pictures are carried out
Object marks, and markup information then is converted into the annotation formatting needed for darknet training, and generate phase according to certain ratio
The training answered, checking, test pictures collection.
Model training unit:Darknet network models are designed, darknet network models are the friendship of convolutional layer and pond layer
For connection (specific visible 2.2.2 parts), training parameter (including learning rate) is adjusted, trains to obtain using data set
The weight parameter of model.
Fixation and recognition unit:For a pictures of arbitrary resolution, system divides the image into S*S grid first,
Each grid predicts the value of the confidence C of B Bounding Box and Bounding Box, and the value of the confidence represents the confidence level that box includes a target, if
There is no target, the value of the confidence zero.Each Bounding Box includes 5 values:X, y, w, h and confidence.(x, y) is represented and grid
The center of related box.(w, h) is the wide and high of the box related to full figure information.Confidence represents prediction box
IOU and ground truth, final output S*S* (B*5+C) dimensional vector.The vector includes the Bounding Box coordinate to picture prediction
The class probability of information, the value of the confidence and each grid, the confidence score of each Bounding Box pass through the class probability for corresponding to grid
It is multiplied to obtain with the confidence level of box, the fraction has weighed the category and appeared in probability in box and the box and target
Degree of agreement.For the output box information and class probability of network, non-maximum restraining processing is carried out to it and threshold process is given up
Repeat block, obtain final testing result.
The present invention operation principle be:As shown in Fig. 2 network model uses preceding several layers of alternatings for convolutional layer and pond layer
Connection, the mode of three convolutional layers of heel, does not use full articulamentum.The main amount of calculation of model is neural network forecast, and different
Computation layer perform be calculated as follows:
Convolutional layer calculates:The calculating process of discrete convolution is to utilize convolution mask (convolution kernel, wave filter) on original image
Slide, being added up after the element multiplication on correspondence position, obtain final result, that is, realize the behaviour of slip-multiplication-superposition
Make.
Pond layer calculates:Pond layer is mainly to carry out aggregate statistics to the feature of image diverse location, for example, people can be with
Calculate the average value (or maximum) of some special characteristic on one region of image.According to the method for different computing pools,
It is divided into average pondization and maximum pond again.And pond layer is normally at after convolutional layer.
A series of boxes are obtained according to network output information integral data, and threshold value is set, filter the low box of score, most
Non-maximum restraining processing is carried out to the box of reservation afterwards, repeat block is removed, obtains final testing result.
Based on the object detecting system of darknet frameworks, high-accuracy quick detection and real-time target inspection can be carried out
Survey.Whole system is inputted picture, inferred by system-computed, you can obtain the target of picture using design philosophy end to end
Frame and its generic;In calculating process, the global information of picture is made full use of to carry out computational reasoning, the positioning to detection block is accurate
Really, and different pieces of information collection is directed to, using the prior information of data set, multiple target frames are can be predicted in each grid, and finally selection is put
For reliability highest target frame as output, the thought can acceleration model convergence in training.