Image classification model training method, system and device based on dynamic weight adjustment

By dynamically adjusting the weights and learning rate of the image classification model and combining the image quality score and the proportion of key areas, the accuracy problem of the traditional AdaBoost method when facing image data with uneven quality is solved, and the accuracy and generalization ability of image classification are improved.

CN120278300BActive Publication Date: 2025-09-12CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510766024.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-12
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

When faced with image data of uneven quality, the traditional AdaBoost method focuses too much on low-quality data, resulting in overfitting of noisy data, which affects the model accuracy and generalization ability.

Method used

By calculating the image quality score, key area ratio and non-key area ratio of the image samples, the weight and learning rate of the image classification model are dynamically adjusted, and dynamically updated in combination with the confidence level to optimize the weight distribution of the image samples.

Benefits of technology

It improves the accuracy of image classification, reduces the negative impact of low-quality image samples, enhances the model's attention to high-quality image samples, and improves the model's accuracy and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278300B_ABST
    Figure CN120278300B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system, and device for training an image classification model based on dynamic weight adjustment. The method calculates the image quality score, critical area ratio, and non-critical area ratio of each image sample in an image sample training data set; initializes the weight of each image sample based on the image quality score and determines a first initial weight for each image sample; determines a second initial weight for each image sample based on the first initial weight and critical area ratio of each image sample; calculates the confidence of a weak classifier based on the first initial weight; and dynamically updates the weight of the image samples during the image classification model training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-critical area ratio, and dynamically adjusts the learning rate during the training process until the image classification model is trained. The present application can improve the accuracy of image classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image classification technology, and in particular to a method, system and device for training an image classification model based on dynamic weight adjustment. Background Art

[0002] Image data is widely used in various fields, such as medical image analysis, autonomous driving, and object recognition. The accuracy of image classification directly impacts the effectiveness of subsequent decision-making. However, this image data often has varying quality. For example, in autonomous driving, images captured by cameras may contain noise due to weather or lighting conditions. In medical imaging, image quality varies significantly between different devices. These quality variations pose significant challenges to image classification tasks.

[0003] To improve image classification accuracy, existing technologies use the AdaBoost method. However, traditional AdaBoost methods rely solely on the misclassification rate of samples to adjust weights, without considering differences in sample data quality. This results in AdaBoost methods often over-focusing on misclassified, low-quality data when faced with image data of varying quality. This causes low-quality data to be overweighted during training, potentially leading to overfitting of noisy data and affecting model performance. Image data varies in criticality, and simple error adjustment mechanisms can cause the model to focus on unimportant or redundant areas, impacting its accuracy and generalization capabilities.

[0004] In summary, the accuracy of the traditional AdaBoost method for image classification is relatively low. Summary of the Invention

[0005] This application aims to propose an image classification model training method, system and equipment based on dynamic weight adjustment, which can improve the accuracy of image classification.

[0006] In a first aspect, an embodiment of the present application provides an image classification model training method based on dynamic weight adjustment, the method comprising:

[0007] Obtain an image sample training data set, and obtain an image classification model including a weak classifier;

[0008] In the process of training the image classification model using the image sample training data set, calculating the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training data set;

[0009] Initializing the weight of each image sample according to the image quality score, and determining a first initial weight of each image sample;

[0010] Determining a second initial weight for each image sample according to the first initial weight of each image sample and the proportion of the key area;

[0011] Calculating the confidence of the weak classifier according to the first initial weight;

[0012] Based on the confidence, the second initial weight of each image sample, the image quality score and the proportion of the non-critical area, the weights of the image samples during the image classification model training process are dynamically updated, and the learning rate during the training process is dynamically adjusted until the image classification model is trained.

[0013] Compared with the prior art, the first aspect of the present application has the following beneficial effects:

[0014] The method obtains an image sample training dataset and an image classification model including a weak classifier; during the process of training the image classification model using the image sample training dataset, calculates the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training dataset; initializes the weight of each image sample based on the image quality score and determines a first initial weight for each image sample; determines a second initial weight for each image sample based on the first initial weight and the critical area ratio of each image sample; calculates the confidence of the weak classifier based on the first initial weight; and dynamically updates the weight of the image sample during the training of the image classification model based on the confidence, the second initial weight of each image sample, the image quality score, and the non-critical area ratio, and dynamically adjusts the learning rate during the training process until the image classification model is trained. In this way, since higher-quality image samples contain more effective information, by comprehensively considering the image quality score, the critical area ratio, and the non-critical area ratio in subsequent weight calculation, weight update, and dynamic adjustment of the learning rate, higher-quality image samples can be given more attention, reducing the negative impact of low-quality image samples, thereby improving the accuracy of image classification.

[0015] In some embodiments, in the process of training the image classification model using the image sample training dataset, calculating the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training dataset includes:

[0016] In the process of training the image classification model using the image sample training data set, calculating the image blur level, noise intensity and image feature integrity level of each image sample;

[0017] Taking a weighted average of the image blur degree, the noise intensity, and the image feature integrity degree to obtain an image quality score for each image sample in the image sample training data set;

[0018] The critical area ratio of each image sample in the image sample training data set is identified, and the non-critical area ratio of each image sample in the image sample training data set is calculated based on the critical area ratio.

[0019] In some implementations, initializing the weight of each image sample according to the image quality score to determine a first initial weight of each image sample includes:

[0020] ;

[0021] in, Indicates the The first initial weight of image samples, Represents the total number of image samples, Indicates the The image quality score of each image sample.

[0022] In some implementations, determining the second initial weight of each image sample based on the first initial weight of each image sample and the proportion of the key area includes:

[0023] ;

[0024] in, Indicates the The second initial weight of image samples, Indicates the The first initial weight of image samples, represents the hyperparameter used to control the weight of the key area, Indicates the The key area ratio of each image sample.

[0025] In some embodiments, calculating the confidence of the weak classifier according to the first initial weight includes:

[0026] Calculating a global quality mean according to the first initial weight;

[0027] Calculating the classification error rate of the weak classifier on the image samples in the image sample training data set;

[0028] The confidence of the weak classifier is calculated based on the global quality mean and the classification error rate.

[0029] In some embodiments, dynamically updating the weights of image samples during the image classification model training process based on the confidence level, the second initial weight of each image sample, the image quality score, and the proportion of non-critical areas includes:

[0030] ;

[0031] in, Indicates the The weight of the image samples in the training process of the image classification model, if ,but represents the second initial weight, Indicates the The weights of the image classification model during the training round, Indicates confidence, represents the indicator function, Indicates the The label data corresponding to the image samples, Represents the image sample training dataset The classifier output corresponding to the image sample is Indicates the The image quality score of image samples, represents the hyperparameter, Indicates the The proportion of non-critical areas in image samples, represents the attenuation factor, Represents the molecular part The calculated value.

[0032] In some embodiments, dynamically adjusting the learning rate during training includes:

[0033] ;

[0034] in, Indicates the The learning rate during the training round, represents the initial learning rate, represents the adjustment factor, Represents the global quality mean.

[0035] In a second aspect, an embodiment of the present application further provides an image classification model training system based on dynamic weight adjustment, the system comprising:

[0036] A data acquisition unit, configured to acquire an image sample training data set and an image classification model including a weak classifier;

[0037] a first data calculation unit, configured to calculate an image quality score, a critical area ratio, and a non-critical area ratio for each image sample in the image sample training dataset during a process of training the image classification model using the image sample training dataset;

[0038] a first weight determination unit, configured to initialize the weight of each image sample according to the image quality score, and determine a first initial weight of each image sample;

[0039] a second weight determining unit, configured to determine a second initial weight of each image sample according to the first initial weight of each image sample and the proportion of the key area;

[0040] a second data calculation unit, configured to calculate the confidence of the weak classifier according to the first initial weight;

[0041] A classification model training unit is used to dynamically update the weights of image samples during the image classification model training process based on the confidence level, the second initial weight of each image sample, the image quality score, and the proportion of non-critical areas, and dynamically adjust the learning rate during the training process until the image classification model is trained.

[0042] In a third aspect, an embodiment of the present application also provides an electronic device comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the above-mentioned image classification model training method based on dynamic weight adjustment.

[0043] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned image classification model training method based on dynamic weight adjustment.

[0044] It can be understood that the beneficial effects of the above-mentioned second to fourth aspects compared with the relevant technologies are the same as the beneficial effects of the above-mentioned first aspect compared with the relevant technologies. Please refer to the relevant description in the above-mentioned first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0046] Figure 1 This is a flowchart of an embodiment of the image classification model training method based on dynamic weight adjustment provided by the present application;

[0047] Figure 2 This is a schematic diagram of the overall process of the best embodiment of the image classification model training method based on dynamic weight adjustment provided by the present application;

[0048] Figure 3 This is a structural diagram of an embodiment of an image classification model training system based on dynamic weight adjustment provided by the present application;

[0049] Figure 4 It is a structural diagram of an embodiment of the electronic device provided by this application. DETAILED DESCRIPTION

[0050] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.

[0051] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0052] In the description of this application, it should be understood that descriptions involving orientation, such as the orientation or positional relationship indicated by up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.

[0053] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technical personnel in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.

[0054] To improve image classification accuracy, existing technologies use the AdaBoost method. However, traditional AdaBoost methods rely solely on the misclassification rate of samples to adjust weights, without considering differences in sample data quality. This results in AdaBoost methods often over-focusing on misclassified, low-quality data when faced with image data of varying quality. This causes low-quality data to be overweighted during training, potentially leading to overfitting of noisy data and affecting model performance. Image data varies in criticality, and simple error adjustment mechanisms can cause the model to focus on unimportant or redundant areas, impacting its accuracy and generalization capabilities.

[0055] In order to solve the problem of low accuracy of image classification in the above-mentioned traditional AdaBoost method, the present application proposes an image classification model training method, system and device based on dynamic weight adjustment.

[0056] Reference Figure 1 , is a flow chart of the image classification model training method based on dynamic weight adjustment provided by the embodiment of the present application. The image classification model training method based on dynamic weight adjustment is applied to an electronic device, which may be a server or a mobile terminal. Figure 1 As shown, the image classification model training method based on dynamic weight adjustment may include the following steps:

[0057] Step S100: obtaining an image sample training data set, and obtaining an image classification model including a weak classifier;

[0058] Step S200: in the process of training the image classification model using the image sample training data set, calculating the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training data set;

[0059] Step S300: Initialize the weight of each image sample according to the image quality score, and determine a first initial weight of each image sample;

[0060] Step S400: determining a second initial weight for each image sample based on the first initial weight and the key area ratio of each image sample;

[0061] Step S500: Calculate the confidence of the weak classifier according to the first initial weight;

[0062] Step S600: Based on the confidence, the second initial weight of each image sample, the image quality score, and the proportion of non-critical areas, dynamically update the weight of the image samples during the image classification model training process, and dynamically adjust the learning rate during the training process until the image classification model is trained.

[0063] In this embodiment, an image sample training data set is obtained, and an image classification model including a weak classifier is obtained; in the process of training the image classification model using the image sample training data set, the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training data set are calculated; based on the image quality score, the weight of each image sample is initialized to determine the first initial weight of each image sample; based on the first initial weight of each image sample and the critical area ratio, the second initial weight of each image sample is determined; based on the first initial weight, the confidence of the weak classifier is calculated; based on the confidence, the second initial weight of each image sample, the image quality score, and the non-critical area ratio, the weight of the image sample in the image classification model training process is dynamically updated, and the learning rate in the training process is dynamically adjusted until the image classification model is trained. In this way, since higher-quality image samples contain more effective information, by comprehensively considering the image quality score, the critical area ratio, and the non-critical area ratio in the subsequent weight calculation, weight update, and dynamic adjustment of the learning rate, higher-quality image samples can be given more attention, the negative impact of low-quality image samples can be reduced, and the accuracy of image classification can be improved.

[0064] The image classification model including weak classifiers may be an image classification model including one or more weak classifiers known to those skilled in the art. For example, the model in this embodiment may be an AdaBoost model including multiple weak classifiers.

[0065] The above calculation of the image quality score, critical area ratio and non-critical area ratio of each image sample in the image sample training data set can be achieved by evaluating the image quality score of each image sample in the image sample training data set through existing technologies (such as noise standard deviation), or by identifying the critical area ratio of each image sample through target detection technology. The non-critical area ratio of each image sample can be calculated based on the obtained critical area ratio.

[0066] In some embodiments, in the process of training an image classification model using an image sample training dataset, calculating the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training dataset includes:

[0067] In the process of training the image classification model using the image sample training data set, the image blur degree, noise intensity and image feature integrity degree of each image sample are calculated;

[0068] The image blur degree, noise intensity and image feature integrity are weighted averaged to obtain the image quality score of each image sample in the image sample training dataset;

[0069] Identify the critical area ratio of each image sample in the image sample training data set, and calculate the non-critical area ratio of each image sample in the image sample training data set based on the critical area ratio.

[0070] In this embodiment, the image blur, noise intensity, and image feature integrity of each image sample are calculated during the training of an image classification model using an image sample training dataset. The image blur, noise intensity, and image feature integrity are weighted averaged to obtain an image quality score for each image sample in the image sample training dataset. The critical area ratio of each image sample in the image sample training dataset is identified, and based on the critical area ratio, the non-critical area ratio of each image sample in the image sample training dataset is calculated. In this way, by comprehensively considering the image blur, noise intensity, and image feature integrity of each image sample, and calculating the image quality score for each image sample, a more accurate image quality score can be obtained, laying a good data foundation for the subsequent dynamic adjustment of weights.

[0071] In some implementations, initializing the weight of each image sample based on the image quality score to determine a first initial weight for each image sample includes:

[0072] ;

[0073] in, Indicates the The first initial weight of image samples, Represents the total number of image samples, Indicates the The image quality score of each image sample.

[0074] In this embodiment, the weight of each image sample is initialized according to the image quality score, so that the weight of high-quality image samples is relatively large, so that the image classification model pays more attention to high-quality image samples in the early stage of training, thereby improving the classification accuracy of the image classification model.

[0075] In some embodiments, determining the second initial weight of each image sample based on the first initial weight and the key area ratio of each image sample includes:

[0076] ;

[0077] in, Indicates the The second initial weight of image samples, Indicates the The first initial weight of image samples, represents the hyperparameter used to control the weight of the key area, Indicates the The key area ratio of each image sample.

[0078] In this embodiment, since different areas of the image may have different importance, determining the second initial weight of each image sample based on the first initial weight and the proportion of the key area of ​​each image sample can enhance the image classification model's learning of the key areas, thereby improving the classification accuracy of the image classification model.

[0079] In some embodiments, calculating the confidence of the weak classifier according to the first initial weight includes:

[0080] Calculate the global quality mean according to the first initial weight;

[0081] Calculate the classification error rate of the weak classifier on the image samples in the image sample training dataset;

[0082] The confidence of the weak classifier is calculated based on the global quality mean and classification error rate.

[0083] In this embodiment, a global quality mean is calculated based on the first initial weight; the classification error rate of the weak classifier on the image samples in the image sample training dataset is calculated; and the confidence of the weak classifier is calculated based on the global quality mean and the classification error rate. By calculating the confidence of the weak classifier based on the global quality mean and the classification error rate, the contribution of the weak classifier in the AdaBoost model can be better measured.

[0084] In some embodiments, dynamically updating the weights of image samples during image classification model training based on the confidence level, the second initial weight of each image sample, the image quality score, and the proportion of non-critical areas includes:

[0085] ;

[0086] in, Indicates the The weight of the image samples in the training process of the image classification model, if ,but represents the second initial weight, Indicates the The weights of the image classification model during the round of training, Indicates confidence, represents the indicator function, Indicates the The label data corresponding to the image samples, Represents the image sample training dataset The classifier output corresponding to the image sample is Indicates the The image quality score of image samples, represents the hyperparameter, Indicates the The proportion of non-critical areas in image samples, represents the attenuation factor, Represents the molecular part The calculated value.

[0087] In this embodiment, by comprehensively considering the confidence, the second initial weight of each image sample, the image quality score and the proportion of non-critical areas, the weight of the image classification model during the training process is dynamically updated, which can pay more attention to higher quality image samples and reduce the negative impact of low-quality image samples, thereby improving the accuracy of image classification.

[0088] In some embodiments, dynamically adjusting the learning rate during training includes:

[0089] ;

[0090] in, Indicates the The learning rate during the training round, represents the initial learning rate, represents the adjustment factor, Represents the global quality mean.

[0091] In this embodiment, since image samples with higher quality usually contain more effective information, by considering the global quality mean to calculate the learning rate, it is possible to pay more attention to image samples with higher quality, slow down the learning pace of image samples with lower quality, and avoid overfitting noisy data.

[0092] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:

[0093] Image data is widely used in various fields, such as medical image analysis, autonomous driving, and object recognition. The accuracy of image classification directly impacts the effectiveness of subsequent decision-making. However, this image data often has varying quality. For example, in autonomous driving, images captured by cameras may contain noise due to weather or lighting conditions. In medical imaging, image quality varies significantly between different devices. These quality variations pose significant challenges to image classification tasks.

[0094] AdaBoost (Adaptive Boosting) is a powerful ensemble learning method that improves classification accuracy by combining multiple weak classifiers into a single strong classifier. The AdaBoost model dynamically adjusts the weights of samples to focus on misclassified samples, thereby improving classifier performance.

[0095] However, the traditional AdaBoost method relies solely on the misclassification rate of samples to adjust weights, without considering differences in sample data quality. This means that when faced with image data of varying quality, AdaBoost often overemphasizes misclassified, low-quality data, causing low-quality data to occupy an excessively high weight during training. This can lead to overfitting of noisy data and affect model performance. Image data varies in criticality, and a simple error adjustment mechanism can cause the model to focus on unimportant or redundant areas, affecting the model's accuracy and generalization capabilities. These issues prevent the AdaBoost model from fully realizing its advantages when processing image data with large quality variations. Therefore, a new method is needed to take image data quality into account and dynamically adjust the weights of image samples to improve the performance of the AdaBoost algorithm.

[0096] To effectively address the shortcomings of the AdaBoost model when processing image data, this embodiment proposes a method for dynamically adjusting AdaBoost weights based on data quality. The core of this embodiment's method is to dynamically adjust weights based on sample quality and error, reducing the negative impact of low-quality sample data on model performance.

[0097] Specifically, the method of this embodiment adopts a dual-driven adjustment mechanism of quality and error. The method of this embodiment introduces data quality assessment, which affects the initial weight of each image sample by scoring its quality. At the same time, the weight of misclassified image samples will be dynamically updated according to the classification error. The combination of quality and error makes high-quality image samples occupy more weight in the training process, thereby guiding the model to learn valuable features faster. Figure 2 The method of this embodiment specifically includes the following contents:

[0098] For image classification problems, such as traffic sign recognition in autonomous driving, the image samples may contain different traffic sign images. The quality of each image sample may vary, and some images may have poor lighting or blur that affects recognition performance.

[0099] Sample data: This embodiment has a set of image samples , each sample is a picture representing different traffic signs. These image samples may be taken by different sensors or under different conditions, so their quality will vary.

[0100] Label: Each image sample There is a corresponding label , where the label represents the category of the image (e.g., “stop sign,” “speed limit sign,” etc.).

[0101] Weak classifiers: Use weak classifiers to perform preliminary classification of image data. In this embodiment, the weak classifier can be a simple decision tree, which can roughly classify the image data. A decision tree can make preliminary predictions based on the image's color, shape, or edge information. However, these weak classifiers are generally imperfect and only provide slightly better accuracy than random guessing.

[0102] Input: Image data , label data , initial learning rate and weak classifiers (i.e. weak classifiers of the round).

[0103] (1) Data quality assessment.

[0104] Each image sample Each image has different qualities, which directly affects the classification results. The image blur is calculated using edge detection technology, the noise standard deviation is used to evaluate the noise intensity in the image, and the image feature integrity is calculated using the deep learning-based segmentation algorithm U-Net. It is the weighted average result of three dimensions: image blur, noise intensity and image feature integrity.

[0105] Identify each image sample through object detection technology The proportion of key areas (such as traffic sign areas) is recorded as , then the proportion of non-critical areas of the sample is recorded as .

[0106] (1);

[0107] It should be noted that the edge detection technology, noise standard deviation, deep learning-based segmentation algorithm U-Net, and target detection technology of this embodiment all adopt existing technologies well known to those skilled in the art and are not described in detail in this embodiment.

[0108] (2) Initialize sample weights.

[0109] Unlike the equal initial weights of samples in the AdaBoost algorithm, in this embodiment, the weight of each image sample is initialized based on its quality score. High-quality image samples have larger weights, while poor-quality image samples have smaller weights. This allows the image classification model to focus more on high-quality image samples in the early stages of training. The formula for initializing the weight (i.e., the first initial weight) is as follows:

[0110] (2);

[0111] in, Indicates the The first initial weight of the image samples ranges from [0-1], Represents the total number of image samples, Indicates the The image quality score of image samples, Indicates taking the minimum value, Indicates taking the maximum value.

[0112] (3) Regional importance weighting.

[0113] In image classification tasks, different regions of an image may have different importance. For example, in a traffic sign recognition task, the traffic sign itself is more important than the background. This embodiment strengthens the learning of key regions by weighting the key regions in the image. The formula is as follows:

[0114] (3);

[0115] in, Indicates the Image samples The initial key area weight (i.e., the second initial weight), It represents the hyperparameter used to control the weight of key regions, and takes the value [0.5-1] to highlight the importance of the region. Indicates the The key area ratio of each image sample.

[0116] (4) Dynamic weight iterative update.

[0117] Each image sample is classified using a weak classifier, and the weight of each sample is updated based on the classification error and data quality. If a sample is misclassified, its weight is increased, giving it more attention in the next round of training. In this improved method, weight updates not only rely on misclassification but also take into account sample quality. The weight increase of low-quality samples is suppressed, thereby reducing their negative impact on the model.

[0118] The dynamic update weight formula is as follows:

[0119] (4);

[0120] in, Indicates the The weight of the image samples in the training process of the image classification model, if ,but Represents the second initial weight. Indicates the The weights of the image classification model during the round of training, Indicates confidence, Represents the indicator function, which takes the value of 1 when the weak classifier misclassifies, and 0 otherwise. Represents the molecular part The calculated value, represents the exponential function, Used to control the value of the entire weight interval. is the first The proportion of non-critical areas in image samples, represents the attenuation factor, The formula is:

[0121] (5);

[0122] in, It is The confidence of the weak classifier is used to measure the contribution of the weak classifier in the AdaBoost model. Indicates the total number of iterations. The calculation formula is:

[0123] (6);

[0124] in, is the global quality mean: , represents the hyperparameter that balances quality and error. It is The error rate of the weak classifier represents the classification error rate of the weak classifier on the training samples. Represents the logarithmic function. The calculation formula is:

[0125] (7);

[0126] (5) Dynamic learning rate adjustment.

[0127] During the training process, high-quality samples usually contain more effective information. Therefore, this embodiment hopes to pay more attention to high-quality samples and accelerate their learning. On the contrary, for low-quality samples, their learning pace should be slowed down to avoid overfitting noisy data. Dynamic learning rate formula:

[0128] (8);

[0129] in, It is The learning rate of the round, is the initial learning rate. is the global quality mean. is a tuning factor that controls the sensitivity of the learning rate to changes in quality.

[0130] (6) Final output of the image classification model.

[0131] At the end of training, the weighted outputs of all weak classifiers will be used to make the final prediction. The output of each weak classifier According to its confidence Perform weighted summation and finally pass the symbol function Get the classification result. The final classifier output formula is:

[0132] (9);

[0133] in, is the prediction result of the final image classification model, It is The confidence of the weak classifier.

[0134] By combining data quality assessment, regional weighting, dynamic weight update, and dynamic learning rate adjustment, the improved AdaBoost method of this embodiment can optimize the training process of the image classification model when faced with large differences in image quality, reduce the negative impact of low-quality data, and accelerate the learning of high-quality image samples.

[0135] Compared with the prior art, the method of this embodiment has the following advantages:

[0136] (1) Data quality assessment: An image quality score is calculated for each image sample, and the image data quality is evaluated based on multiple criteria such as image clarity, noise level, and feature integrity. Image samples with high quality scores will receive higher initial weights, while low-quality image samples will receive lower weights, thereby avoiding the negative impact of low-quality image samples on the model training process.

[0137] (2) Region Importance: In image data processing, certain regions (such as object or lesion regions) are crucial to the classification results. This embodiment strengthens the learning of key regions by weighting different regions in the image.

[0138] (3) Dynamic weight update and dynamic learning rate: Combined with classification error evaluation and data quality evaluation, the weights of image samples are dynamically updated. For misclassified image samples, the weights are increased according to the error, while for low-quality image samples, their weights are suppressed. In this way, the image classification model is not dominated by low-quality data, while focusing on and optimizing the training effect of high-quality data. As training progresses, the learning rate and decay factor are dynamically adjusted to accelerate the convergence of the image classification model on high-quality data while avoiding overfitting noise.

[0139] Reference Figure 3 The embodiment of the present application further provides an image classification model training system based on dynamic weight adjustment, the system comprising a data acquisition unit 100, a first data calculation unit 200, a first weight determination unit 300, a second weight determination unit 400, a second data calculation unit 500, and a classification model training unit 600, wherein:

[0140] The data acquisition unit 100 is used to acquire an image sample training data set and an image classification model including a weak classifier;

[0141] The first data calculation unit 200 is used to calculate the image quality score, the key area ratio and the non-key area ratio of each image sample in the image sample training dataset during the process of training the image classification model using the image sample training dataset;

[0142] A first weight determination unit 300 is configured to initialize the weight of each image sample according to the image quality score and determine a first initial weight of each image sample;

[0143] A second weight determination unit 400 is configured to determine a second initial weight for each image sample based on the first initial weight and the key area ratio of each image sample;

[0144] A second data calculation unit 500 is used to calculate the confidence of the weak classifier according to the first initial weight;

[0145] The classification model training unit 600 is used to dynamically update the weights of image samples during the image classification model training process based on the confidence level, the second initial weight of each image sample, the image quality score, and the proportion of non-critical areas, and dynamically adjust the learning rate during the training process until the image classification model is trained.

[0146] It should be noted that since the image classification model training system based on dynamic weight adjustment in this embodiment and the above-mentioned image classification model training method based on dynamic weight adjustment are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to this system embodiment and will not be described in detail here.

[0147] Reference Figure 4 , an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0148] at least one memory;

[0149] at least one processor;

[0150] at least one program;

[0151] The program is stored in the memory, and the processor executes at least one program to implement the above-mentioned image classification model training method based on dynamic weight adjustment implemented in the present disclosure.

[0152] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

[0153] The electronic device according to the embodiment of the present application is described in detail below.

[0154] The processor 1600 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.

[0155] Memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). Memory 1700 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in memory 1700 and is called by processor 1600 to execute the image classification model training method based on dynamic weight adjustment in the embodiments of this disclosure.

[0156] Input / output interface 1800, used for information input and output;

[0157] Communication interface 1900, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0158] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0159] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0160] An embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned image classification model training method based on dynamic weight adjustment.

[0161] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0162] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0163] Those skilled in the art will understand that the technical solutions shown in the drawings do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than shown in the drawings, or a combination of certain steps, or different steps.

[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0165] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0166] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0167] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0168] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0169] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0170] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the purpose of the present application.

[0172] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the purpose of the present application.

Claims

1. A method for training an image classification model based on dynamic weight adjustment, characterized in that: The method comprises: Obtain an image sample training data set, and obtain an image classification model including a weak classifier; In the process of training the image classification model using the image sample training data set, calculating the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training data set; Initializing the weight of each image sample according to the image quality score, and determining a first initial weight of each image sample; Determining a second initial weight for each image sample according to the first initial weight of each image sample and the proportion of the key area; Calculating the confidence of the weak classifier according to the first initial weight; Dynamically updating the weights of image samples during the image classification model training process based on the confidence level, the second initial weight of each image sample, the image quality score, and the non-critical area ratio, and dynamically adjusting the learning rate during the training process until the image classification model is trained, including: ; in, Indicates the The weight of the image samples in the training process of the image classification model, if ,but represents the second initial weight, Indicates the The weights of the image classification model during the training round Indicates confidence, represents the indicator function, Indicates the The label data corresponding to the image samples, Represents the image sample training dataset The classifier output corresponding to the image sample is Indicates the The image quality score of image samples, represents the hyperparameter, Indicates the The proportion of non-critical areas in image samples, represents the attenuation factor, Represents the molecular part The calculated value.

2. The image classification model training method based on dynamic weight adjustment according to claim 1, characterized in that: In the process of training the image classification model using the image sample training dataset, calculating the image quality score, the critical area ratio, and the non-critical area ratio of each image sample in the image sample training dataset includes: In the process of training the image classification model using the image sample training data set, calculating the image blur level, noise intensity and image feature integrity level of each image sample; Taking a weighted average of the image blur degree, the noise intensity, and the image feature integrity degree to obtain an image quality score for each image sample in the image sample training data set; The critical area ratio of each image sample in the image sample training data set is identified, and the non-critical area ratio of each image sample in the image sample training data set is calculated based on the critical area ratio.

3. The image classification model training method based on dynamic weight adjustment according to claim 1, characterized in that: Initializing the weight of each image sample according to the image quality score to determine a first initial weight of each image sample includes: ; in, Indicates the The first initial weight of image samples, Represents the total number of image samples, Indicates the The image quality score of each image sample.

4. The image classification model training method based on dynamic weight adjustment according to claim 1, characterized in that: The determining, according to the first initial weight of each image sample and the proportion of the key area, of the second initial weight of each image sample includes: ; in, Indicates the The second initial weight of image samples, Indicates the The first initial weight of image samples, represents the hyperparameter used to control the weight of the key area, Indicates the The key area ratio of each image sample.

5. The image classification model training method based on dynamic weight adjustment according to claim 1, characterized in that: Calculating the confidence of the weak classifier according to the first initial weight includes: Calculating a global quality mean according to the first initial weight; Calculating the classification error rate of the weak classifier on the image samples in the image sample training data set; The confidence of the weak classifier is calculated based on the global quality mean and the classification error rate.

6. The image classification model training method based on dynamic weight adjustment according to claim 1, characterized in that: The dynamically adjusting the learning rate during training includes: ; in, Indicates the The learning rate during the training round, represents the initial learning rate, represents the adjustment factor, represents the global quality mean.

7. An image classification model training system based on dynamic weight adjustment, characterized in that: The system comprises: A data acquisition unit, configured to acquire an image sample training data set and an image classification model including a weak classifier; a first data calculation unit, configured to calculate an image quality score, a critical area ratio, and a non-critical area ratio for each image sample in the image sample training dataset during a process of training the image classification model using the image sample training dataset; a first weight determination unit, configured to initialize the weight of each image sample according to the image quality score, and determine a first initial weight of each image sample; a second weight determining unit, configured to determine a second initial weight of each image sample according to the first initial weight of each image sample and the proportion of the key area; a second data calculation unit, configured to calculate the confidence of the weak classifier according to the first initial weight; A classification model training unit is configured to dynamically update the weights of image samples during the image classification model training process based on the confidence level, the second initial weight of each image sample, the image quality score, and the proportion of non-critical areas, and dynamically adjust the learning rate during the training process until the image classification model is trained, comprising: ; in, Indicates the The weight of the image samples in the training process of the image classification model, if ,but represents the second initial weight, Indicates the The weights of the image classification model during the training round Indicates confidence, represents the indicator function, Indicates the The label data corresponding to the image samples, Represents the image sample training dataset The classifier output corresponding to the image sample is Indicates the The image quality score of image samples, represents the hyperparameter, Indicates the The proportion of non-critical areas in image samples, represents the attenuation factor, Represents the molecular part The calculated value.

8. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the image classification model training method based on dynamic weight adjustment as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the image classification model training method based on dynamic weight adjustment as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Hyperspectral remote sensing image classification method based on Adaboost algorithm of transfer learning

    CN110378405A

  • Face image quality evaluation method and device, computer equipment and storage medium

    CN115546854A