Classification model training method and training device, electronic equipment and readable medium

By optimizing the training parameters and state of the classification model based on the training data and recall, the problems of model training complexity and accuracy are solved, and an efficient and accurate model training process is achieved.

CN118918404APending Publication Date: 2024-11-08BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202310504896.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the training of classification models, model parameter settings and optimization adjustments are complex, making it difficult to achieve efficient training. Especially for those who are not familiar with machine learning, model training efficiency and accuracy are difficult to ensure.

Method used

By determining the training parameters of the classification model based on the training data and determining the training state based on the recall, the model is optimized and adjusted using data analysis, including adjusting the number of iterations, data quantity and target thresholds to achieve efficient training and accurate prediction of the model.

Benefits of technology

It improves the training efficiency of the model and the accuracy of classification results, making it convenient for people who do not understand machine learning to train the model, ensuring the accuracy and efficiency of the model prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918404A_ABST
    Figure CN118918404A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a classification model training method and device, electronic equipment and a readable medium. A specific embodiment of the training method comprises the steps that training parameters of a classification model are determined according to training data, and the training data comprise at least one category of positive sample pictures; inputting the training data into a classification model, and carrying out model training; determining the recall rate of the classification model in response to determining that the classification model completes the preset number of iterative calculations; and determining the training state of the classification model according to the recall rate of the classification model. The embodiment is related to the artificial intelligence technology, and the training algorithm of the classification network model can be systematized. By analyzing the training data, training parameters of the model can be determined. By analyzing the recall rate in the training process, optimization suggestions of the model can be provided. Therefore, a user who does not understand an algorithm can also train a high-precision classification model. Therefore, the training efficiency of the model and the accuracy of the classification result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of artificial intelligence technology, and in particular to a training method, a training device, an electronic device, and a readable medium for a classification model. Background Art

[0002] Machine learning is a general term for a class of algorithms. These algorithms are usually used to mine implicit rules from a large amount of historical data and use them for prediction or classification. More specifically, machine learning can be seen as finding a function whose input is sample data and whose output is the expected result. It's just that this function is too complex to be expressed formally. It should be noted that the goal of machine learning is generally to make the learned function well applicable to "new samples" rather than just performing well on training samples. The ability of a learned function to apply to new samples is called generalization ability.

[0003] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0004] The content of this disclosure is used to introduce concepts in a brief form, and these concepts will be described in detail in the detailed implementation section below. Some embodiments of the present disclosure propose a training method, a training device, an electronic device, a computer-readable medium, and a computer program product for a classification model to solve one or more of the technical problems mentioned in the above background technology section.

[0005] In a first aspect, some embodiments of the present disclosure provide a method for training a classification model, comprising: determining training parameters of the classification model based on training data, wherein the training data includes positive sample images of at least one category; inputting the training data into the classification model to perform model training; in response to determining that the classification model has completed a preset number of iterative calculations, determining the recall rate of the classification model; and determining the training status of the classification model based on the recall rate of the classification model.

[0006] In some embodiments, the training parameters of the classification model are determined based on the training data, including: counting the total number of all sample images, the number of categories of positive sample images, and the total number of positive sample images in the training data; determining the target number of iterations for model training based on the total number of all sample images; and determining the amount of data used for a single iteration of the classification model based on the number of categories of positive sample images and the total number of positive sample images.

[0007] In some embodiments, the training status of the classification model is determined based on the recall rate of the classification model, including: in response to determining that the classification model does not meet the convergence conditions, determining the analysis data of the classification model after the current iterative calculation is completed, wherein the analysis data includes at least one of the following: the average error between recall classes, the maximum error between recall classes, and the indicator improvement rate; determining the optimization adjustment data of the classification model based on the analysis data, and training the classification model based on the adjusted data.

[0008] In some embodiments, the convergence condition includes at least one of the following: the cumulative number of iterations of the classification model is greater than a first threshold; among the recall rates of each model obtained by iterative calculation within a preset number of iterations, the minimum recall rate is greater than a second threshold, wherein the preset number of iterations range is the difference between the cumulative number of iterations and the first threshold to the cumulative number of iterations; among the recall rates of each model within the corresponding preset number of iterations, the difference between the maximum recall rate and the minimum recall rate is greater than a third threshold.

[0009] In some embodiments, determining optimization adjustment data for a classification model based on analysis data includes: in response to determining that the average inter-class error of the recall rate is greater than or equal to a fourth threshold, determining the amount of data used for adjusting a single iteration of the classification model.

[0010] In some embodiments, optimization adjustment data of the classification model is determined based on the analysis data, including: in response to determining that the maximum error between recall classes is less than a fourth threshold and the indicator improvement rate is greater than or equal to a fifth threshold, determining the target number of iterations for adjusting the classification model.

[0011] In some embodiments, determining the optimization adjustment data of the classification model based on the analysis data also includes: in response to determining that the average error between recall classes is less than a fourth threshold, and the fourth threshold is less than or equal to the maximum error between recall classes, determining to adjust the training data; or in response to determining that the maximum error between recall classes is less than the fourth threshold, and the indicator improvement rate is less than the fifth threshold, determining to increase the amount of training data.

[0012] In some embodiments, the training method also includes: in response to determining that the cumulative number of iterations of the classification model reaches the target number of iterations, ending the training of the classification model, and determining the recall rate of the current model; in response to determining that the recall rate is greater than a second threshold, determining that the classification model training is completed.

[0013] In some embodiments, training data is obtained by the following method: in response to receiving video images of multiple categories, frame extraction is performed on the video images of each category to obtain a positive sample picture set under that category; the number of pictures in the positive sample picture sets of multiple categories is analyzed to determine whether a preset data condition is met; in response to determining that the preset data condition is met, a negative sample picture set is supplemented and generated based on the positive sample picture sets of multiple categories; and the positive sample picture sets and negative sample picture sets of multiple categories are used as training data.

[0014] In some embodiments, frame extraction is performed on video images of each category to obtain a positive sample picture set under the category, including: for each category of video images, extracting a preset frame of video images for saving; determining the similarity between the video images based on the frame value difference between subsequent video frames and the video frame of the most recently saved video image in the order of the video frames; in response to determining that the similarity is less than a preset similarity, saving the video image of the subsequent video frame; and obtaining the positive sample picture set under the category based on each saved video image.

[0015] In some embodiments, the preset data conditions include: among multiple categories of positive sample picture sets, the number of pictures in a first positive sample picture set is greater than a first preset value, and the ratio of the number of pictures in the second positive sample picture set to the first positive sample picture set is less than a second preset value, wherein the first positive sample picture set and the second positive sample picture set are respectively the positive sample picture sets with the least and the largest number of pictures in multiple positive sample picture sets; and based on the positive sample picture sets of multiple categories, supplementing the generation of negative sample picture sets, including: counting the total number of positive sample pictures in the positive sample picture sets of multiple categories, generating negative sample pictures with the same total number, and obtaining negative sample picture sets.

[0016] In a second aspect, some embodiments of the present disclosure provide a training device for a classification model, comprising: a parameter determination unit, configured to determine the training parameters of the classification model based on training data, wherein the training data includes positive sample images of at least one category; a model training unit, configured to input the training data into the classification model to perform model training; a recall rate determination unit, configured to determine the recall rate of the classification model in response to determining that the classification model has completed a preset number of iterative calculations; and a state determination unit, configured to determine the training state of the classification model based on the recall rate of the classification model.

[0017] In some embodiments, the parameter determination unit can be further configured to count the total number of all sample images, the number of categories of positive sample images, and the total number of positive sample images in the training data; determine the target number of iterations for model training based on the total number of all sample images; and determine the amount of data used in a single iteration of the classification model based on the number of categories of positive sample images and the total number of positive sample images.

[0018] In some embodiments, the state determination unit may include an adjustment subunit, which is configured to determine the analysis data of the classification model after the current iterative calculation is completed in response to determining that the classification model does not meet the convergence conditions, wherein the analysis data includes at least one of the following: the average error between recall classes, the maximum error between recall classes, and the indicator improvement rate; determine the optimization adjustment data of the classification model based on the analysis data, and train the classification model based on the adjusted data.

[0019] In some embodiments, the convergence conditions may include at least one of the following: the cumulative number of iterations of the classification model is greater than a first threshold; among the recall rates of each model obtained by iterative calculation within a preset number of iterations, the minimum recall rate is greater than a second threshold, wherein the preset number of iterations range is the difference between the cumulative number of iterations and the first threshold to the cumulative number of iterations; among the recall rates of each model within the corresponding preset number of iterations, the difference between the maximum recall rate and the minimum recall rate is greater than a third threshold.

[0020] In some embodiments, the adjustment subunit may be further configured to determine the amount of data used in a single iteration of the adjustment classification model in response to determining that the average inter-class error of the recall rate is greater than or equal to a fourth threshold.

[0021] In some embodiments, the adjustment subunit may be further configured to determine a target number of iterations for adjusting the classification model in response to determining that the maximum inter-class error of the recall rate is less than a fourth threshold and the indicator improvement rate is greater than or equal to a fifth threshold.

[0022] In some embodiments, the adjustment subunit can be further configured to determine to adjust the training data in response to determining that the average error between recall classes is less than a fourth threshold, and the fourth threshold is less than or equal to the maximum error between recall classes; or to determine to increase the amount of training data in response to determining that the maximum error between recall classes is less than the fourth threshold, and the indicator improvement rate is less than the fifth threshold.

[0023] In some embodiments, the training device may also include a training completion determination unit, which is configured to end the training of the classification model in response to determining that the cumulative number of iterations of the classification model has reached a target number of iterations, and determine the recall rate of the current model; in response to determining that the recall rate is greater than a second threshold, determine that the classification model training is completed.

[0024] In some embodiments, the training device may also include a training data generation unit, which is configured to, in response to receiving video images of multiple categories, perform frame extraction on the video images of each category to obtain a positive sample picture set under the category; analyze the number of pictures in the positive sample picture sets of multiple categories to determine whether preset data conditions are met; in response to determining that the preset data conditions are met, supplementarily generate a negative sample picture set based on the positive sample picture sets of multiple categories; and use the positive sample picture sets and negative sample picture sets of multiple categories as training data.

[0025] In some embodiments, the training data generation unit can be further configured to extract and save the video image of a preset frame for each category of video images; determine the similarity between the video images based on the frame value difference between the subsequent video frames and the video frame of the most recently saved video image in the order of the video frames; in response to determining that the similarity is less than a preset similarity, save the video image of the subsequent video frame; and obtain a positive sample picture set under the category based on the saved video images.

[0026] In some embodiments, the preset data conditions may include: among multiple categories of positive sample picture sets, the number of pictures in a first positive sample picture set is greater than a first preset value, and the ratio of the number of pictures in the second positive sample picture set to the first positive sample picture set is less than a second preset value, wherein the first positive sample picture set and the second positive sample picture set are respectively the positive sample picture sets with the least and the largest number of pictures in multiple positive sample picture sets; and the training data generation unit can be further configured to count the total number of positive sample pictures in multiple categories of positive sample picture sets, generate negative sample pictures with the same total number, and obtain a negative sample picture set.

[0027] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the training method described in any implementation method in the above-mentioned first aspect.

[0028] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the training method described in any implementation manner in the above-mentioned first aspect is implemented.

[0029] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which, when executed by a processor, implements the training method described in any implementation manner in the above-mentioned first aspect.

[0030] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the training method of the classification model of some embodiments of the present disclosure helps to improve the training efficiency of the model and the accuracy of the classification results. Specifically, in the relevant technologies of model construction and training, it is usually required that the relevant personnel have certain machine learning knowledge or experience. The setting and optimization adjustment of model parameters often affect the training efficiency of the model. And the setting of the target threshold generally affects the accuracy of the model prediction results. Generally speaking, it is difficult for people who do not understand machine learning and model training to complete model training. And the obtained model often fails to achieve the expected effect.

[0031] Based on this, the training method of the classification model of some embodiments of the present disclosure can first determine the training parameters of the model according to the training data to perform model training. That is, different training data generally determine different training parameters. In addition, during the model training process, the training status of the classification model can be determined according to the recall rate of the classification model. In other words, for those who do not understand machine learning and model training, model training can be achieved more easily with the assistance of the training method disclosed in the present disclosure. And the model parameters, target thresholds and other data determined by big data are more suitable and efficient. This can not only improve the training efficiency of the model, but also ensure the accuracy of the model prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0033] Figure 1 is a flowchart of some embodiments of the training method of the classification model disclosed in the present invention;

[0034] Figure 2 are flow charts of other embodiments of the training method of the classification model disclosed in the present invention;

[0035] Figure 3 is a flowchart of some embodiments of generating training data in the training method of the classification model disclosed in the present invention;

[0036] Figure 4 Schematic diagrams of some application scenarios of the training method of the classification model disclosed in the present invention;

[0037] Figure 5 It is a schematic diagram of the structure of some embodiments of the training device of the classification model disclosed in the present invention;

[0038] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0039] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0040] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0041] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0042] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0043] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0044] Figure 1 A process 100 of some embodiments of a method for training a classification model according to the present disclosure is shown. The method comprises the following steps:

[0045] Step 101, determining the training parameters of the classification model according to the training data.

[0046] In some embodiments, the execution subject (e.g., server) of the classification model training method can obtain training data through a wired connection or a wireless connection. The training data here can be data used for model training. The training data can include positive sample images of at least one category. Positive sample images are generally images belonging to at least one category.

[0047] In some embodiments, the execution entity may determine the training parameters of the classification model based on the training data. The training parameters here may be set according to actual conditions, such as model parameters such as weights in each network layer. As an example, the training parameters may include the amount of data used for a single iteration of the classification model. Here, the execution entity may determine the amount of data used for each iteration of the model based on the distribution of the training data, such as the number of categories of positive sample images and the total number of positive sample images.

[0048] Furthermore, the training parameters may also include a target number of iterations, wherein the target number of iterations is usually the maximum number of iterations of the model. At this time, the execution subject may determine the target number of iterations according to the total number of all sample images in the training data.

[0049] As an example, there are N categories of positive sample images and 1 negative sample image set in the training data. Category 0 represents the negative class, which contains M0 negative sample images. Category n (1≤n≤N) represents the positive class, which contains M n In this case, the amount of data bs used in a single iteration can be calculated as:

[0050]

[0051] Calculate the target number of iterations mP as:

[0052]

[0053] Here, according to experience, θ1=2, θ2=7, θ3=700, θ4=1000, and θ5=3000 are generally set.

[0054] It is understandable that in order to improve the accuracy of the model classification results, the training data can also include a set of negative sample images. Negative sample images are opposite to the above-mentioned positive sample images. That is, negative sample images generally do not belong to at least one category of images in the training data. This can also enrich the diversity of the training data.

[0055] In some embodiments, in order to further ensure the accuracy of the classification model obtained by training, the above training data can be used Figure 3 The method described in the embodiment is obtained, and no further description is given here. In addition, it should be noted that the execution subject of generating the training data can be the same as the execution subject of the training method, or it can be different.

[0056] Step 102: input the training data into the classification model to perform model training.

[0057] In some embodiments, based on the training parameters determined in step 101, the execution subject can input the training data into the classification model to perform model training. In other words, the negative sample picture set and each class of positive sample picture set in the training data can all be input into the model. The classification model here can be various existing network models created based on machine learning technology. The classification model can have various existing neural network structures (such as DenseBox, VGGNet, ResNet, SegNet, CNN, DNN, etc.).

[0058] Step 103, in response to determining that the classification model completes a preset number of iterative calculations, determining a recall rate of the classification model.

[0059] In some embodiments, when the classification model completes a preset number of iterative calculations, the execution entity can determine the recall rate of the classification model. The preset number of times here can also be set according to actual conditions. For example, after each iterative calculation (epoch) of the model is completed, the model recall rate can be calculated. Among them, an epoch usually means that all data is sent to the model, and a forward calculation and back propagation process is completed. For another example, in the process of model training, it is usually impossible to complete the training in a few times. Therefore, in order to improve the training efficiency, the preset number of times can be a number greater than one, such as 3 or 4.

[0060] In a multi-class classification model, each class has a recall rate. Recall rate generally refers to the probability that a sample that is actually in the nth class is predicted to be in the nth class. Here, the execution subject can determine the model recall rate based on the recall rate of each class. As an example, the recall rate of all classes (including the recall rate of the negative sample image set) can be averaged to represent the recall rate of the model, that is, Among them, r Pn Represents the recall rate of the nth category.

[0061] Step 104: Determine the training status of the classification model according to the recall rate of the classification model.

[0062] In some embodiments, according to the recall rate of the classification model determined in step 103, the execution entity may determine the training status of the classification model. Among them, the training status may include training completed and training incomplete. Training completed may indicate that the model has been trained and can be used for data classification prediction. Incomplete training may indicate that the model has not been trained and the data needs to be adjusted to continue training. For example, the execution entity may determine whether the model recall rate is greater than a preset threshold. If it is greater than the preset threshold, it can be determined that the model training is completed; otherwise, it can be determined that the model training is incomplete.

[0063] In some embodiments, based on the recall rate of the classification model, the execution subject can determine whether the current model meets the convergence condition. The convergence condition may include at least one of the following: the cumulative number of iterations of the classification model is greater than a first threshold; the minimum recall rate of each model recall rate obtained by iterative calculation within a preset number of iterations is greater than a second threshold, wherein the preset number of iterations ranges from the difference between the cumulative number of iterations and the first threshold to the cumulative number of iterations; the difference between the maximum recall rate and the minimum recall rate of each model recall rate within the corresponding preset number of iterations is greater than a third threshold.

[0064] As an example, when the classification model satisfies the above convergence conditions at the same time, the execution subject can determine that the model has converged, which means that the model training is completed, that is, the training ends early, and the classification model can be put into use.

[0065]

[0066] Here, the first threshold, the second threshold and the third threshold can also be set by oneself. According to experience, θ6=9, θ7=90%, θ8=1% can be set generally.

[0067] Furthermore, if it is determined that the classification model does not meet the convergence conditions, it means that the training has not ended early. That is, the training is not completed and the relevant data needs to be adjusted to continue the training. For details, please refer to Figure 2 The relevant description in the embodiments will not be repeated here.

[0068] In some embodiments, if it is determined that the cumulative number of iterations of the classification model reaches the target number of iterations, the training of the classification model can be terminated. At this time, the recall rate of the current model can continue to be calculated. And it is determined whether the recall rate of the model is greater than the second threshold. In the case of determining that the recall rate is greater than the second threshold, the execution subject can determine that the training of the classification model is completed.

[0069] That is to say, if the model training is not terminated early, that is, P = mP at the end of the training. At this point, we can perform a feasibility analysis on the model after the training. p >θ7, the model can be considered usable. Otherwise, corresponding optimization suggestions can be given. Figure 2 Related description in the embodiments.

[0070] Through the above description, the training method of the classification model of some embodiments of the present disclosure can first determine the training parameters of the model according to the training data to perform model training. That is, different training data generally determine different training parameters. In addition, during the model training process, the training status of the classification model can be determined according to the recall rate of the classification model. In other words, for those who do not understand machine learning and model training, model training can be achieved more easily with the assistance of the training method disclosed in the present disclosure. And the determined model parameters, target thresholds and other data are more suitable and efficient. This can not only improve the training efficiency of the model, but also ensure the accuracy of the model prediction results.

[0071] Continue to see Figure 2 , which shows a process 200 of other embodiments of the training method of the classification model according to the present disclosure.

[0072] Here, the executor of the classification model training method disclosed in the present invention, when determining that the classification model training is not completed, such as the classification model does not meet the convergence conditions, or the model recall rate is not greater than the second threshold, can determine the optimization adjustment direction of the model through the following process steps.

[0073] Step 201, determining the analysis data of the classification model after the current iterative calculation is completed.

[0074] In some embodiments, when the execution subject determines that the classification model does not meet the above convergence conditions, it can determine the analysis data of the classification model after the current iterative calculation is completed. The analysis data may include at least one of the following: average error between recall classes, maximum error between recall classes, and indicator improvement rate.

[0075] Here, the average error between recall classes can characterize the average error between the recall rates of each category in the training data and the recall rate of the model. As an example, the absolute value of the difference between the recall rate of each category and the recall rate of the model can be calculated first. Each category here includes the category of the positive sample picture set and the negative sample picture set. After that, the sum of the absolute values ​​of the differences of all categories can be calculated. Thus, the quotient of the sum and the total number of all categories can be used as the average error between recall classes. In addition, the maximum error between recall classes can be the maximum value of the absolute values ​​of the differences between the above categories. The indicator improvement rate can characterize the improvement of the model prediction accuracy after each model training is completed. It can be understood that under normal circumstances, the average error between recall classes will be less than or equal to the maximum error between recall classes.

[0076] In some embodiments, the recall rate is the average error between classes D P , recall rate, maximum error between classes E P And the index improvement rate U P It can be calculated using the following formula:

[0077]

[0078]

[0079]

[0080] Where f is the characteristic function.

[0081] Step 202, determining optimization adjustment data of the classification model according to the analysis data.

[0082] In some embodiments, the execution entity may determine the optimization adjustment data of the classification model according to the analysis data determined in step 201. As an example, Figure 2 As shown in the dotted line, if the average error between recall classes is greater than or equal to the fourth threshold, that is, D P ≥θ9, the execution subject can determine the amount of data bs used in a single iteration of the adjusted classification model. The amount of data used in each iteration after adjustment is bs ′ ,but:

[0083]

[0084] In some embodiments, if it is determined that the maximum error between recall classes is less than the fourth threshold, and the index improvement rate is greater than or equal to the fifth threshold, that is, E P <θ9, and U P ≥θ 11 , then the execution subject can determine the target number of iterations mP for adjusting the classification model. The maximum number of iterations of training after adjustment is mP ′ , then mP ′ =2*mP.

[0085] Furthermore, if it is determined that the average error between recall classes is less than the fourth threshold, and the fourth threshold is less than or equal to the maximum error between recall classes, that is, D P <θ9≤E P In this case, it usually indicates that there is a data imbalance problem, and the user is advised to modify the data distribution. At this time, the execution subject can determine to adjust the training data. In addition, if it is determined that the maximum error between recall classes is less than the fourth threshold, and the indicator improvement rate is less than the fifth threshold, that is, E P <θ9, and U P <θ 11 In this case, it is generally considered that there is a problem of insufficient data, and the user is advised to increase the amount of data. At this time, the execution subject can determine to increase the amount of training data.

[0086] Here, according to experience, the fourth threshold, θ 10and the fifth threshold are θ9=0.15, θ 10 =16,θ 11 =0.8.

[0087] Step 203: training a classification model based on the adjusted data.

[0088] In some embodiments, the execution entity may continue to train the classification model based on the adjusted data, that is, use the adjusted data to replace the previous data for model training.

[0089] The training method of the classification model in the embodiment of the present disclosure further enriches and improves the determination process of optimizing and adjusting the classification model. Through data analysis and training state analysis, fully automatic training of high-precision models can be achieved. Even if the user does not understand deep learning and network training, it can be easily used. This can improve the training efficiency of the model and the prediction accuracy of the model obtained by training.

[0090] Further references Figure 3 , which shows a process 300 of generating training data in some embodiments of the training method of the classification model disclosed in the present invention. The method includes the following steps:

[0091] It is understandable that, in order to further improve the training efficiency and the accuracy of the model prediction results, the training data used to train the model can be obtained by processing the videos or pictures of each category provided by the user. Here, the execution subject for generating the training data can be the same as the above execution subject or different.

[0092] Step 301: In response to receiving video images of multiple categories, frame extraction is performed on the video images of each category to obtain a positive sample picture set of the category.

[0093] In some embodiments, when receiving video images of multiple categories, the execution subject may perform frame extraction processing on the video images of each category. Thus, the extracted video frame images are used as positive sample images of the category to obtain a positive sample image set under the category. As an example, the execution subject may extract video frames from the video images according to a preset number of interval frames. For example, the first frame in the video image is extracted, and then video frames are extracted at a set number of intervals. For another example, the calculation may be started from the first frame of the video image, and the corresponding video frames are extracted at a set number of intervals.

[0094] It is understandable that for videos uploaded by users, we usually want to keep video frames that are not very similar. For relatively similar video frames, we only need to keep one of the pictures. The purpose of this is to ensure data diversity. Therefore, in some embodiments, the execution entity can perform frame extraction based on the similarity between video frame images. As an example, for each category of video images, first, the execution entity can extract the video image of the preset frame (such as the first frame) for saving; then, the similarity between each subsequent video frame image and the saved video image can be calculated. If the similarity between the two images is less than the preset similarity, the subsequent video frame images can be saved. Among them, the preset similarity can be set to 0.9.

[0095] Assume that the video uploaded by the user has a total of T frames, and the video height and width are H and W respectively. Each video frame is denoted by I t ∈R H×W (1≤t≤T), (Right now or ) represents the pixel value (RGB value) of the hth row and wth column of the tth frame image. Then the similarity S of any two frames of images is ij for:

[0096]

[0097] Optionally, in order to reduce the amount of data calculated and improve data processing efficiency, the execution subject can also determine the similarity of the image based on the frame value difference between the video frames. That is, for each category of video images, the video image of the preset frame can be first extracted and saved; then, according to the sequence of the video frames, based on the frame value difference between the subsequent video frame and the video frame of the most recently saved video image, the similarity between the video images can be determined; then, if it is determined that the similarity is less than the preset similarity, the video image of the subsequent video frame can be saved.

[0098] Typically, a video frame I t The similarity with its first k connected frames and the last k connected frames is very large. Default video frame I t The similarity with the video frames that are more than K frames away is small, that is,

[0099]

[0100] For a video, its first frame image I1 can be saved by default. We denote the currently saved video frame as I i , then calculate the video frames after the i-th frame and I i Until a video frame I is found j , so that S ij If the similarity is less than the preset value, Ij . By looping in this way, the dissimilar video frames in the video can be saved.

[0101] Furthermore, the execution subject can obtain a positive sample image set under the category based on the saved video images. For example, the saved video images can be directly used as positive sample images to obtain a positive sample image set for each category. For another example, the saved video images can be sent to the user for screening, and the screened images can be used as positive sample images.

[0102] Step 302: Analyze the number of pictures in the positive sample picture sets of multiple categories to determine whether the preset data conditions are met.

[0103] In some embodiments, the execution subject may analyze the positive sample picture sets of multiple categories obtained in step 301 to determine whether these data meet the preset data conditions. As an example, the execution subject may analyze the number of pictures in these positive sample picture sets to see whether they meet the preset data conditions. Among them, the preset data conditions may characterize the conditions met by the training data that can be used to train the model. Here, if the preset data conditions are met, it means that the pictures in these positive sample picture sets can be used for model training.

[0104] In some embodiments, the preset data condition may include at least one of the following: among the positive sample picture sets of multiple categories, the number of pictures in the first positive sample picture set is greater than a first preset value; the ratio of the number of pictures in the second positive sample picture set to the first positive sample picture set is less than a second preset value. Among them, the first positive sample picture set and the second positive sample picture set may be the positive sample picture set with the least and the most pictures in the multiple positive sample picture sets, respectively. That is, the first positive sample picture set may be the positive sample picture set with the least number of pictures, and the second positive sample picture set may be the positive sample picture set with the most pictures.

[0105] Assume that the classification network that the user needs to train has N positive classes. After data processing, we can get N picture sets V = {V1, V2, ..., V N}. Each collection contains pictures of the current category That is, category n contains M n When the data meets the following conditions, we consider the data qualified and can be trained.

[0106]

[0107] Here, we can usually set θ 12 =500,θ 13 =2.

[0108] Step 303 : In response to determining that the preset data condition is met, a negative sample picture set is supplementarily generated based on the positive sample picture sets of multiple categories.

[0109] In some embodiments, when it is determined that the preset data conditions are met, the execution subject can supplement the generation of the negative sample picture set based on the positive sample picture sets of multiple categories. As an example, the execution subject can supplement the same number of negative sample pictures according to the number of pictures in the second positive sample picture set, that is, the positive sample picture set with the largest number of pictures, so as to obtain the negative sample picture set. The negative sample pictures here can be obtained from a public picture library, or they can be obtained by editing (such as blocking, blurring, erasing, etc.) the positive sample pictures.

[0110] Optionally, first, the execution subject can count the total number of positive sample images in the positive sample image set of multiple categories. Then, negative sample images with the same total number can be generated to obtain a negative sample image set. In other words, when the data is qualified, we will automatically supplement the data with negative class images, and record the negative class set as satisfy

[0111] Step 304: Use positive sample picture sets and negative sample picture sets of multiple categories as training data.

[0112] In some embodiments, the execution entity may use the positive sample picture sets of multiple categories that meet the preset data conditions, and the negative sample picture sets supplemented in step 303, as training data.

[0113] It is necessary to explain that if the user provides classified pictures, we can directly perform data analysis. In other words, these pictures can be used as positive sample pictures to obtain a positive sample picture set of at least one category. In addition, for objects of the same category, we allow users to upload multiple videos. After similarity extraction, each video obtains a video frame sequence. In this case, we can collect the video frame sequences of the same category together and return them to the user for data screening. That is, let the user screen the video frames, remove the pictures that do not contain objects of this category, and ensure that the remaining pictures are positive sample pictures of this category.

[0114] The training method of the classification model provided by the embodiment of the present disclosure further enriches and improves the process of generating training data. By performing data processing and data analysis on the original data, training data that meets the preset data conditions can be obtained. This helps to further improve the training efficiency of the model and can improve the accuracy of the model prediction results.

[0115] In such Figure 4In the application scenario shown, the training method of the classification model disclosed in the present invention can realize the fully automatic training of the classification network model. First, when the video data sent by the user is received, the video data can be similarity extracted. Then, the video pictures obtained by the extraction can be sent to the user for picture screening. After receiving the pictures returned by the user screening, data analysis can be performed to determine whether these pictures are qualified. If unqualified, modification suggestions can be generated and sent to the user, so that the user can modify the data. If qualified, negative class pictures can be supplemented to obtain training data. Then, the training parameters can be calculated according to the training data, and the model training can be started. During the training process, the model recall rate can be calculated to analyze the training status. If the model is available, the training can be completed, and the model can be used for data testing. If the model is not available, the optimization adjustment strategy can be analyzed. If the model parameters are modified, the training parameters can be recalculated to continue training. If the model parameters are not modified, such as modifying the training data, the user can be allowed to modify the data. And the modified data is re-analyzed. And continue training when the data is qualified.

[0116] Continue to refer Figure 5 , as a response to the above Figures 1 to 3 In order to realize the training method shown in the figure, the present disclosure provides some embodiments of a training device for a classification model. These training device embodiments are similar to Figures 1 to 3 The training device can be applied to various electronic devices.

[0117] like Figure 5 As shown, the training device 500 of the classification model of some embodiments may include: a parameter determination unit 501, configured to determine the training parameters of the classification model based on training data, wherein the training data includes positive sample images of at least one category; a model training unit 502, configured to input the training data into the classification model to perform model training; a recall rate determination unit 503, configured to determine the recall rate of the classification model in response to determining that the classification model has completed a preset number of iterative calculations; and a state determination unit 504, configured to determine the training state of the classification model based on the recall rate of the classification model.

[0118] In some embodiments, the parameter determination unit 501 can be further configured to count the total number of all sample images, the number of categories of positive sample images, and the total number of positive sample images in the training data; determine the target number of iterations for model training based on the total number of all sample images; and determine the amount of data used in a single iteration of the classification model based on the number of categories of positive sample images and the total number of positive sample images.

[0119] In some embodiments, the state determination unit 504 may include an adjustment subunit (not shown in the figure), which is configured to determine the analysis data of the classification model after the current iterative calculation is completed in response to determining that the classification model does not meet the convergence conditions, wherein the analysis data includes at least one of the following: the average error between recall classes, the maximum error between recall classes, and the indicator improvement rate; determine the optimization adjustment data of the classification model based on the analysis data, and train the classification model based on the adjusted data.

[0120] In some embodiments, the convergence conditions may include at least one of the following: the cumulative number of iterations of the classification model is greater than a first threshold; among the recall rates of each model obtained by iterative calculation within a preset number of iterations, the minimum recall rate is greater than a second threshold, wherein the preset number of iterations range is the difference between the cumulative number of iterations and the first threshold to the cumulative number of iterations; among the recall rates of each model within the corresponding preset number of iterations, the difference between the maximum recall rate and the minimum recall rate is greater than a third threshold.

[0121] In some embodiments, the adjustment subunit may be further configured to determine the amount of data used in a single iteration of the adjustment classification model in response to determining that the average inter-class error of the recall rate is greater than or equal to a fourth threshold.

[0122] In some embodiments, the adjustment subunit may be further configured to determine a target number of iterations for adjusting the classification model in response to determining that the maximum inter-class error of the recall rate is less than a fourth threshold and the indicator improvement rate is greater than or equal to a fifth threshold.

[0123] In some embodiments, the adjustment subunit can be further configured to determine to adjust the training data in response to determining that the average error between recall classes is less than a fourth threshold, and the fourth threshold is less than or equal to the maximum error between recall classes; or to determine to increase the amount of training data in response to determining that the maximum error between recall classes is less than the fourth threshold, and the indicator improvement rate is less than the fifth threshold.

[0124] In some embodiments, the training device 500 may also include a training completion determination unit (not shown in the figure), which is configured to end the training of the classification model in response to determining that the cumulative number of iterations of the classification model has reached a target number of iterations, and determine the recall rate of the current model; in response to determining that the recall rate is greater than a second threshold, determine that the classification model training is completed.

[0125] In some embodiments, the training device 500 may also include a training data generation unit (not shown in the figure), which is configured to, in response to receiving video images of multiple categories, perform frame extraction on the video images of each category to obtain a positive sample picture set under the category; analyze the number of pictures in the positive sample picture sets of multiple categories to determine whether preset data conditions are met; in response to determining that the preset data conditions are met, supplementarily generate a negative sample picture set based on the positive sample picture sets of multiple categories; and use the positive sample picture sets and negative sample picture sets of multiple categories as training data.

[0126] In some embodiments, the training data generation unit can be further configured to extract and save the video image of a preset frame for each category of video images; determine the similarity between the video images based on the frame value difference between the subsequent video frames and the video frame of the most recently saved video image in the order of the video frames; in response to determining that the similarity is less than a preset similarity, save the video image of the subsequent video frame; and obtain a positive sample picture set under the category based on the saved video images.

[0127] In some embodiments, the preset data conditions may include: among multiple categories of positive sample picture sets, the number of pictures in a first positive sample picture set is greater than a first preset value, and the ratio of the number of pictures in the second positive sample picture set to the first positive sample picture set is less than a second preset value, wherein the first positive sample picture set and the second positive sample picture set are respectively the positive sample picture sets with the least and the largest number of pictures in multiple positive sample picture sets; and the training data generation unit can be further configured to count the total number of positive sample pictures in multiple categories of positive sample picture sets, generate negative sample pictures with the same total number, and obtain a negative sample picture set.

[0128] It can be understood that the units recorded in the training device 500 of the classification model are similar to the reference Figures 1 to 3 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the training device 500 for the classification model and the units contained therein, and will not be described in detail here.

[0129] Reference below Figure 6 , which shows a structural schematic diagram of an electronic device 600 suitable for implementing some embodiments of the present disclosure. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0130] like Figure 6As shown, the electronic device 600 may include a processing device 601 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0131] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a speaker, a vibrator, etc.; storage devices 608 including, for example, a hard disk, a magnetic disk, etc.; and communication devices 609. The communication devices 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0132] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0133] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0134] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0135] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines the training parameters of the classification model according to the training data, wherein the training data includes positive sample images of at least one category; inputs the training data into the classification model to perform model training; determines the recall rate of the classification model in response to determining that the classification model has completed a preset number of iterative calculations; determines the training status of the classification model according to the recall rate of the classification model.

[0136] In addition, computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0138] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a parameter determination unit, a model training unit, a recall determination unit, and a state determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the parameter determination unit may also be described as a "unit for determining the training parameters of the classification model based on the training data".

[0139] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0140] Some embodiments of the present disclosure also provide a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned classification model training methods.

[0141] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A classification model training method, comprising: Determining training parameters of a classification model according to training data, wherein the training data includes positive sample images of at least one category; Inputting the training data into the classification model to perform model training; In response to determining that the classification model completes a preset number of iterative calculations, determining a recall rate of the classification model; The training status of the classification model is determined according to the recall rate of the classification model.

2. The training method according to claim 1, wherein: Determining the training parameters of the classification model according to the training data includes: Count the total number of all sample images in the training data, the number of categories of positive sample images, and the total number of positive sample images; Determine the target number of iterations for model training based on the total number of all sample images; The amount of data used in a single iteration of the classification model is determined based on the number of categories of the positive sample images and the total number of positive sample images.

3. The training method according to claim 2, wherein: Determining the training state of the classification model according to the recall rate of the classification model includes: In response to determining that the classification model does not meet the convergence condition, determining analysis data of the classification model after the current iterative calculation is completed, wherein the analysis data includes at least one of the following: an average error between recall classes, a maximum error between recall classes, and an indicator improvement rate; Determine optimized adjustment data of the classification model based on the analysis data, and train the classification model based on the adjusted data.

4. The training method according to claim 3, wherein: The convergence condition includes at least one of the following: The cumulative number of iterations of the classification model is greater than a first threshold; Among the recall rates of each model obtained by iterative calculation within a preset range of iteration times, the minimum recall rate is greater than a second threshold, wherein the preset range of iteration times is from the difference between the cumulative number of iterations and the first threshold to the cumulative number of iterations; Among the recall rates of each model within the preset range of iteration times, the difference between the maximum recall rate and the minimum recall rate is greater than a third threshold.

5. The training method according to claim 3, wherein: The step of determining the optimization adjustment data of the classification model according to the analysis data comprises: In response to determining that the average inter-class error of the recall rate is greater than or equal to a fourth threshold, it is determined to adjust the amount of data used in a single iteration of the classification model.

6. The training method according to claim 3, wherein: The step of determining the optimization adjustment data of the classification model according to the analysis data comprises: In response to determining that the maximum inter-class error of the recall rate is less than a fourth threshold and the indicator improvement rate is greater than or equal to a fifth threshold, determining a target number of iterations for adjusting the classification model.

7. The training method according to claim 3, wherein: The step of determining the optimization adjustment data of the classification model according to the analysis data further includes: In response to determining that the average inter-class error of the recall rate is less than a fourth threshold, and the fourth threshold is less than or equal to the maximum inter-class error of the recall rate, determining to adjust the training data; or In response to determining that the maximum inter-class error of the recall rate is less than a fourth threshold and the indicator improvement rate is less than a fifth threshold, it is determined to increase the data amount of the training data.

8. The training method according to claim 4, wherein: The training method further comprises: In response to determining that the cumulative number of iterations of the classification model reaches the target number of iterations, ending the training of the classification model, and determining a recall rate of the current model; In response to determining that the recall rate is greater than the second threshold, it is determined that the classification model training is completed.

9. The training method according to any one of claims 1 to 8, wherein: The training data is obtained by the following method: In response to receiving video images of multiple categories, performing frame extraction processing on the video images of each category to obtain a positive sample picture set under the category; Analyze the number of images in the positive sample image sets of the multiple categories to determine whether preset data conditions are met; In response to determining that the preset data condition is met, supplementarily generating a negative sample picture set based on the positive sample picture sets of the multiple categories; The positive sample picture sets of the multiple categories and the negative sample picture sets are used as training data.

10. The training method according to claim 9, wherein: The frame extraction process is performed on the video images of each category to obtain a positive sample picture set under the category, including: For each category of video images, extract the video image of the preset frame and save it; Determining the similarity between the video images based on the frame value difference between the subsequent video frame and the video frame of the most recently saved video image according to the sequence of the video frames; In response to determining that the similarity is less than a preset similarity, saving the video image of the subsequent video frame; A positive sample picture set under this category is obtained according to each saved video image.

11. The training method according to claim 9, wherein: The preset data conditions include: Among the positive sample picture sets of the multiple categories, the number of pictures in a first positive sample picture set is greater than a first preset value, and the ratio of the number of pictures in a second positive sample picture set to the number of pictures in the first positive sample picture set is less than a second preset value, wherein the first positive sample picture set and the second positive sample picture set are respectively the positive sample picture sets with the least and the largest number of pictures among the multiple positive sample picture sets; and The method of supplementing the generation of negative sample picture sets based on the positive sample picture sets of the multiple categories includes: The total number of positive sample images in the positive sample image sets of the multiple categories is counted, and negative sample images having the same total number are generated to obtain a negative sample image set.

12. A training device for a classification model, comprising: A parameter determination unit, configured to determine a training parameter of a classification model according to training data, wherein the training data includes positive sample images of at least one category; A model training unit is configured to input the training data into the classification model to perform model training; a recall rate determination unit, configured to determine a recall rate of the classification model in response to determining that the classification model completes a preset number of iterative calculations; The state determination unit is configured to determine the training state of the classification model according to the recall rate of the classification model.

13. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the training method as described in any one of claims 1-11.

14. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the training method as described in any one of claims 1 to 11 is implemented.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the training method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Image single classification method based on generative confrontation network

    CN108491874A

  • A method and device for generating a picture label model

    CN109816023A

  • Image classification model training and classification method, computer equipment and storage medium

    CN109948727A

  • Model training method and device, classification method and equipment

    CN111488939A

  • Pathological image classification learning method, classification system and readable medium

    CN113436192A