Method for adjusting control of multiple data

By co-optimizing the learning rate, warm-up strategy, and data augmentation parameters of the YOLOv7 model, the issues of scene adaptability, stability, and accuracy of the model were resolved, achieving high-precision target detection.

CN122157134APending Publication Date: 2026-06-05DTI (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DTI (SHANGHAI) CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The generalized parameter configuration of the existing YOLOv7 model leads to poor scene adaptability, insufficient training stability, high risk of overfitting, and insufficient classification accuracy, which cannot meet the requirements of high-precision detection.

Method used

By employing a phased collaborative tuning strategy, the core parameters of the YOLOv7 model are adjusted, including the collaborative optimization of the learning rate and warm-up strategy, data augmentation parameters, and loss function weights, to achieve the optimal configuration.

Benefits of technology

It achieved a significant improvement in model recognition rate, enhanced training stability and generalization, a substantial increase in the ability to identify subcategories, reduced false positive and false negative rates, and a significant improvement in adaptability and training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157134A_ABST
    Figure CN122157134A_ABST
Patent Text Reader

Abstract

The application provides a kind of multiple data adjustment control method, belong to adjustment control technical field, it includes: step 1: the core parameter of YOLOv7 model default configuration file is parsed and optimization target is determined;Step 2: after parsing and optimization target determination, learning rate and warm-up strategy collaborative optimization are carried out;Step 3: after learning rate and warm-up strategy collaborative optimization, data enhancement parameter collaborative optimization is executed;Step 4: loss function weight optimization;Step 5: combination parameter fine-tuning and optimal configuration determination.To solve the existing YOLOv7 model parameter configuration generalization, lack of systematicness, training stability is insufficient, overfitting risk is high and the problems such as insufficient classification precision, realize the comprehensive improvement of model recognition rate, training stability, generalization and classification precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of adjustment and control technology, and specifically relates to a method for adjusting and controlling multiple data. Background Technology

[0002] In numerous fields such as security monitoring, intelligent transportation, and industrial inspection, object detection technology plays a crucial role. The YOLOv7 model, with its high detection performance, has become the mainstream object detection model. Currently, the training of the YOLOv7 model primarily relies on the official default configuration file (such as hyp.scratch.p5.yaml). This configuration file employs a generalized parameter setting design, covering core configurations such as learning rate scheduling, data augmentation, and loss function weights, making it suitable for object detection tasks in most general scenarios.

[0003] In practical applications, users typically use default parameters or make piecemeal adjustments to individual parameters, input training samples into the model, complete iterative training, and finally output the detection model. However, this approach has several drawbacks:

[0004] Generalized parameter configuration, poor scene adaptability: The default parameters are designed for general scenes and are not adapted to the shape and feature distribution of specific targets (such as vehicles and small objects), resulting in a low recognition rate (only 84%) under the same training samples, which cannot meet the requirements of high-precision detection.

[0005] The parameter tuning lacks a systematic approach: it often involves adjusting single parameters in a scattered manner without considering the synergistic effects between parameters (such as matching data augmentation with loss function weights, and adapting learning rate with warm-up strategies), which can easily lead to a decline in overall performance due to optimization of a single parameter.

[0006] Insufficient training stability: The default warm-up rounds are too short (3.0 rounds), the learning rate rises too quickly in the early stage, causing weight oscillations in the early stage of training, slow model convergence speed, and easy to get trapped in local optima.

[0007] High risk of overfitting: The default configuration has too high probability of mosaic enhancement (1.0) and probability of mixed enhancement (0.15), and the scaling enhancement magnitude (0.9) is too large. This is likely to lead to overfitting and poor generalization for specific scene samples (such as vehicle detection from a fixed viewpoint).

[0008] Insufficient classification accuracy: The default classification loss weight (0.3) is low, which is insufficient to distinguish the target subcategories (such as cranes, pump trucks, and pile drivers), resulting in a high false positive rate.

[0009] Therefore, there is an urgent need for a method to adjust and control multiple data points that can systematically optimize YOLOv7 model parameters and improve model detection performance for specific scenarios. Summary of the Invention

[0010] The purpose of this invention is to provide a method for adjusting and controlling multiple data points to solve the problems of generalized parameter configuration, lack of systematic adjustment, insufficient training stability, high risk of overfitting, and insufficient classification accuracy of existing YOLOv7 models, thereby achieving a comprehensive improvement in model recognition rate, training stability, generalization ability, and classification accuracy.

[0011] The present invention employs the following technical solution.

[0012] A method for adjusting and controlling multiple data points, comprising:

[0013] Step 1: Analyze the core parameters of the default configuration file for the YOLOv7 model and determine the optimization objectives;

[0014] Step 2: After the analysis and optimization objectives are determined, the learning rate and warm-up strategy are jointly optimized.

[0015] Step 3: After co-tuning the learning rate and warm-up strategy, perform co-tuning of data augmentation parameters;

[0016] Step 4: Adjust the weights of the loss function;

[0017] Step 5: Fine-tuning of combined parameters and determination of optimal configuration.

[0018] Preferably, step 1 specifically includes:

[0019] Step 1-1: Perform initial parameter parsing;

[0020] Step 1-2: Optimize target setting.

[0021] Preferably, step 1-1 specifically includes:

[0022] The core parameters in the default configuration file hyp.scratch.p5.yaml of the YOLOv7 model are functionally broken down.

[0023] Preferably, steps 1-2 specifically include:

[0024] For specific detection scenarios, core optimization goals are set, including:

[0025] ① The recognition rate has been increased to over 98%;

[0026] ② The number of training convergence rounds is reduced by 30%;

[0027] ③ The false positive rate for subcategories has been reduced to below 1%;

[0028] ④ Improved model generalization.

[0029] Preferably, step 2 specifically includes:

[0030] Step 2-1: Perform extended warm-up rounds;

[0031] Step 2-2: Keep the core learning rate parameter unchanged.

[0032] Preferably, step 2-1 specifically includes:

[0033] The warmup_epochs was adjusted from 3.0 to 5.0 to extend the low learning rate adaptation phase.

[0034] Preferably, step 2-2 specifically includes:

[0035] Maintain lr0=0.01 and lrf=0.1 to ensure a reasonable pace of learning rate decline in the later stages of training.

[0036] Preferably, in step 2, the learning rate change formula is as follows:

[0037] ;

[0038] in, For the first Learning rate of the round, For the total number of training rounds, For the warm-up rounds, The initial learning rate, This is the learning rate decay factor.

[0039] Preferably, step 3 specifically includes:

[0040] Step 3-1: Enable moderate rotation enhancement;

[0041] Step 3-2: Reduce the translation and scaling amplitude;

[0042] Step 3-3: Reduce the probability of over-amplification.

[0043] Preferably, step 3-1 specifically includes:

[0044] The degrees were adjusted from 0.0 to 5.0 to improve the YOLOv7 model's adaptability to different target poses.

[0045] Preferably, step 3-2 specifically includes:

[0046] Adjust the translate value from 0.2 to 0.15 and the scale value from 0.9 to 0.3 to adapt to object detection in specific scenarios.

[0047] Preferably, step 3-3 specifically includes:

[0048] Adjust the value of mosaic from 1.0 to 0.8 and mixup from 0.15 to 0.05.

[0049] Preferably, in step 3, the formula for calculating the similarity of sample feature distributions after data augmentation is:

[0050] ;

[0051] in, For feature distribution similarity, For the sample size, For feature dimension, Original sample The 3D eigenvalues For data augmentation samples The 1-dimensional eigenvalues.

[0052] Preferably, step 4 specifically includes:

[0053] Step 4-1: Increase the classification loss weight: Adjust cls from 0.3 to 0.5;

[0054] Step 4-2: Keep the bounding box and target loss weights unchanged: keep box=0.05 and obj=0.7.

[0055] Preferably, in step 4, the total loss function formula is: ;

[0056] in, This is the total loss value. For bounding box regression loss, For classifying losses, For target detection loss, , , These are the weights corresponding to the losses.

[0057] Preferably, step 5 specifically includes:

[0058] Step 5-1, Sensitivity Analysis: Make minor adjustments to key parameters and analyze the impact of parameter changes on the recognition rate, i.e., screen parameter combinations with low sensitivity, which are also highly stable.

[0059] Step 5-2, combined fine-tuning: maintain hsv_h=0.015, hsv_s=0.6, hsv_v=0.4; keep weight_decay=0.0005;

[0060] Step 5-3, Determine the optimal configuration: The final configuration is hyp.scratch.best.yaml.

[0061] Preferably, in step 5, the formula for calculating parameter sensitivity is: ;

[0062] in, For parameters Sensitivity For parameters The amount of change in recognition rate caused by the change. For parameters The change in quantity.

[0063] The beneficial effects of the present invention are as follows, compared with the prior art:

[0064] A significant leap in recognition rate: Through a phased collaborative optimization strategy, the model recognition rate has increased from 87% to 98.3% under the same training samples, with the false negative rate dropping to below 0.8% and the false positive rate dropping to below 1.2%, completely solving the core pain point of insufficient recognition accuracy in existing technologies.

[0065] Significantly optimized training stability and convergence speed: By extending the warm-up rounds and coordinating the learning rate parameter, the fluctuation range of the loss value in the early stage of training was reduced from 12% to 5%, the number of convergence rounds was reduced from 300 rounds to 200 rounds, training efficiency was improved by 30%, and the model was prevented from getting stuck in local optima.

[0066] Enhanced generalization and scene adaptability: By synergistically adjusting data augmentation parameters, overfitting and feature diversity are balanced, reducing the difference in accuracy between the training and test sets from 8% to 2.1%. The model maintains high recognition accuracy in different lighting (strong light, weak light) and viewing angle (front, side) scenarios.

[0067] Significantly improved subcategorization recognition capability: By increasing the classification loss weight, the false detection rate of vehicle subcategories (cars, trucks, SUVs, cranes, pump trucks, pile drivers) has been reduced from 8% to 1.2%, meeting the needs of accurate classification and detection, and its practicality far exceeds that of basic category recognition technology.

[0068] The optimization logic is highly reusable: it establishes a closed-loop optimization process of parsing, setting, optimizing, verifying, and solidifying, which supports rapid adaptation to other scenarios (such as small object detection and pedestrian detection). High performance can be achieved by simply fine-tuning the parameters based on this logic, reducing the cost of secondary development.

[0069] Optimal parameter synergy: Avoiding the blind adjustment of single parameters in existing technologies, the learning rate scheduling, data augmentation, and loss function weights are optimized through multi-parameter linkage to ensure optimal overall performance. Attached Figure Description

[0070] Figure 1This is a flowchart of the method for adjusting and controlling multiple data in this invention. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, other embodiments obtained by those skilled in the art without creative effort are all within the protection scope of this invention.

[0072] like Figure 1 As shown, this invention proposes a method for adjusting and controlling multiple data points, comprising the following steps:

[0073] Based on a phased collaborative tuning strategy, the core parameters of the YOLOv7 model are adjusted and controlled, specifically including the following steps:

[0074] Step 1: Analyze the core parameters of the default configuration file for the YOLOv7 model and determine the optimization objectives;

[0075] In a preferred but non-limiting embodiment of the present invention, step 1 specifically includes:

[0076] Step 1-1: Perform initial parameter parsing;

[0077] In a preferred but non-limiting embodiment of the present invention, step 1-1 specifically includes:

[0078] The core parameters in the default YOLOv7 model configuration file hyp.scratch.p5.yaml are functionally broken down to clarify the impact of each parameter on model performance. The categories, specific parameters, default values, and functions of the decomposed core parameters are shown in Table 1 below:

[0079] Table 1

[0080]

[0081] Step 1-2: Optimize target setting.

[0082] In a preferred but non-limiting embodiment of the present invention, steps 1-2 specifically include:

[0083] For specific detection scenarios, core optimization goals are set, including:

[0084] ① The recognition rate has been increased to over 98%;

[0085] ② The number of training convergence rounds is reduced by 30%;

[0086] ③ The false positive rate for subcategories has been reduced to below 1%;

[0087] ④ Improved model generalization (test set accuracy decreased by ≤2%).

[0088] Step 2, Phase 1: After the analysis and optimization objectives are determined, the learning rate and warm-up strategy are jointly optimized.

[0089] In a preferred but non-limiting embodiment of the present invention, step 2 specifically includes:

[0090] Step 2-1: Perform extended warm-up rounds;

[0091] In a preferred but non-limiting embodiment of the present invention, step 2-1 specifically includes:

[0092] The warmup_epochs was adjusted from 3.0 to 5.0 to extend the low learning rate adaptation phase, allowing the model weights to be updated slowly in the early stages and avoiding oscillations.

[0093] Step 2-2: Keep the core learning rate parameter unchanged.

[0094] In a preferred but non-limiting embodiment of the present invention, step 2-2 specifically includes:

[0095] Maintain lr0=0.01 and lrf=0.1 to ensure that the learning rate decreases at a reasonable pace in the later stages of training and avoid insufficient convergence.

[0096] In step 2, collaborative verification can also be performed: by monitoring the training curve (the fluctuation range of the loss value and the upward trend of the accuracy), the combined effect of extending the warm-up rounds and the fixed learning rate can be verified to ensure that the fluctuation range of the loss value in the early stage of training is ≤5% and the convergence speed is improved by 20%.

[0097] In a preferred but non-limiting embodiment of the present invention, the learning rate change formula in step 2 is as follows:

[0098] ;

[0099] in, For the first Learning rate of the round, For the total number of training rounds, This is the warm-up round (optimized to 5.0). The initial learning rate is 0.01. The learning rate decay factor is 0.1.

[0100] Step 3, Phase 2: After co-tuning the learning rate and warm-up strategy, perform co-tuning of data augmentation parameters;

[0101] In a preferred but non-limiting embodiment of the present invention, step 3 specifically includes:

[0102] Step 3-1: Enable moderate rotation enhancement;

[0103] In a preferred but non-limiting embodiment of the present invention, step 3-1 specifically includes:

[0104] Adjusting degrees from 0.0 to 5.0 (±5° rotation) improves the YOLOv7 model's adaptability to different target poses while avoiding feature distortion caused by excessive rotation.

[0105] Step 3-2: Reduce the translation and scaling amplitude;

[0106] In a preferred but non-limiting embodiment of the present invention, step 3-2 specifically includes:

[0107] The translate was adjusted from 0.2 to 0.15 (±15% translation) and the scale was adjusted from 0.9 to 0.3 (±30% scaling) to adapt to object detection in specific scenarios and avoid excessive deformation of object features.

[0108] Step 3-3: Reduce the probability of over-amplification.

[0109] In a preferred but non-limiting embodiment of the present invention, step 3-3 specifically includes:

[0110] The mosaic value was adjusted from 1.0 to 0.8 (80% mosaic enhancement) and the mixup value was adjusted from 0.15 to 0.05 (5% mixed enhancement) to reduce the interference of artificially synthesized scenes on the learning of real samples and reduce the risk of overfitting.

[0111] In step 3, collaborative verification can also be performed: by verifying the difference between the accuracy of the training set and the test set, the difference is ensured to be ≤3%, while the target false negative rate decreases by 15%.

[0112] In a preferred but non-limiting embodiment of the present invention, in step 3, the formula for calculating the similarity of sample feature distributions after data augmentation is as follows:

[0113] ;

[0114] in, For feature distribution similarity, For the sample size, For feature dimension, Original sample The 3D eigenvalues For data augmentation samples The 3D eigenvalues The closer the value is to 1, the more similar the feature distribution of the augmented sample is to the original sample, and the lower the risk of overfitting.

[0115] Step 4, Stage 3: Loss function weight tuning;

[0116] In a preferred but non-limiting embodiment of the present invention, step 4 specifically includes:

[0117] Step 4-1: Increase the classification loss weight: Adjust cls from 0.3 to 0.5 to increase the training weight of the classification task and strengthen the model's feature learning for the target subcategories;

[0118] Step 4-2: Keep the bounding box and target loss weights unchanged: Maintain box=0.05 and obj=0.7 to ensure that the bounding box regression accuracy does not decrease and to balance classification and localization performance.

[0119] In step 4, collaborative verification can also be performed: the false detection rate of each category is analyzed by confusion matrix analysis to ensure that the false detection rate of each category is ≤1.5%.

[0120] In a preferred but non-limiting embodiment of the present invention, in step 4, the total loss function formula is: ;

[0121] in, This is the total loss value. For bounding box regression loss, For classifying losses, For target detection loss, , , These are the weights for the corresponding losses (after optimization, they are 0.05, 0.5, and 0.7 respectively).

[0122] Step 5, Stage 4: Fine-tuning of combined parameters and determination of optimal configuration;

[0123] In a preferred but non-limiting embodiment of the present invention, step 5 specifically includes:

[0124] Step 5-1, Sensitivity Analysis: Make minor adjustments (within ±10%) to key parameters (such as hsv_h, hsv_s, weight_decay) and analyze the impact of parameter changes on the recognition rate, i.e., screen parameter combinations with low sensitivity, which are also highly stable.

[0125] Step 5-2, fine-tuning: Maintain hsv_h=0.015, hsv_s=0.6, hsv_v=0.4 (consistent with the optimized configuration) to avoid excessive color enhancement affecting target feature extraction; keep weight_decay=0.0005 to ensure stable regularization and prevent overfitting; verify the combined effect of "degrees=5.0+cls=0.5+mosaic=0.8" to ensure that each parameter works synergistically.

[0126] Step 5-3, Optimal Configuration Determination: The final configuration is shown in Table 2 below.

[0127] Table 2

[0128]

[0129] In a preferred but non-limiting embodiment of the present invention, in step 5, the formula for calculating parameter sensitivity is: ;

[0130] in, For parameters Sensitivity For parameters The amount of change in recognition rate caused by the change. For parameters The change The smaller the absolute value, the lower the parameter sensitivity and the higher the stability.

[0131] The method for adjusting and controlling multiple data in this invention may further include: verification of optimization effect and configuration solidification.

[0132] Multi-dimensional verification: Establish a five-dimensional verification system for recognition rate, false negative rate, false positive rate, convergence speed, and generalization ability, and conduct quantitative evaluation of the optimization results at each stage to ensure that each adjustment has a clear effect improvement.

[0133] Configuration solidification: The optimal parameter combination (hyp.scratch.best.yaml) is solidified into a scene-specific configuration template, which supports rapid reuse in subsequent similar scenes. At the same time, parameter tuning logs are recorded (including performance comparisons before and after adjustments and parameter coordination logic), providing a reference for subsequent tuning of new scenes.

[0134] Dynamic adaptation: It supports iterative parameter updates based on the characteristics of new scene samples and this optimization logic to ensure that the model performance remains optimal.

[0135] Alternative solutions to the present invention may be as follows:

[0136] Alternatives to learning rate scheduling: The existing optimization uses the OneCycleLR learning rate strategy, which can be replaced by Cosine AnnealingLR or Adaptive Learning Rate (AdamW optimizer). Only the adaptive values ​​of parameters such as lr0 and lrf need to be adjusted to achieve the same stable convergence effect.

[0137] Data augmentation alternatives: In addition to adjusting existing parameters, CutMix augmentation (to replace mixup) and RandomCrop augmentation can be added. By controlling the CutMix probability (0.05-0.1) and the cropping ratio (0.7-0.9), the generalization and fitting risk can be balanced.

[0138] Alternative loss function: The default loss function can be replaced with FocalLoss (set fl_gamma=1.5) to replace the tuning method of "increasing cls weights". By enhancing the learning of hard samples, the classification accuracy can also be improved.

[0139] Alternative warm-up strategy: The fixed number of warm-up rounds (warmup_epochs=5.0) can be replaced with an adaptive warm-up strategy (the warm-up duration is dynamically adjusted based on the change in loss value). The warm-up will automatically end when the fluctuation of the loss value is ≤3%, which can adapt to the training needs of different samples.

[0140] Alternative solutions for parameter tuning order: The order of tuning stages can be adjusted (e.g., optimize the loss function weights first, then optimize the data augmentation parameters), or "genetic algorithm" or "grid search" can be used to combine parameters for optimization, which can also find the optimal parameter configuration. The core logic is still "cooperative optimization".

[0141] Regularization alternative: While keeping weight_decay=0.0005, a Dropout layer (dropout=0.1) can be added to further reduce the risk of overfitting without affecting the overall recognition performance of the model.

[0142] The key technical points of this invention are as follows:

[0143] A phased, progressive parameter tuning method: Through a phased process of learning rate and warm-up strategy → data augmentation → loss function weights → combined fine-tuning, the model performance is gradually optimized, avoiding blind parameter adjustments and achieving a step-by-step improvement in recognition rate.

[0144] Multi-parameter collaborative optimization logic: In view of the parameter correlation of YOLOv7 model, a combination optimization strategy such as learning rate-warm-up rounds and data augmentation intensity-loss weights is designed to solve the overall performance imbalance problem caused by single parameter adjustment in existing technologies.

[0145] Contextualized data augmentation and adaptation technology: Based on the characteristics of specific scenario samples, it accurately adjusts enhancement parameters such as rotation, translation, scaling, and mosaic to balance generalization and overfitting risk and improve the model's ability to adapt to different scenarios.

[0146] Weight adjustment technique for improving classification accuracy: By increasing the classification loss weight (cls=0.5), the learning of subdivided category features is strengthened, which solves the problem of insufficient category recognition accuracy in existing technologies.

[0147] Closed-loop verification and configuration solidification technology: Establish a five-dimensional performance verification system to ensure that each step of optimization has clear effect support, and solidify the optimal configuration as a template to support reuse in multiple scenarios and reduce optimization costs.

[0148] A specific embodiment of the present invention is shown below:

[0149] (I) Setup of the experimental environment

[0150] Hardware environment: CPU is Intel Core i9-12900K, GPU is NVIDIA RTX 3090 (24G), and memory is 64GDDR5.

[0151] Software environment: Operating system is Ubuntu 20.04, deep learning framework is PyTorch 1.10.0, Python version is 3.8.10, and CUDA version is 11.3.

[0152] Dataset: The intelligent transportation vehicle detection dataset is used, which includes six types of targets: cars, trucks, SUVs, cranes, pump trucks, and pile drivers. The training set has 8,000 images and the test set has 2,000 images.

[0153] (II) Implementation Steps

[0154] 1. Core Parameter Analysis and Optimization

[0155] Objective defined: Use a Python script to read the hyp.scratch.p5.yaml file and parse out the default values ​​and functional descriptions of each core parameter.

[0156] Based on the needs of intelligent transportation vehicle detection scenarios, the optimization targets are set as follows: recognition rate ≥ 98%, training convergence rounds ≤ 210 (30% reduction from the original 300 rounds), false detection rate of subcategories ≤ 1%, and test set accuracy decrease ≤ 2%.

[0157] Phase 1: Co-optimization of learning rate and warm-up strategy:

[0158] In the model training code, change the warmup_epochs parameter to 5.0, while keeping lr0=0.01 and lrf=0.1 unchanged.

[0159] Start model training, record the loss value and accuracy every 10 training rounds, plot the training curve, and monitor the fluctuation range of the loss value and the upward trend of the accuracy.

[0160] After training, the fluctuation range of the loss value in the initial training period (first 20 rounds) was 4.2%, the number of convergence rounds was reduced from 300 rounds to 240 rounds, the convergence speed was improved by 20%, and the model recognition rate was improved from 87% to 90.2%, achieving the stage optimization goal.

[0161] 3. Phase Two: Collaborative Optimization of Data Augmentation Parameters

[0162] In the data augmentation module, modify the following parameters: degrees=5.0, translate=0.15, scale=0.3, mosaic=0.8, mixup=0.05. Perform data augmentation based on the adjusted parameters to generate an augmented training set. Continue training the model. After training, the statistical accuracy of the training set is 95.2%, the accuracy of the test set is 93.5%, the difference is 1.7% ≤ 3%, the target false negative rate decreases by 18%, and the model recognition rate improves to 93.7%, meeting the stage requirements.

[0163] 4. Phase Three: Loss Function Weight Tuning

[0164] In the loss function calculation code, the cls parameter was modified to 0.5, while keeping box=0.05 and obj=0.7 unchanged. The model was retrained. After training, the false detection rate of each category was analyzed using the confusion matrix. The false detection rate of each category was ≤1.2%, and the model recognition rate was improved to 96.5%, achieving the desired stage optimization effect.

[0165] 5. Phase Four: Fine-tuning of Combined Parameters and Determination of Optimal Configuration: Parameters such as hsv_h, hsv_s, and weight_decay are fine-tuned within a range of ±10%. For example, hsv_h is set to 0.0135, 0.015, and 0.0165; hsv_s to 0.54, 0.6, and 0.66; and weight_decay to 0.00045, 0.0005, and 0.00055. For each set of fine-tuned parameters, the model is trained and the recognition rate is recorded. Through parameter sensitivity analysis, parameter combinations with low sensitivity and high stability are selected: hsv_h = 0.015, hsv_s = 0.6, hsv_v = 0.4, and weight_decay = 0.0005. The combined effect of "degrees=5.0+cls=0.5+mosaic=0.8" was verified, and the model recognition rate reached 98.3%, which was determined to be the optimal configuration hyp.scratch.best.yaml.

[0166] 6. Optimization effect verification and configuration solidification:

[0167] The optimized model was validated across five dimensions: recognition rate, false negative rate, false positive rate, convergence speed, and generalization ability. The results are as follows: recognition rate 98.3%, false negative rate 0.7%, false positive rate 1.1%, convergence rounds 200, and accuracy difference between the training and test sets 2.1%, all meeting the optimization objectives. The `hyp.scratch.best.yaml` configuration file was solidified as a dedicated template for intelligent transportation vehicle detection scenarios, recording parameter tuning logs, including parameter adjustments at each stage, performance change data, and parameter coordination logic.

[0168] The beneficial effects of the present invention are as follows, compared with the prior art:

[0169] A significant leap in recognition rate: Through a phased collaborative optimization strategy, the model recognition rate has increased from 87% to 98.3% under the same training samples, with the false negative rate dropping to below 0.8% and the false positive rate dropping to below 1.2%, completely solving the core pain point of insufficient recognition accuracy in existing technologies.

[0170] Significantly optimized training stability and convergence speed: By extending the warm-up rounds and coordinating the learning rate parameter, the fluctuation range of the loss value in the early stage of training was reduced from 12% to 5%, the number of convergence rounds was reduced from 300 rounds to 200 rounds, training efficiency was improved by 30%, and the model was prevented from getting stuck in local optima.

[0171] Enhanced generalization and scene adaptability: By synergistically adjusting data augmentation parameters, overfitting and feature diversity are balanced, reducing the difference in accuracy between the training and test sets from 8% to 2.1%. The model maintains high recognition accuracy in different lighting (strong light, weak light) and viewing angle (front, side) scenarios.

[0172] Significantly improved subcategorization recognition capability: By increasing the classification loss weight, the false detection rate of vehicle subcategories (cars, trucks, SUVs, cranes, pump trucks, pile drivers) has been reduced from 8% to 1.2%, meeting the needs of accurate classification and detection, and its practicality far exceeds that of basic category recognition technology.

[0173] The optimization logic is highly reusable: it establishes a closed-loop optimization process of parsing, setting, optimizing, verifying, and solidifying, which supports rapid adaptation to other scenarios (such as small object detection and pedestrian detection). High performance can be achieved by simply fine-tuning the parameters based on this logic, reducing the cost of secondary development.

[0174] Optimal parameter synergy: Avoiding the blind adjustment of single parameters in existing technologies, the learning rate scheduling, data augmentation, and loss function weights are optimized through multi-parameter linkage to ensure optimal overall performance.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention without departing from the spirit and scope of the present invention. Any modifications or equivalent substitutions should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for adjusting and controlling multiple data points, characterized in that, include: Step 1: Analyze the core parameters of the default configuration file for the YOLOv7 model and determine the optimization objectives; Step 2: After the analysis and optimization objectives are determined, the learning rate and warm-up strategy are jointly optimized. Step 3: After co-tuning the learning rate and warm-up strategy, perform co-tuning of data augmentation parameters; Step 4: Adjust the weights of the loss function; Step 5: Fine-tuning of combined parameters and determination of optimal configuration.

2. The method for adjusting and controlling multiple data according to claim 1, characterized in that, Step 1 specifically includes: Step 1-1: Perform initial parameter parsing; Step 1-2: Optimize target setting.

3. The method for adjusting and controlling multiple data according to claim 2, characterized in that, Step 1-1 specifically includes: The core parameters in the default configuration file hyp.scratch.p5.yaml of the YOLOv7 model are functionally broken down; Steps 1-2 specifically include: For specific detection scenarios, core optimization goals are set, including: ① The recognition rate has been increased to over 98%; ② The number of training convergence rounds is reduced by 30%; ③ The false positive rate for subcategories has been reduced to below 1%; ④ Improved model generalization.

4. The method for adjusting and controlling multiple data according to claim 3, characterized in that, Step 2 specifically includes: Step 2-1: Perform extended warm-up rounds; Step 2-2: Keep the core learning rate parameter unchanged.

5. The method for adjusting and controlling multiple data according to claim 4, characterized in that, Step 2-1 specifically includes: The warmup_epochs were adjusted from 3.0 to 5.0 to extend the low learning rate adaptation phase; Step 2-2 specifically includes: Maintain lr0=0.01 and lrf=0.1 to ensure a reasonable pace of learning rate decline in the later stages of training; In step 2, the formula for the change in learning rate is as follows: ; in, For the first Learning rate of the round, For the total number of training rounds, For the warm-up rounds, The initial learning rate, This is the learning rate decay factor.

6. The method for adjusting and controlling multiple data according to claim 5, characterized in that, Step 3 specifically includes: Step 3-1: Enable moderate rotation enhancement; Step 3-2: Reduce the translation and scaling amplitude; Step 3-3: Reduce the probability of over-amplification.

7. The method for adjusting and controlling multiple data according to claim 6, characterized in that, Step 3-1 specifically includes: The degrees were adjusted from 0.0 to 5.0 to improve the YOLOv7 model's adaptability to different target poses. Step 3-2 specifically includes: Adjusted translate from 0.2 to 0.15 and scale from 0.9 to 0.3 to adapt to target detection in specific scenarios; Step 3-3 specifically includes: Adjust the value of mosaic from 1.0 to 0.8 and mixup from 0.15 to 0.

05.

8. The method for adjusting and controlling multiple data according to claim 7, characterized in that, In step 3, the formula for calculating the similarity of sample feature distributions after data augmentation is as follows: ; in, For feature distribution similarity, For the sample size, For feature dimension, Original sample The 3D eigenvalues For data augmentation samples The 1-dimensional eigenvalues.

9. The method for adjusting and controlling multiple data according to claim 8, characterized in that, Step 4 specifically includes: Step 4-1: Increase the classification loss weight: Adjust cls from 0.3 to 0.5; Step 4-2: Keep the bounding box and target loss weights unchanged: maintain box=0.05 and obj=0.7; In step 4, the total loss function formula is: ; in, This is the total loss value. For bounding box regression loss, For classifying losses, For target detection loss, , , These are the weights corresponding to the losses.

10. The method for adjusting and controlling multiple data according to claim 9, characterized in that, Step 5 specifically includes: Step 5-1, Sensitivity Analysis: Make minor adjustments to key parameters and analyze the impact of parameter changes on the recognition rate, i.e., screen parameter combinations with low sensitivity, which are also highly stable. Step 5-2, combined fine-tuning: maintain hsv_h=0.015, hsv_s=0.6, hsv_v=0.4; keep weight_decay=0.0005; Step 5-3, Determining the optimal configuration: The final configuration is hyp.scratch.best.yaml; In step 5, the formula for calculating parameter sensitivity is: ; in, For parameters Sensitivity For parameters The amount of change in recognition rate caused by the change. For parameters The change in quantity.