Method and system for adaptive quantitative analysis of target detection training set quantity

Through adaptive quantitative analysis method and YOLOv8n model training, the size of the object detection training set is dynamically adjusted, which solves the problem of insufficient number of training sets in the existing technology, and realizes efficient and low-cost data preparation and model training.

CN119169415BActive Publication Date: 2025-04-11CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411687219.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-04-11
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

The prior art lacks effective methods in the field of object detection to estimate the required number of training sets, resulting in high data preparation costs, insufficient model generalization capabilities, and insufficient support for small sample learning.

Method used

An adaptive quantitative analysis method is proposed, through image data augmentation and YOLOv8n model training, the training set size is dynamically adjusted to optimize the model performance. The method includes a multi-stage process of data augmentation, model training, training set tuning, and performance evaluation.

Benefits of technology

It realizes an accurate estimate of the number of training sets in the object detection task, reduces the cost of data preparation, improves the model training efficiency and generalization ability, and is especially suitable for scenarios where data acquisition is difficult or costly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169415B_ABST
    Figure CN119169415B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of deep learning technology, and discloses a method and system for adaptive quantitative analysis of the number of training sets for target detection. The method uses an image data enhancement method to perform data enhancement on the original image data set to obtain an enhanced data set; training verification of the overall data set; training verification of the original image data set; three enhanced data sets are sequentially expanded to the training set for training, and it is determined whether the training set used for the current training needs to be trained next time according to the training accuracy; it is determined whether the number of data sets meets the error requirements; performance index determination; repeated iterations, and output of the final result. The present invention provides an innovative tool for the field of target detection technology, which improves the learning efficiency and application performance of the model by more scientifically and reasonably predicting and configuring the scale of the training data set, especially in scenarios where the cost of data acquisition is high or data availability is limited, and has its unique value and advantages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and in particular, relates to a method and system for adaptively quantitatively analyzing the number of target detection training sets. Background Art

[0002] In the field of machine learning and especially deep learning, the quality and quantity of data sets directly affect the learning ability and generalization of the model. Adequate and diverse data sets allow the model to understand the complexity of the task more effectively, and thus perform better in practical applications. However, the difficulty in obtaining high-quality data sets, high costs, or privacy issues may limit the use of data. In the field of deep learning, object detection is an important research direction in the field of computer vision, which involves identifying and locating one or more specific targets (such as vehicles, people, animals, etc.) in an image or video. It can not only determine the type of target, but also accurately point out the location of the target (usually represented by a bounding box). Object detection technology is of great significance and widely used in a variety of application scenarios.

[0003] In the current research on target detection technology, scholars mainly focus on how to improve the accuracy and training speed of the model, which is undoubtedly the key aspect to improve model performance. However, other important factors that affect the learning ability and generalization of the model, especially the quantity and quality of the training set, have not received corresponding in-depth research and attention. In the process of target detection, for some situations where it is difficult to obtain a data set, if the estimated value of the number of required training sets is known in advance, this will greatly reduce the time, computing power, labor, and cost of data preparation and preprocessing.

[0004] In the current research on object detection technology, although the focus is mainly on improving the accuracy and training speed of the model, there are several key technical defects and problems:

[0005] (1) Difficulty and cost of obtaining datasets: High-quality datasets are usually difficult to obtain and require a lot of time and resources to collect and annotate. In addition, especially in application scenarios involving personal privacy or sensitive information (such as facial recognition and personal activity monitoring), data collection may face strict legal and ethical restrictions.

[0006] (2) Insufficient data diversity: Even if a large amount of data is obtained, the data diversity may be insufficient, especially in a specific application domain. For example, a model for pedestrian detection may not generalize well to other lighting or urban conditions if it is only trained under specific lighting or specific urban environments. This overfitting will limit the practicality of the model.

[0007] (3) Lack of methods to estimate the size of training sets: There is currently a lack of effective quantitative tools or methods to estimate the minimum size of a dataset required to complete a specific task. This situation may cause researchers and developers to blindly increase the amount of data, thereby unnecessarily increasing costs and time without substantially improving model performance.

[0008] (4) Insufficient support for small sample learning: Many existing deep learning models perform poorly when data is scarce. These models usually require a large amount of labeled data to achieve ideal performance, and when data is limited, the performance of the model will drop significantly.

[0009] (5) Lack of flexibility and adaptability: Existing object detection frameworks and models are usually not adaptable to new or unseen scenarios and may require retraining or extensive adjustments when faced with different environments or changes.

[0010] The main reason for these problems and shortcomings is that existing technologies are too dependent on big data and lack algorithms and models that are still effective when data is limited. In addition, the lack of attention to data quality and diversity will directly affect the generalization ability of the model and the effect of practical application. Therefore, developing methods that can effectively evaluate and predict the amount of data required, as well as improving the adaptability and generalization ability of the model to small data sets, are key directions for future research. Summary of the invention

[0011] To overcome the problems existing in the related art, the disclosed embodiments of the present invention provide a method and system for adaptively quantitatively analyzing the number of training sets for target detection. The present invention proposes a method for quantitatively analyzing the number of training sets, which can estimate the number of training sets required to detect similar targets when the quality of the data sets is similar.

[0012] The technical solution is as follows: A method for adaptively and quantitatively analyzing the number of target detection training sets, comprising:

[0013] S1, the original image data set is enhanced by using the image data enhancement method to obtain an enhanced data set; the enhanced data set includes: random blur, random scaling, and color processing;

[0014] S2, the enhanced data set and the original image data set are combined to form a unified overall data set, and the yolov8n model is used for target detection training. After the training is completed, it is verified on the validation set to obtain and record;

[0015] S3, set For the The number of training sets used for the first training, input the original image data set into the yolov8n model for target detection training, and record the number of training sets required for the first training After training, it is verified on the same validation set and obtained ;

[0016] S4, Phase 1: and For comparison, if , increase the training set, sample 50% of the three enhanced data sets of random blur, random scaling, and color processing in turn, expand them to the training set for training, and record the number of training sets required for each training And the training accuracy value , until ;

[0017] S5, set , is the threshold value, when When the training accuracy meets the requirements, it is judged and Analyze the size of the training set to see if it meets the error requirements;

[0018] S6, Stage 2: When or , > When , you need to train again, and record the number of training sets required for each training. And the training accuracy value ;

[0019] In step S3, ; is the average accuracy when the IoU threshold is set to 0.5;

[0020] In step S4, if after the first training, If the training set needs to be expanded, 50% of the random fuzzy enhanced dataset is randomly sampled as the dataset added after the first training. If the training set needs to be expanded after the second training, 50% of the random fuzzy enhanced dataset is sampled as the dataset added after the second training. The dataset added after the first training should be mutually exclusive with the dataset added after the second training, and the sum is the random fuzzy enhanced dataset.

[0021] In step S5, when When the error requirements for training accuracy and the number of data sets are met, the number of training sets used for the current training is output as the final output result;

[0022] In step S6, when , > When , the training accuracy meets the requirement, but does not meet the error requirement of the number of data sets, the training set is further reduced for the next training;

[0023] No. The number of datasets required for training It is obtained by the following formula:

[0024] ;

[0025] In the formula, For the The number of training sets used for training.

[0026] When shrinking the training set, include:

[0027] In the first case, after the first training using the original image dataset, There is no need to expand the training set. When reducing the training set, the original image dataset needs to be operated directly. , the training set needs to be reduced, and the number of reduced data sets is , where the sum of the remaining data set after the second training and the sampled data set is the remaining data set after the first training;

[0028] In the second case, after the first training using the original image dataset , the training set needs to be expanded. If after the second training , the training set needs to be reduced, and the number of reduced data sets is , where the sum of the dataset deleted after the second training and the dataset remaining after the second training is the dataset added after the first training.

[0029] In step S6, when When the training accuracy does not meet the requirements, the training set needs to be expanded. The number of datasets required for training It is obtained by the following formula:

[0030] ;

[0031] In step S6, when expanding the training set, there are the following two situations:

[0032] In the first case, the training set is expanded according to the first case of step S6;

[0033] In the second case, the training set is expanded according to the second case of step S6;

[0034] S7, iterate step S5 and step S6 repeatedly until the and When , the iteration ends and the final result is output.

[0035] Another object of the present invention is to provide a system for adaptively and quantitatively analyzing the number of target detection training sets, the system implementing the method for adaptively and quantitatively analyzing the number of target detection training sets, the system comprising:

[0036] The enhanced data set acquisition module is used to perform data enhancement on the original image data set using an image data enhancement method to obtain an enhanced data set; the enhanced data set includes: random blur, random scaling, and color processing;

[0037] The overall dataset training and verification module is used to combine the enhanced dataset with the original image dataset to form a unified overall dataset, and use the yolov8n model to train target detection. After the training is completed, it is verified on the verification set to obtain and record;

[0038] The original image dataset training and verification module is set For the The number of training sets used for the first training, input the original image data set into the yolov8n model for target detection training, and record the number of training sets required for the first training After training, it is verified on the same validation set and obtained ;

[0039] Enhanced dataset extension module, used to and For comparison, if , increase the training set, sample 50% of the three enhanced data sets of random blur, random scaling, and color processing in turn, expand them to the training set for training, and record the number of training sets required for each training And the training accuracy value , until ;

[0040] The number of training sets is used to train the judgment module. , is the threshold value, when When the training accuracy meets the requirements, it is judged and Analyze the size of the training set to see if it meets the error requirements;

[0041] Performance index determination module, used when or , > When , you need to train again, and record the number of training sets required for each training. And the training accuracy value ;

[0042] The training set quantity result output module is used to iterate the training set quantity training judgment and performance index judgment until the and When , the iteration ends and the final result is output.

[0043] Furthermore, the system is applied to offshore wind turbines to identify the type and extent of blade damage, and to the medical field to identify and diagnose disease image data.

[0044] Combining all the above technical solutions, the beneficial effects of the present invention are as follows: the adaptive analysis method of quantitative analysis training set proposed by the present invention can not only be applicable to the field of target detection, but also provide reference ideas for data preparation in other different fields. The present invention estimates the number of training sets required in the target detection task, especially for detecting similar targets under the condition of similar data set quality. Compared with the prior art, the advantages of the present invention further include:

[0045] (1) Accurately estimate training data requirements: Develop an algorithm that can reasonably predict the minimum dataset size required for effective training based on the specific requirements and conditions of the object detection task (such as object type, scene complexity, etc.). This prediction model will take into account the different requirements of different tasks for data diversity and quantity, helping researchers and developers optimize resource allocation and planning.

[0046] (2) Reduce data preparation costs: By providing a tool to predict the size of the required data set, aimless expansion and waste in the data preparation stage can be reduced, thereby significantly reducing the time, computing power and human resources consumed in the process of data collection, processing and labeling.

[0047] (3) Improve training efficiency: Enable object detection model developers to understand and design the training process more accurately, avoid over-training or under-training problems, and thus improve the efficiency and effectiveness of model training.

[0048] (4) Optimize model performance and generalization ability: Ensure that the number of training sets used is sufficient to train a model with high accuracy and good generalization ability, rather than simply relying on a large amount of data to make up for deficiencies in model design.

[0049] The present invention provides an innovative tool for the field of target detection technology, which improves the learning efficiency and application performance of the model by more scientifically and reasonably predicting and configuring the size of the training data set, especially in scenarios where the cost of data acquisition is high or the availability of data is limited, and has its unique value and advantages. The present invention optimizes the performance of the target detection model by adaptively adjusting the size of the training set, and is expected to reduce training costs, improve model deployment efficiency, and have significant economic benefits. Through scientific methodology and experimental verification, the present invention proves the effectiveness of its method, overcomes the previous bias of relying on experience or intuition to select the size of the training set, and provides more objective and scientific guidance for the field of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;

[0051] Figure 1 is a flow chart of a method for adaptively and quantitatively analyzing the number of target detection training sets provided by an embodiment of the present invention;

[0052] Figure 2 is a schematic diagram of the first stage extended data set provided by an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of the first case of reducing a data set in the first stage provided by an embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of the second case of reducing a data set in the first stage provided by an embodiment of the present invention;

[0055] Figure 5 This is a schematic diagram of the first case of the second-stage extended training set provided by an embodiment of the present invention;

[0056] Figure 6 This is a schematic diagram of the second situation of the second stage extended training set provided by an embodiment of the present invention;

[0057] Figure 7 is a schematic diagram of a method for adaptively and quantitatively analyzing the number of target detection training sets provided by an embodiment of the present invention;

[0058] Figure 8 It is a schematic diagram of a system for adaptive quantitative analysis of the number of target detection training sets provided by an embodiment of the present invention;

[0059] In the figure: 1. Enhanced data set acquisition module; 2. Overall data set training and verification module; 3. Original image data set training and verification module; 4. Enhanced data set expansion module; 5. Training set quantity training judgment module; 6. Performance indicator judgment module; 7. Current training set quantity result output module. DETAILED DESCRIPTION

[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0061] The present invention provides a method for adaptively and quantitatively analyzing the number of target detection training sets. Through image data enhancement and YOLOv8n model training, the size of the training set is dynamically adjusted to optimize the model performance, thereby achieving the optimal match between the model performance and the number of training sets.

[0062] Embodiment 1, as Figure 1 As shown, the method for adaptively and quantitatively analyzing the number of target detection training sets provided by the embodiment of the present invention includes:

[0063] S1, the original image data set is enhanced by using the image data enhancement method to obtain an enhanced data set; the enhanced data set includes: random blur, random scaling, and color processing;

[0064] S2, the enhanced data set and the original image data set are combined to form a unified overall data set, and the yolov8n model is used for target detection training. After the training is completed, it is verified on the validation set to obtain and record;

[0065] in, is the average accuracy when the IoU threshold is set to 0.5;

[0066] It is understandable that the prior art is generally The values ​​are all calculated after each model is run, and the performance is compared. The present invention compares the performance indicators of the yolov8n model itself by continuously changing the data set.

[0067] S3, set For the The number of training sets used for the first training, input the original image data set into the yolov8n model for target detection training, and record the number of training sets required for the first training After training, it is verified on the same validation set and obtained ;

[0068] For the The performance index AP@0.5 obtained after training;

[0069] S4, Phase 1: and For comparison, if , increase the training set, sample 50% of the three enhanced data sets of random blur, random scaling, and color processing in turn, expand them to the training set for training, and record the number of training sets required for each training And the training accuracy value , until ;

[0070] If the training set needs to be expanded after the first training ( ), then 50% of the random fuzzy enhanced dataset is randomly sampled as the dataset added after the first training. If the training set needs to be expanded after the second training, 50% of the random fuzzy enhanced dataset is sampled as the dataset added after the second training. It is worth noting that the dataset added after the first training should be mutually exclusive with the dataset added after the second training, and the sum should be the random fuzzy enhanced dataset, such as Figure 2 As shown in the figure, the first and second trainings are performed with the extended data set;

[0071] S5, set , is the threshold value, when When the training accuracy meets the requirements, it is judged and Analyze the size of the training set to see if it meets the error requirements;

[0072] S6, Stage 2: When or , > When , you need to train again, and record the number of training sets required for each training. And the training accuracy value ;

[0073] In step S3, , is the average accuracy when the IoU threshold is set to 0.5;

[0074] In step S4, if after the first training, If the training set needs to be expanded, 50% of the random fuzzy enhanced dataset is randomly sampled as the dataset added after the first training. If the training set needs to be expanded after the second training, 50% of the random fuzzy enhanced dataset is sampled as the dataset added after the second training. The dataset added after the first training should be mutually exclusive with the dataset added after the second training, and the sum is the random fuzzy enhanced dataset.

[0075] In step S5, when When the error requirements for training accuracy and the number of data sets are met, the number of training sets used for the current training is output as the final output result;

[0076] In step S6, when , > When , the training accuracy meets the requirement, but does not meet the error requirement of the number of data sets, the training set is further reduced for the next training;

[0077] No. The number of datasets required for training It is obtained by the following formula:

[0078] ;

[0079] In the formula, For the The number of training sets used for training.

[0080] When shrinking the training set, include:

[0081] In the first case, after the first training using the original image dataset, There is no need to expand the training set. When reducing the training set, the original image dataset needs to be operated directly. , the training set needs to be reduced, and the number of reduced data sets is , where the sum of the remaining data set after the second training and the sampled data set is the remaining data set after the first training;

[0082] In the second case, after the first training using the original image dataset , the training set needs to be expanded. If after the second training , the training set needs to be reduced, and the number of reduced data sets is , where the sum of the dataset deleted after the second training and the dataset remaining after the second training is the dataset added after the first training.

[0083] In step S6, when When the training accuracy does not meet the requirements, the training set needs to be expanded. The number of datasets required for training It is obtained by the following formula:

[0084] ;

[0085] In step S6, when expanding the training set, there are the following two situations:

[0086] In the first case, the training set is expanded according to the first case of step S6;

[0087] In the second case, the training set is expanded according to the second case of step S6;

[0088] S7, iterate step S5 and step S6 repeatedly until the and When , the iteration ends and the final result is output.

[0089] For example, Figure 7 The present invention provides a method and principle for adaptively and quantitatively analyzing the number of target detection training sets.

[0090] Embodiment 2, as Figure 8 As shown, the system for adaptive quantitative analysis of the number of target detection training sets provided by the embodiment of the present invention includes:

[0091] The enhanced data set acquisition module 1 is used to perform data enhancement on the original image data set using an image data enhancement method to obtain an enhanced data set; the enhanced data set includes: random blurring, random scaling, and color processing;

[0092] The overall data set training and verification module 2 is used to combine the enhanced data set with the original image data set to form a unified overall data set, and use the yolov8n model to train the target detection. After the training is completed, it is verified on the verification set to obtain and record;

[0093] Original image dataset training verification module 3, set For the The number of training sets used for the first training, input the original image data set into the yolov8n model for target detection training, and record the number of training sets required for the first training After training, it is verified on the same validation set and obtained ;

[0094] Enhanced dataset extension module 4, used to and For comparison, if , increase the training set, sample 50% of the three enhanced data sets of random blur, random scaling, and color processing in turn, expand them to the training set for training, and record the number of training sets required for each training And the training accuracy value , until ;

[0095] Training set number training judgment module 5, set , is the threshold value, when When the training accuracy meets the requirements, it is judged and Analyze the size of the training set to see if it meets the error requirements;

[0096] Performance index determination module 6, used when or , > When , you need to train again, and record the number of training sets required for each training. And the training accuracy value ;

[0097] The training set quantity result output module 7 is used to repeatedly iterate the training set quantity training judgment and performance index judgment until the and When , the iteration ends and the final result is output.

[0098] The technical improvement of the method for adaptive quantitative analysis of the number of target detection training sets provided by the embodiment of the present invention is to develop a quantitative analysis method for estimating the optimal training set size required to complete an effective target detection task. The specific key points include:

[0099] (1) Algorithm development: Design and implement an algorithm that can predict the minimum data set size required based on the specific requirements of the object detection task (such as factors such as object type and scene complexity). This algorithm will comprehensively consider the characteristics of the task and predict the precise data volume required to support efficient and accurate model training.

[0100] (2) Optimal resource allocation: Through this algorithm, researchers and developers can make more reasonable resource allocation and planning at the beginning of the project. This not only includes resource allocation for data collection and processing, but also involves the rational use of human and financial resources, thereby reducing overall project costs and improving project execution efficiency.

[0101] (3) Improve data preparation efficiency: Reduce unnecessary expansion and redundant work in the data preparation stage, and ensure that the collection and processing of each piece of data is purposeful and effective. This approach can significantly reduce the time and cost consumption in data collection, processing and annotation.

[0102] (4) Precise design of the training process: enabling model developers.

[0103] A more reasonable training plan can be designed based on the estimated amount of data to avoid poor model performance caused by insufficient data or overfitting caused by too much data, thereby optimizing training efficiency and model performance.

[0104] (5) Improvement of model performance and generalization ability: By ensuring the appropriate amount and high quality of the training set, it helps to build an object detection model with excellent performance and strong generalization ability. This is especially important in scenarios where data acquisition is difficult or costly.

[0105] In summary, the present invention provides an innovative technical tool that can predict and optimize the data requirements in target detection tasks through scientific and quantitative methods, thereby maximizing resource utilization efficiency while ensuring model performance.

[0106] Application example 1: Due to the particularity of the operating environment of offshore wind turbines, the amount of blade damage data may be relatively small. By quantitatively analyzing the amount of data on onshore wind turbine blades, the amount of damage data on offshore wind turbine blades can be estimated, and then the target detection model can be trained to identify the type and degree of blade damage, such as cracks, sand holes, etc.

[0107] Application example 2: In the medical field, the amount of image data for some rare diseases may be insufficient. By analyzing related but more common disease image data, the amount of image data for rare diseases can be estimated to help train object detection models to identify and diagnose diseases.

[0108] It can be seen from the above embodiments that the present invention improves the efficiency of resource utilization: by predicting the precise data set size required for the target detection task, it helps researchers and developers to make reasonable resource allocation and planning at the beginning of the project, thereby effectively reducing the time and cost consumption of data collection, processing and labeling, increasing the utilization efficiency of human and financial resources, and reducing unnecessary waste of resources.

[0109] In terms of optimizing the training process: the algorithm can help model developers design a more scientific and reasonable training plan based on specific task requirements, avoiding insufficient model training due to insufficient data or overfitting caused by too much data. This not only improves training efficiency, but also optimizes the model's learning process.

[0110] In terms of improving model performance and generalization ability: ensuring the use of appropriate and high-quality training data can build an object detection model with better performance and stronger generalization ability. Especially in environments where data acquisition costs are high or conditions are limited, an effective data usage strategy is particularly important.

[0111] In terms of accelerating the product development cycle: by accurately predicting the amount of data required and optimizing the training process, the entire cycle of product development to market launch can be accelerated, allowing products to enter the market faster and realize commercial value earlier.

[0112] In terms of supporting diverse application scenarios: the algorithm is applicable to various scenarios and different target detection tasks, and has wide applicability and flexibility. Whether it is a simple or complex application environment, it can provide scientific and reasonable data support, thereby enhancing the practicality and effectiveness of the project.

[0113] In summary, the present invention not only improves the economic and technical benefits in practical applications, but also can significantly improve the scientificity and systematicness of project management, providing strong support for the development and application of target detection technology.

[0114] According to the above embodiment process, the technology proposed in the present invention is experimentally verified. The relevant computer configuration is: Python version is 3.8.0, Pytorch-cuda version is 11.7, GPU is RTX 4090, CPU is Xeon Platinum8352V, the target detection task of the data set is strawberry, which is divided into a training set (653 images) and a validation set (158 images), totaling 811 images. The detailed introduction of the training set is shown in Table 1.

[0115] Table 1 Training set (strawberry)

[0116]

[0117] The dataset in Table 1 is used for target detection training. is 0.6914, β is set to 300, the number of iterations is 100, the batch size is 4, and the training results are shown in Table 2.

[0118] Table 2 Training results

[0119]

[0120] The experimental results show that the M_ap6 of the sixth round of training is 0.7014, and the performance meets the requirements. At this time, the number of training sets is 305, with 776 data items for label 0, 316 data items for label 1, and 762 data items for label 2. It can be seen that if the complexity of the detection target is similar to that of strawberries and the quality of the data set is similar, about 305 images are required, which is about 49.91% of the original data set. This significantly saves the cost of data set production and computing power, and improves efficiency, which is specifically reflected in the following aspects:

[0121] (1) Algorithm development: Design and implement an algorithm that can predict the minimum data set size required based on the specific requirements of the target detection task (such as target type, scene complexity, etc.). The algorithm analyzes the characteristics of the task and accurately predicts the data volume required, providing a basis for efficient and accurate model training.

[0122] (2) Optimal resource allocation: Using the above algorithms, researchers and developers can make more reasonable resource allocation and planning at the beginning of the project, including data collection, processing resources, and allocation of human and financial resources, so as to reduce project costs and improve execution efficiency.

[0123] (3) Improve data preparation efficiency: By reducing unnecessary expansion and redundant work in the data preparation stage, we can ensure the purposefulness and effectiveness of data collection and processing, and significantly reduce time and cost consumption.

[0124] (4) Accurate design of the training process: Design a reasonable training plan based on the estimated amount of data to avoid model performance problems caused by insufficient or excessive data, and optimize training efficiency and model performance.

[0125] (5) Improvement of model performance and generalization ability: Ensure the appropriate amount and high quality of the training set to help build an object detection model with excellent performance and strong generalization ability, which is particularly suitable for scenarios where data acquisition is difficult or costly.

[0126] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for adaptively and quantitatively analyzing the number of target detection training sets, characterized in that: The method includes: S1, the original image data set is enhanced by using the image data enhancement method to obtain an enhanced data set; the enhanced data set includes: random blur, random scaling, and color processing; S2, the enhanced data set and the original image data set are combined to form a unified overall data set, and the yolov8n model is used for target detection training. After the training is completed, it is verified on the validation set to obtain M_ap and record it; S3, let n i is the number of training sets used for the i-th time. The original image data set is input into the yolov8n model for target detection training. The number of training sets n1 required for the first training is recorded. After the training is completed, it is verified on the same validation set to obtain M_ap1. S4, Phase 1: M_ap i Compared with M_ap, if M_ap>M_ap i , increase the training set, sample 50% of the three enhanced data sets of random blur, random scaling, and color processing in turn, expand them to the training set for training, and record the number of training sets n required for each training i And the training accuracy value M_ap i , until M_ap≤M_ap i ; S5, let α = n i -n i-1 , β is the threshold, when M_ap≤M_ap i When the training accuracy meets the requirements, the size of α and β is judged, and the number of training sets is analyzed to see whether it meets the error requirements; S6, second stage: when M_ap>M_ap i Or M_ap≤M_ap i , α>β, it is necessary to train again, and record the number of training sets n required for each training. i And the training accuracy value M_ap i ; S7, iterate step S5 and step S6 repeatedly until M_ap≤M_ap is satisfied i And when β≥α, the iteration ends and the final result is output; In step S5, when β>α, the error requirement for the number of data sets is met, and the number of training sets used for the current training is output as the final output result; When M_ap≤M_ap i , when α>β, when reducing the training set, including: In the first case, after the first training with the original image dataset, M_ap≤M_ap1 does not require training set expansion. When reducing the training set, the original image dataset needs to be operated directly. If M_ap≤M_ap2 after the second training, the training set needs to be reduced, and the number of datasets reduced is 0.5α, where the sum of the remaining dataset after the second training and the sampled dataset is the remaining dataset after the first training; In the second case, after the first training using the original image dataset, if M_ap>M_ap1, the training set needs to be expanded. If M_ap≤M_ap2 after the second training, the training set needs to be reduced. The number of reduced datasets is 0.5α, where the sum of the dataset deleted after the second training and the remaining dataset after the second training is the dataset added after the first training.

2. The method for adaptively and quantitatively analyzing the number of target detection training sets according to claim 1, characterized in that: In step S3, M_ap i =AP@0.5; AP@0.5 is the average accuracy when the IoU threshold is set to 0.5; In step S4, if after the first training, M_ap>M_ap1, the training set needs to be expanded, then 50% is randomly sampled from the random fuzzy enhanced data set as the data set added after the first training; if the training set needs to be expanded after the second training, then 50% is sampled from the random fuzzy enhanced data set as the data set added after the second training. The data set added after the first training should be mutually exclusive with the data set added after the second training, and the sum is the random fuzzy enhanced data set.

3. The method for adaptively and quantitatively analyzing the number of target detection training sets according to claim 1, characterized in that: In step S6, M_ap≤M_ap i , α>β, the training accuracy meets the requirements, but does not meet the error requirements of the number of data sets, and further reduce the training set for the next training; The number of data sets n required for the i+1th training i+1 It is obtained by the following formula: n i+1 =n i -0.5α(1) Where n i is the number of training sets used for the i-th training.

4. The method for adaptively and quantitatively analyzing the number of target detection training sets according to claim 3, characterized in that: When reducing the training set, there are two situations: In the first case, the training set is reduced according to the first case of step S6; In the second case, the training set is reduced according to the second case of step S6.

5. The method for adaptively and quantitatively analyzing the number of target detection training sets according to claim 4, characterized in that: When M_ap>M_ap i When the training accuracy does not meet the requirements, the training set needs to be expanded. The number of data sets required for the i+1th training is n i+1 It is obtained by the following formula: n i+1 =n i +0.5α(2)。 6. The method for adaptively and quantitatively analyzing the number of target detection training sets according to claim 1, characterized in that: In step S6, when expanding the training set, there are the following two situations: In the first case, the training set is expanded according to the first case of step S6; In the second case, the training set is expanded according to the second case of step S6.

7. A system for adaptive quantitative analysis of target detection training set quantity, characterized in that: The system implements the method for adaptively and quantitatively analyzing the number of target detection training sets as described in any one of claims 1 to 6, and the system comprises: The enhanced data set acquisition module (1) is used to perform data enhancement on the original image data set using an image data enhancement method to obtain an enhanced data set; the enhanced data set includes: random blurring, random scaling, and color processing; The overall data set training and verification module (2) is used to combine the enhanced data set with the original image data set to form a unified overall data set, and use the yolov8n model to train the target detection. After the training is completed, it is verified on the verification set to obtain M_ap and record it; Original image dataset training and verification module (3), let n i is the number of training sets used for the i-th time. The original image data set is input into the yolov8n model for target detection training. The number of training sets ni required for the first training is recorded. After the training is completed, it is verified on the same validation set to obtain M_ap1; Enhanced dataset extension module (4) is used to convert M_ap i Compared with M_ap, if M_ap>M_ap i , increase the training set, sample 50% of the three enhanced data sets of random blur, random scaling, and color processing in turn, expand them to the training set for training, and record the number of training sets n required for each training i And the training accuracy value M_ap i , until M_ap≤M_ap i ; Training set number training judgment module (5), let α = n i -n i-1 , β is the threshold, when M_ap≤M_ap i When the training accuracy meets the requirements, the size of α and β is judged, and the number of training sets is analyzed to see whether it meets the error requirements; When β>α, the error requirement for the number of data sets is met, and the number of training sets used for the current training is output as the final output result; When M_ap≤M_ap i , when α>β, when reducing the training set, including: In the first case, after the first training with the original image dataset, M_ap≤M_ap1 does not require training set expansion. When reducing the training set, the original image dataset needs to be operated directly. If M_ap≤M_ap2 after the second training, the training set needs to be reduced, and the number of datasets reduced is 0.5α, where the sum of the remaining dataset after the second training and the sampled dataset is the remaining dataset after the first training; In the second case, after the first training using the original image dataset, if M_ap>M_ap1, the training set needs to be expanded. If M_ap≤M_ap2 after the second training, the training set needs to be reduced by 0.5α, where the sum of the dataset deleted after the second training and the remaining dataset after the second training is the dataset added after the first training. Performance index determination module (6), used when M_ap>M_ap i Or M_ap≤M_ap i , α>β, it is necessary to train again, and record the number of training sets n required for each training. i And the training accuracy value M_ap i ; The training set number result output module (7) is used to iterate the training set number training judgment and performance index judgment until M_ap≤M_ap is satisfied. i And when β≥α, the iteration ends and the final result is output.

8. The system for adaptive quantitative analysis of target detection training set quantity according to claim 7, characterized in that: The system is used in offshore wind turbines to identify the type and extent of damage to blades, and is also used in the medical field to identify and diagnose disease image data.

Citation Information

Patent Citations

  • Method for realizing small sample character recognition of X-ray image map by self-generating data set and label

    CN110728307A

  • Techniques for two-stage entity-aware data augmentation

    US20230419040A1