A deep learning training method for object detection
By introducing the Pig Game process from game theory into object detection, the sample training process is optimized, the sample imbalance problem is solved, the accuracy and generalization performance of the model are improved, and more efficient object detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2026-03-20
AI Technical Summary
The imbalance of samples is difficult to solve in existing technologies, which leads to a decrease in model accuracy and thus low accuracy of target detection.
The process of introducing the Pig Game from game theory is used to model the different difficulty levels of samples in the training sample set as a game between big pigs and small pigs. By adjusting the sample roles and training opportunities, the neural network training process is optimized and computing resources are dynamically allocated.
It improves the training accuracy and generalization performance of the model, avoids overfitting or underfitting, and enhances the accuracy and training efficiency of object detection.
Smart Images

Figure CN116597134B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of target detection, and particularly relates to a deep learning training method for target detection. BACKGROUND
[0002] The target detection task is to find all the targets (objects) of interest in an image, determine their categories and positions, and is one of the core problems in the field of computer vision. Due to different appearances, shapes and postures of various objects, and the interference of factors such as light and occlusion during imaging, target detection has always been the most challenging problem in the field of computer vision. With the large-scale application of deep learning in the field of target detection, the precision and speed of target detection technology have been rapidly improved, and have been widely applied to the fields of pedestrian detection, face detection, text detection, traffic sign and signal lamp detection and remote sensing image detection.
[0003] In the field of deep learning, after designing the structure, activation function, loss function, optimizer and the like of the deep learning neural network model, neural network training is still needed, so that the model can be used for actual target detection tasks. Among them, the neural network model training process is very important, and will directly affect the training time cost, model inference precision and the like of the model.
[0004] The data set is a sample collection of neural networks, and the essence of neural network training is to learn the mathematical distribution hidden in the data set. In the current object detection algorithm, due to the differences between detection algorithms and data sets, there may be three imbalance problems of easy and difficult samples, class interval samples and positive and negative samples. In academic research and teaching, many algorithms have a basic assumption that the data distribution is uniform. When these algorithms are directly applied to actual data, ideal results cannot be achieved in most cases. Because the actual data is often very unevenly distributed, there will be a "long tail phenomenon", that is, the so-called "80-20 principle". According to whether it is easy to learn and the degree of overlap with the label, all samples can be divided into four categories: simple positive samples (Easy Positive), hard positive samples (Hard Positive), simple negative samples (Easy Negative) and hard negative samples (Hard Negative).
[0005] The difficult sample refers to the ambiguous edge box, which is in the transition area of the foreground and the background, and the difficult sample loss is large in network training, which is the sample that the model hopes to learn and optimize. Using this part of training can improve the accuracy of detection. However, a large number of samples are not in the transition area of the foreground and the background, which is called simple sample, and the single loss is small, which has limited effect on parameter convergence. However, because of the large number, if the loss is calculated, the loss will be much larger than the difficult sample. The imbalance of difficult and easy samples will also affect the convergence and accuracy of the model.
[0006] The model trained by the unbalanced samples has poor generalization ability and is prone to overfitting. At present, there are two common methods to solve the problem of unbalanced data samples. The first method is data resampling, so that the data participating in iterative calculation is balanced. The second method is to modify the loss function of the model, and increase the loss function reward for few samples in the loss function calculation process.
[0007] Among them, data resampling includes data oversampling and undersampling. The disadvantage of data oversampling is that it is prone to few sample overfitting, cannot learn more robust and easy to generalize features, and performs poorly on unbalanced data. Because the features of positive samples are almost the same, the model learns almost nothing about these positive samples, so it is prone to overfitting. The disadvantage of undersampling is that it will cause serious information loss of multiple samples, resulting in underfitting. Some information of the majority class samples is lost.
[0008] The typical case of modifying the loss function of the model is to use the Focal loss method, which balances the samples by controlling the weights of positive and negative samples and controlling the weights of easy and difficult classification samples. The disadvantage is that it is easily affected by noise data.
[0009] In the process of implementing the present application, the inventors found that the prior art at least has the following problems:
[0010] The existing sample imbalance phenomenon is difficult to solve, which leads to a decrease in model accuracy, thereby reducing the accuracy of target detection. SUMMARY
[0011] The purpose of the present application is to provide a deep learning training method for target detection to solve the technical problem that the existing sample imbalance phenomenon in the prior art is difficult to solve, which leads to a decrease in model accuracy, thereby reducing the accuracy of target detection. The technical effects produced by the preferred technical solutions in the many technical solutions provided by the present application are described in detail below.
[0012] To achieve the above purpose, the present application provides the following technical solutions:
[0013] The application provides a deep learning training method for target detection, comprising:
[0014] S1, sequentially performing cleaning, labeling, preprocessing and division on collected image data to obtain a training sample set;
[0015] S2, performing preliminary deep learning training on the training sample set to obtain an accuracy rate of correct detection of each sample;
[0016] S3, according to the accuracy rate, modeling the training process of samples with different difficulties in the training sample set as a process of wisdom pig game, and performing training again to obtain a finally trained target detection model; the target detection model is used to determine the category and position of a specified object in an image.
[0017] Preferably, step S2 comprises:
[0018] S21, setting hyperparameters in a neural network training process, and training samples in the training sample set for t rounds;
[0019] S22, calculating the accuracy rate of correct detection of each sample in the t rounds of training process.
[0020] Preferably, step S3 comprises:
[0021] S31, setting game parameters and initializing the number of big pig labels and the number of small pig labels of all samples, and performing training for the remaining N rounds; wherein the game parameters include: action probability and waiting probability of big pig, big pig elimination threshold, action probability and waiting probability of small pig, and small pig elimination threshold;
[0022] S32, in each training, selecting 2*BatchSize samples, and equally dividing the samples into a first sample group and a second sample group;
[0023] S33, respectively selecting samples corresponding to positions of the first sample group and the second sample group, and sequentially assigning the samples with roles of the big pig and the small pig according to the accuracy rate;
[0024] S34, the big pig and the small pig perform game, and BatchSize samples successfully passing the game are selected from each corresponding position to join a training batch;
[0025] S35, updating the accuracy rate of each sample until the training round reaches N rounds of training to end, and obtaining a finally trained target detection model.
[0026] Preferably, step S34 comprises:
[0027] S341、according to the action probability and the waiting probability of the big pig and the small pig, selecting the action that the big pig and the small pig will take; the action includes action and waiting;
[0028] S342、according to the action taken by the big pig and the small pig, obtaining the probability value of the two samples participating in training according to the improved payoff matrix using probability theory;
[0029] S343、according to the probability value, selecting the sample that successfully plays the game by means of roulette;
[0030] S344、selecting BatchSize samples that successfully play the game to join the training batch.
[0031] Preferably, in step S33, among the two samples at the corresponding position, the sample with high accuracy is assigned as the small pig, and the sample with low accuracy is assigned as the big pig.
[0032] Preferably, in step S34, if the number of selected samples is less than BatchSize, a certain number of samples are randomly selected from the samples that successfully play the game, so that the number of samples in the current training batch is equal to BatchSize.
[0033] Preferably, when a certain sample is assigned as the big pig, the value of the big pig frequency label is increased by one; when a certain sample is assigned as the small pig, the value of the small pig frequency label is increased by one.
[0034] Preferably, when the big pig frequency label of a certain sample is greater than the big pig elimination threshold or the small pig frequency label is greater than the small pig elimination threshold, the sample is removed from training.
[0035] Preferably, the calculation formula of the accuracy in step S22 is:
[0036]
[0037] Preferably, if all object prediction results in the same sample are correct or more than a certain proportion of object prediction results are correct, it is considered that the sample is correctly detected, otherwise it is considered that the sample is not correctly detected.
[0038] Implementing one of the technical solutions in the above technical solutions of the present application has the following advantages or beneficial effects:
[0039] The application introduces game theory into the process of neural network training, so that the model can adapt to the sample set with unbalanced sample training difficulty, is not easy to be affected by noise data, and will not appear the phenomena of model overfitting or underfitting, not only improves the precision of the trained model, greatly improves the accuracy of the target detection result, but also makes the model learn more real data distribution law, thereby improving the generalization performance of the model. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings. In the drawings:
[0041] Figure 1 is a flowchart of a deep learning training method for target detection according to an embodiment of the present application;
[0042] Figure 2 is a flowchart of step S2 of a deep learning training method for target detection according to an embodiment of the present application;
[0043] Figure 3 is a flowchart of step S3 of a deep learning training method for target detection according to an embodiment of the present application;
[0044] Figure 4 is a flowchart of step S34 of a deep learning training method for target detection according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the present application more clear, the various exemplary embodiments to be described below will be referred to the corresponding drawings, which constitute a part of the exemplary embodiments, and the various exemplary embodiments possibly used to realize the present application are described. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation described in the following exemplary embodiments does not represent all the implementations consistent with the present disclosure. It should be understood that they are only examples of processes, methods and devices, etc. consistent with some aspects of the present disclosure as detailed in the appended claims, and other embodiments can be used, or structural and functional modifications can be made to the embodiments listed herein, without departing from the scope and spirit of the present application.
[0046] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse" and the like indicate the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the elements referred to must have a specific orientation, be constructed and operated in a specific orientation. The terms "first", "second" and the like are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "a plurality of" means two or more. The terms "connected", "connected" should be broadly understood, for example, it can be fixed connection, detachable connection, integral connection, mechanical connection, electrical connection, communication connection, direct connection, indirect connection through intermediate medium, internal communication of two elements or interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more related listed items. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0047] In order to illustrate the technical solutions of the present application, the following will be described by specific examples, only showing the part related to the embodiment of the present application.
[0048] Example one:
[0049] As Figure 1 shown, the present application provides a deep learning training method for target detection, comprising:
[0050] S1, sequentially cleaning, labeling, preprocessing and dividing the collected image data to obtain a training sample set;
[0051] S2, performing preliminary deep learning training on the training sample set to obtain the accuracy rate of each sample being correctly detected;
[0052] S3, according to the accuracy rate, modeling the process of training different samples in the training sample set as the process of wisdom pig game, and training again to obtain the finally trained target detection model; the target detection model is used to determine the category and position of the specified object in the image.
[0053] This embodiment introduces game theory into the process of neural network training, so that the model can adapt to the sample set with unbalanced training difficulty of samples, is not easily affected by noise data, and will not appear the phenomena of model overfitting or underfitting. Not only improves the precision of the trained model, greatly improves the accuracy of target detection, but also makes the model learn more real data distribution rules, so as to improve the generalization performance of the model.
[0054] In step S1, the collected image data is sequentially cleaned, labeled, preprocessed and divided to obtain a training sample set, specifically:
[0055] According to the needs of the deep learning application scene, the data samples required by the model are collected. In the target detection problem, the collected data samples are images. There are many data collection methods, among which the main collection methods are manual collection, system collection, network crawling, virtual simulation, adversarial generation, open source data, etc. Among them, manual collection is to let relevant staff collect in the actual production environment, such as shooting image video data, intercepting signal data, etc.; system collection refers to some professional data collection, whose main function is to collect and save uploaded data in various environments, so as to avoid manual collection; network crawling is to use web crawler tools to crawl data on the network, generally the noise of data on the network is large, and it needs to be checked manually after crawling; virtual simulation refers to generating the required data in a virtual working environment, such as a license plate generator, which is a virtual simulation tool; adversarial generation uses generative adversarial neural network (GAN) to generate data; open source data is generally collected by academic research institutions or some AI enterprises and opened to the public, and some open source data will be used in the pre-training stage. The data collection process and method plays a crucial role in the quality of the data, and the quality of the data has a great influence on the final trained model, so to ensure the performance of the deep learning model, the process and method of data collection need to be standardized. In addition, according to the actual application scene, some open source data sets can be directly selected, or several open source data sets can be mixed as a business data set.
[0056] Cleaning the data is to clean away useless noise data and leave effective data. The data cleaning methods mainly include data denoising, desensitization, missing data processing, duplicate checking, and deleting error data.
[0057] Data set annotation. The quality and scale of data annotation are usually important factors to improve the application effect of AI model, and the data annotation method can be divided into manual, semi-automatic and automatic according to the degree of automation. Among them, manual annotation algorithm is a more reliable annotation method. However, it is not easy to establish a high-quality, large-scale professional field data set by manual annotation of data through manpower: the training of annotation personnel and manual annotation cost is high, time-consuming. The work of data annotation is generally completed with the help of annotation tools, among which the annotation tools of image and video data account for a large part, and the commonly used image and video annotation tools include labelme, labelbox, labelimg, and magic annotation assistant. It is worth mentioning that magic annotation assistant is a very powerful free annotation tool, which covers image data, video data, speech data, text data, and 3D point cloud data, and is suitable for the current mainstream operating system. In this embodiment, any data annotation method can be selected according to the application scene.
[0058] Finally, the data set is divided. The data set division is the process of dividing the data set into a training set, a validation set and a test set. The training set is the training sample set required for the training of the embodiment.
[0059] As shown in Figure 2 , step S2 includes:
[0060] S21, set the hyperparameters in the neural network training process, and train the samples in the training sample set for t rounds; Here, the hyperparameters are BatchSize and Epoch. BatchSize is the number of selected samples for one training, and Epoch is the number of times of training with all samples. Therefore, Epoch=t+N.
[0061] S22, calculate the accuracy of each sample correctly detected in the t rounds of training process. The calculation formula of the accuracy is:
[0062]
[0063] Because in the target detection task, there are often multiple objects to be detected in the same sample (image) in the same round (such as an image containing multiple faces, and the face is the object to be detected), therefore, if all object prediction results in the same sample are correct or more than a certain proportion of object prediction results are correct, it is considered that the sample is correctly detected, otherwise it is considered that the sample is not correctly detected, to judge the target detection result.
[0064] As shown in Figure 3 , step S3 includes:
[0065] S31, set the game parameters, and initialize the big pig frequency label and the small pig frequency label of all samples, and train for the remaining N rounds; wherein, the game parameters include: the action probability and the waiting probability of the big pig, the big pig elimination threshold, the action probability and the waiting probability of the small pig, and the small pig elimination threshold;
[0066] S32, in each training, select 2*BatchSize samples, and divide the samples into a first sample group and a second sample group; the number of samples in the first sample group and the second sample group is BatchSize;
[0067] S33, select the samples in the corresponding positions of the first sample group and the second sample group respectively, and assign the samples with the roles of big pigs and small pigs in turn according to the accuracy;
[0068] S34, the big pigs and the small pigs play the game, and select BatchSize game successful samples from each corresponding position to join the training batch;
[0069] S35, update the accuracy of each sample until the training round reaches N rounds of training end, and get the final trained target detection model.
[0070] As shown in Figure 4 S34 includes:
[0071] S341, according to the action probability and waiting probability of the big pig and the small pig, respectively, select the action that the big pig and the small pig will take; the action includes action and waiting; this embodiment sets the action probability of the big pig and the small pig greater than 0.5, and the waiting probability less than 0.5, and the sum of the action probability and the waiting probability equal to 1. The probability is set according to the actual training situation, such as setting the action probability of the big pig as 0.7, and the waiting probability as 0.3; setting the action probability of the small pig as 0.75, and the waiting probability as 0.25.
[0072] S342, according to the action taken by the big pig and the small pig, the probability value of the two samples participating in the training is obtained according to the improved payoff matrix of probability theory;
[0073] S343, according to the probability value, the samples participating in the game successfully are selected by the way of roulette; specifically: the sum of the probability values of the two samples participating in this training is equal to 1, according to the probability value occupied by the sample, the disc is divided according to the probability values of the two samples, such as assuming that the probability of the big pig sample participating in this training is 0.83, and the probability of the small pig sample participating in this training is 0.17, then in the disc, the big pig sample occupies 83%, and the small pig sample occupies 17%; after the division is completed, the disc is rotated, and after the disc stops, the pointer stops at the sample corresponding to the sector area, which is the sample participating in the game successfully; obviously, the sample with greater probability value has greater probability of the disc pointer stopping in its area. In this way, the big pig representing the difficult training sample can have a greater chance of participating in the training, and the small pig representing the easy training sample has a smaller training opportunity.
[0074] S344, select BatchSize samples participating in the game successfully to join the training batch.
[0075] The wisdom of pigs in game theory simulates the competition between big pigs and small pigs for resources. It is assumed that there is a big pig and a small pig in the pigsty. One end of the pigsty has a pig trough, and the other end is equipped with a button to control the supply of pig food. Pressing the button will have 10 units of pig food into the trough, but whoever presses the button will first pay a cost of 2 units. The button and the pig trough are in opposite positions, and the pig that presses the button will pay a cost of 2 units and lose the opportunity to eat first.
[0076] If the piglets arrive at the trough first, the rate of eating is generally lacking in competition, and the final size of the pig to eat the food ratio is 6:4; if they arrive at the trough at the same time, the large pig eats faster, and the final size of the pig benefit ratio is 7:3; if the large pig arrives at the trough first, the large pig will occupy all the remaining pig food, and the final size of the pig benefit ratio is 9:1. Thus, the traditional benefit matrix is shown in Table 1:
[0077]
[0078] Table 1 Benefit matrix
[0079] In step S342, the embodiment models the benefits of the large pig and the small pig as the probability of obtaining the resource size. Since the small pig has a benefit of -1 in the above benefit matrix, and the probability must be greater than 0, the benefit corresponding to the large pig waiting and the small pig acting (9, -1) is changed to (9, 0); then the corresponding benefits under various conditions are converted into probability values, and the action probability and waiting probability of the large pig and the small pig set previously are added to obtain the improved benefit matrix using probability theory as shown in Table 2:
[0080]
[0081] Table 2 Improved benefit matrix using probability theory
[0082] By improving the benefit matrix using probability theory, the benefits of the two parties in the game are converted into the probability values of the large pig samples and the small pig samples participating in the batch training, that is, the opportunity size of the data samples participating in the training, so that more training opportunities can be allocated to difficult-to-train samples (large pig samples), and fewer training opportunities are allocated to easy-to-train samples (small pig samples), achieving “balanced” training under the condition of sample difficulty imbalance.
[0083] In step S33, among the two samples at the corresponding position, the sample with high accuracy is allocated as a small pig, and the sample with low accuracy is allocated as a large pig. Generally, the sample with high accuracy is an easy-to-train simple sample, so it is allocated as a relatively weak small pig in game theory, reducing the number of times it participates in training; the sample with low accuracy is a difficult-to-train difficult sample, so it is allocated as a large pig that easily obtains resources in game theory, enabling it to participate in more training. This makes the resource allocation more reasonable, reduces the computing resources, and also improves the model precision and training efficiency.
[0084] In step S34, if the selected sample quantity is less than BatchSize, a certain quantity of samples are randomly selected from the samples in the game success, so that the sample quantity of the current batch training is equal to BatchSize. Because there is a possibility that the big pig sample and the small pig sample are selected at the same time, in this case, the probability of the big pig sample and the small pig sample participating in the training is 0, i.e. none of them participates in the training, so there is a case that the selected sample quantity is less than BatchSize, and therefore the samples of the current batch need to be supplemented.
[0085] In order to measure the training difficulty of each sample, in the game process, 2 labels are provided for each sample, which are big pig frequency label and small pig frequency label, and the values are the number of times that the data sample is assigned as a big pig role and a small pig role in the game process, which are both initialized to 0 times in the embodiment. For the two labels of each sample, the following rules are adopted to remove over-trained samples:
[0086] In the training process, when a certain sample is assigned as a big pig, the value of the big pig frequency label is increased by 1; and when it is assigned as a small pig, the value of the small pig frequency label is increased by 1. In order to prevent some samples from occupying too many training opportunities, when the big pig frequency label of a certain sample is greater than the big pig elimination threshold or the small pig frequency label is greater than the small pig elimination threshold, it is considered that the sample participates in the training opportunity too many times, and the accuracy is higher than many other samples, and it is not necessary to participate in the training again. The sample is removed from the training and does not participate in the subsequent training sample selection.
[0087] By using the rule, for the same data sample, as long as one of the big pig frequency label or the small pig frequency label reaches the corresponding threshold, the sample is removed and does not participate in the training sample selection in the later stage; which can effectively prevent some samples from participating in the training too much.
[0088] The embodiment introduces game theory into the process of neural network training, so that the model can adapt to the sample set with unbalanced training difficulty of samples, is not easily affected by noise data, and does not appear the phenomena of overfitting or underfitting of the model, not only improves the precision of the trained model, greatly improves the accuracy of target detection, but also makes the model learn more real data distribution rules, thereby improving the generalization performance of the model; in the training process, the intelligent pig game theory strategy is used to distribute the difficult-to-train samples to the big pig role that is easier to obtain resources, and the easy-to-train samples to the weak small pig role, and dynamically adjust the roles of different samples according to the real-time situation of the neural network in the training process, so that the training process of the neural network is more directional and targeted, and the training efficiency is improved; at the same time, it also avoids the waste of huge computing resources caused by exhaustive training of all samples in the training set, saves the artificial cost required for manual detection and finding unbalanced samples. The probability theory is introduced to improve the payoff matrix of the intelligent pig game, and the computing resources for training are dynamically allocated to all samples in a reasonable way, so as to achieve the dual goals of model training and resource saving.
[0089] The embodiment method can be easily migrated to other computer vision tasks other than target detection.
[0090] The embodiment is only a specific example, and does not mean that the present application is such an implementation.
[0091] The above only describes the preferred embodiments of the present application, and those skilled in the art know that various changes or equivalent replacements can be made to the features and embodiments without departing from the spirit and scope of the present application. In addition, the features and embodiments can be modified to adapt to specific conditions and materials under the guidance of the present application without departing from the spirit and scope of the present application. Therefore, the present application is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of the present application are within the protection scope of the present application.
Claims
1. A deep learning training method for object detection, characterized in that, include: S1. The collected image data is cleaned, labeled, preprocessed, and divided sequentially to obtain the training sample set; S2. Perform preliminary deep learning training on the training sample set to obtain the accuracy rate of each sample being correctly detected; S3. Based on the accuracy, the process of training samples of varying difficulty in the training sample set is modeled as a pig game process, and the training is performed again to obtain the final trained target detection model; the target detection model is used to determine the category and location of a specified object in the image.
2. The deep learning training method for object detection according to claim 1, characterized in that, Step S2 includes: S21. Set the hyperparameters in the neural network training process, and train the samples in the training sample set for t rounds. S22. Calculate the accuracy of each sample being correctly detected during t training rounds.
3. The deep learning training method for object detection according to claim 1, characterized in that, Step S3 includes: S31. Set the game parameters and initialize the big pig count labels and small pig count labels for all samples, and conduct training for the remaining N rounds; where the game parameters include: the big pig's action probability and waiting probability, the big pig elimination threshold, the small pig's action probability and waiting probability, and the small pig elimination threshold. S32. In each training session, select 2 BatchSize samples are given, and the samples are equally divided into a first sample group and a second sample group; S33. Select samples at corresponding positions in the first sample group and the second sample group respectively, and assign the roles of the big pig and the little pig to the samples in sequence according to the accuracy. S34. The big pig and the little pig play a game, and BatchSize samples that successfully play the game are selected from each corresponding position and added to the training batch. S35. Update the accuracy of each sample until the training rounds reach N rounds, and obtain the final trained object detection model.
4. The deep learning training method for object detection according to claim 3, characterized in that, Step S34 includes: S341. Select the actions that the large pig and the small pig will take based on the action probability and waiting probability of the large pig and the small pig, respectively; the actions include action and waiting. S342. Based on the actions taken by the large pig and the small pig, obtain the probability values of the two samples participating in the training according to the improved profit matrix using probability theory. S343. Based on the probability values, select two successful samples from the samples by roulette wheel. S344. Select BatchSize successful game samples and add them to the training batch.
5. The deep learning training method for object detection according to claim 3, characterized in that, In step S33, among the two samples at the corresponding positions, the one with the higher accuracy is assigned to the piglet, and the one with the lower accuracy is assigned to the piglet.
6. The deep learning training method for object detection according to claim 3, characterized in that, In step S34, if the number of selected samples is less than BatchSize, a certain number of samples are randomly selected from the successful games to make the number of training samples in this batch equal to BatchSize.
7. The deep learning training method for object detection according to claim 3, characterized in that, When a sample is assigned to the large pig, the value of the large pig count label is incremented by one; when it is assigned to the small pig, the value of the small pig count label is incremented by one.
8. A deep learning training method for object detection according to claim 7, characterized in that, If the number of times a large pig is counted in a sample is greater than the large pig culling threshold or the number of times a small pig is counted is greater than the small pig culling threshold, then the sample is removed from the training.
9. A deep learning training method for object detection according to claim 2, characterized in that, The formula for calculating the accuracy rate in step S22 is as follows: 。 10. A deep learning training method for object detection according to claim 9, characterized in that, If all objects in the same sample are correctly predicted or a certain percentage of objects are correctly predicted, then the sample is considered to have been correctly detected; otherwise, the sample is considered not to have been correctly detected.
Citation Information
Patent Citations
Seaborne wireless Mesh network credible cooperative service method
CN109379739A
Unidirectional grounding fault feeder line identification method under sample imbalance
CN114218988A