Model training optimization tool and method based on data driving

By providing a data-driven model training optimization tool, the problem of lack of automated optimization mechanisms in existing tools is solved, and an automated process from data preprocessing to model export and deployment is realized, reducing manual intervention and improving the adaptability and optimization of the model.

CN120180129APending Publication Date: 2025-06-20JIANGSU ZEYU ELECTRICITY UNION COMM NETWORK EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510289935.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The lack of automated data-driven optimization mechanisms in model training and export of existing tools leads to a large amount of manual intervention, especially in labeling error correction, model optimization iteration and inference optimization tools.

Method used

Provide a data-driven model training optimization tool, including data processing module, model training optimization module, comparison and difference ruling module and export and deployment module, and reduce manual intervention through automated processes from data preprocessing, model training, optimization to export and deployment.

Benefits of technology

It realizes an automated process from target requirements to model export and deployment, reduces manual workload, improves scenario adaptation complexity and optimization level, and improves the execution efficiency of inference tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180129A_ABST
    Figure CN120180129A_ABST
Patent Text Reader

Abstract

The invention provides a model training optimization tool and method based on data driving, and the method comprises the steps: firstly matching a data set according to a target demand through a data processing module, carrying out the pre-training preparation processing of the data set to form target training data, and then selecting a frame according to the target demand through a model training optimization module, according to the method, the target training data is adopted to perform self-training based on the framework to form the multi-version model, the multi-version model is optimized to form the target model, then the optimal model is screened out, and finally the optimal model is exported and deployed in the hardware environment matched with the optimal model, so that the whole process can be automatically completed, and the efficiency is improved. A user only needs to input a target demand as required, the system provides consistent automatic training services until the target model is exported, the manual workload is reduced, the scene adaptation complexity is improved, the optimization degree is improved, a framework can be selected according to the target demand, the execution efficiency of a reasoning task can be improved, and the model adaptation degree can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence model training tools, and more specifically, to a data-driven model training optimization tool and method. Background Art

[0002] Currently, a great deal of manual cooperation is required during model training. Users need to independently obtain data and then conduct relevant training. Especially in object detection tasks, the quality of data processing and the efficiency of model optimization directly determine the detection performance. Traditional detection frameworks such as YOLO, MMDetection, PaddleDetection, etc., although providing efficient detection functions, lack a complete solution for dataset processing and automated model optimization.

[0003] Although existing tools support model training and export functions, the lack of an automated data-driven optimization mechanism leads to a large amount of manual intervention. For example, in annotation error correction and model optimization iteration, existing systems fail to form a data feedback loop. Moreover, after model export, there is a lack of inference optimization tools. Especially in multi-GPU deployment and TensorRT acceleration, users need to configure and optimize by themselves, greatly increasing the workload.

[0004] Therefore, there is an urgent need for a data-driven model training optimization tool and method that can consistently provide automatic training services according to the target requirements input by users until the target model is exported, reduce the manual workload, improve the complexity of scenario adaptation, and enhance the optimization level. Summary of the Invention

[0005] In view of the above problems, the purpose of the present invention is to provide a data-driven model training optimization tool to solve the technical problems that although existing tools support model training and export functions, the lack of an automated data-driven optimization mechanism leads to a large amount of manual intervention. For example, in annotation error correction and model optimization iteration, existing systems fail to form a data feedback loop. Moreover, after model export, there is a lack of inference optimization tools. Especially in multi-GPU deployment and TensorRT acceleration, users need to configure and optimize by themselves, greatly increasing the workload.

[0006] A data-driven model training optimization tool provided by the present invention includes: A data processing module, configured to match a dataset according to target requirements and perform pre-training preparation processing on the dataset to form target training data; A model training and optimization module, configured to select a framework according to target requirements, and perform self-training based on the framework using the target training data to form multi-version models, and optimize the multi-version models to form a target model; A comparison and difference determination module for screening the target model to form an optimal model; An export and deployment module for exporting the optimal model and deploying it in a hardware environment adapted to the optimal model.

[0007] Preferably, the data processing module includes a crawling unit, a data cleaning unit, and a data conversion unit; wherein, The crawling unit is used to obtain crawling keywords according to the target requirements, and generate a crawling task according to the crawling keywords, preset quality parameters, and target quantity to obtain open data; The data cleaning unit is used to obtain the resolution of each picture in the open data, calculate the clarity score of each picture in the open data by using Laplace transform to obtain a clarity score, calculate the similarity value between pairwise pictures in the open data by using perceptual hashing, and clean the open data based on the resolution, the clarity score, and the similarity value according to preset cleaning rules to obtain a data set; The data conversion unit is used to perform format conversion on the data set to form standard data, and perform automatic annotation and version numbering on the standard data to form target training data.

[0008] Preferably, the cleaning rules include: Delete pictures in the open data with a resolution lower than a preset resolution threshold, delete pictures with a clarity score lower than a preset clarity threshold, and delete one of the pairwise pictures with a similarity value higher than a preset similarity threshold.

[0009] Preferably, the model training and optimization module includes a framework selection unit, a one-key training unit, an intermediate participation unit, a cross-validation unit, and an optimization unit, The framework selection unit is used to lock the model type according to the target requirements, and determine a preset number of target frameworks in the framework library; wherein, the framework library at least includes YOLOv8n, YOLOv8m, PP-YOLOE, Faster R-CNN; The one-key training unit is used to obtain training requirements according to the target requirements, use the target framework as the training basis, and repeatedly train the training basis according to the training requirements to generate multi-version models; The intermediate participation unit is used to perform training monitoring, training interruption, training early stopping, and training resumption during the repeated training process; The cross-validation unit is used to perform cross-validation during the repeated training process to obtain a validation result; The optimization unit is used to adjust the training parameters according to the verification result to optimize and screen the multi-version model to obtain the target model.

[0010] Preferably, the comparison and difference determination module includes a horizontal comparison unit, a difference determination unit, a report generation unit, and an optimal selection unit, where The horizontal comparison unit is used to horizontally compare the target models trained and generated under a preset number of target frameworks to form horizontal comparison parameter data; The difference determination unit is used to perform difference determination based on the parameter data to form an evaluation opinion; The report generation unit is used to form an evaluation report based on the parameter data and the evaluation opinion; The optimal selection unit is used to select a model as the optimal model from all the target models according to the evaluation report.

[0011] Preferably, the parameter data includes epoch, loss value, average precision, accuracy rate, and recall rate; The evaluation report includes visualization charts of the epoch, the loss value, the average precision, the accuracy rate, and the recall rate.

[0012] Preferably, the export and deployment module includes an adjustment unit, an export unit, and a deployment unit; The adjustment unit is used to adjust the optimal model to form a standard model; The export unit is used to export the standard model as an ONNX format model and a TensorRT format model; The deployment unit is used to deploy the ONNX format model and the TensorRT format model in a preset hardware environment.

[0013] Preferably, adjusting the optimal model includes: Selecting an accuracy mode for the optimal model; and performing layer fusion on the optimal model to fuse the operators in the optimal model into a single operator; where the accuracy mode includes single precision, half precision, and quantization precision.

[0014] The present invention also provides a data-driven model training optimization method, where model training is implemented based on the data-driven model training optimization tool as described above, including: Matching a data set according to target requirements, and performing pre-training preparation processing on the data set to form target training data; Selecting a framework according to target requirements, and performing self-training based on the target training data using the framework to form a multi-version model, and optimizing the multi-version model to form a target model; Screen the target model to form an optimal model; Export the optimal model and deploy it in a hardware environment adapted to the optimal model.

[0015] Preferably, the process of selecting a framework according to target requirements, self-training based on the framework using the target training data to form multi-version models, and optimizing the multi-version models to form a target model includes: Lock the model type according to the target requirements, and determine a preset number of target frameworks in the framework library; wherein, the framework library at least includes YOLOv8n, YOLOv8m, PP-YOLOE, Faster R-CNN; Obtain training requirements according to the target requirements, use the target framework as the training basis, and repeatedly train the training basis according to the training requirements to generate multi-version models; Perform training monitoring, training interruption, early stopping of training, and training recovery during the repeated training process; Perform cross-validation during the repeated training process to obtain verification results; Adjust training parameters according to the verification results to optimize and screen the multi-version models to obtain a target model.

[0016] As can be seen from the above technical solutions, the data-driven model training optimization tool and method provided by the present invention first match the data set according to target requirements through a data processing module, and perform pre-training preparation processing on the data set to form target training data. Then, through the model training optimization module, a framework is selected according to target requirements, and self-training is carried out based on the framework using the target training data to form multi-version models, and the multi-version models are optimized to form a target model. Then, based on the comparison and difference determination module, the target model is screened to form an optimal model. Finally, through the export and deployment module, the optimal model is exported and deployed in a hardware environment adapted to the optimal model. The whole process can be automatically completed. The user only needs to input the target requirements as required. The system provides a one-stop automatic training service until the target model is exported, reducing the manual workload, improving the complexity of scenario adaptation, improving the optimization level, and being able to select a framework according to target requirements, which can improve the execution efficiency of inference tasks and enhance the model adaptability. Description of the Drawings

[0017] By referring to the following description of the specification in conjunction with the drawings, and with a more comprehensive understanding of the present invention, other objects and results of the present invention will become more apparent and easier to understand. In the drawings: Figure 1Schematic diagram of a data-driven model training optimization tool according to an embodiment of the present invention; Figure 2 Flowchart of a data-driven model training optimization method according to an embodiment of the present invention. Detailed implementation manners

[0018] Although existing tools support model training and export functions, the lack of an automated data-driven optimization mechanism leads to the need for a large amount of manual intervention. For example, in the correction of annotation errors and the iterative optimization of models, existing systems fail to form a data feedback loop. Moreover, after the model is exported, there is a lack of inference optimization tools. Especially in the deployment of multiple GPUs and TensorRT acceleration, users need to configure and optimize by themselves, which greatly increases the workload.

[0019] In view of the above problems, the present invention provides a data-driven model training optimization tool and method. The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0020] To illustrate the data-driven model training optimization tool and method provided by the present invention, Figure 1 、 Figure 2 Exemplary markings are made for the embodiments of the present invention.

[0021] The following description of the exemplary embodiments is actually only illustrative and in no way limits the present invention and its application or use. Technologies and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the said technologies and devices should be regarded as part of the specification.

[0022] As Figure 1 shown, the data-driven model training optimization tool 100 provided by the present invention includes; A data processing module 110, configured to match a data set according to target requirements, and perform pre-training preparation processing on the data set to form target training data; A model training and optimization module 120, configured to select a framework according to target requirements, and perform self-training based on the framework using the target training data to form multiple versions of models, and optimize the multiple versions of models to form a target model; A comparison and difference determination module 130, configured to screen the target model to form an optimal model; An export and deployment module 140, configured to export the optimal model and deploy it in a hardware environment adapted to the optimal model. For the data processing module 110, it is used to match the data set according to the target requirements, and perform pre-training preparation processing on the data set to form target training data; specifically, in this embodiment, the data processing module 110 includes a crawling unit 111, a data cleaning unit 112, and a data conversion unit 113; among them, The crawling unit 111 is used to obtain crawling keywords according to the target requirements, and generate a crawling task according to the crawling keywords, preset quality parameters, and target quantity to obtain open data; The data cleaning unit 112 is used to obtain the resolution of each picture in the open data, calculate the clarity of each picture in the open data by using Laplace transform to obtain a clarity score, calculate the similarity value between two pictures in the open data by using perceptual hashing, and clean the open data based on the resolution, the clarity score, and the similarity value according to preset cleaning rules to obtain a data set; The data conversion unit 113 is used to perform format conversion on the data set to form standard data, and perform automatic annotation and version numbering on the standard data to form target training data.

[0023] In a more specific embodiment, the form of obtaining the crawling keywords by the crawling unit 111 according to the target requirements is not specifically limited. It can set target questions for the user in advance, such as asking the user to fill in a form according to the questions. The questions can be: "What is the function of the pre-trained model? Why is the detected object? Why is the use? Whether to select the model framework? What are the numbers of the training set and the verification machine? What is the model export format, etc.", or it can enable the user to fill in a requirement as the target requirement in a preset target requirement box, and then perform character recognition on the requirement to obtain at least keywords including crawling keywords and framework keywords, and then perform subsequent processing based on the keywords. For example, if the user inputs "train a detection model for automatically identifying personnel wearing safety helmets", then its crawling keyword is "wearing a safety helmet", and its framework keyword is "detection", and then select a basic framework that is conducive to the generation of the detection model. Then, a crawling task is generated according to the crawling keywords, preset quality parameters, and target quantity to obtain open data. Here, the quality parameters and target quantity can be specified by the user input, or can be the default of the data processing module in this embodiment, which is not limited here.

[0024] During the crawling process, the picture source can be selected from a public website or an open database in a specific field. For example, the data volume target is: the target data volume set by the user (such as 1000 images); the quality parameter is: the minimum standard of the input resolution (such as 512×512 pixels) or the expected clarity requirement; then, picture crawling is performed based on this, and information such as the source URL, crawling time, and keyword matching degree of each picture will be recorded.

[0025] The data cleaning unit 112 obtains the resolution of each picture in the open data, calculates the clarity of each picture in the open data using Laplace transform to obtain a clarity score, calculates the similarity value between every two pictures in the open data using perceptual hashing, and cleans the open data based on the resolution, the clarity score, and the similarity value according to a preset cleaning rule to obtain a data set; wherein, the cleaning rule includes: Delete the pictures in the open data whose resolution is lower than a preset resolution threshold, delete the pictures whose clarity score is lower than a preset clarity threshold, and delete one of the two pictures whose similarity value is higher than a preset similarity threshold.

[0026] For example, use Laplace transform to calculate the picture clarity score, pictures with a score lower than the threshold will be marked as blurred and excluded; use perceptual hashing (PHash) to compare picture similarity, if the hash value difference is lower than the threshold, it will be marked as duplicate, and only high-resolution pictures will be retained; check the resolution of each picture, pictures with a resolution lower than the user-set standard (such as 512×512 pixels) will be directly deleted; and in this specific embodiment, the cleaning result will generate a log containing the reasons for deleting pictures (blurred, duplicate, low resolution) to ensure the traceability of the cleaning process.

[0027] The data conversion unit 113 converts the format of the data set to form standard data, automatically annotates and numbers the version of the standard data to form target training data. For example, the cleaned pictures are automatically converted to the VOC or COCO format, and then a standard annotation file is generated to form target training data, and the version number and source of the generated data set are recorded to support subsequent tracking and incremental updates. At the same time, it automatically detects and processes inconsistent situations in the data set, and situations such as image and annotation file mismatch and missing labels will all be deleted.

[0028] The model training and optimization module 120 is used to select a framework according to the target requirements, and perform self-training based on the framework using the target training data to form multi-version models, and optimize the multi-version models to form a target model; wherein, The model training and optimization module 120 includes a framework selection unit 121, a one-key training unit 122, an intermediate participation unit 123, a cross-validation unit 124, and an optimization unit 125. The framework selection unit 121 is used to lock the model type according to the target requirements, and determine a preset number of target frameworks in the framework library; wherein, the framework library at least includes YOLOv8n, YOLOv8m, PP-YOLOE, Faster R-CNN. The one-key training unit 122 is used to obtain training requirements according to the target requirements, use the target framework as the training basis, and repeatedly train the training basis according to the training requirements to generate multi-version models; The midway participation unit 123 is used to perform training monitoring, training interruption, early stopping of training, and training recovery during the repeated training process; The cross-validation unit 124 is used to perform cross-validation during the repeated training process to obtain a validation result; The optimization unit 125 is used to adjust training parameters according to the validation result to optimize and screen the multi-version models to obtain a target model.

[0029] More specifically, when the framework selection unit 121 locks the model type according to the target requirements, it first analyzes or performs text recognition on the target requirements to identify framework keywords. For example, if the user inputs "train a detection model for automatically identifying personnel wearing safety helmets", then the crawled keyword is "wearing a safety helmet", and its framework keyword is "detection". The model type can be locked in the "detection" category according to the framework keyword, and then a preset number of target frameworks are determined in the framework library according to the model type; the framework can be automatically assigned to the user. However, if the user chooses to select a suitable framework by themselves, they can also select a pre-trained model according to actual needs (such as YOLOv8n, YOLOv8m, PP-YOLOE, Faster R-CNN, etc.). These models perform differently under different tasks and hardware resources, and the user can select the most suitable model for training.

[0030] For the one-key training unit 122, it obtains training requirements according to the target needs, uses the target framework as the training basis, and repeatedly trains the training basis according to the training requirements to generate multi-version models. The midway participation unit 123 is used to monitor training, interrupt training, early stop training, and resume training during the repeated training process; when the cross-validation unit 124 performs cross-validation during the repeated training process to obtain the validation result, first, training data preparation is carried out: the system automatically divides the dataset into a training set and a validation set (such as a 7:3 or 8:2 ratio); then, the training process is started: the user can trigger the one-key training unit 122 to start the training process by clicking the "One-key Start Training" button; during the training process, multi-GPU support exists: that is, in the case of multiple GPU resources, the system will automatically allocate computing resources to optimize the training speed; single-card training and distributed training (such as data parallelism and model parallelism) are supported. At the same time, training monitoring exists: that is, it can display the training progress in real time, including indicators such as the current epoch, loss value (Loss), mean average precision (mAP), accuracy rate, and recall rate; the midway participation unit 123 can perform interruption and recovery: if the training process is interrupted, the system supports resuming training from the nearest checkpoint to avoid data loss; it also has an early stop mechanism: when the performance of the model no longer improves on the validation set, the training is automatically terminated to avoid overfitting.

[0031] The optimization unit 125 is used to adjust the training parameters according to the validation result to optimize and screen the multi-version models to obtain the target model. The optimization unit 125 is a horizontal comparison unit, that is, a comparison between models generated by training different training datasets under the same framework, or a comparison between models generated under different parameters under the same framework, that is, their basic frameworks are the same, so as to select the most suitable target model. In addition, multi-fold cross-validation (such as 5-fold) is supported, and the number of folds can be set according to needs to evaluate the stability and generalization ability of the model under different data partitions, so as to select the most suitable model for the user. Specifically, it can also be the optimization of training for the same dataset under the same framework. For example, according to the preliminary training results, the system automatically suggests adjusting some hyperparameters (such as learning rate, batch size, optimizer type, etc.) for further optimization, supports the use of adaptive optimization algorithms (such as AdamW), and dynamically adjusts the learning rate. For complex tasks, the system can guide the user to use transfer learning strategies, select more suitable pre-trained models and perform fine-tuning, and in order to improve the training speed and save memory, mixed-precision training is supported, and the training process is accelerated by using half-precision floating-point numbers (FP16).

[0032] The comparison and difference determination module 130 is used to screen the target models to form the optimal model; among them, the comparison and difference determination module 130 includes a horizontal comparison unit 131, a difference determination unit 132, a report generation unit 133, and an optimal selection unit 134, where, The horizontal comparison unit 131 is used to horizontally compare the target models trained under a preset number of target frameworks to form horizontal comparison parameter data; The difference determination unit 132 is used to perform difference determination based on the parameter data to form an evaluation opinion; The report generation unit 133 is used to form an evaluation report based on the parameter data and the evaluation opinion; The most optimal selection unit 134 is used to select one model as the optimal model from all the target models according to the evaluation report.

[0033] Specifically, the horizontal comparison performed by the horizontal comparison unit 131 is to horizontally compare the target models trained under a preset number of target frameworks to form horizontal comparison parameter data. That is, when the user inputs target requirements, if there is no key framework data or even if there is key framework data "detection", but there are multiple types of detection frameworks, multiple frameworks can be used for training. Then, the horizontal comparison unit 131 compares the different models trained under different frameworks, thereby further improving the user's options and enhancing the adaptability of the model. The background will record the detailed logs of each training, including the training loss, validation loss, and various performance indicators of each epoch, for the user to analyze.

[0034] When the difference determination unit 132 performs difference determination based on the parameter data to form an evaluation opinion, it automatically sorts out the parameter data of each model, and at the same time, the background technical personnel put forward selective evaluation opinions; The report generation unit 133 is used to form an evaluation report based on the parameter data and the evaluation opinion; the parameter data includes epoch, loss value, average precision, accuracy rate, and recall rate; the evaluation report includes visual charts of the epoch, the loss value, the average precision, the accuracy rate, and the recall rate; that is, to further visually sort out the parameter data and form an evaluation report in combination with the evaluation opinion. The visual charts in the evaluation report such as loss value curves, precision curves, IoU curves, etc. help users intuitively understand the progress of model training; furthermore, for example, based on indicators such as mAP, recall rate, F1 score, and inference speed for scoring, each indicator is standardized according to preset weights (such as mAP 40%, recall rate 30%, F1 20%, speed 10%) and then the comprehensive score is calculated. If a model is particularly outstanding in a certain indicator but relatively low in other indicators, the system balances through weighting to avoid being dominated by a single indicator. Subsequently, the model with the highest score is automatically recommended, and the deviation between each model and the original annotation is marked through difference analysis to assist in optimizing the annotation data.

[0035] The most preferred selection unit 134 is used to select one model from all the target models as the optimal model according to the evaluation report, which shows various indicators during the training process and the final evaluation results. Users can analyze the model performance based on the report to select the optimal model, or adjust hyperparameters, increase training data, or use more complex enhancement strategies to improve the model performance and further optimize the training. When selecting, this unit can be viewed and selected by the user himself according to the evaluation report, or the evaluation scores of each model can be formed based on the evaluation report, and then the model with the highest evaluation score is automatically selected as the optimal model.

[0036] The export and deployment module 140 is used to export the optimal model and deploy it in the hardware environment adapted to the optimal model; wherein, the export and deployment module 140 includes an adjustment unit 141, an export unit 142 and a deployment unit 143; The adjustment unit 141 is used to adjust the optimal model to form a standard model; adjusting the optimal model includes: selecting the precision mode of the optimal model; and performing layer fusion on the optimal model to fuse the operators in the optimal model into a single operator; wherein, the precision mode includes single precision, half precision and quantization precision; The export unit 142 is used to export the standard model into an ONNX format model and a TensorRT format model; The deployment unit 143 is used to deploy the ONNX format model and the TensorRT format model in a preset hardware environment.

[0037] In a more specific embodiment, the system supports exporting the model into ONNX and TensorRT formats. The ONNX format is used for cross-platform deployment, while the TensorRT format is optimized for inference acceleration on NVIDIA hardware. Through the export tool, users can select the optimal deployment plan according to the hardware environment and actual needs. After exporting to the TensorRT format, the system automatically performs inference optimization, including mixed-precision inference, dynamic batch size adjustment, etc. The tool supports distributed inference of multiple GPUs to improve the execution efficiency of large-scale inference tasks.

[0038] More specifically, in the inference optimization and multi-GPU acceleration module, after exporting the model to the TensorRT format, a series of optimization steps are executed to improve the inference efficiency. For example: TensorRT model conversion and optimization: Export the trained model into the ONNX format for subsequent TensorRT conversion. The ONNX format can effectively be compatible with different deep learning frameworks and support the optimization process of TensorRT; TensorRT Conversion: Use TensorRT to convert the ONNX model into an optimized TensorRT model. Specify the target hardware architecture (such as GPU model) during the process for hardware-level optimization. This conversion includes the following settings: 1) Precision Mode Selection: Supports FP32 (single precision), FP16 (half precision), and INT8 (quantized precision) modes. For non-critical tasks, FP16 or INT8 precision can be selected to save video memory and accelerate inference.

[0039] 2) Layer Fusion: TensorRT automatically fuses multiple operators in the model into a single operator, reducing computational redundancy and improving efficiency.

[0040] Mixed Precision Optimization during Inference: 1) Automatic Precision Mixing: Enable the mixed precision mode during the inference stage. TensorRT can automatically select FP16 or FP32 precision to execute operations according to the computational characteristics of the model layers. By dynamically allocating precision, it not only ensures the accuracy of important calculations but also reduces unnecessary computational overhead; 2) Video Memory Management: Enable the video memory optimization mode to allow TensorRT to dynamically switch between different precisions, avoid video memory overflow, and improve inference stability.

[0041] Dynamic Batch Size Adjustment: 1) Input Batch Size Optimization: Enable dynamic Batch Size for changes in input data. TensorRT supports preset Batch Size ranges, allowing the model to flexibly adjust according to the actual data volume during inference. Dynamic Batch Size can effectively adapt to different inference requirements without wasting computational resources; 2) Inference Concurrency Setting: The system maximizes the use of the GPU's computational power through TensorRT's max_batch_size and workspace_size parameters. In diverse inference tasks, multiple Batches are allowed to execute simultaneously to improve throughput.

[0042] Multi-GPU Distributed Inference: 1) Multi-GPU Resource Allocation: Use the multi-GPU architecture to perform distributed inference. The system divides the input data into multiple subtasks and executes them in parallel on different GPUs. This distributed inference supports synchronous (each GPU completes a part of the task) or asynchronous (multiple tasks are independently executed on different GPUs) modes to improve parallel efficiency; 2) Data Synchronization and Load Balancing: During multi-GPU inference, the system dynamically monitors the load conditions of each GPU to ensure balanced distribution of GPU tasks. Data synchronization between GPUs is achieved through NCCL (NVIDIA Collective Communications Library) to share intermediate results or gradient information.

[0043] 3) Result Merging: After distributed inference is completed, the system automatically merges the result data of each GPU and outputs the final inference result to ensure the consistency and accuracy of the completion of the inference task.

[0044] Performance Monitoring and Optimization Feedback: 1) Inference Performance Monitoring: The system records the execution time, GPU utilization rate, and video memory occupancy of each inference. If the inference speed decreases or the video memory is exhausted at a certain stage, the system will trigger an automatic optimization prompt to guide the user to adjust parameters such as the precision mode or Batch Size. 2) Feedback Optimization: Based on the results of performance monitoring, the user can further fine-tune the precision, Batch Size, or distributed settings to gradually improve the efficiency and stability of inference.

[0045] Through the above steps, the system realizes efficient inference optimization in a multi-GPU environment, significantly reducing the inference time and improving the execution efficiency of large-scale inference tasks.

[0046] It should be noted that the data-driven model training optimization tool in this embodiment supports running in multi-hardware environments, including multi-GPUs, edge computing devices, etc. Users can choose single-card, multi-card, or distributed training and inference modes according to specific tasks, and the system will automatically adjust resource allocation to ensure efficient execution in different hardware environments.

[0047] As described above, the data-driven model training optimization tool provided by the present invention provides a consistent automatic training service until the target model is exported, reducing the manual workload, increasing the complexity of scenario adaptation, improving the optimization level, and can select a framework according to the target requirements, which can improve the execution efficiency of inference tasks, enhance the model adaptability, and the settings in the process enhance the generalization ability and robustness of the model. The continuous optimization process ensures the closed-loop feedback between data and the model, improves the accuracy and adaptability of the model, and supports distributed inference of multi-GPUs, improving the execution efficiency of large-scale inference tasks.

[0048] In addition, as Figure 2 shown, the present invention also provides a data-driven model training optimization method, which realizes model training based on the data-driven model training optimization tool as described above, including: S1: Match the dataset according to the target requirements, and perform pre-training preparation processing on the dataset to form target training data; S2: Select a framework according to the target requirements, and perform self-training based on the framework using the target training data to form multi-version models, and optimize the multi-version models to form a target model; S3: Screen the target model to form an optimal model; S4: Export the optimal model and deploy it in a hardware environment adapted to the optimal model.

[0049] Among them, the process of selecting a framework according to the target requirements, performing self-training based on the framework using the target training data to form multi-version models, and optimizing the multi-version models to form a target model includes: S21: Lock the model type according to the target requirements, and determine a preset number of target frameworks in the framework library; among them, the framework library at least includes YOLOv8n, YOLOv8m, PP-YOLOE, Faster R-CNN; S22: Obtain the training requirements according to the target requirements, use the target framework as the training basis, and repeatedly train the training basis according to the training requirements to generate multi-version models; S23: Perform training monitoring, training interruption, early stopping of training, and training recovery during the repeated training process; S24: Perform cross-validation during the repeated training process to obtain verification results; S25: Adjust the training parameters according to the verification results to optimize and screen the multi-version models to obtain a target model.

[0050] For specific embodiments, reference may be made to the specific implementation manners and beneficial effects of the above data-driven model training optimization tool, and details are not described herein again.

[0051] As described above by way of example with reference to the drawings, a data-driven model training optimization tool and method according to the present invention are described. However, those skilled in the art should understand that various improvements can be made to the above data-driven model training optimization tool and method proposed by the present invention without departing from the content of the present invention. Therefore, the protection scope of the present invention should be determined by the content of the appended claims.

Claims

1. A data-driven model training optimization tool, characterized in that: include: A data processing module, used to match the data set according to the target requirements and perform pre-training preparation processing on the data set to form target training data; A model training optimization module, used to select a framework according to target requirements, and use the target training data to perform self-training based on the framework to form a multi-version model, and optimize the multi-version model to form a target model; A comparison and difference determination module, used for screening the target model to form an optimal model; The export and deployment module is used to export the optimal model and deploy it in a hardware environment compatible with the optimal model.

2. The data-driven model training optimization tool according to claim 1, characterized in that: The data processing module includes a crawling unit, a data cleaning unit and a data conversion unit; wherein, The crawling unit is used to obtain crawling keywords according to the target requirements, and generate crawling tasks according to the crawling keywords, preset quality parameters and target quantity to obtain open data; The data cleaning unit is used to obtain the resolution of each picture in the open data, use Laplace transform to calculate the clarity of each picture in the open data to obtain a clarity score, use perceptual hashing to calculate the similarity value between any two pictures in the open data, and clean the open data according to a preset cleaning rule based on the resolution, the clarity score and the similarity value to obtain a data set; The data conversion unit is used to perform format conversion on the data set to form standard data, and automatically annotate and version number the standard data to form target training data.

3. The data-driven model training optimization tool according to claim 2, characterized in that: The cleaning rules include: In the open data, the images whose resolution is lower than the preset resolution threshold are deleted, the images whose clarity score is lower than the preset clarity threshold are deleted, and among the two images, one of the images whose similarity value is higher than the preset similarity threshold is deleted.

4. The data-driven model training optimization tool according to claim 3, characterized in that: The model training optimization module includes a framework selection unit, a one-click training unit, a midway participation unit, a cross-validation unit, and an optimization unit. The framework selection unit is used to lock the model type according to the target requirement, and determine a preset number of target frameworks in the framework library according to the model type; wherein the framework library includes at least YOLOv8n, YOLOv8m, PP-YOLOE, and Faster R-CNN; The one-key training unit is used to obtain training requirements according to the target requirements, use the target framework as a training basis, and repeatedly train the training basis according to the training requirements to generate a multi-version model; The midway participation unit is used to perform training monitoring, training interruption, early training stop and training recovery during the repeated training; The cross-validation unit is used to perform cross-validation during the repeated training to obtain a validation result; The optimization unit is used to adjust the training parameters according to the verification result to optimize and screen the multi-version model to obtain the target model.

5. The data-driven model training optimization tool according to claim 4, characterized in that: The comparison and difference determination module includes a horizontal comparison unit, a difference determination unit, a report generation unit and an optimal selection unit, wherein: The horizontal comparison unit is used to horizontally compare the target models trained and generated under a preset number of target frameworks to form horizontal comparison parameter data; The difference determination unit is used to perform difference determination based on the parameter data to form an evaluation opinion; The report generating unit is used to form an evaluation report according to the parameter data and the evaluation opinion; The optimal selection unit is used to select a model as the optimal model from all target models according to the evaluation report.

6. The data-driven model training optimization tool according to claim 5, characterized in that: The parameter data includes epoch, loss value, average precision, accuracy, and recall rate; The evaluation report includes a visualization chart of the epoch, the loss value, the average precision, the accuracy rate, and the recall rate.

7. The data-driven model training optimization tool according to claim 1, characterized in that: The export and deployment module includes an adjustment unit, an export unit and a deployment unit; The adjustment unit is used to adjust the optimal model to form a standard model; The export unit is used to export the standard model into an ONNX format model and a TensorRT format model; The deployment unit is used to deploy the ONNX format model and the TensorRT format model in a preset hardware environment.

8. The data-driven model training optimization tool according to claim 7, characterized in that: The optimal model is adjusted, including: Selecting a precision mode for the optimal model; and performing layer fusion on the optimal model to fuse operators in the optimal model into a single operator; wherein the precision mode includes single precision, half precision and quantized precision.

9. A data-driven model training optimization method, characterized in that: Implementing model training based on the data-driven model training optimization tool according to any one of claims 1 to 8 includes: Matching a data set according to target requirements, and performing pre-training preparation processing on the data set to form target training data; Select a framework according to target requirements, and use the target training data to perform self-training based on the framework to form a multi-version model, and optimize the multi-version model to form a target model; Screening the target model to form an optimal model; The optimal model is exported and deployed in a hardware environment compatible with the optimal model.

10. The DRAM testing method based on embedded logic analysis according to claim 9, characterized in that: The process of selecting a framework according to target requirements, performing self-training based on the framework using the target training data to form a multi-version model, and optimizing the multi-version model to form a target model includes: The model type is locked according to the target requirement, and a preset number of target frameworks are determined in the framework library according to the model type; wherein the framework library includes at least YOLOv8n, YOLOv8m, PP-YOLOE, and Faster R-CNN; Acquire training requirements according to the target requirements, use the target framework as a training basis, and repeatedly train the training basis according to the training requirements to generate a multi-version model; Performing training monitoring, training interruption, early training stop and training recovery during the repeated training; Perform cross-validation during the repeated training to obtain a validation result; The training parameters are adjusted according to the verification results to optimize and screen the multi-version model to obtain a target model.