For positioning the construction method and device of the deep learning model of multiple target characteristic point
Technical field
This application involves field of artificial intelligence, in particular to a kind of for positioning the depth of multiple target characteristic point
Spend the construction method and device of learning model.
Background technique
Currently, people become higher and higher in the requirement of image recognition this aspect with the continuous development of information technology,
Wherein, the method for image recognition is carried out by the method for artificial intelligence because accuracy with higher is valued by the people
With research.
In current result of study, the method using artificial intelligent recognition image is usually preferentially will using detector
All critical point detections come out in image to be detected, are then grouped the key point of prediction using certain algorithm (as clustered)
It divides, so that multiple key points are divided in multiple targets, and then completes the crucial point prediction of multiple target.However, practicing
Middle discovery, although this method has compared with high detection efficiency, due to the division of above-mentioned key point be based on certain algorithm and
It is not based on target itself, which results in dividing precision of this method to multiple key points is lower, and then is affected mostly crucial
Positioning accuracy of the point in multiple target.
Summary of the invention
Being designed to provide for the embodiment of the present application is a kind of for positioning the structure of the deep learning model of multiple target characteristic point
Construction method and device can be improved by establishing the new deep learning model of one kind to target feature point (or being key point)
Accuracy of identification.
The embodiment of the present application provides a kind of for positioning the construction method of the deep learning model of multiple target characteristic point, packet
It includes:
It obtains the stacking hourglass network for extracting the characteristic that input data includes, be used for according to the characteristic
Target detection is carried out to obtain the detection network of target position information, obtain for carrying out critical point detection according to the characteristic
The positioning network of key point information and target signature is obtained for combining the target position information and the key point information
Put and export the output network of the target feature point;
Combine the stacking hourglass network, the detection network, the positioning network and the output network obtain it is more
Tasking learning network model;
Be arranged in the multi-task learning network model weighted target function, default training condition and with the input
The corresponding hyper parameter of data, obtains the first training pattern;
First training pattern is trained, the second training pattern and corresponding with second training pattern is obtained
Training information;
When the training information meets the default training condition, saving second training pattern is for positioning mesh
Mark the deep learning model of characteristic point.
During above-mentioned realization, stacking hourglass network, detection network, positioning with specific function can be preferentially obtained
Network and output network, and input and output combination is carried out according to its corresponding function on the basis of getting these networks,
Multi-task learning network model is obtained, while weighted target function, default training are set in the multi-task learning network model
Condition and hyper parameter corresponding with input data obtain the first training pattern, then by being trained to the first training pattern
To the second training pattern and training information so that when training information meets preset training condition, the second training pattern of storage is
For positioning the deep learning model of target feature point, to complete the building of the deep learning model.Implement this embodiment party
Formula can obtain the deep learning model that can position target feature point in conjunction with multiple smart networks, then by setting
Weighted target function, default training condition and hyper parameter are set to be trained to above-mentioned deep learning model, is trained
Deep learning model afterwards, and when satisfaction thinks training condition to be achieved, the deep learning model after determining training be for
The deep learning model of target feature point is positioned, to realize that this is used to position the structure of the deep learning model of multiple target characteristic point
It builds, meanwhile, it, can be by using the depth after the deep learning model construction for being used to position target feature point is completed
Model is practised to effectively improve the accuracy of identification to target feature point (or being key point).
Further, the detection network is YOLO network.
During above-mentioned realization, determine above-mentioned for obtaining target position according to characteristic progress target detection
The detection network of information is YOLO network, wherein YOLO network is for the target detection in image, in addition, the YOLO network can
Think any one in YOLOv1, YOLOv2 or YOLOv3 or any one network based on YOLO thought.As it can be seen that implementing
This embodiment can improve the depth for positioning target feature point by limiting concrete type and the structure of detection network
Spend learning model in target detection precision, to improve the positioning accurate for positioning the deep learning model of target feature point
Degree.In addition, choosing the deep learning model that YOLO network is used to position target feature point as this on the basis of foregoing description
Detection network, entire depth learning model can be preferably compatible with, to improve the ability to work of entire depth learning model
With positioning accuracy.
Further, the acquisition is for extracting the stacking hourglass network for the characteristic that input data includes, being used for root
Target detection, which is carried out, according to the characteristic obtains the detection network of target position information, for carrying out according to the characteristic
Critical point detection obtains the positioning network of key point information and for combining the target position information and key point letter
Before the step of breath obtains target feature point and exports the output network of the target feature point, the method also includes:
Preset training set is obtained by pretreatment network, and the training set is pre-processed to obtain input data.
During above-mentioned realization, hourglass network, detection network are stacked, network is positioned and exports network in above-mentioned
On the basis of, then by the preset training set of pretreatment network acquisition, and the training set is pre-processed to obtain input data.Its
In, training set is can be inputted after the pretreatment by pretreatment network for trained data set into stacking hourglass net
Network carries out feature extraction processing, so that the effect of feature extraction is more preferable, and then improves for positioning target feature point
The positioning feature point effect of deep learning model.
Further, be arranged in the multi-task learning network model weighted target function, default training condition and
Hyper parameter corresponding with the input data, before the step of obtaining the first training pattern, the method also includes:
Obtain crucial point location objective function and border detection objective function;
It is weighted and is weighted according to the crucial point location objective function and the border detection objective function
Objective function.
During above-mentioned realization, crucial point location objective function is objective function corresponding with positioning network, and convenient
Detection objective function is objective function corresponding with detection network, and weighting herein is added to the line function that is integrated into of two kinds of networks
Power processing, obtains weighted target function, so that the deep learning model for positioning target feature point can be directly arranged
The weighted target function to improve the overall fusion degree of the deep learning model, and then improves deep learning model
Positioning accuracy.
Further, the corresponding hyper parameter of the described and input data includes at least number corresponding with the input data
According to require, it is described stack hourglass network to stack number, the order of the described stacking hourglass network, training batch size, network excellent
Change device, learning rate initial value and learning rate adjustment requirement.
During above-mentioned realization, it is determined that hyper parameter corresponding with input data includes at least the data to input data
It is required that the part can identify meaningless data and refuse to handle, to improve the input accuracy of data;Meanwhile it is above-mentioned
Hyper parameter further includes the restriction to hourglass network is stacked, which can be improved the ability in feature extraction for stacking hourglass network, and
And the deep learning model being finally built into can be made more efficient in practice;In addition, training batch size, the network optimization
The setting of the hyper parameters such as device, learning rate initial value and learning rate adjustment requirement can carry out detailed for multi-task learning network model
Most parameter setting so that training process more meet expection, obtain training as a result, the result of the training is in reality in turn
It can be more preferable to the locating effect of target feature point in trampling.
Further, described that first training pattern is trained, obtain the second training pattern and with described second
The step of training pattern corresponding training information includes:
Obtain preset training set and preset verifying collection;
First training pattern is trained by the training set, obtains the second training pattern;
Second training pattern is tested by verifying collection, and by the training set to second instruction
Practice model to be tested, obtains and the verifying collects corresponding first test result and the second survey corresponding with the training set
Test result;
It is calculated, is obtained and second training pattern according to first test result and second test result
Corresponding training information.
During above-mentioned realization, training set and verifying collection are obtained, and trained process is completed using training set,
And complete to be tested using training set and verifying collection after training, two kinds of test results are obtained, and then pass through this two kinds surveys
Trained information is calculated in test result, which is used to indicate the training degree of the second training pattern.As it can be seen that implementing this
Kind embodiment can monitor or periodically monitor the training result of the second model in real time, so as to reach in training result
The deep learning model constructed is come into operation to when being expected, so that the target signature point location for improving deep learning model is quasi-
Exactness.
Further, the training information corresponding with second training pattern includes error difference, described default
Training condition includes error threshold, described when the training information meets the default training condition, saves second instruction
Practicing the step of model is the deep learning model for positioning target feature point includes:
When the error difference is greater than the error threshold, saving second training pattern is for positioning target spy
Levy the deep learning model of point.
During above-mentioned realization, it is determined that the preservation condition of the second training pattern, and when meeting the preservation condition, it protects
Depositing the second training pattern is the deep learning model for positioning target feature point.Among these, uses and determined according to error
The preservation condition of training result, so that the deep learning model is saved in error permission.As it can be seen that this
The method that preservation condition is determined according to training result error has good effect in a practical case, and because training obtains
Deep learning model be for practical, therefore on the basis of agreeing with each other, deep learning model has better
Positioning accuracy.
The embodiment of the present application second aspect provides a kind of for positioning the structure of the deep learning model of multiple target characteristic point
Device is built, the construction device of the deep learning model for positioning multiple target characteristic point includes:
Acquiring unit, for obtaining stacking hourglass network for extracting the characteristic that input data includes, for root
Target detection, which is carried out, according to the characteristic obtains the detection network of target position information, for carrying out according to the characteristic
Critical point detection obtains the positioning network of key point information and for combining the target position information and key point letter
Breath obtains target feature point and exports the output network of the target feature point;
Assembled unit, for combining the stacking hourglass network, the detection network, the positioning network and described defeated
Network obtains multi-task learning network model out;
Setting unit, for weighted target function, default training condition to be arranged in the multi-task learning network model
And hyper parameter corresponding with the input data, obtain the first training pattern;
Training unit obtains the second training pattern and with described second for being trained to first training pattern
The corresponding training information of training pattern;
Storage unit, for when the training information meets the default training condition, saving the second training mould
Type is the deep learning model for positioning target feature point.
During above-mentioned realization, the stacking hourglass network with specific function, detection can be obtained by acquiring unit
Network, positioning network and output network, and these networks will acquire by assembled unit and carried out according to its corresponding function
Input and output combination obtains multi-task learning network model, then is set in the multi-task learning network model by setting unit
It sets weighted target function, default training condition and hyper parameter corresponding with input data and obtains the first training pattern, further
The first training pattern is trained by training unit to obtain the second training pattern and training information, so that storage unit is being sentenced
It is disconnected go out training information when meeting preset training condition, the second training pattern of storage is the depth for positioning target feature point
Model is practised, to complete the building of the deep learning model.Implement this embodiment, multiple smart networks can be combined
The deep learning model that can position target feature point is obtained, then passes through setting weighted target function, default training condition
And hyper parameter is trained above-mentioned deep learning model, the deep learning model after being trained, and thinks in satisfaction
When training condition to be achieved, the deep learning model after determining training is the deep learning mould for positioning target feature point
Type, thus realize that this is used to position the building of the deep learning model of multiple target characteristic point, meanwhile, it is special for positioning target at this
After the deep learning model construction of sign point is completed, it can be effectively improved by using the deep learning model to target spy
Levy the accuracy of identification of point (or being key point).
The embodiment of the present application third aspect provides a kind of electronic equipment, including memory and processor, the storage
Device is for storing computer program, and the processor runs the computer program so that the computer equipment is executed according to this
The construction method of deep learning model described in any one of application embodiment first aspect for positioning multiple target characteristic point.
The embodiment of the present application fourth aspect provides a kind of computer readable storage medium, is stored with computer program and refers to
It enables, when the computer program instructions are read and run by a processor, executes any one of the embodiment of the present application first aspect
The construction method of the deep learning model for positioning multiple target characteristic point.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application will make below to required in the embodiment of the present application
Attached drawing is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore should not be seen
Work is the restriction to range, for those of ordinary skill in the art, without creative efforts, can be with
Other relevant attached drawings are obtained according to these attached drawings.
Fig. 1 is provided by the embodiments of the present application a kind of for positioning the building side of the deep learning model of multiple target characteristic point
The flow diagram of method;
Fig. 2 is provided by the embodiments of the present application another for positioning the building of the deep learning model of multiple target characteristic point
The flow diagram of method;
Fig. 3 is that a kind of building for positioning the deep learning model of multiple target characteristic point provided by the embodiments of the present application fills
The structural schematic diagram set;
Fig. 4 is provided by the embodiments of the present application another for positioning the building of the deep learning model of multiple target characteristic point
The structural schematic diagram of device.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile the application's
In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Embodiment 1
Fig. 1 is please referred to, Fig. 1 provides a kind of for positioning the deep learning mould of multiple target characteristic point for the embodiment of the present application
The flow diagram of the construction method of type.This method is a kind of for positioning the deep learning model of target feature point for constructing,
And this method can apply the positioning that in image recognition or scene Recognition multiple targets or personage are carried out with target feature point,
For example, the model that this method constructs can be applied in street to realize the effect identified to character features point
Fruit.Wherein, the construction method of the deep learning model for being used to position multiple target characteristic point includes:
S101, acquisition are for extracting the stacking hourglass network for the characteristic that input data includes, being used for according to characteristic
The detection network of target position information is obtained, for being closed according to characteristic progress critical point detection according to target detection is carried out
The positioning network of key point information and target feature point is obtained for composite object location information and key point information and exports mesh
Mark the output network of characteristic point.
In the present embodiment, hourglass network is stacked for extracting the characteristic that input data includes, and this feature data are
The characteristic parameter of input data.
In the present embodiment, input data can be picture, and the picture can be and obtain through various channels, to this
It is not limited in any way in the present embodiment, wherein the picture is several, can become training set.
In the present embodiment, characteristic is the characteristic parameter for including in above-mentioned picture (input data), wherein this feature
Parameter is input to above-mentioned detection network and above-mentioned positioning network as the output result for stacking hourglass network.
In the present embodiment, detection network is used to carry out target detection according to characteristic to obtain target position information,
In, detection network is specifically used for the characteristic got according to above-mentioned stacking hourglass network and carries out target detection, the detection
Journey can be understood as the target information for obtaining each target that it includes in input data.
In the present embodiment, positioning network is used to carry out critical point detection according to characteristic to obtain key point information,
In, positioning network is specifically used for the characteristic got according to above-mentioned stacking hourglass network and carries out critical point detection, the positioning
Process can be understood as obtaining all key points for including in input data, and the key point includes human body key point and other passes
Key point.
In the present embodiment, although detection network and positioning network are different two kinds of networks, but in the building of model
In, the information that both networks detect will participate in subsequent step jointly, such as be handled by loss function.It can be seen that
In the building process of model, detection network and positioning network are indivisible common grounds, and total by this kind point-
Mode can be to avoid the omission of any information, to improve the accuracy of identification of target feature point.
In the present embodiment, output network is to obtain target feature point simultaneously for composite object location information and key point information
Export the network of target feature point, it is to be understood that target feature point is obtained by processed by the information of the output network,
And the target feature point is exported, that is to say, that the network is the network for exporting good result.
In the present embodiment, stacking hourglass network, detection network, positioning network and output network is according to original framework
The newly Multi net voting model that determining purpose is set up jointly, and there is inevitable connection relationship in multiple networks, it is therefore, above-mentioned
Four networks can be understood as integrated network, that is, can not be split.
In the present embodiment, hourglass network is stacked for identifying to human body attitude, specifically, stacking hourglass network mould
Various algorithms in type can effectively provide the crucial telecommunications system of each region of human body.Meanwhile hourglass network is stacked in people
In work intelligence, human body key point can be more accurately identified.
In the present embodiment, target position information can be location information of the target in correspondence image.
In the present embodiment, key point information is the information of all key points in its corresponding image.
In the present embodiment, detection network is preferably YOLO network, wherein YOLO network is base with the detection network for table
In the network model of YOLO thought.
In the present embodiment, the detection preferred network structure of network is convolutional layer~convolutional layer~convolutional layer~maximum pond
Six layer network structure of layer~convolutional layer~convolutional layer, and form on the basis of combining weighted target function based on YOLO
The YOLO network of thought.Using the network target can be improved on the basis of meeting the building of multi-task learning network model
The order of accuarcy of detection
S102, combination stacked hourglass network, detection network, positioning network and output network obtain multi-task learning network
Model.
As an alternative embodiment, combination stacked hourglass network, detection network, positioning network and output network
The step of obtaining multi-task learning network model include:
The output end for stacking hourglass network is connected to the input terminal of detection network and the input terminal of positioning network;
The input terminal for exporting network is connected to the output end of detection network and the output end of positioning network.
Implement this embodiment, the combination of aforementioned four network can be embodied so that each network it
Between operation it is more smooth.
In the present embodiment, the multi-task learning network model that aforementioned four combination of network obtains is a kind of deep learning model
Basic model, the model have corresponding stationkeeping ability, but still need to training to improve its ability to work, to can just determine
For positioning the deep learning model of target feature point.
In the present embodiment, multi-task learning model is integrated network model, to no longer adding to go to live in the household of one's in-laws on getting married in this present embodiment
It states.
S103, be arranged in multi-task learning network model weighted target function, default training condition and with input number
According to corresponding hyper parameter, the first training pattern is obtained.
In the present embodiment, weighted target function is the specific objective function being applied in the multi-task learning network model,
Wherein, which be weighted by multiple objective functions.
In the present embodiment, training condition is preset for determining the degree of training, and meeting the default training condition
On the basis of terminate trained process, and get the deep learning model for positioning target feature point.
In the present embodiment, hyper parameter includes the parameter information for limiting input data type, the setting ginseng for stacking hourglass network
Number information (including stacking number and order), network optimizer, learning rate relevant parameter etc..Wherein, hyper parameter is for instructing
Therefore the parameter information for practicing above-mentioned multi-task learning model for the content that the hyper parameter includes, is not made any in the present embodiment
It limits.
In the present embodiment, and the corresponding hyper parameter of input data can specifically include data corresponding with input data and want
At the beginning of asking, stack the order for stacking number, stacking hourglass network of hourglass network, training to criticize size, network optimizer, learning rate
Initial value and learning rate adjustment requirement.
In the present embodiment, the first training pattern is properly termed as again to training pattern, it is to be understood that the first training mould
Type can start to train when receiving training data.
S104, the first training pattern is trained, obtains the second training pattern and corresponding with the second training pattern
Training information.
In the present embodiment, the second training pattern is obtained for the first training pattern by training, but the second training pattern
Training degree can for do not complete degree.
In the present embodiment, training information corresponding with the second training pattern is the training degree of the second model, specifically,
The training information can be the control information between result and notional result that the second training pattern obtains in practice.
As an alternative embodiment, be trained to the first training pattern, obtain the second training pattern and with
After the step of second training pattern corresponding training information, this method further include:
Storing the second training pattern is intermediate model of mind.
Implement this embodiment, can storing unfinished deep learning model in the training process, (this is unfinished
Deep learning model is known as intermediate model of mind), to carry out subsequent comparison or practice by saving the model in training
Operation, so that the building or use for the artificial model provide alternative or compare scheme.
In the present embodiment, the storage quantity of intermediate model of mind can be set to limited, such as intermediate model of mind
Can store 5 it is newest.
S105, when training information meets default training condition, saving the second training pattern is for positioning target signature
The deep learning model of point.
In the present embodiment, it can illustrate to train degree up to standard when above-mentioned training information meets default training condition,
That is, the second training pattern stored at this time can play in practical it is expected within effect, therefore deconditioning mistake
Journey determines the second training pattern at this time for the deep learning model for positioning target feature point.
In the present embodiment, which can be being capable of structure
Any device of deep learning model is built, wherein the device includes at least computer, does not repeat excessively in this present embodiment.
As it can be seen that implement the construction method of the described deep learning model for being used to position multiple target characteristic point of Fig. 1, it can
The deep learning model that can position target feature point is obtained in conjunction with multiple smart networks, then passes through setting weighting mesh
Scalar functions, default training condition and hyper parameter are trained above-mentioned deep learning model, the depth after being trained
Learning model, and when satisfaction thinks training condition to be achieved, the deep learning model after determining training is for positioning target
The deep learning model of characteristic point, thus realize that this is used to position the building of the deep learning model of multiple target characteristic point, meanwhile,
After the deep learning model construction for being used to position target feature point is completed, it can be come by using the deep learning model
Effectively improve the accuracy of identification to target feature point (or being key point).
Embodiment 2
Fig. 2 is please referred to, Fig. 2 is provided by the embodiments of the present application another for positioning the deep learning of multiple target characteristic point
The flow diagram of the construction method of model.Fig. 2 is described for positioning the structure of the deep learning model of multiple target characteristic point
The flow diagram of construction method is according to described in Fig. 1 for positioning the building side of the deep learning model of multiple target characteristic point
What the flow diagram of method improved.Wherein, the building of the deep learning model for being used to position multiple target characteristic point
Method includes:
S201, preset training set is obtained by pretreatment network, and training set is pre-processed to obtain input data.
In the present embodiment, training set is preset, and in general, preset data include training set, verifying collection
And three parts of test set, wherein training set described in this embodiment is the data set for participating in training.
In the present embodiment, pretreatment network for handling training set obtains that trained input data can be participated in.
In the present embodiment, preset training set is obtained by pretreatment network it is to be understood that pretreatment network obtains in advance
If training set.
S202, acquisition are for extracting the stacking hourglass network for the characteristic that input data includes, being used for according to characteristic
The detection network of target position information is obtained, for being closed according to characteristic progress critical point detection according to target detection is carried out
The positioning network of key point information and target feature point is obtained for composite object location information and key point information and exports mesh
Mark the output network of characteristic point.
In the present embodiment, hourglass network is stacked for extracting the characteristic that input data includes, and this feature data are
The characteristic parameter of input data.
In the present embodiment, input data can be picture, and the picture can be and obtain through various channels, to this
It is not limited in any way in the present embodiment, wherein the picture is several, can become training set.
In the present embodiment, characteristic is the characteristic parameter for including in above-mentioned picture (input data), wherein this feature
Parameter is input to above-mentioned detection network and above-mentioned positioning network as the output result for stacking hourglass network.
In the present embodiment, detection network is used to carry out target detection according to characteristic to obtain target position information,
In, detection network is specifically used for the characteristic got according to above-mentioned stacking hourglass network and carries out target detection, the detection
Journey can be understood as the target information for obtaining each target that it includes in input data.
In the present embodiment, positioning network is used to carry out critical point detection according to characteristic to obtain key point information,
In, positioning network is specifically used for the characteristic got according to above-mentioned stacking hourglass network and carries out critical point detection, the positioning
Process can be understood as obtaining all key points for including in input data, and the key point includes human body key point.
In the present embodiment, although detection network and positioning network are different two kinds of networks, but in the building of model
In, the information that both networks detect will participate in subsequent step jointly, such as be handled by loss function.It can be seen that
In the building process of model, detection network and positioning network are indivisible common grounds, and total by this kind point-
Mode can be to avoid the omission of any information, to improve the accuracy of identification of target feature point.
In the present embodiment, output network is to obtain target feature point simultaneously for composite object location information and key point information
Export the network of target feature point, it is to be understood that target feature point is obtained by processed by the information of the output network,
And the target feature point is exported, that is to say, that the network is the network for exporting good result.
In the present embodiment, stacking hourglass network, detection network, positioning network and output network is according to original framework
The newly Multi net voting model that determining purpose is set up jointly, and there is inevitable connection relationship in multiple networks, it is therefore, above-mentioned
Four networks can be understood as integrated network, that is, can not be split.
In the present embodiment, it stacks hourglass network to be interpreted as stacking hourglass core network, on this basis, stacks hourglass
Network, pretreatment network and positioning network can form a complete stacking hourglass whole network.It can be seen that the present embodiment
Described in stacking hourglass network, pretreatment network and the positioning networks such as network be all interpreted as following multi-task learning networks
A part in model, therefore each network is all bound together, in should not being split.
In the present embodiment, target position information can be location information of the target in correspondence image.
In the present embodiment, key point information can be the information of all key points in its corresponding image.
In the present embodiment, detection network is preferably YOLO network, wherein YOLO network is base with the detection network for table
In the network model of YOLO thought.
In the present embodiment, the detection preferred network structure of network is convolutional layer~convolutional layer~convolutional layer~maximum pond
Six layer network structure of layer~convolutional layer~convolutional layer, and form on the basis of combining weighted target function based on YOLO
The YOLO network of thought;Using the network target can be improved on the basis of meeting the building of multi-task learning network model
The order of accuarcy of detection.
S203, combination stacked hourglass network, detection network, positioning network and output network obtain multi-task learning network
Model.
In the present embodiment, the multi-task learning network model that aforementioned four combination of network obtains is a kind of deep learning model
Basic model, the model have corresponding stationkeeping ability, but still need to training to improve its ability to work, to can just determine
For positioning the deep learning model of target feature point.
In the present embodiment, multi-task learning model is integrated network model, to no longer adding to go to live in the household of one's in-laws on getting married in this present embodiment
It states.
S204, crucial point location objective function and border detection objective function are obtained.
In the present embodiment, crucial point location objective function can be corresponding with positioning network.
In the present embodiment, border detection objective function can be corresponding with detection network.
In the present embodiment, above-mentioned two objective function is the two target letters put forward based on pre-set network
Number, but during practice, an objective function is only needed in the deep learning model, but to complete whole tune
It is whole, therefore obtaining above-mentioned two objective function is the basic information provided for the building of entire model.
In the present embodiment, crucial point location objective function can use the loss of L2 costing bio disturbance positioning feature point task,
Calculation formula is as follows:
Wherein, yiIndicate the predicted value of network,Indicate corresponding target value, n indicates number of samples.
In the present embodiment, the setting of border detection objective function is optimized in the loss of the original justice of YOLO network,
Calculation formula is as follows:
Wherein, λcoordAdjustment factor, λ are lost for coordinatenoobjTo lose adjustment factor, S without containing the prediction of object grid
Indicate the division to image, B indicates that each grid wants the number of predicted boundary frame, xi、yiIt indicates in i-th of grid prediction object
Cross, the ordinate of heart point,Indicate the true horizontal, ordinate of object central point, w in i-th of gridi、hiIndicate prediction
Object width, height,Indicate the true width of object, height, CiIndicate that i-th of grid prediction includes the general of object
Rate,Indicate the friendship of predicted boundary frame and real border frame and ratio, pi(c) probability of i-th of grid prediction object category is indicated,Indicate the true object category probability of i-th of grid,Indicate i-th and include j-th of the grid prediction of object
The loss coefficient of bounding box,Calculation formula it is as follows:
Wherein, c_col indicates that the column where the grid comprising object central point, c_row are indicated comprising object central point
Row where grid, σwIndicate variance of the Gaussian Profile on picture traverse direction, σhIndicate Gaussian Profile in picture altitude direction
On variance, the general term formula of both direction variance is defined as follows:
Wherein, factor is for control decision weight with the adjusting with the increased decrease speed of central point lattice spacing
The factor, box_w indicate that the width of the rectangle frame comprising object, box_h indicate the height of the rectangle frame comprising object.
Weight decrease speed can be divided into different grades, the partitioning standards of the grade by the setting to factor value
For decision weights from the central position 1 drop to 0.1 required for pass through the number of grid, according to output characteristic pattern in the present invention
Grade control is 8 by size, and the corresponding grid number of grade 1 to 8 is 2,4,6,8,12,16,24,32, corresponding
The value of factor is 2.65,5.3,8,10.6,16,21.2,32,42.5.In view of the length and width of object to be predicted usually exist
Certain difference, decline principle of the invention are that grid where from object central point goes out with vertical direction simultaneously in the horizontal direction
When the grid being dealt into where reaching object boundary frame, two grid have same decision-making capability, can use the width of prediction object
Degree and height are adjusted variance to realize.
S205, it is weighted to obtain weighted target according to crucial point location objective function and border detection objective function
Function.
In the present embodiment, the loss of two tasks is fused together by objective function setting by the way of weighted sum,
Calculation formula is as follows:
Ltotal=λkpsLkps+Ldet+μ||w||2;
Wherein, LkpsIt is characterized the loss of point location task, LdetThe loss of task is returned for human body bounding box, | | w | |2It is
Reduce the L2 norm of network over-fitting possibility, λ for control network model complexitykpsIt is for adjusting each section damage with μ
Lose shared ratio in whole loss.
S206, be arranged in multi-task learning network model weighted target function, default training condition and with input number
According to corresponding hyper parameter, the first training pattern is obtained.
In the present embodiment, weighted target function is the specific objective function being applied in the multi-task learning network model,
Wherein, which be weighted by multiple objective functions.
In the present embodiment, training condition is preset for determining the degree of training, and meeting the default training condition
On the basis of terminate trained process, and get the deep learning model for positioning target feature point.
In the present embodiment, and the corresponding hyper parameter of input data can specifically include data corresponding with input data and want
At the beginning of asking, stack the order for stacking number, stacking hourglass network of hourglass network, training to criticize size, network optimizer, learning rate
Initial value and learning rate adjustment requirement
In the present embodiment, data demand corresponding with input data may include that " input of network is 256 × 256 big
Small Three Channel Color image ";The stacking number for stacking hourglass network is 2, and the order for stacking hourglass network is 4;It is criticized when training
Size (batch_size) is set as 20;Network optimizer selects RMSProp algorithm (root mean square back-propagation algorithm, RMSProp
Algorithm is the improvement version of RProp algorithm);The initial value of learning rate is 2.5*10-4;Learning rate adjustment requirement is to walk in training process
Number 50000 step learning rates of every increase drop to original 10%.
In the present embodiment, the first training pattern is properly termed as again to training pattern, it is to be understood that the first training mould
Type can start to train when receiving training data.
S207, preset training set and preset verifying collection are obtained.
In the present embodiment, for training set for training deep learning model, verifying collection is used for test depth learning model.
S208, the first training pattern is trained by training set, obtains the second training pattern.
In the present embodiment, the first training pattern is trained based on training set.
In the present embodiment, the second training pattern is that the training of the first training pattern obtains.
S209, the second training pattern is tested by verifying collection, and the second training pattern is carried out by training set
Test obtains and verifies corresponding first test result of collection and the second test result corresponding with training set.
In the present embodiment, by verifying the first test result for collecting and being tested the second training pattern.
In the present embodiment, the second training pattern is tested by training set the second test result.
In the present embodiment, the first test result and the second test result and the output result of ultimate depth learning model are similar
Seemingly.
S210, it is calculated, is obtained corresponding with the second training pattern according to the first test result and the second test result
Training information.
In the present embodiment, the error got between the two is calculated according to both the first test result and the second test result
Value, and the error amount is determined as training information corresponding with the second training pattern.
In the present embodiment, the unit of above-mentioned error amount can be pixel.
S211, error difference be greater than error threshold when, save the second training pattern be for positioning target feature point
Deep learning model.
In the present embodiment, training information corresponding with the second training pattern includes error difference, presets training condition packet
Include error threshold.
In the present embodiment, which is used to show when the error difference on training set and verifying collection is greater than error threshold,
Stop the training to network model and saves the structure and parameter of model this moment.
In the present embodiment, above-mentioned error threshold can choose 2000;Unit can be pixel.
As it can be seen that implement the construction method of the described deep learning model for being used to position multiple target characteristic point of Fig. 2, it can
The deep learning model that can position target feature point is obtained in conjunction with multiple smart networks, then passes through setting weighting mesh
Scalar functions, default training condition and hyper parameter are trained above-mentioned deep learning model, the depth after being trained
Learning model, and when satisfaction thinks training condition to be achieved, the deep learning model after determining training is for positioning target
The deep learning model of characteristic point, thus realize that this is used to position the building of the deep learning model of multiple target characteristic point, meanwhile,
After the deep learning model construction for being used to position target feature point is completed, it can be come by using the deep learning model
Effectively improve the accuracy of identification to target feature point (or being key point).
Embodiment 3
Fig. 3 is please referred to, Fig. 3 is provided by the embodiments of the present application a kind of for positioning the deep learning mould of multiple target characteristic point
The structural schematic diagram of the construction device of type.Wherein, the construction device of the deep learning model for being used to position multiple target characteristic point
Include:
Acquiring unit 310, for obtaining stacking hourglass network for extracting the characteristic that input data includes, being used for
Target detection, which is carried out, according to characteristic obtains the detection network of target position information, for carrying out key point according to characteristic
Detection obtains the positioning network of key point information and obtains target signature for composite object location information and key point information
Put and export the output network of target feature point;
Assembled unit 320 obtains more for combination stacked hourglass network, detection network, positioning network and output network
Tasking learning network model;
Setting unit 330, for be arranged in multi-task learning network model weighted target function, default training condition with
And hyper parameter corresponding with input data, obtain the first training pattern;
Training unit 340, for being trained to the first training pattern, obtaining the second training pattern and training mould with second
The corresponding training information of type;
Storage unit 350, for when training information meets default training condition, saving the second training pattern to be for fixed
The deep learning model of position target feature point.
In the present embodiment, above-mentioned use can be quoted for positioning the construction device of deep learning model of multiple target characteristic point
All explanation contents and additional content in the construction method of the deep learning model of positioning multiple target characteristic point are right
No longer add to repeat in this present embodiment.
As it can be seen that implementing Fig. 3 is described for positioning the construction device of the deep learning model of multiple target characteristic point, it can
The deep learning model that can position target feature point is obtained in conjunction with multiple smart networks, then passes through setting weighting mesh
Scalar functions, default training condition and hyper parameter are trained above-mentioned deep learning model, the depth after being trained
Learning model, and when satisfaction thinks training condition to be achieved, the deep learning model after determining training is for positioning target
The deep learning model of characteristic point, thus realize that this is used to position the building of the deep learning model of multiple target characteristic point, meanwhile,
After the deep learning model construction for being used to position target feature point is completed, it can be come by using the deep learning model
Effectively improve the accuracy of identification to target feature point (or being key point).
Embodiment 4
Fig. 4 is please referred to, Fig. 4 is provided by the embodiments of the present application another for positioning the deep learning of multiple target characteristic point
The structural schematic diagram of the construction device of model.Fig. 4 is described for positioning the structure of the deep learning model of multiple target characteristic point
The structural schematic diagram for building device is according to described in Fig. 3 for positioning the building dress of the deep learning model of multiple target characteristic point
What the structural schematic diagram set improved.Wherein, the building of the deep learning model for being used to position multiple target characteristic point
Device further include:
Pretreatment unit 360 for obtaining preset training set by pretreatment network, and pre-processes training set
Obtain input data.
As an alternative embodiment, acquiring unit 310 can be also used for obtaining crucial point location objective function and
Border detection objective function;
The also included computing unit 370 of construction device for positioning the deep learning model of multiple target characteristic point, is used for
It is weighted to obtain weighted target function according to crucial point location objective function and border detection objective function.
As an alternative embodiment, training unit 340 includes:
Subelement 341 is obtained, for obtaining preset training set and preset verifying collection;
Training subelement 342 obtains the second training pattern for being trained by training set to the first training pattern;
Subelement 343 is tested, for testing by verifying collection the second training pattern, and by training set to second
Training pattern is tested, and corresponding first test result of collection and the second test knot corresponding with training set are obtained and verify
Fruit;
Computation subunit 344 obtains and the second instruction for being calculated according to the first test result and the second test result
Practice the corresponding training information of model.
As an alternative embodiment, include error difference in training information corresponding with the second training pattern,
Default training condition includes under the basis of error threshold, and storage unit 350 is specifically used for when error difference is greater than error threshold,
Saving the second training pattern is the deep learning model for positioning target feature point.
In the present embodiment, above-mentioned use can be quoted for positioning the construction device of deep learning model of multiple target characteristic point
All explanation contents and additional content in the construction method of the deep learning model of positioning multiple target characteristic point are right
No longer add to repeat in this present embodiment.
As it can be seen that implement the construction device of the described deep learning model for being used to position multiple target characteristic point of Fig. 4, it can
The deep learning model that can position target feature point is obtained in conjunction with multiple smart networks, then passes through setting weighting mesh
Scalar functions, default training condition and hyper parameter are trained above-mentioned deep learning model, the depth after being trained
Learning model, and when satisfaction thinks training condition to be achieved, the deep learning model after determining training is for positioning target
The deep learning model of characteristic point, thus realize that this is used to position the building of the deep learning model of multiple target characteristic point, meanwhile,
After the deep learning model construction for being used to position target feature point is completed, it can be come by using the deep learning model
Effectively improve the accuracy of identification to target feature point (or being key point).
The embodiment of the present application provides a kind of electronic equipment, including memory and processor, and the memory is for depositing
Computer program is stored up, the processor runs the computer program so that computer equipment execution is implemented according to the application
Any one of example 1 or embodiment 2 are used to position the construction device method of the deep learning model of multiple target characteristic point.
The embodiment of the present application provides a kind of computer readable storage medium, is stored with computer program instructions, described
When computer program instructions are read and run by a processor, any one of the embodiment of the present application 1 or embodiment 2 are executed for fixed
The construction device method of the deep learning model of position multiple target characteristic point.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the application, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement
The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes
It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement
It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above description is only an example of the present application, the protection scope being not intended to limit this application, for ability
For the technical staff in domain, various changes and changes are possible in this application.Within the spirit and principles of this application, made
Any modification, equivalent substitution, improvement and etc. should be included within the scope of protection of this application.It should also be noted that similar label and
Letter indicates similar terms in following attached drawing, therefore, once it is defined in a certain Xiang Yi attached drawing, then in subsequent attached drawing
In do not need that it is further defined and explained.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.