Acne type recognition model training method and related device

By using the similarity information of acne images and standard images for labeling, and training the classification network model, the problem of low acne type recognition accuracy is solved and higher recognition accuracy is achieved.

CN112183603BActive Publication Date: 2024-11-19SHENZHEN SHULIAN TIANXIA INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202011004325.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-22
Publication Date
2024-11-19
Estimated Expiration
2040-09-22

AI Technical Summary

Technical Problem

The accuracy of acne type recognition in the prior art is low, mainly due to the small acne area and the lack of obvious characteristics between different categories, resulting in the low accuracy of classification labels.

Method used

The similarity information between the sample image and the standard image is used for annotation. The classification network model is trained by calculating the category probability label to reflect the similarity between categories, thereby improving the accuracy of acne type recognition.

Benefits of technology

Probabilistic labeling enables the model to learn similar characteristics between acne types, significantly improving the accuracy of acne type recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112183603B_ABST
    Figure CN112183603B_ABST
Patent Text Reader

Abstract

The present application discloses a method for training an acne type recognition model and a related device. The method includes: obtaining a sample data set, the sample data set including a plurality of sample images belonging to different acne types; obtaining a standard image corresponding to each acne type, the standard image being used to represent the acne pattern of an acne type; calculating the category probability label of each of the sample images, the category probability label including the similarity information between the sample image and each of the standard images; training a classification network model based on each of the sample images and the category probability labels corresponding to each of the sample images to obtain an acne type recognition model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method for training an acne type recognition model and related devices. Background Art

[0002] With the rapid development of mobile communication technology and the improvement of people's living standards, various smart terminals have been widely used in people's daily work and life, making people more and more accustomed to using terminal applications. As a result, the demand for apps with functions such as beauty selfies and photo skin testing has become more and more, and there is also a great demand for analysis of facial acne conditions. According to the type of acne, targeted skin improvement plans can be proposed or queried.

[0003] However, acne is small in area and the distinguishable features between different categories are not obvious, resulting in low accuracy in identifying acne types. Summary of the invention

[0004] The present application provides a method for training an acne type recognition model and related devices.

[0005] In a first aspect, a method for training an acne type recognition model is provided, comprising:

[0006] Acquire a sample data set, wherein the sample data set includes a plurality of sample images belonging to different acne types;

[0007] Obtaining a standard image corresponding to each acne type, wherein the standard image is used to represent the acne pattern of an acne type;

[0008] Calculating a category probability label for each of the sample images, wherein the category probability label includes a similarity probability between the sample image and each of the standard images;

[0009] A classification network model is trained based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model.

[0010] In a second aspect, a device for training an acne type recognition model is provided, comprising:

[0011] An acquisition module, used for acquiring a sample data set, wherein the sample data set includes a plurality of sample images belonging to different acne types;

[0012] The acquisition module is further used to acquire a standard image corresponding to each acne type, wherein the standard image is used to represent the acne pattern of an acne type;

[0013] A calculation module, used to calculate a category probability label of each of the sample images, wherein the category probability label includes similarity information between the sample image and each of the standard images;

[0014] The training module is used to train a classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model.

[0015] According to a third aspect, a computer storage medium is provided, wherein the computer storage medium stores one or more instructions, wherein the one or more instructions are suitable for being loaded by a processor and executing the steps of the first aspect and any possible implementation thereof.

[0016] The embodiment of the present application obtains a sample data set, the sample data set includes multiple sample images belonging to different acne types, obtains a standard image corresponding to each acne type, the standard image is used to represent the acne pattern of an acne type, calculates the category probability label of each of the sample images, the category probability label includes the similarity information between the sample image and each of the standard images, and then trains the classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model, which can accurately identify the acne type. The traditional classification labeling method has low classification accuracy, while the present application uses the similarity information between the sample image and each of the standard images for labeling during model training, which can reflect the similarity between the categories from the label, and the acne type label is probabilistic, so that the model can learn the similar features between acne types, thereby improving the accuracy of acne type recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0018] Figure 1 A flowchart of a method for training an acne type recognition model provided in an embodiment of the present application;

[0019] Figure 2 A flowchart of a method for training an acne type recognition model provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of the structure of an acne type recognition model training device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0022] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] The neural network (NN) involved in the embodiments of the present application is a complex network system formed by a large number of simple processing units (called neurons) widely connected to each other. It reflects many basic characteristics of human brain functions and is a highly complex nonlinear dynamic learning system. Neural networks have large-scale parallel, distributed storage and processing, self-organization, self-adaptation and self-learning capabilities, and are particularly suitable for processing imprecise and fuzzy information processing problems that require simultaneous consideration of many factors and conditions.

[0025] Convolutional Neural Networks (CNN) are a type of feedforward neural network that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning.

[0026] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.

[0027] See also Figure 1 , Figure 1: is a flowchart of a method for training an acne type recognition model provided in an embodiment of the present application. The method may include:

[0028] 101. Obtain a sample data set, where the sample data set includes a plurality of sample images belonging to different acne types.

[0029] The execution subject of the embodiment of the present application may be a pimple type recognition model training device, which may be an electronic device. In a specific implementation, the electronic device may be a terminal, which may also be referred to as a terminal device, including but not limited to other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the above-mentioned device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).

[0030] Specifically, a sample data set may be constructed first. The sample data set may include sample images of different application scenarios, different shooting qualities, and different acne types. The acne types may include comedones, post-acne erythema, inflammatory papules, pustules, nodules, and cysts.

[0031] In one embodiment, the method comprises:

[0032] Acquire a plurality of image data containing pimples, wherein the pimples belong to different categories;

[0033] The plurality of image data are normalized to obtain the plurality of sample images of a preset size, thereby obtaining the sample data set.

[0034] Since the acne image is small, the image data can be normalized first and the image size can be set to a preset size to facilitate accurate subsequent processing.

[0035] 102. Obtain a standard image corresponding to each acne type, wherein the standard image is used to represent the acne pattern of an acne type.

[0036] Specifically, a standard image corresponding to each acne type may be pre-set. Optionally, the standard image may be selected from the collected acne type data set, and the standard image may be used as a representative pattern image of the corresponding acne type and as a comparative reference image when classifying other processed images.

[0037] For example, acne types may include six types of samples: comedones, post-acne erythema, inflammatory papules, pustules, nodules and cysts. Six standard acne type images are selected, which can be represented as follows:

[0038] [y1T,y2T,y3T,y4T,y5T,y6T].

[0039] 103. Calculate a category probability label of each of the sample images, where the category probability label includes similarity information between the sample image and each of the standard images.

[0040] Specifically, for any sample image, the similarity with the standard image can be measured to generate a category probability label for the sample image, wherein the similarity information can take into account the similarity of image brightness, contrast, structure and other features, and the similarity evaluation values ​​of various aspects can be calculated according to preset calculation rules and integrated into a probability value, which can reflect the probability that a sample image belongs to the acne type corresponding to a standard image.

[0041] In one implementation, the above step 103 may include:

[0042] For any of the sample images, calculate the similarity probability between the sample image and each of the standard images;

[0043] Obtaining artificial labels for the sample images, where the artificial labels are used to mark the acne type to which the sample images belong;

[0044] The category probability label of the sample image is generated according to the artificial label of the sample image and the similarity probability.

[0045] The artificial labels of the sample images above can be the result of artificial calibration. The probability value in the artificial labels is 1 or 0, indicating whether it belongs to a certain acne type: 1 means it belongs, and 0 means it does not belong. For example, acne types include comedones, post-acne erythema, inflammatory papules, pustules, nodules and cysts. The categories in the artificial labels are also arranged in the above order. Assuming that the sample image x is determined to be an inflammatory papule by the artificial label, the artificial label can be expressed as Ta = [0, 0, 1, 0, 0, 0].

[0046] In the embodiment of the present application, since there are many common features between acne types, when setting labels, the above-mentioned artificial labels and the above-mentioned similarity probabilities can be combined to set new category probability labels for sample images.

[0047] 104. Train a classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model.

[0048] After determining the category probability labels of the above-mentioned sample images, the constructed classification network model can be trained according to the sample data set annotated with the above-mentioned category probability labels until the preset loss function converges to obtain the above-mentioned acne type recognition model.

[0049] In an optional implementation, the construction of the above classification network model can be as follows:

[0050] The feature extraction structure in the model is mainly composed of a convolutional layer, an upsampling layer, a fully connected layer and a softmax layer. The network structure is shown in Table 1:

[0051] Layer Input Operator c s 1 56*56*3 Conv2d(3*3) 32 2 2 28*28*32 Conv2d(3*3) 32 1 3 28*28*32 Up_downing 32 1 4 56*56*32 Conv2d(3*3) 64 1 5 56*56*64 Conv2d(3*3) 128 2 7 28*28*128 Conv2d(3*3) 256 2 9 14*14*256 Conv2d(3*3) 256 2 10 7*7*256 Conv2d(1*1) 512 1 11 7*7*512 FC - - 13 1*1*n softmax - _

[0052] Table 1

[0053] In the above Table 1, c represents the number of output channels, s represents the step size, and n represents the number of acne types.

[0054] The functions of the convolutional layers 1, 2, and 4-10 of the above network structure are to extract features; the 3rd layer is an upsampling layer, which mainly expands the size of the features, thereby deepening the network structure and enabling the network to further extract deep semantic features; the 11th layer is a fully connected layer, which mainly integrates the features in the image feature map that has passed through multiple convolutional layers and pooling layers, obtains the high-level meaning of the image features, and then uses it for image classification. In a convolutional neural network, the fully connected layer maps the feature map generated by the convolutional layer into a feature vector of a fixed length (generally the number of image categories in the input image data set). This feature vector contains the combined information of all features of the input image. Although the position information of the image is lost, the vector retains the most characteristic image features in the image, thereby completing the image classification task. Through the combination of the above convolutional layers, upsampling layers, and fully connected layers, image features can be fully and reasonably extracted during the training process and recognition process, which helps to obtain a model for accurately identifying acne and helps to improve the accuracy of acne recognition.

[0055] Optionally, the above-mentioned classification network model structure can be replaced by a proposed feature extraction structure, such as Mobilinet, VGG and other structures, which can be set as needed, and the embodiments of the present application are not limited to this.

[0056] Optionally, the method further includes:

[0057] Obtain an acne image to be processed;

[0058] The acne image to be processed is processed using the acne type recognition model to obtain the probability that the acne image to be processed belongs to the different acne types; and the acne type corresponding to the acne image to be processed is determined according to the probability;

[0059] Output the acne type corresponding to the above acne image to be processed.

[0060] The above steps can be performed after step 104. Through the above steps 101 to 104, a trained acne type recognition model can be obtained and then applied to the above processing steps. That is, the model obtained after training can also be used in other devices to perform the above processing steps, which is not limited here.

[0061] The acne image to be processed may be a captured image containing acne, or any skin image containing acne, such as a face image with acne. The acquired image may be pre-processed by cropping to obtain a standardized acne image to be processed, so as to identify the type of acne.

[0062] In the embodiment of the present application, the acne type recognition model obtained above can be used to process the acne image to be processed. Specifically, the probability of the acne image to be processed belonging to different acne types can be predicted, the acne type with the highest probability is determined to be the acne type corresponding to the acne image to be processed, and then the acne type corresponding to the acne image to be processed is output.

[0063] The embodiment of the present application obtains a sample data set, the sample data set includes multiple sample images belonging to different acne types, obtains a standard image corresponding to each acne type, the standard image is used to represent the acne pattern of an acne type, calculates the category probability label of each of the sample images, the category probability label includes the similarity probability between the sample image and each of the standard images, and then trains the classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model, which can accurately identify the acne type. The traditional classification labeling method has low classification accuracy, while the present application uses the similarity probability between the sample image and each of the standard images for labeling during model training, which can reflect the similarity between the categories from the label, and the acne type label is probabilistic, so that the model can learn the similar features between the acne types, thereby improving the accuracy of acne type recognition.

[0064] See also Figure 2 , Figure 2 FIG. 2 is a flow chart of another acne type recognition model training method provided in an embodiment of the present application. Figure 2 As shown, the method may specifically include:

[0065] 201. Obtain a sample data set, where the sample data set includes a plurality of sample images belonging to different acne types.

[0066] 202. Obtain a standard image corresponding to each acne type, where the standard image is used to represent the acne pattern of an acne type.

[0067] The above steps 201 and 202 can be respectively referred to Figure 1 Step 101 and step 102 in the illustrated embodiment will not be described in detail here.

[0068] 203. Obtain a brightness evaluation value, a contrast evaluation value, and a structure evaluation value between the sample image and any one of the standard images.

[0069] Specifically, for any sample image x, the brightness evaluation value, contrast evaluation value and structure evaluation value between the sample image x and each standard image y may be calculated respectively to obtain a structure similarity value representing the structural similarity between the two images.

[0070] The structural similarity (SSIM) involved in the embodiments of the present application is an indicator for measuring the similarity between two images. The range of structural similarity is 0 to 1. When the two images are exactly the same, the value of SSIM is equal to 1.

[0071] As an implementation of the structural similarity theory, the structural similarity index defines structural information as independent of brightness and contrast from the perspective of image composition, reflecting the properties of the object structure in the scene, and models distortion as a combination of three different factors: brightness, contrast, and structure. The mean can be used as an estimate of brightness, the standard deviation as an estimate of contrast, and the covariance as a measure of structural similarity.

[0072] Specifically, the brightness evaluation value r, contrast evaluation value c, and structure evaluation value s between the sample image x and any standard image y can be obtained according to the following formulas:

[0073]

[0074]

[0075]

[0076] Among them, μ x is the mean value of the pixel values ​​of each pixel in the sample image x, μ y is the mean value of the pixel values ​​of each pixel in the above standard image y, σ x is the variance of the pixel values ​​of each pixel in the sample image x, σ y is the variance of the pixel values ​​of each pixel in the above standard image y, σ xy is the covariance value of the pixel values ​​of the sample image x and the standard image y; c1=(k1·L) 2 , c2=(k2·L) 2 , the above L is the range of pixel values ​​in the sample image, and the above k1 and the above k2 are preset constants.

[0077] The brightness evaluation value, contrast evaluation value, and structure evaluation value involved in the above SSIM respectively indicate the differences in brightness, contrast, and texture structure of the two images. The larger these evaluation values ​​are, the closer the corresponding similarities are, and the larger the SSIM is, the closer the similarities are.

[0078] 204. Obtain a structural similarity value between the sample image and any one of the standard images according to the brightness evaluation value, the contrast evaluation value and the structure evaluation value, so as to obtain a structural similarity value between the sample image and each of the standard images.

[0079] In one embodiment, the structural similarity value SSIM between the sample image x and the standard image y can be expressed as:

[0080] SSIM(x,y)=r(x,y)×c(x,y)×s(x,y);

[0081] The structural similarity value can represent the similarity between the sample image x and the standard image to a certain extent. The larger the SSIM value, the smaller the difference between images x and y.

[0082] 205. Obtain a ratio of the structural similarity value between the sample image and each of the standard images in the total structural similarity value as a similarity probability between the sample image and each of the standard images.

[0083] After respectively calculating the structural similarity values ​​of the sample image x and each standard image, the proportion Tbi of the structural similarity value corresponding to each category in the total structural similarity value can be calculated.

[0084] Specifically, it can be expressed as:

[0085]

[0086] Where n represents the number of the above acne types.

[0087] The proportion Tbi of each category can be used as the probability distribution in the category probability label to obtain the category probability label corresponding to the sample image. For example, if there are 6 acne types, n=6, then the available category probability label Tb=[Tb1, Tb2, Tb3, Tb4, Tb5, Tb6].

[0088] Since the traditional classification labeling method is not sufficient to reflect the similarity between images of different acne types, the model training focuses more on information with obvious features, resulting in low accuracy of model recognition. Therefore, in this application, the acne category labels are probabilistically constructed through the above-mentioned SSIM structural similarity algorithm, which can reflect the similarity between the image and each category from the label. Then, the loss function is used for training, which can enable the model to better learn the similar features between different categories during the training process, thereby achieving the purpose of improving the accuracy of acne category recognition.

[0089] 206. Obtain an artificial label for the sample image, where the artificial label is used to mark the acne type to which the sample image belongs.

[0090] Among them, the artificial labels of the above sample images are the results of manual calibration, which can be the labels carried in the existing sample data set. The probability value in the above artificial labels is 1 or 0, indicating whether it belongs to a certain acne type: 1 means it belongs, and 0 means it does not belong. For example, acne types include six categories: comedones, post-acne erythema, inflammatory papules, pustules, nodules and cysts. The categories in the artificial labels are also arranged in the above order. Assuming that the sample image x artificial label is judged to be an inflammatory papule, the artificial label can be expressed as Ta = [0,0,1,0,0,0].

[0091] 207. Generate the category probability label of the sample image according to the artificial label of the sample image and the similarity probability.

[0092] In an optional implementation, the artificial label of the sample image and the similarity probability may be weighted according to a preset weight to obtain the category probability label of the sample image.

[0093] Specifically, the category probability label of the sample image can be set in the form of probability distribution. The probability distribution of its category probability label can be composed of two parts, one part is the artificial label Ta obtained by manual calibration, and the other part is the similarity probability Tb using the structural similarity value. The above preset weights can set the weights of the two parts to be a and b respectively (a and b are both greater than 0 and less than 1, and can be the same), then the probability distribution of the category probability label of the sample image is T = a*Ta+b*Tb. For example, if the weight values ​​of Ta and Tb are both set to 0.5, then T = 0.5Ta+0.5Tb. Assuming Ta = [0,0,1,0,0,0], Tb = [0.12,0.2,0.48,0.1,0.1,0.1], then:

[0094] T=0.5*[0,0,1,0,0,0]+0.5*[0.12,0.2,0.48,0.1,0.1,0.1]

[0095] =[0.06,0.1,0.74,0.05,0.05].

[0096] Through the above steps, the category probability label corresponding to each sample image can be obtained.

[0097] 208. Train a classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model.

[0098] The above step 208 can be referred to as Figure 1 Step 104 in the illustrated embodiment will not be described in detail here.

[0099] In the embodiment of the present application, the SSIM structural similarity algorithm is used to calculate the label probabilization. In an optional implementation, other calculation methods that can achieve the same purpose can be used, that is, the above-mentioned similarity information can be set with calculation rules as needed, and the embodiment of the present application does not limit this.

[0100] Specifically, the above step 208 includes:

[0101] Inputting the above-mentioned sample images and the category probability labels corresponding to the above-mentioned sample images into the above-mentioned classification network model, and outputting the predicted classification results of the above-mentioned sample images;

[0102] A loss function is used to calculate the predicted classification results of the above-mentioned each sample image and the loss value of the above-mentioned category probability label, and the network parameters of the above-mentioned classification network model are adjusted according to the above-mentioned loss value until the above-mentioned classification network model converges to obtain the above-mentioned acne type recognition model.

[0103] In one implementation, the above loss function may adopt a KL divergence loss function.

[0104] The KL divergence (Kullback-Leibler divergence) involved in the embodiments of the present application is relative entropy, also known as information divergence, which is an asymmetric measure of the difference between two probability distributions.

[0105] Specifically, the KL divergence loss function used in the embodiment of the present application may be:

[0106]

[0107] Among them, the above T is the above category probability label, the above P is the predicted classification result of the softmax layer of the above classification network model; the above Z represents the number of the above sample images, and the above n represents the number of the above acne types. For example, assuming n = 6, the probability distribution of the predicted classification result output by the softmax layer can be expressed as P = [P1, P2, P3, P4, P5, P6], and the probability distribution of the true category probability label is expressed as T = [T1, T2, T3, T4, T5, T6]. P and T can be substituted into the above KL divergence loss function to calculate the loss value, adjust the network parameters according to the loss value, and repeat the above steps until the model converges and the training is completed.

[0108] Further optionally, the above classification network model can select the optimization algorithm of the model as needed, such as using the Adam algorithm to optimize the model parameters. The number of iterations can be set to limit the convergence condition, that is, iterative training can be performed according to the preset number of iterations, learning rate, weight decay and other parameters to make the loss function converge, and a trained acne type recognition model is obtained after the training is completed. For example, the above number of iterations can be set to 500 times, the initialization learning rate can be set to 0.001, and the weight decay can be set to 0.0005. Every 50 iterations, the learning rate decays to 1 / 10 of the original.

[0109] By adopting the above KL divergence loss function, we can better utilize the advantages of label probabilism, so that the model can better learn similar features between different categories.

[0110] The acne type recognition model training method in the embodiment of the present application uses an acne type recognition model that combines the category probability label of the sample image and the manually annotated information as labels, and the category probability label is generated based on the similarity probability between the sample image and each standard image. The similarity between the categories can be reflected from the label, and the acne type label is probabilistic, rather than simply judging which category it is or is not. This allows the model to learn similar features between acne types and to more accurately identify the acne type corresponding to the image in the application.

[0111] Based on the description of the above acne type recognition model training method embodiment, the present application embodiment also discloses an acne type recognition model training device. Figure 3 The acne type recognition model training device 300 includes:

[0112] An acquisition module 310 is used to acquire a sample data set, wherein the sample data set includes a plurality of sample images belonging to different acne types;

[0113] The acquisition module 310 is further used to acquire a standard image corresponding to each acne type, wherein the standard image is used to represent the acne pattern of an acne type;

[0114] A calculation module 320, configured to calculate a category probability label of each of the sample images, wherein the category probability label includes similarity information between the sample image and each of the standard images;

[0115] The training module 330 is used to train a classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model.

[0116] Optionally, the acquisition device 310 is further used to acquire an acne image to be processed;

[0117] The calculation module 320 is also used to process the acne image to be processed using the acne type recognition model to obtain the probability that the acne image to be processed belongs to the different acne types; determine the acne type corresponding to the acne image to be processed according to the probability; and output the acne type corresponding to the acne image to be processed.

[0118] According to one embodiment of the present application, Figure 1 and Figure 2 Each step involved in the method shown can be performed by Figure 3 The operations performed by various modules in the acne type recognition model training device 300 are not described in detail here.

[0119] The acne type recognition model training device 300 in the embodiment of the present application can obtain a sample data set, the sample data set includes multiple sample images belonging to different acne types, obtain a standard image corresponding to each acne type, the standard image is used to represent the acne pattern of an acne type, calculate the category probability label of each of the sample images, the category probability label includes the similarity probability between the sample image and each of the standard images, and then train the classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain the acne type recognition model, which can accurately identify the acne type. The traditional classification labeling method has low classification accuracy, while in the present application, the similarity probability between the sample image and each of the standard images is used for labeling during model training, which can reflect the similarity between the categories from the label, and the acne type label is probabilistic, so that the model can learn the similar features between the acne types, thereby improving the accuracy of acne type recognition.

[0120] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It is understandable that the computer storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The computer storage medium provides a storage space that stores the operating system of the electronic device. In addition, one or more instructions suitable for being loaded and executed by the processor 401 are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0121] In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by a processor to implement the corresponding steps in the above embodiment; in a specific implementation, one or more instructions in a computer storage medium may be loaded and executed by a processor. Figure 1 and / or Figure 2 Any steps in the method will not be repeated here.

[0122] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0123] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the module is only a logical function division, and there may be other division methods in actual implementation, for example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

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

[0125] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a magnetic disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.

Claims

1. A method for training an acne type recognition model, characterized in that: include: Acquire a sample data set, wherein the sample data set includes a plurality of sample images belonging to different acne types; Obtaining a standard image corresponding to each acne type, wherein the standard image is used to represent the acne pattern of an acne type; Calculating a category probability label for each of the sample images, wherein the category probability label includes similarity information between the sample image and each of the standard images; Training a classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model; The calculating of the category probability label of each of the sample images comprises: For any of the sample images, calculate the similarity probability between the sample image and each of the standard images; obtain an artificial label for the sample image, the artificial label being used to mark the acne type to which the sample image belongs; generate the category probability label for the sample image based on the artificial label of the sample image and the similarity probability; The calculating of the similarity probability between the sample image and each standard image includes: Obtain a brightness evaluation value, a contrast evaluation value and a structure evaluation value between the sample image and any one of the standard images; obtain a structure similarity value between the sample image and any one of the standard images based on the brightness evaluation value, the contrast evaluation value and the structure evaluation value, so as to obtain a structure similarity value between the sample image and each of the standard images; obtain the proportion of the structure similarity value between the sample image and each of the standard images in the total structure similarity value as the similarity probability between the sample image and each of the standard images.

2. The acne type recognition model training method according to claim 1, characterized in that: The step of generating the category probability label of the sample image according to the artificial label of the sample image and the similarity probability comprises: The artificial label of the sample image and the similarity probability are weighted according to a preset weight to obtain the category probability label of the sample image.

3. The acne type recognition model training method according to claim 1 or 2, characterized in that: The step of training a classification network model based on each sample image and a category probability label corresponding to each sample image to obtain an acne type recognition model includes: Inputting each sample image and the category probability label corresponding to each sample image into the classification network model, and outputting the predicted classification result of the sample image; A loss function is used to calculate the predicted classification results of each sample image and the loss value of the category probability label, and the network parameters of the classification network model are adjusted according to the loss value until the classification network model converges to obtain the acne type recognition model.

4. The acne type recognition model training method according to claim 3, characterized in that: The obtaining of the sample data set comprises: Acquire a plurality of image data containing pimples, wherein the pimples belong to different categories; The plurality of image data are normalized to obtain a plurality of sample images of a preset size, thereby obtaining the sample data set.

5. The acne type recognition model training method according to claim 1, characterized in that: The method further comprises: Obtain an acne image to be processed; The acne image to be processed is processed using the acne type recognition model to obtain the probability that the acne image to be processed belongs to the different acne types; and the acne type corresponding to the acne image to be processed is determined according to the probability; Output the acne type corresponding to the acne image to be processed.

6. A pimple type recognition model training device, characterized in that: include: An acquisition module, used for acquiring a sample data set, wherein the sample data set includes a plurality of sample images belonging to different acne types; The acquisition module is further used to acquire a standard image corresponding to each acne type, wherein the standard image is used to represent the acne pattern of an acne type; A calculation module, used to calculate a category probability label of each of the sample images, wherein the category probability label includes similarity information between the sample image and each of the standard images; A training module, used for training a classification network model based on the sample images and the category probability labels corresponding to the sample images to obtain an acne type recognition model; The calculation module is specifically used to: for any one of the sample images, calculate the similarity probability between the sample image and each of the standard images; obtain the artificial label of the sample image, the artificial label is used to mark the acne type to which the sample image belongs; generate the category probability label of the sample image according to the artificial label of the sample image and the similarity probability; The calculation module is specifically used to: obtain a brightness evaluation value, a contrast evaluation value and a structure evaluation value between the sample image and any one of the standard images; obtain a structure similarity value between the sample image and any one of the standard images according to the brightness evaluation value, the contrast evaluation value and the structure evaluation value, so as to obtain a structure similarity value between the sample image and each of the standard images; The proportion of the structural similarity value between the sample image and each standard image in the total structural similarity value is obtained as the similarity probability between the sample image and each standard image.

7. The device according to claim 6, characterized in that The acquisition module is also used to acquire the acne image to be processed; The calculation module is also used to process the acne image to be processed using the acne type recognition model to obtain the probability that the acne image to be processed belongs to the different acne types; and determine the acne type corresponding to the acne image to be processed according to the probability; Output the acne type corresponding to the acne image to be processed.

8. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor executes the steps of the acne type recognition model training method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Method and apparatus for generating an adaptive training image dataset

    US12651441B2

  • Method and apparatus for generating an adaptive training image dataset

    US20230138430A1