Deep learning enhanced model precision training method, target detection method and system
By processing sample data and adjusting weight parameters using a deep learning model, the problem of low accuracy in existing target detection models is solved, achieving improved target detection accuracy and fault tolerance without increasing computational load.
Patent Information
- Application Number
- CN202111260838.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2041-10-28
AI Technical Summary
Existing target detection models have low detection accuracy while maintaining real-time performance, especially those based on one-stage models such as the YOLO series, RetinaNet model, and SSD network model.
The sample data is processed by a deep learning model, the loss function values of various prediction results are calculated, and the weight parameters are adjusted by the backpropagation algorithm until the preset values are met, thereby optimizing the model accuracy.
Without increasing computational load, the accuracy of target detection was improved, and the model's fault tolerance and detection accuracy were enhanced.
Smart Images

Figure CN116050458B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and computer vision, and in particular to a training method, object detection method and system for enhancing the accuracy of deep learning models. Background Technology
[0002] With the increasing intelligence of electronic devices and the rapid development of artificial intelligence technology, object detection has been widely used in various fields to detect the presence and location of target objects in digital images. To maintain the real-time performance of object detection tasks, most current object detection models employ one-stage models, such as the YOLO series, RetinaNet, and SSD network models. Because these networks have simple structures and low computational cost, they execute quickly, but their object detection accuracy is relatively low. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a training method, object detection method and system for deep learning enhancement model with high detection accuracy.
[0004] The objective of this invention can be achieved through the following technical solutions:
[0005] According to a first aspect of the present invention, a training method for enhancing the accuracy of a deep learning model is provided, the method comprising:
[0006] By processing the sample data using a deep learning model, prediction results A, B, C, and D, representing different information about the prediction target, are obtained.
[0007] Based on the prediction results A and B, obtain the first loss function value L. reg The second loss function value L is obtained based on the prediction result B. iou The third loss function value L is obtained based on the prediction result C. obj The fourth loss function value L is obtained based on the prediction results B and D. cls According to the first loss function value L reg The second loss function value L iou The third loss function value L obj and the fourth loss function value L cls Determine the loss function value of the deep learning model;
[0008] Based on the loss function value of the deep learning model, the weight parameters of the deep learning model are adjusted using the backpropagation algorithm until the loss function value meets the preset value, thus obtaining the trained deep learning model.
[0009] Preferably, the sample data is a digital image carrying target annotation information.
[0010] Preferably, prediction result A is a predicted bounding box, including center point coordinates and width and height information; prediction result B is the intersection-union ratio of the predicted bounding box; prediction result C is the probability value of including the predicted target; and prediction result D is the probability information of the category to which the predicted target belongs.
[0011] Preferably, the first loss function value L is obtained based on the prediction result A and the prediction result B. reg Specifically, the loss function value L reg It is the calculated value of the loss function between the prediction result A and the corresponding target annotation information, and is dynamically adjusted through the prediction result B. Its mathematical calculation formula is as follows:
[0012]
[0013] Where N is the number of prediction results A; T is the number of target annotation information; for Let α be the i-th result of the prediction result B, where α is a preset power parameter; and These are the coordinates of the center point, width, and height of the i-th prediction result A, respectively. x j y j w j and h j These are the center point coordinates, width, and height of the j-th annotation information of the target annotation information, respectively; The calculation method is as follows:
[0014]
[0015] Among them, for IOU ij It is the intersection-union ratio between the i-th result of the prediction result A and the j-th annotation information of the target annotation information.
[0016] Preferably, the step of obtaining the loss function value L based on the prediction result B is... iou Specifically, the second loss function value L iou It is the calculated value of the loss function between the predicted result B and the corresponding target annotation information, and its mathematical calculation formula is as follows:
[0017]
[0018] Preferably, the step of obtaining the third loss function value L based on the prediction result C is... objSpecifically, the third loss function value L obj It is the calculated value of the loss function between the prediction result C and the target annotation information, and its mathematical calculation formula is as follows:
[0019]
[0020] Among them, for It is the i-th prediction result of prediction result B; The calculation method is as follows:
[0021]
[0022] in, yes The k-th high probability value in the set, where k is a preset parameter less than N.
[0023] Preferably, the step of obtaining the fourth loss function value L based on the prediction result B and the prediction result D is... cls Specifically, the fourth loss function value L cls It is the calculated value of the loss function between the prediction result D and the corresponding target annotation information, and is dynamically adjusted through the prediction result B. Its calculation formula is as follows:
[0024]
[0025] Among them, for p j (c) is the j-th annotation information of the target annotation information. is the i-th prediction result of the prediction result D, and β is a preset power parameter.
[0026] Preferably, the mathematical formula for calculating the loss function value of the deep learning model is as follows:
[0027] Loss = L reg +L iou +L obj +L cls
[0028] Among them, L reg Let L be the first loss function value. iou For the second loss function value, L obj For the third loss function value, L cls This is the value of the fourth loss function.
[0029] According to a second aspect of the present invention, a target detection method based on a deep learning model is provided, the method comprising:
[0030] Acquire the image to be detected;
[0031] The acquired image to be detected is input into the trained target detection model for processing to obtain prediction result A, prediction result B, prediction result C and prediction result D;
[0032] Based on prediction results B and C, the confidence level including the target is determined, and the confidence level calculation expression is as follows:
[0033]
[0034] Where γ is a preset parameter less than 1. Confidence i It is the i-th prediction confidence value; For the i-th result of the prediction result B, It is the probability value in the i-th prediction result of the prediction result B;
[0035] If the confidence level of the target is higher than the preset confidence level threshold, the predicted bounding box is obtained based on the prediction result A, and the target category information is obtained based on the prediction result D.
[0036] The final detection result is obtained based on the predicted bounding box and target category information.
[0037] According to a third aspect of the present invention, a deep learning-based object detection system is provided, the system comprising the following modules:
[0038] The image acquisition module 301 is used to acquire the image to be detected;
[0039] The object detection inference module 302 is used to input the image to be detected into the trained deep learning model for processing, and obtain the prediction result A, prediction result B, prediction result C and prediction result D;
[0040] The confidence level acquisition module 303 is used to acquire the confidence level of the target based on the acquired prediction results B and C.
[0041] The detection result acquisition module 304 is used to acquire a prediction bounding box based on the acquired prediction result A if the confidence level is higher than a preset confidence level threshold, and to acquire the target category information based on the acquired prediction result D, and to acquire the final detection result based on the prediction bounding box and the target category information.
[0042] Compared with the prior art, the present invention has the following advantages:
[0043] 1) The training method of the neural network model of the present invention improves the accuracy of target detection without increasing the amount of computation;
[0044] 2) This invention adjusts the weight parameters of the model based on the prediction results of various types of data, resulting in higher fault tolerance and higher accuracy in target detection. Attached Figure Description
[0045] Figure 1 This is a flowchart of the deep learning model training method of the present invention;
[0046] Figure 2 This is a flowchart of the object detection method based on a deep learning model of the present invention;
[0047] Figure 3 This is a schematic diagram of the target detection system of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0049] Example
[0050] First, an embodiment of a deep learning model accuracy enhancement training method of the present invention is given, the method comprising:
[0051] By processing the sample data using a deep learning model, prediction results A, B, C, and D, representing different information about the prediction target, are obtained.
[0052] Based on the prediction results A and B, obtain the first loss function value L. reg The second loss function value L is obtained based on the prediction result B. iou The third loss function value L is obtained based on the prediction result C. obj The fourth loss function value L is obtained based on the prediction results B and D. cls According to the first loss function value L reg The second loss function value L iou The third loss function value L obj and the fourth loss function value L cls Determine the loss function value of the deep learning model;
[0053] Based on the loss function value of the deep learning model, the weight parameters of the deep learning model are adjusted using the backpropagation algorithm until the loss function value meets the preset value, thus obtaining the trained deep learning model.
[0054] The sample data consists of digital images carrying target annotation information.
[0055] The prediction result A is the predicted bounding box, including the center point coordinates and width and height information; the prediction result B is the intersection-union ratio of the predicted bounding box; the prediction result C is the probability value of including the predicted target; and the prediction result D is the probability information of the category to which the predicted target belongs.
[0056] The first loss function value L is obtained based on the prediction result A and the prediction result B. reg Specifically, the loss function value L reg It is the calculated value of the loss function between the prediction result A and the corresponding target annotation information, and is dynamically adjusted through the prediction result B. Its mathematical calculation formula is as follows:
[0057]
[0058] Where N is the number of prediction results A; T is the number of target annotation information; for Let α be the i-th result of the prediction result B, where α is a preset power parameter; and These are the coordinates of the center point, width, and height of the i-th prediction result A, respectively. x j y j w j and h j These are the center point coordinates, width, and height of the j-th annotation information of the target annotation information, respectively; The calculation method is as follows:
[0059]
[0060] Among them, for IOU ij It is the intersection-union ratio between the i-th result of the prediction result A and the j-th annotation information of the target annotation information.
[0061] The loss function value L is obtained based on the prediction result B. iou Specifically, the second loss function value L iou It is the calculated value of the loss function between the predicted result B and the corresponding target annotation information, and its mathematical calculation formula is as follows:
[0062]
[0063] The third loss function value L is obtained based on the prediction result C. obj Specifically, the third loss function value Lobj It is the calculated value of the loss function between the prediction result C and the target annotation information, and its mathematical calculation formula is as follows:
[0064]
[0065] Among them, for It is the i-th prediction result of prediction result B; The calculation method is as follows:
[0066]
[0067] in, yes The k-th high probability value in the set, where k is a preset parameter less than N.
[0068] The fourth loss function value L is obtained based on the prediction results B and D. cls Specifically, the fourth loss function value Lc ls It is the calculated value of the loss function between the prediction result D and the corresponding target annotation information, and is dynamically adjusted through the prediction result B. Its calculation formula is as follows:
[0069]
[0070] Among them, for p j (c) is the j-th annotation information of the target annotation information. is the i-th prediction result of the prediction result D, and β is a preset power parameter.
[0071] Preferably, the mathematical formula for calculating the loss function value of the deep learning model is as follows:
[0072] Loss = L reg +L iou +L obj +L cls
[0073] Among them, L reg Let L be the first loss function value. iou For the second loss function value, L obj For the third loss function value, L cls This is the value of the fourth loss function.
[0074] The following is an embodiment of an object detection method based on the training method of the above-mentioned deep learning model according to the present invention. The method includes:
[0075] Acquire the image to be detected;
[0076] The acquired image to be detected is input into the trained target detection model for processing to obtain prediction result A, prediction result B, prediction result C and prediction result D;
[0077] Based on prediction results B and C, the confidence level including the target is determined, and the confidence level calculation expression is as follows:
[0078]
[0079] Where γ is a preset parameter less than 1. Confidence i It is the i-th prediction confidence value; For the i-th result of the prediction result B, It is the probability value in the i-th prediction result of the prediction result B;
[0080] If the confidence level of the target is higher than the preset confidence level threshold, the predicted bounding box is obtained based on the prediction result A, and the target category information is obtained based on the prediction result D.
[0081] The final detection result is obtained based on the predicted bounding box and target category information.
[0082] The following is a system embodiment of the present invention: a deep learning-based object detection system, which includes the following modules:
[0083] The image acquisition module is used to acquire the image to be detected.
[0084] The object detection inference module is used to input the image to be detected into the trained deep learning model for processing, and to obtain the prediction result A, prediction result B, prediction result C and prediction result D;
[0085] The confidence level acquisition module is used to obtain the confidence level of the target based on the obtained prediction results B and C.
[0086] The detection result acquisition module is used to obtain a predicted bounding box based on the obtained prediction result A if the confidence level is higher than a preset confidence level threshold, and to obtain the target category information based on the obtained prediction result D. Finally, the detection result is obtained based on the predicted bounding box and the target category information.
[0087] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A target detection method based on a deep learning model, characterized in that, The method includes: Acquire the image to be detected; The acquired image to be detected is input into the trained target detection model for processing to obtain prediction result A, prediction result B, prediction result C and prediction result D; Based on prediction result B, the confidence level including the target is determined, and the confidence level calculation expression is: in, It is a preset parameter less than 1. It is the first i One prediction confidence value; For the prediction result B, the first i This result, for It is the first of the prediction results B i The probability value of each predicted result; If the confidence level of the target is higher than the preset confidence level threshold, the predicted bounding box is obtained based on the prediction result A, and the target category information is obtained based on the prediction result D. The final detection result is obtained based on the predicted bounding box and target category information; The training process of the object detection model includes: The sample data is processed by a deep learning model to obtain prediction results A, B, C, and D, which represent different information about the predicted target, respectively. The sample data is a digital image carrying target annotation information. Prediction result A is the predicted bounding box, including the center point coordinates and width and height information. Prediction result B is the intersection-union ratio of the predicted bounding box. Prediction result C is the probability value of including the predicted target. Prediction result D is the probability information of the category to which the predicted target belongs. The first loss function value is obtained based on the prediction results A and B. L reg The second loss function value is obtained based on the prediction result B. L iou The third loss function value is obtained based on the prediction result C. L obj The fourth loss function value is obtained based on the prediction results B and D. L cls According to the first loss function value L reg Second loss function value L iou Third loss function value L obj and the fourth loss function value L cls Determine the loss function value of the deep learning model; Based on the loss function value of the deep learning model, the weight parameters of the deep learning model are adjusted using the backpropagation algorithm until the loss function value meets the preset value, thus obtaining the trained deep learning model. The first loss function value is obtained based on the prediction result A and the prediction result B. L reg Specifically, the loss function value L reg It is the calculated value of the loss function between the prediction result A and the corresponding target annotation information, and is dynamically adjusted through the prediction result B. Its mathematical calculation formula is as follows: in, N It is the number of the predicted results A; T It is the number of target annotation information; for , For the prediction result B, the first i One result, α The power parameter can be preset; These are the prediction results A's first and second predictions. i The center point coordinates, width, and height of each result; These are the first of the target annotation information. j The center point coordinates, width, and height of each annotation information; , The calculation method is as follows: Among them, for , IOU ij It is the first of the prediction results A i The result is related to the target annotation information of the first... j Intersection over union (IoU) ratio among labeled information.
2. The method according to claim 1, characterized in that, The second loss function value is obtained based on the prediction result B. L iou Specifically, the second loss function value L iou It is the calculated value of the loss function between the predicted result B and the corresponding target annotation information, and its mathematical calculation formula is as follows: 。 3. The method according to claim 1, characterized in that, The third loss function value is obtained based on the prediction result C. L obj Specifically, the value of the third loss function L obj It is the calculated value of the loss function between the prediction result C and the target annotation information, and its mathematical calculation formula is as follows: Among them, for It is the first of the prediction results B i The probability value of each predicted result; , The calculation method is as follows: in, yes The probability values in the set are sorted from largest to smallest and are located at the th position. k The probability value of the bit. k It is preset to be less than N The parameters.
4. The method according to claim 1, characterized in that, The fourth loss function value is obtained based on the prediction result B and the prediction result D. L cls Specifically, the value of the fourth loss function L cls It is the calculated value of the loss function between the prediction result D and the corresponding target annotation information, and is dynamically adjusted through the prediction result B. Its calculation formula is as follows: Among them, for , It is the first of the predicted results D. i One prediction result, β The power parameter can be preset.
5. The method according to claim 1, characterized in that, The mathematical formula for calculating the loss function value of the deep learning model is as follows: in, L reg The first loss function value, L iou This is the value of the second loss function. L obj The value of the third loss function. L cls This is the value of the fourth loss function.
6. A target detection system based on deep learning, characterized in that, The system, employing the method of claim 1, comprises the following modules: The image acquisition module is used to acquire the image to be detected. The object detection inference module is used to input the image to be detected into the trained deep learning model for processing, and to obtain the prediction result A, prediction result B, prediction result C and prediction result D; The confidence level acquisition module is used to obtain the confidence level of the target based on the obtained prediction result B. The detection result acquisition module is used to obtain a predicted bounding box based on the obtained prediction result A when the obtained confidence level is higher than a preset confidence level threshold, obtain target category information based on the obtained prediction result D, and obtain the final detection result based on the predicted bounding box and the target category information.
Citation Information
Patent Citations
Building embedded part detection method and system based on improved YOLO
CN111178206A
Target detection model training method, and target detection method and device
CN112329873A
Target detection method and device applied to vehicle-road cooperation, roadside equipment and vehicle
CN113469025A