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

By dynamically adjusting the weight and learning rate of the image classification model, combining image quality evaluation and regional importance, the accuracy of the AdaBoost method when facing uneven quality image data is solved, and the accuracy and generalization ability of image classification are improved.

CN120278300AActive Publication Date: 2025-07-08CENT SOUTH UNIV
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When facing uneven quality image data, the traditional AdaBoost method pays too much attention to misclassified low-quality data, resulting in overfitting noise data, affecting the accuracy and generalization ability of the model.

Method used

By calculating the image quality score, key area proportion and non-critical area proportion of image samples, dynamically adjust the weight and learning rate of the image classification model, and optimize the training process based on data quality evaluation and regional importance.

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 CN120278300A_ABST
    Figure CN120278300A_ABST
Patent Text Reader

Abstract

The invention discloses an image classification model training method, system and equipment based on dynamic weight adjustment. The method comprises the following steps: calculating an image quality score, a key region proportion and a non-key region proportion of each image sample in an image sample training data set; according to the image quality score, initializing the weight of each image sample, and determining the first initial weight of each image sample; determining a second initial weight of each image sample according to the first initial weight and the key area proportion of each image sample; calculating the confidence of the weak classifier according to the first initial weight; and based on the confidence, the second initial weight of each image sample, the image quality score and the non-critical area proportion, dynamically updating the weight of the image sample in the training process of the image classification model, and dynamically adjusting the learning rate in the training process until the image classification model is trained. The accuracy of image classification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image classification, and particularly 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 affects the effectiveness of subsequent decisions. However, these image data usually have quality differences. For example, in autonomous driving, the images captured by the camera may have noise due to weather or light problems; while in medical images, the quality differences of the images captured by different devices are relatively large. These quality differences pose great challenges to the image classification task.

[0003] To improve the accuracy of image classification, the existing technology adopts the AdaBoost method. However, the traditional AdaBoost method only relies on the misclassification rate of samples to adjust the weights, and does not consider the quality differences of sample data. This makes the AdaBoost method tend to over-focus on the low-quality data with misclassifications when facing uneven-quality image data, resulting in the low-quality data occupying too high a weight in training, which may lead to overfitting of noise data and affect the performance of the model. In image data, the key importance of image regions is different, and a simple error adjustment mechanism may cause the model to focus on unimportant or redundant regions, affecting the accuracy and generalization ability of the model.

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

[0005] The present application aims to propose a method, system, and device for training an image classification model 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 a method for training an image classification model based on dynamic weight adjustment, the method including: Obtain an image sample training data set, and obtain an image classification model including weak classifiers; During the process of training the image classification model using the image sample training data set, calculate the image quality score, the proportion of key regions, and the proportion of non-key regions of each image sample in the image sample training data set; According to the image quality score, initialize the weight of each image sample to determine the first initial weight of each image sample; According to the first initial weight of each image sample and the proportion of key regions, determine the second initial weight of each image sample; Calculate the confidence of the weak classifier according to the first initial weight; Based on the confidence, the second initial weight of each image sample, the image quality score, and the non-critical region ratio, dynamically update the weight of the image sample during the training process of the image classification model, and dynamically adjust the learning rate during the training process until the image classification model is trained.

[0007] Compared with the prior art, the first aspect of the present application has the following beneficial effects: This method includes obtaining an image sample training data set and obtaining an image classification model including a weak classifier; during the process of training the image classification model using the image sample training data set, calculating the image quality score, the key region ratio, and the non-critical region 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 to determine the first initial weight of each image sample; determining the second initial weight of each image sample according to the first initial weight of each image sample and the key region ratio; calculating the confidence of the weak classifier according to the first initial weight; based on the confidence, the second initial weight of each image sample, the image quality score, and the non-critical region ratio, dynamically update the weight of the image sample during the training process of the image classification model, and dynamically adjust the learning rate during the training process until the image classification model is trained. In this way, since the image samples with higher quality contain more valid information, by comprehensively considering the image quality score, the key region ratio, and the non-critical region ratio for subsequent weight calculation, weight update, and dynamic adjustment of the learning rate, more attention can be given to the image samples with higher quality, reducing the negative impact of low-quality image samples, thereby improving the accuracy of image classification.

[0008] In some embodiments, during the process of training the image classification model using the image sample training data set, calculating the image quality score, the key region ratio, and the non-critical region ratio of each image sample in the image sample training data set includes: During the process of training the image classification model using the image sample training data set, calculate the image blur degree, the noise intensity, and the image feature integrity degree of each image sample; Perform weighted averaging on the image blur degree, the noise intensity, and the image feature integrity degree to obtain the image quality score of each image sample in the image sample training data set; Identify the key region ratio of each image sample in the image sample training data set, and calculate the non-critical region ratio of each image sample in the image sample training data set according to the key region ratio.

[0009] In some embodiments, initializing the weight of each image sample according to the image quality score to determine the first initial weight of each image sample includes: ; where represents the first initial weight of the -th image sample, represents the total number of image samples, represents the -th image sample's image quality score.

[0010] In some embodiments, determining the second initial weight of each image sample according to the first initial weight of each image sample and the key area ratio includes: ; where represents the second initial weight of the -th image sample, represents the first initial weight of the -th image sample, represents a hyperparameter for controlling the key area weight, represents the key area ratio of the -th image sample.

[0011] In some embodiments, calculating the confidence of the weak classifier according to the first initial weight includes: Calculating the 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 dataset; Calculating the confidence of the weak classifier based on the global quality mean and the classification error rate.

[0012] In some embodiments, dynamically updating the weight of the image sample during the training process of the image classification model based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key area ratio includes: ; where represents the weight of the image sample during the -th round of the image classification model training process. If , then represents the second initial weight, represents the weight of the image classification model during the -th round of training, represents the confidence, represents the indicator function, Indicates the label data corresponding to the th image sample, Indicates the classifier output result corresponding to the th image sample in the image sample training dataset, Indicates the th image sample's image quality score, Indicates a hyperparameter, Indicates the th image sample's non-critical region ratio, Indicates the decay factor, Indicates the value calculated for the numerator part of the calculation.

[0013] In some embodiments, the dynamic adjustment of the learning rate during the training process includes: ; wherein, Indicates the learning rate during the th round of training, Indicates the initial learning rate, Indicates the adjustment factor, Indicates the global quality mean.

[0014] In a second aspect, an embodiment of the present application further provides an image classification model training system based on dynamic weight adjustment, and the system includes: A data acquisition unit, configured to acquire an image sample training dataset and an image classification model including weak classifiers; A first data calculation unit, configured to calculate the image quality score, the key region ratio, and the non-critical region 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; A first weight determination unit, configured to initialize the weight of each image sample according to the image quality score and determine the first initial weight of each image sample; A second weight determination unit, configured to determine the second initial weight of each image sample according to the first initial weight of each image sample and the key region ratio; 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, configured to dynamically update the weight of the image sample during the training process of the image classification model and dynamically adjust the learning rate during the training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-critical region ratio until the image classification model is trained.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including at least one control processor and a memory communicatively connected to the at least one control processor; the memory stores instructions executable 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 a method for training an image classification model based on dynamic weight adjustment as described above.

[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a method for training an image classification model based on dynamic weight adjustment as described above.

[0017] It can be understood that the beneficial effects of the above second to fourth aspects compared with the related art are the same as those of the above first aspect compared with the related art. For the relevant descriptions, reference can be made to the relevant descriptions in the above first aspect, and details are not described herein again. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the accompanying drawings, where: Figure 1 is a schematic flowchart of an embodiment of a method for training an image classification model based on dynamic weight adjustment provided by the present application; Figure 2 is a schematic overall flowchart of the best embodiment of a method for training an image classification model based on dynamic weight adjustment provided by the present application; Figure 3 is a schematic structural diagram of an embodiment of a system for training an image classification model based on dynamic weight adjustment provided by the present application; Figure 4 is a schematic structural diagram of an embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for explaining the present application and should not be construed as limiting the present application.

[0020] In the description of the present application, if the first, second, etc. are described only for the purpose of distinguishing technical features, they should not be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence of the indicated technical features.

[0021] In the description of the present application, it should be understood that for the orientation description, such as the orientation or positional relationship indicated by up, down, etc., it is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present 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. Therefore, it should not be construed as a limitation to the present application.

[0022] In the description of the present application, it should be noted that unless otherwise clearly defined, words such as setting, installation, connection, etc. should be understood in a broad sense. Those skilled in the art can reasonably determine the specific meanings of the above words in the present application in combination with the specific content of the technical solution.

[0023] To improve the accuracy of image classification, the prior art adopts the AdaBoost method. However, the traditional AdaBoost method only relies on the misclassification rate of samples to adjust the weights and does not consider the quality differences of sample data. This makes the AdaBoost method tend to over-focus on the low-quality data with misclassification when facing uneven-quality image data, resulting in the low-quality data occupying too high weights in training, which may lead to overfitting of noise data and affect the performance of the model. In image data, the key characteristics of image regions are different, and a simple error adjustment mechanism may cause the model to focus on unimportant or redundant regions, affecting the accuracy and generalization ability of the model.

[0024] To solve the problem that the accuracy of the above traditional AdaBoost method for image classification is relatively low, the present application proposes an image classification model training method, system and device based on dynamic weight adjustment.

[0025] Referring to Figure 1 , it is a schematic flowchart of the image classification model training method based on dynamic weight adjustment provided by an embodiment of the present application. The image classification model training method based on dynamic weight adjustment is applied to an electronic device, and the electronic device can be a server or a mobile terminal, etc. As Figure 1 shown, the image classification model training method based on dynamic weight adjustment may include the following steps: Step S100: Obtain an image sample training data set and an image classification model including weak classifiers; Step S200: During the process of training the image classification model with the image sample training data set, calculate the image quality score, the proportion of key regions and the proportion of non-key regions of each image sample in the image sample training data set; Step S300: Initialize the weight of each image sample according to the image quality score and determine the first initial weight of each image sample; Step S400: Determine the second initial weight of each image sample according to the first initial weight and the key region ratio of each image sample; Step S500: Calculate the confidence of the weak classifier according to the first initial weight; Step S600: Dynamically update the weight of the image sample during the training of the image classification model and dynamically adjust the learning rate during the training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key region ratio until the image classification model is trained.

[0026] In this embodiment, by obtaining the image sample training data set and obtaining an image classification model including weak classifiers; during the process of training the image classification model with the image sample training data set, calculate the image quality score, the key region ratio, and the non-key region ratio of each image sample in the image sample training data set; initialize the weight of each image sample according to the image quality score to determine the first initial weight of each image sample; determine the second initial weight of each image sample according to the first initial weight and the key region ratio of each image sample; calculate the confidence of the weak classifier according to the first initial weight; dynamically update the weight of the image sample during the training of the image classification model and dynamically adjust the learning rate during the training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key region ratio until the image classification model is trained. In this way, since the image samples with higher quality contain more valid information, by comprehensively considering the image quality score, the key region ratio, and the non-key region ratio for subsequent weight calculation, weight update, and dynamic adjustment of the learning rate, more attention can be given to the image samples with higher quality, reducing the negative impact of low-quality image samples, thereby improving the accuracy of image classification.

[0027] The above-mentioned obtaining of the image classification model including weak classifiers can be an image classification model including one or more weak classifiers well-known to those skilled in the art. For example, the model in this embodiment can be an AdaBoost model including multiple weak classifiers.

[0028] The above-mentioned calculation of the image quality score, the key region ratio, and the non-key region ratio of each image sample in the image sample training data set can be to evaluate the image quality score of each image sample in the image sample training data set through existing technologies (such as the standard deviation of noise), can be to identify the key region ratio of each image sample through object detection technology, and the non-key region ratio of each image sample can be calculated from the obtained key region ratio.

[0029] In some embodiments, during the process of training an image classification model using an image sample training dataset, calculating the image quality score, the proportion of key regions, and the proportion of non-key regions for each image sample in the image sample training dataset includes: During the process of training an image classification model using an image sample training dataset, calculating the image blurriness, noise intensity, and image feature integrity degree of each image sample; Performing a weighted average on the image blurriness, noise intensity, and image feature integrity degree to obtain the image quality score for each image sample in the image sample training dataset; Identifying the proportion of key regions for each image sample in the image sample training dataset, and calculating the proportion of non-key regions for each image sample in the image sample training dataset based on the proportion of key regions.

[0030] In this embodiment, during the process of training an image classification model using an image sample training dataset, by calculating the image blurriness, noise intensity, and image feature integrity degree of each image sample; performing a weighted average on the image blurriness, noise intensity, and image feature integrity degree to obtain the image quality score for each image sample in the image sample training dataset; identifying the proportion of key regions for each image sample in the image sample training dataset, and calculating the proportion of non-key regions for each image sample in the image sample training dataset based on the proportion of key regions. In this way, by comprehensively considering the image blurriness, noise intensity, and image feature integrity degree 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 dynamically adjusting the weights in the later stage.

[0031] In some embodiments, initializing the weight of each image sample according to the image quality score to determine the first initial weight of each image sample includes: ; wherein, represents the first initial weight of the th image sample, represents the total number of image samples, represents the th image sample's image quality score.

[0032] In this embodiment, by initializing the weight of each image sample according to the image quality score, the weights of high-quality image samples are relatively large, enabling the image classification model to pay more attention to high-quality image samples in the initial stage of training, thereby improving the classification accuracy of the image classification model.

[0033] In some embodiments, determining the second initial weight of each image sample according to the first initial weight and the proportion of the key region of each image sample includes: ; Wherein, represents the second initial weight of the -th image sample, represents the first initial weight of the -th image sample, represents the hyperparameter for controlling the weight of the key region, represents the proportion of the key region of the -th image sample.

[0034] In this embodiment, since different regions of an image may have different importance, determining the second initial weight of each image sample according to the first initial weight and the proportion of the key region of each image sample can strengthen the learning of the key region by the image classification model, thereby improving the accuracy of classification of the image classification model.

[0035] In some embodiments, calculating the confidence of the weak classifier according to the first initial weight includes: Calculating the 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 dataset; Calculating the confidence of the weak classifier based on the global quality mean and the classification error rate.

[0036] In this embodiment, calculating the 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 dataset; calculating the confidence of the weak classifier based on the global quality mean and the classification error rate. In this way, by considering the global quality mean and the classification error rate and calculating the confidence of the weak classifier, the contribution of the weak classifier in the AdaBoost model can be better measured.

[0037] In some embodiments, dynamically updating 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 proportion of the non-key region includes: ; Wherein, represents the weight of the image sample during the -th round of training of the image classification model. If , then represents the second initial weight, represents the weight of the image classification model during the -th round of training, denotes the confidence level, denotes the indicator function, denotes the label data corresponding to the th image sample, denotes the output result of the classifier corresponding to the th image sample in the image sample training dataset, denotes the image quality score of the th image sample, denotes the hyperparameter, denotes the proportion of non-critical regions of the th image sample, denotes the decay factor, denotes the value calculated for the numerator part

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

[0039] In some embodiments, the learning rate during the training process is dynamically adjusted, including: ; wherein, denotes the learning rate during the th round of training process, denotes the initial learning rate, denotes the adjustment factor, denotes the global quality mean.

[0040] In this embodiment, since the image samples with higher quality usually contain more valid information, by considering the global quality mean to calculate the learning rate, more attention can be paid to the image samples with higher quality. For the image samples with lower quality, their learning pace is slowed down, and overfitting to noise data is avoided.

[0041] For the convenience of those skilled in the art to understand, the following provides a set of optimal embodiments: Image data is widely used in various fields, such as medical image analysis, autonomous driving, and object recognition. The accuracy of image classification directly affects the effectiveness of subsequent decisions. However, there are usually quality differences in these image data. For example, in autonomous driving, the images captured by the camera may have noise due to weather or light problems; while in medical imaging, the image quality differences between different devices are relatively large. These quality differences pose great challenges to the image classification task.

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

[0043] However, the traditional AdaBoost method only relies on the misclassification rate of samples to adjust the weights, without considering the quality differences of sample data. This means that when faced with image data of uneven quality, AdaBoost often pays too much attention to misclassified low-quality data, causing low-quality data to occupy too high a weight in training, which may lead to overfitting of noisy data and affect model performance. In image data, the criticality of image regions is different, and a simple error adjustment mechanism may cause the model to focus on unimportant or redundant regions, affecting the accuracy and generalization ability of the model. These problems prevent the AdaBoost model from exerting its due advantages when processing image data with large quality differences. Therefore, it is necessary to propose a new method that takes the quality of image data into consideration and dynamically adjusts the weights of image samples to improve the performance of the AdaBoost algorithm.

[0044] In order to effectively solve the shortcomings of the AdaBoost model when processing image data, this embodiment proposes a method for dynamically adjusting the weights of AdaBoost based on data quality. The core of the method in this embodiment is to dynamically adjust the weights based on the quality and error of the sample to reduce the negative impact of low-quality sample data on model performance.

[0045] 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 by scoring the quality of each image sample. At the same time, the weight of the misclassified image sample 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: For image classification problems, such as the traffic sign recognition task in autonomous driving, the image samples may contain different traffic sign images. The quality of each image sample may be different, and some images may have poor recognition performance due to lighting problems or blur.

[0046] Sample data: This example 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.

[0047] Label: Each image sample has a corresponding label , which represents the category of the image (such as "stop sign", "speed limit sign", etc.).

[0048] Weak classifier: The weak classifier is used to perform a preliminary classification on the image data. In the scenario of this embodiment, the weak classifier can be a simple decision tree, which can perform a rough classification on the image data. A decision tree can make a preliminary prediction based on the color, shape, or edge information of the image. However, these weak classifiers are usually not perfect and they can only provide an accuracy slightly higher than random guessing.

[0049] Input: Image data , label data , initial learning rate and the weak classifier (i.e., the weak classifier in the th round).

[0050] (1) Data quality assessment.

[0051] Each image sample has different quality, which directly affects the classification result. The edge detection technology is used to calculate the image blurriness, the noise standard deviation is used to evaluate the noise intensity in the image, and the deep learning-based segmentation algorithm U-Net is used to calculate the image feature integrity. Each image quality score is the weighted average result of the three dimensions of image blurriness, noise intensity, and image feature integrity.

[0052] The proportion of the key area (such as the traffic sign area) of each image sample is identified through the object detection technology and is denoted as , then the proportion of the non-key area of the sample is denoted as .

[0053] (1); It should be noted that the edge detection technology, noise standard deviation, deep learning-based segmentation algorithm U-Net, and object detection technology in this embodiment are all existing technologies well-known to those skilled in the art, and this embodiment does not make specific descriptions.

[0054] (2) Initialize the sample weights.

[0055] Different from the equal sample initial weights in the AdaBoost algorithm, in the method of this embodiment, the weights of each image sample are initialized according to the quality scores of the image samples. The weights of high-quality image samples are larger, and the weights of low-quality image samples are smaller, so that the image classification model can pay more attention to high-quality image samples in the initial stage of training. The formula for initializing the weights (i.e., the first initial weights) is as follows: (2); Wherein, represents the first initial weight of the -th image sample, and the value range is [0 - 1], represents the total number of image samples, represents the -th image sample's image quality score, represents taking the minimum value, represents taking the maximum value.

[0056] (3) Regional importance weighting.

[0057] In the image classification task, different regions of an image may have different importance. For example, in the traffic sign recognition task, the traffic sign itself is more important than the background. In this embodiment, the key regions in the image are weighted to strengthen the learning of the key regions, and the formula is as follows: (3); Wherein, represents the initial key region weight (i.e., the second initial weight) of the -th image sample, represents the hyperparameter used to control the key region weight, and the value range [0.5 - 1] is used to highlight the regional importance, represents the proportion of the key region of the -th image sample.

[0058] (4) Dynamic weight iterative update.

[0059] Each image sample is classified by using a weak classifier, and the weights of each sample are updated according to the classification error and data quality. If a certain sample is misclassified, its weight will increase, so that more attention will be given to this sample in the next round of training. In the improved method, the weight update not only depends on the misclassification situation, but also considers the quality of the sample. The increase in the weight of low-quality samples will be suppressed, thereby reducing its negative impact on the model.

[0060] The formula for dynamically updating the weights is as follows: (4); Wherein, Indicates the weight of the image sample during the training process of the round image classification model. If is the case, then Indicates the weight of the image classification model during the round of training, indicates the confidence level, indicates the numerator part The calculated value, indicates the exponential function, used to control the entire weight value within the interval. is the proportion of the non-critical area of the th image sample calculated by formula (1), indicates the decay factor, The formula is: (5); Among them, is the confidence level of the th round of weak classifier, which measures the contribution of the weak classifier in the AdaBoost model, indicates the total number of iterative cycles. The calculation formula is: (6); Among them, is the global quality mean: , indicates the hyperparameter that balances quality and error. is the th round of weak classifier error rate, which represents the classification error rate of the weak classifier on the training samples, indicates the logarithmic function. The calculation formula is: (7); (5) Dynamic learning rate adjustment.

[0061] During the training process, samples with higher quality usually contain more valid information. Therefore, this embodiment hopes to give more attention to samples with higher quality and accelerate their learning. On the contrary, for samples with lower quality, their learning pace should be slowed down to avoid overfitting noisy data. The dynamic learning rate formula: (8); Among them, is the learning rate of the th round, is the initial learning rate. is the global quality mean. is an adjustment factor used to control the sensitivity of the learning rate to changes in quality.

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

[0063] At the end of training, the weighted output results of all weak classifiers will be used for the final prediction. The output of each weak classifier will be weighted and summed according to its confidence and finally, the classification result is obtained through the sign function The final classifier output formula: (9); where is the prediction result of the final image classification model, is the round of the confidence of the weak classifier.

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

[0065] Compared with the prior art, the method of this embodiment has the following advantages: (1) Data quality assessment: Calculate the image quality score for each image sample, and evaluate the image data quality according to multi-dimensional criteria such as image clarity, noise level, and feature integrity. Image samples with high quality scores will obtain higher initial weights, while low-quality image samples will get lower weights, thus avoiding the negative impact of low-quality image samples on the model training process.

[0066] (2) Region importance: In image data processing, certain regions (such as object or lesion regions) are crucial for the classification result. In this embodiment, different regions in the image are weighted to strengthen the learning of key regions.

[0067] (3) Dynamic weight update and dynamic learning rate: Combine classification error assessment and data quality assessment to dynamically update the weights of image samples. For misclassified image samples, the weights increase according to the error, while for low-quality image samples, their weights will be suppressed. In this way, it is ensured that the image classification model will not be dominated by low-quality data, and at the same time, it can focus on and optimize the training effect of high-quality data. As the training progresses, dynamically adjust the learning rate and decay factor to accelerate the convergence of the image classification model on high-quality data while avoiding overfitting to noise.

[0068] Refer to Figure 3, an embodiment of the present application further provides an image classification model training system based on dynamic weight adjustment. The system includes 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, where: The data acquisition unit 100 is configured to acquire an image sample training data set and an image classification model including weak classifiers. The first data calculation unit 200 is configured 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 data set during the process of training the image classification model using the image sample training data set. The first weight determination unit 300 is configured to initialize the weight of each image sample according to the image quality score and determine the first initial weight of each image sample. The second weight determination unit 400 is configured to determine the second initial weight of each image sample according to the first initial weight and the key area ratio of each image sample. The second data calculation unit 500 is configured to calculate the confidence of the weak classifier according to the first initial weight. The classification model training unit 600 is configured to dynamically update the weight of the image sample during the training process of the image classification model and dynamically adjust the learning rate during the training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key area ratio until the image classification model is trained.

[0069] 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 content in the method embodiment is equally applicable to the system embodiment of the present application and will not be elaborated here.

[0070] Refer to Figure 4 , an embodiment of the present application further provides an electronic device, which includes: At least one memory; At least one processor; At least one program; 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 of the present disclosure.

[0071] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), an in-vehicle computer, etc.

[0072] The electronic device according to the embodiments of the present application will be introduced in detail below.

[0073] The processor 1600 can be implemented by using a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present disclosure; The 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), etc. The memory 1700 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1700, and the processor 1600 is called to execute the method for training an image classification model based on dynamic weight adjustment according to the embodiments of the present disclosure.

[0074] The input / output interface 1800 is used to realize information input and output; The communication interface 1900 is used to realize the communication interaction between this device and other devices, and can communicate through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); The bus 2000 transmits information between various components of the device (such as the processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900); Among them, the processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900 are communicatively connected to each other inside the device through the bus 2000.

[0075] The embodiments of the present disclosure also provide 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 make a computer execute the above-mentioned method for training an image classification model based on dynamic weight adjustment.

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

[0077] The embodiments described in the embodiments of the present disclosure are for more clearly illustrating 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 know 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 equally applicable to similar technical problems.

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

[0079] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0080] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0081] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of this application and the above drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0082] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one (item) 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.

[0083] In 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 illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0084] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0085] In addition, the functional units in each embodiment of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0086] When 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 this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The foregoing storage medium includes: various media that can store programs such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs. The embodiments of this application have been described in detail above with reference to the accompanying drawings, but this application is not limited to the above embodiments. Within the knowledge scope of those of ordinary skill in the art to which this application pertains, various changes can also be made without departing from the purpose of this application.

[0087] The embodiments of this application have been described in detail above with reference to the accompanying drawings, but this application is not limited to the above embodiments. Within the knowledge scope of those of ordinary skill in the art to which this application pertains, various changes can also be made without departing from the purpose of this application.

Claims

1. A method for training an image classification model based on dynamic weight adjustment, characterized in that The method includes: obtaining an image sample training data set, and obtaining an image classification model including weak classifiers; during the process of training the image classification model using the image sample training data set, calculating the image quality score, the key area ratio, and the non-key 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 to determine the first initial weight of each image sample; determining the second initial weight of each image sample according to the first initial weight of each image sample and the key area ratio; calculating the confidence of the weak classifier according to the first initial weight; dynamically updating the weights of the image samples during the training process of the image classification model and dynamically adjusting the learning rate during the training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key area ratio until the image classification model is trained.

2. The method for training an image classification model based on dynamic weight adjustment according to claim 1, wherein The calculating the image quality score, the key area ratio, and the non-key area ratio of each image sample in the image sample training data set during the process of training the image classification model using the image sample training data set includes: during the process of training the image classification model using the image sample training data set, calculating the image blur degree, the noise intensity, and the image feature integrity degree of each image sample; performing weighted averaging on the image blur degree, the noise intensity, and the image feature integrity degree to obtain the image quality score of each image sample in the image sample training data set; identifying the key area ratio of each image sample in the image sample training data set and calculating the non-key area ratio of each image sample in the image sample training data set according to the key area ratio.

3. The method for training an image classification model based on dynamic weight adjustment according to claim 1, characterized in that The initializing the weight of each image sample according to the image quality score to determine the first initial weight of each image sample includes: ; Among them, represents the first initial weight of the th image sample, represents the total number of image samples, represents the th image quality score of the image sample.

4. The method for training an image classification model based on dynamic weight adjustment according to claim 1, wherein, The determining the second initial weight of each image sample according to the first initial weight of each image sample and the key area ratio includes: ; Among them, represents the second initial weight of the th image sample, represents the first initial weight of the th image sample, represents the hyperparameter for controlling the weight of the key region, represents the proportion of the key region of the th image sample.

5. The method for training an image classification model based on dynamic weight adjustment according to claim 1, wherein The calculating the confidence of the weak classifier according to the first initial weight includes: calculating the 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; calculating the confidence of the weak classifier based on the global quality mean and the classification error rate.

6. The method for training an image classification model based on dynamic weight adjustment according to claim 5, wherein The dynamically updating the weights of the image samples during the training process of the image classification model based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key area ratio includes: ; Among them, represents the weight of the image sample during the round of training of the image classification model. If , then represents the second initial weight, represents the weight of the image classification model during the round of training, represents the confidence level, represents the indicator function, represents the label data corresponding to the th image sample, represents the classifier output result corresponding to the th image sample in the image sample training dataset, represents the image quality score of the th image sample, represents the hyperparameter, represents the proportion of the non-critical region of the th image sample, represents the attenuation factor, represents the value calculated for the numerator part of the calculation.

7. The method for training an image classification model based on dynamic weight adjustment according to claim 1, wherein The dynamically adjusting the learning rate during the training process includes: ; in, Indicates The learning rate during the training round, represents the initial learning rate, represents the adjustment factor, Represents the global quality mean.

8. An image classification model training system based on dynamic weight adjustment, characterized in that, The system includes: a data acquisition unit for obtaining an image sample training data set and obtaining an image classification model including weak classifiers; A first data calculation unit, configured to calculate an image quality score, a key region ratio, and a non-key region 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; 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 determination unit, configured to determine a second initial weight of each image sample according to the first initial weight of each image sample and the key region ratio; 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, configured to dynamically update the weight of the image sample during the training process of the image classification model and dynamically adjust the learning rate during the training process based on the confidence, the second initial weight of each image sample, the image quality score, and the non-key region ratio, until the image classification model is trained.

9. An electronic device, characterized in that, Comprising at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable 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 method for training an image classification model based on dynamic weight adjustment according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to execute the method for training an image classification model based on dynamic weight adjustment according to any one of claims 1 to 7.

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

  • Model training method and related device

    CN119445292A

  • Systems and methods for diagnostic oriented image quality assessment

    US20190228547A1