Method for training image classification model and related product

By generating a target image set with a lower resolution than ultra-wide-angle images and using its prediction results to optimize the image classification model, the problem of difficulty in training ultra-wide-angle images is solved and the classification accuracy and training efficiency of the model are improved.

CN118736653APending Publication Date: 2024-10-01BEIJING AIRDOC TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310332446.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the field of machine learning, the limited number of ultra-wide-angle images and the high cost of labeling make it difficult to train image classification models. In particular, because the area to be classified occupies a small number of pixels, the model has poor classification accuracy.

Method used

By generating target picture sets with smaller resolutions than ultra-wide-angle pictures, use image classification models to predict these target pictures, determine the prediction results of ultra-wide-angle pictures, and optimize the training model based on the prediction results, including cropping and correction processing to improve prediction results. degree of relevance.

Benefits of technology

It reduces the complexity and cost of ultra-wide-angle image training and improves the classification accuracy of the model, especially in large-resolution image classification tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736653A_ABST
    Figure CN118736653A_ABST
Patent Text Reader

Abstract

The invention discloses a method for training an image classification model and a related product. The method comprises the steps that a target picture set is generated based on ultra-wide-angle pictures in a training sample, and the resolution ratio of target pictures in the target picture set is smaller than that of the ultra-wide-angle pictures; predicting each target picture in the target picture set based on the image classification model to obtain a prediction result of each target picture; determining a prediction result of the ultra-wide-angle picture based on the prediction result of each target picture; and performing optimization training on the image classification model according to the prediction result of the ultra-wide-angle image. Through the scheme disclosed by the invention, optimization training of the image classification model under the ultra-wide-angle image dimension can be realized, the whole training process is easy to realize, and the precision of a large-resolution image classification task of the model is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of image processing technology. More specifically, the present disclosure relates to a method for training an image classification model, an electronic device and a computer-readable storage medium for executing the aforementioned method. Background Art

[0002] In the field of machine learning, the purpose of image classification is achieved by training neural network models. In the process of training neural network models, the diversity and accuracy of training samples will directly affect the performance of the neural network model. In particular, the training of classification models for ultra-wide-angle pictures is difficult because the number of ultra-wide-angle pictures is limited and the cost of labeling and picture acquisition is high. On the other hand, the area to be classified (such as the lesion area) in the ultra-wide-angle picture only occupies a small number of pixels relative to the entire image, so that the label is not closely associated with the entire picture. As a result, the training of classification models for ultra-wide-angle pictures is very difficult and the model classification accuracy is poor.

[0003] In view of this, there is an urgent need to provide a solution for training image classification models using ultra-wide-angle images to effectively reduce the difficulty of model training. Summary of the invention

[0004] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes a solution for training an image classification model in multiple aspects.

[0005] In a first aspect, the present disclosure provides a method for training an image classification model, the method comprising: generating a target image set about the ultra-wide-angle image based on the ultra-wide-angle image in a training sample, wherein the resolution of the target image in the target image set is smaller than that of the ultra-wide-angle image; predicting each target image in the target image set based on the image classification model to obtain a prediction result for each target image; determining a prediction result for the ultra-wide-angle image based on the prediction result of each target image; and optimizing and training the image classification model according to the prediction result of the ultra-wide-angle image.

[0006] In some embodiments, generating a target picture set about the ultra-wide-angle picture based on the ultra-wide-angle picture in the training sample includes: cropping the ultra-wide-angle picture to obtain the target picture; and constructing the target picture set according to the cropped picture.

[0007] In some embodiments, based on the prediction results of each target image, determining the prediction result of the ultra-wide-angle image includes: determining the prediction result of one dimension of the ultra-wide-angle image based on the maximum value of the prediction results of all target images or using the average value of the prediction results of all target images.

[0008] In some embodiments, the method further includes: performing correction processing on the prediction results of each dimension of the ultra-wide-angle image so that the sum of the corrected prediction results of all dimensions of the ultra-wide-angle image is 1.

[0009] In some embodiments, correcting the prediction result of one dimension of the ultra-wide-angle image includes: calculating the ratio between the prediction result of any dimension of the ultra-wide-angle image and the prediction results of all dimensions to achieve correction of the prediction result of any dimension.

[0010] In some embodiments, wherein the image classification model includes a binary classification model for distinguishing whether an image has a lesion, determining a prediction result of a dimension of the ultra-wide-angle image includes: determining a prediction result of a diseased dimension of the ultra-wide-angle image based on a maximum value among the prediction results of all the target images; and determining a prediction result of a disease-free dimension of the ultra-wide-angle image based on an average value of the prediction results of all the target images.

[0011] In some embodiments, optimizing the training of the image classification model according to the prediction result of the ultra-wide-angle image includes: obtaining the annotation label of the ultra-wide-angle image; calculating the loss function between the prediction result of the ultra-wide-angle image and the annotation label; and optimizing the parameters of the image classification model based on the calculated loss function to achieve optimized training of the image classification model.

[0012] In some embodiments, calculating the loss function between the prediction result of the ultra-wide-angle picture and the annotated label includes: calculating a cross entropy loss function between the prediction result of the ultra-wide-angle picture and the annotated label.

[0013] In a second aspect, the present disclosure provides an electronic device, comprising: a processor; and a memory storing computer instructions for training an image classification model, wherein when the computer instructions are executed by the processor, the electronic device executes the method described in the first aspect of the present disclosure.

[0014] In a third aspect, the present disclosure provides a computer-readable storage medium comprising program instructions for training an image classification model, wherein when the program instructions are executed by a processor, the method described in the first aspect of the present disclosure is implemented.

[0015] Through the scheme for training the image classification model provided above, the disclosed embodiment obtains a target picture set containing multiple target pictures with lower resolution than the ultra-wide-angle picture through the ultra-wide-angle picture, and uses the prediction results of the classification model for multiple low-resolution pictures to determine the prediction results of the high-resolution ultra-wide-angle picture, and uses the prediction results of the ultra-wide-angle picture to optimize the training of the image classification model. It can be seen that the disclosed scheme cleverly uses the prediction results with high correlation with the low-resolution picture to determine the prediction results of the high-resolution ultra-wide-angle picture, thereby improving the correlation between the ultra-wide-angle picture and its prediction results, and can maintain the optimization training of the model under the dimension of the high-resolution ultra-wide-angle picture, so that the entire training process is easy to implement, and effectively improves the accuracy of the model's large-resolution image classification task. Further, in some embodiments, multiple target pictures with a resolution lower than the ultra-wide-angle fundus picture can be obtained by cropping the ultra-wide-angle picture, so that the overall operation of the picture is simple and easy to implement, and the complexity of ultra-wide-angle picture processing is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0017] Figure 1 A schematic diagram showing an ultra-wide-angle fundus picture of an area where a lesion is present;

[0018] Figure 2 An exemplary flow chart of a method for training an image classification model according to an embodiment of the present disclosure is shown;

[0019] Figure 3 An exemplary flow chart of a method for training an image classification model according to another embodiment of the present disclosure is shown;

[0020] Figure 4 A method for training an image classification model according to another embodiment of the present disclosure is shown as an exemplary flow chart;

[0021] Figure 5 A schematic diagram showing the cropping effect of the ultra-wide-angle fundus image of an embodiment of the present disclosure; and

[0022] Figure 6 An exemplary structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0024] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0025] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0026] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0027] For the classification task of ultra-wide-angle images (especially ultra-wide-angle medical images, such as ultra-wide-angle fundus images), how to effectively train the classification model based on a limited number of ultra-wide-angle fundus images becomes a difficult problem. On the one hand, the amount of ultra-wide-angle image data is limited and the acquisition cost is high. On the other hand, the ultra-wide-angle fundus images have a very small area to be classified due to their high resolution. For example, Figure 1 As shown in the figure, in the classification task of whether there is a lesion in the ultra-wide-angle fundus image, the entire image will only be marked as "there is hard exudation", but the specific location of the "hard exudation" will not be marked. The vast majority of the areas in the image are normal fundus images, with only very few pixels ( Figure 1The lesion area shown by the white rectangular box in the middle is related to the label. Therefore, it can be intuitively felt that there is less information related to the label in the whole picture, which makes the image and the label not closely related. Under such data distribution, it is very difficult to train a classification model using limited ultra-wide-angle data. In this regard, the related technology uses a generative adversarial network to increase the sample size. Through the adversarial generation method, a large number of ordinary fundus images are converted into generated virtual ultra-wide-angle fundus images, thereby increasing the sample size of ultra-wide-angle images. This method has the disadvantages that the generation effect cannot be explained and the generated image is not real and effective. It is also difficult to train and takes a greater time cost.

[0028] In view of this, the disclosed embodiment provides a solution for training an image classification model, which can use ultra-wide-angle pictures as training samples, and reduce the resolution of the training samples during the training process to obtain multiple low-resolution pictures, and then use the prediction results of the low-resolution pictures to determine the prediction results of the ultra-wide-angle pictures, so as to maintain the optimization training of the image classification model under the ultra-wide-angle picture dimension. As a result, the entire training process is easy to implement, the training cost is reduced, and the accuracy of the model's large-resolution image classification tasks is effectively improved.

[0029] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0030] Figure 2 An exemplary flow chart of a method 200 for training an image classification model according to an embodiment of the present disclosure is shown.

[0031] like Figure 2As shown, at step S201, a target picture set about the ultra-wide-angle picture can be generated based on the ultra-wide-angle picture in the training sample. Among them, the resolution of the target picture in the aforementioned target image set is smaller than that of the ultra-wide-angle picture. The ultra-wide-angle picture here can include an ultra-wide-angle picture selected arbitrarily from the training picture set. The ultra-wide-angle picture is a large-sized picture with a large resolution, so that the proportion of the area to be classified relative to the whole picture is small, which is not conducive to classification prediction. Therefore, it can be considered to increase the proportion of the area to be classified relative to the picture. The inventor has found that the proportion of the area to be classified relative to the picture in the picture can be increased by reducing the resolution of the original ultra-wide-angle picture. There are many ways to adjust the picture resolution, for example, the picture resolution can be reduced by adjusting the pixel value without changing the picture size, or by adjusting the picture size. In this embodiment, it is preferred to reduce the picture resolution by adjusting the picture size. Specifically, the large-sized ultra-wide-angle picture can be used to generate multiple small-sized target pictures, each of which has a reduced resolution and is a partial display of the original ultra-wide-angle picture, so that the low-resolution target picture can be used to increase the proportion of the area to be classified in the target picture. In some embodiments, a large-size ultra-wide-angle image may be used to obtain a small-size target image through a variety of image processing methods. For example, a large-resolution ultra-wide-angle image may be converted into multiple small-resolution target images through rasterization, segmentation, or cropping, and each target image may be used to display a portion of the original ultra-wide-angle image, and all target images may be spliced ​​into the original ultra-wide-angle image to ensure that information of the original ultra-wide-angle image is not lost.

[0032] Next, at step S202, each target image in the target image set can be predicted based on the image classification model to obtain a prediction result for each target image. As mentioned above, each target image has a low resolution and is a partial display of the original ultra-wide-angle image. If the target image contains an area to be classified, the proportion of the area to be classified relative to the target image is relatively large. Therefore, by using the image classification model to predict each target image in the image, a prediction result with a greater correlation with the target image can be obtained.

[0033] Next, at step S203, the prediction result of the ultra-wide-angle picture can be determined based on the prediction result of each target picture. Since each target picture is only a partial display of the original ultra-wide-angle picture, after obtaining the prediction result of each target picture, the prediction result of all pictures can be further used to determine the prediction result of the ultra-wide-angle picture, providing necessary guarantee for subsequent model optimization under the ultra-wide-angle picture dimension.

[0034] Finally, in step S204, the image classification model may be optimized and trained according to the prediction results of the ultra-wide-angle image.

[0035] Therefore, in the process of model training, for each large-size ultra-wide-angle picture in the training sample, a plurality of small-size (i.e., low-resolution) target pictures can be formed by using the large-size ultra-wide-angle picture, and the resolution of each target picture obtained is reduced and it is a partial display of the ultra-wide-angle picture, so that the proportion of the area to be classified (or target) in the target picture is increased, thereby improving the prediction effect of each target picture. Further, each target picture is a partial display of the original ultra-wide-angle picture, so after obtaining the prediction result of each target picture, the prediction result of the ultra-wide-angle picture is determined by using the prediction result with a large correlation with the low-resolution target picture, which can effectively improve the strong correlation between the prediction result of the ultra-wide-angle picture and the picture, thereby maintaining the optimization training of the image classification model under the ultra-wide-angle picture dimension. It can be seen that the entire training process is easy to implement, and the effective training of the model can be achieved with the help of limited ultra-wide-angle fundus images, and the accuracy of the model's large-resolution image classification task can be ensured. In addition, the entire training process does not require the generation of additional ultra-wide-angle pictures, and the training cost is relatively low.

[0036] Figure 3 FIG. 3 is an exemplary flow chart of a method 300 for training an image classification model according to another embodiment of the present disclosure. It should be noted that: Figure 3 The method 300 can be understood as a further limitation and extension of the method 200. Figure 2 The relevant detailed description also applies to the following.

[0037] like Figure 3 As shown, at step S301, the ultra-wide-angle pictures in the training samples can be cropped, and a target picture set can be constructed based on the cropped target pictures. By cropping the large resolution (i.e., large size), the resolution of the small-sized pictures obtained is smaller than that of the original ultra-wide-angle pictures. The target picture set may include all the small-sized target pictures obtained by cropping. The number of small-sized pictures in the target picture set is not limited here, and can be adjusted specifically according to application requirements (for example, the number of cropped pictures can be adjusted according to factors such as the resolution of the ultra-wide-angle picture and the architectural performance of the image classification model). Among them, the content of different target pictures obtained from the same ultra-wide-angle picture may partially overlap or may not overlap at all.

[0038] Next, at step S302, each target image in the target image set may be predicted based on the image classification model to obtain a prediction result for each target image. Specifically, a small-sized target image in the target image set may be input into the image classification model, and the image classification model may perform inference prediction on all target images.

[0039] Next, at step S303, the prediction result of one dimension of the ultra-wide-angle picture can be determined based on the maximum value of the prediction results of all target pictures or by using the average value of the prediction results of all target pictures. The number of prediction results of the ultra-wide-angle picture in terms of dimensions is determined specifically according to the classification task of the image classification model. For example, if the image classification model is a binary classification task, the ultra-wide-angle picture has prediction results in two dimensions. If the image classification model is a multi-classification task, the ultra-wide-angle picture has prediction results in multiple dimensions.

[0040] Next, at step S304, the prediction results of each dimension of the ultra-wide-angle picture may be corrected so that the sum of the prediction results of all dimensions of the corrected ultra-wide-angle picture is 1. Considering that the sum of the prediction results of all dimensions of the ultra-wide-angle picture derived from the prediction results of the small-size picture may not be 1, it is necessary to further correct the prediction results of each dimension of the ultra-wide-angle picture. In some embodiments, the ratio between the prediction result of any dimension of the ultra-wide-angle picture and the prediction results of all dimensions may be calculated to achieve correction of the prediction result of any dimension.

[0041] At step S305, the annotation label of the ultra-wide-angle image can be obtained. Among them, the annotation label can be understood as a reference label for subsequent comparison with the prediction result. In some embodiments, the annotation label of the ultra-wide-angle image here can be a manually annotated label. It should be noted that step S305 can be performed before or after any step in steps S301 to S304. There is no restriction on the timing of obtaining the annotation label, which can be adjusted according to design requirements.

[0042] Next, at step S306, a loss function between the prediction result of the ultra-wide-angle image and the annotated label may be calculated. For example, in some embodiments, this may be achieved by calculating a cross entropy loss function between the prediction result of the ultra-wide-angle image and the annotated label. It should be noted that the specific type of the loss function is not limited here, and may be, for example, a KL divergence loss function.

[0043] Next, at step S307, the parameters of the image classification model may be optimized based on the calculated loss function to achieve optimized training of the image classification model.

[0044] Therefore, during the training process, the ultra-wide-angle picture is cropped into multiple small-size (i.e., low-resolution) pictures, and then the prediction results of the ultra-wide-angle picture are determined with the help of the prediction results of the low-resolution pictures, so as to maintain the optimized training of the image classification model under the ultra-wide-angle picture dimension.

[0045] It should be noted that those skilled in the art have a certain inertia of thinking about the processing methods of image cropping. Usually, the cropping of images is mostly used in segmentation and target detection tasks, and the annotation of segmentation and target detection tasks is the specific position of an object in the image. Therefore, after cropping the image, several small-sized images are obtained, and there are still gray target areas in these small-sized images. In other words, in segmentation and target detection tasks, the cropping operation turns large-sized images into small-sized images, and the annotations of large-sized images can still be used as small-sized labels. Therefore, the prediction results of small-sized images and the annotation results of small-sized images can be used to directly optimize the model.

[0046] The cropping method is not considered for application in classification tasks. Specifically, the label of the classification task is to describe the overall information of the image. For example, the label of the classification task can be "whether there is exudation." However, the label of the classification task does not indicate the "specific location of the exudative lesion." Therefore, in the classification task, if an image is cropped, it will not be possible to confirm whether there are exudative lesions in each small-sized image. The label of the entire image cannot be directly used as the annotation result of the small-sized image, and thus the annotation result of the small-sized image is lost, making it impossible to continue to optimize the model. Therefore, this cropping method has not been used in classification tasks before.

[0047] The solution disclosed in this paper breaks this kind of thinking inertia, crops the ultra-wide-angle picture into small-sized pictures, and uses the prediction results of each small-sized picture to reversely infer the prediction results of the original ultra-wide-angle picture, so that the model can still be optimized in the ultra-wide-angle picture dimension. As a result, the picture cropping process is innovatively applied in classification tasks.

[0048] Figure 4 The method for training an image classification model according to another embodiment of the present disclosure is an exemplary flow chart. It should be noted that: Figure 4 It can be understood that Figure 2 and Figure 3 Therefore, the above combined with Figure 2 and Figure 3 The relevant detailed description in also applies to the following. Figure 4 The anomaly detection model of the binary classification model is taken as an example to illustrate the specific training process of the image classification model.

[0049] like Figure 4As shown, at step S401, an ultra-wide-angle fundus image is randomly selected as a training sample and cropped. In practical applications, a sample can be randomly selected from the ultra-wide-angle fundus image sample set, which is marked as X. Regarding the sample X, its annotation label can be recorded as gt (value 0 or 1), where "0" indicates that the sample image is manually judged to be a lesion-free image, and "1" indicates that the sample image is manually judged to be a lesion-free image. In addition, after the sample X is inferred by the anomaly detection model, a two-dimensional prediction result [y1, y2] can be theoretically obtained. Among them, "y1" indicates that the sample image is manually judged to be a lesion-free image, "y2" indicates that the sample image is manually judged to be a lesion-free image, and y1+y2=1.

[0050] After obtaining the sample X, Figure 5 As shown, the large-resolution sample X can be cropped to obtain a set of small-size images [x 1 ,x 2 ,...,x n ].in, Figure 5 The areas enclosed by the white rectangle in the ultra-wide-angle fundus image on the left and the white rectangle in the cropped small-size image on the right are the lesion areas. It can be seen that the lesion area in the ultra-wide-angle fundus image accounts for a small proportion of the entire image, so there is little information associated with its annotated label in the ultra-wide-angle fundus image. After cropping, the lesion area in the small-size image on the right accounts for a relatively large proportion of the image, which is conducive to the subsequent anomaly detection model inference to obtain accurate prediction results.

[0051] Next, at step S402, the small-sized image can be input into an anomaly detection model, and the anomaly detection model is used to perform inference prediction on each image. 1 ,x 2 ,...,x n ] to perform inference prediction, and 2n output results can be obtained: If one of the n cropped images is detected as having a lesion, then the entire image can be considered to have a lesion. If all n cropped images are detected as having no lesions, then the entire image can be considered to have no lesions. Therefore, for the entire image, the probability of having a lesion is the maximum value of the prediction results of the n cropped images, that is, For the entire image, the probability of no lesion is the average of the prediction results of n cropped images, that is,

[0052] Considering that y1+y2≠1 according to the above calculation formula, the correction operation can be performed by the following formula:

[0053] After obtaining the prediction result of the corrected ultra-wide-angle fundus image, then, at step S403, the loss function between the model prediction result and the annotated label is calculated. For example, in some embodiments, the cross entropy loss function between the prediction result and the annotated label can be calculated:

[0054] in, It is a logical function that returns 1 when the condition is met and 0 when the condition is not met.

[0055] Next, at step S404, the model parameters may be optimized based on the calculated cross entropy loss function, and steps S401 to S404 may be repeatedly performed until the model converges.

[0056] Finally, in step S405, an optimized anomaly detection model is obtained.

[0057] Therefore, even if the lesion area is very small relative to the entire image, the trained model can still be well classified, thereby improving the accuracy of large-resolution image classification tasks. In addition, when using ultra-wide-angle fundus images to train image classification models, the adversarial generative network solution is not used, and there is no need to generate additional ultra-wide-angle fundus images as samples. Instead, the optimization function (loss function) of model training is improved to make the solution simpler, easier to implement, and more efficient.

[0058] It should be noted that the above process only uses a binary abnormality detection model as an example to illustrate the training process of the image classification model, and the disclosed solution is not limited to this. For example, the image classification model may also include a multi-classification model. When it is a multi-classification model, the prediction result of the ultra-wide-angle fundus image is also adjusted to a multi-dimensional prediction result. For example, when the image classification model is a three-classification model, the prediction result of the ultra-wide-angle fundus image is a prediction result of three dimensions.

[0059] When the image classification model is a multi-classification model, the prediction result of any dimension of the ultra-wide-angle fundus image can be determined based on the maximum value or average value of the prediction results of all small-size target images obtained by cropping. In addition, the prediction results of each dimension of the ultra-wide-angle fundus image need to be corrected according to the needs. Then, the prediction results of each dimension after correction are compared with the annotation labels of the ultra-wide-angle fundus image to calculate the cross-entropy loss function between the two. For example, the cross-entropy loss function can be calculated by the following formula: Where C represents the number of categories in the classification task in the multi-classification model (for example, for the anomaly detection model, C = 2); i = 1, 2, ..., C; It is a logical function that returns 1 when the condition is met and 0 when the condition is not met.

[0060] In addition, it should be noted that the application scenario of the solution disclosed in the present invention is not limited to training the image classification model using ultra-wide-angle fundus images, but can also be extended to training the image classification model using other types of large-resolution images. Among them, other types of images may include some medical images or non-medical images with large resolution and a small proportion of the classification area relative to the entire image. Through the solution disclosed in the present invention, the problem of difficulty in classification caused by large resolution and extremely small proportion of the classification area can be solved.

[0061] The present disclosure also provides an electronic device. Figure 6 As shown, the electronic device 600 may include a processor 601 and a memory 602. The memory 602 stores computer instructions for training an image classification model. When the computer instructions are executed by the processor 601, the electronic device 600 executes the above-mentioned method in combination with the above-mentioned method. Figures 2 to 4 For example, in some embodiments, the electronic device 600 can generate a target picture set based on the ultra-wide-angle picture in the training sample (for example, cropping the ultra-wide-angle picture), predict the cropped target picture, determine the prediction result of the ultra-wide-angle fundus picture using the prediction result of the target picture, calculate the cross entropy loss function between the prediction result of the ultra-wide-angle fundus picture and the annotation label, and optimize the model parameters using the loss function. Based on this, the electronic device 600 can maintain the optimization training of the model under the dimension of the high-resolution ultra-wide-angle fundus picture, so that the entire training process is easy to implement and effectively improves the accuracy of the model's large-resolution image classification task.

[0062] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for training an image classification model, characterized in that: The method comprises: generating a target image set about the ultra-wide-angle image based on the ultra-wide-angle image in the training sample, wherein the resolution of the target image in the target image set is smaller than that of the ultra-wide-angle image; Predicting each target image in the target image set based on the image classification model to obtain a prediction result for each target image; Determining a prediction result of the ultra-wide-angle picture based on the prediction result of each target picture; and The image classification model is optimized and trained according to the prediction result of the ultra-wide-angle image.

2. The method according to claim 1, characterized in that The target picture set about the ultra-wide-angle picture based on the training sample includes: Performing cropping processing on the ultra-wide-angle image to obtain multiple target images; and The target picture set is constructed according to the plurality of cropped target pictures.

3. The method according to claim 1, characterized in that: Determining the prediction result of the ultra-wide-angle picture based on the prediction result of each target picture includes: The prediction result of one dimension of the ultra-wide-angle picture is determined based on a maximum value among the prediction results of all the target pictures or by using an average value of the prediction results of all the target pictures.

4. The method according to claim 3, characterized in that Also includes: Correction processing is performed on the prediction results of each dimension of the ultra-wide-angle picture so that the sum of the corrected prediction results of all dimensions of the ultra-wide-angle picture is 1.

5. The method according to claim 4, characterized in that Correcting the prediction result of one dimension of the ultra-wide-angle image includes: A ratio between a prediction result of any dimension of the ultra-wide-angle image and the prediction results of all dimensions is calculated to correct the prediction result of any dimension.

6. The method according to claim 3, characterized in that: The image classification model includes a binary classification model for distinguishing whether an image has a lesion, and determining a prediction result of one dimension of the ultra-wide-angle image includes: Determining a prediction result of a diseased dimension of the ultra-wide-angle image based on a maximum value among the prediction results of all the target images; and The prediction result of the disease-free dimension of the ultra-wide-angle image is determined based on an average value of the prediction results of all the target images.

7. The method according to any one of claims 1 to 6, characterized in that Optimizing and training the image classification model according to the prediction result of the ultra-wide-angle image includes: Obtaining a label for the ultra-wide-angle image; Calculating a loss function between a prediction result of the ultra-wide-angle image and the annotation label; and The parameters of the image classification model are optimized based on the calculated loss function to achieve optimized training of the image classification model.

8. The method according to claim 7, characterized in that Calculating the loss function between the prediction result of the ultra-wide-angle image and the annotated label includes: Calculate the cross entropy loss function between the prediction result of the ultra-wide-angle image and the annotation label.

9. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions for training an image classification model, wherein when the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: Contains program instructions for training an image classification model, and when the program instructions are executed by a processor, the method according to any one of claims 1-8 is implemented.

Citation Information

Patent Citations

  • Image recognition model training method and device, equipment, medium and program product

    CN114648680A

  • Image classification method, electronic equipment, storage medium and program product

    CN114743043A

  • Method for training image segmentation network model, method for processing image and product

    CN115641443A