Skin lesion image recognition and auxiliary diagnosis method based on artificial intelligence
By training convolutional neural networks and optimizing convolution kernels to generate a new lesion recognition model, the problem of misjudgment of similar features in traditional skin lesion diagnosis is solved, and accurate recognition and diagnosis of similar skin diseases is achieved, which is suitable for people with different skin colors.
Patent Information
- Application Number
- CN202510968055.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional diagnosis of skin lesions relies on the doctor's experience. It is difficult to accurately distinguish skin diseases with similar visual features, leading to misdiagnosis.
A convolutional neural network is used to train the lesion recognition model, determine the probability distribution through the activation function, analyze the correlation coefficients of similar skin diseases, optimize the convolution kernel to generate a new lesion recognition model, and identify incorrectly labeled images.
It improves the recognition accuracy of similar skin diseases, reduces misdiagnosis, enhances the generalization ability and diagnostic reliability of the model, and adapts to the diagnosis of skin lesions in people with different skin colors.
Smart Images

Figure CN120707557A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition and processing, and in particular to an artificial intelligence-based skin lesion image recognition and auxiliary diagnosis method. Background Art
[0002] As the largest organ in the human body, the skin carries important functions such as defending against external aggressions and regulating body temperature. However, because it is directly exposed to the external environment, skin lesions are extremely diverse, ranging from benign moles and seborrheic keratosis to malignant melanoma and skin cancer. Among them, melanoma is a highly malignant skin tumor. Early diagnosis and intervention can greatly improve the patient's cure rate and survival rate. Therefore, early and accurate diagnosis of skin lesions is of great significance.
[0003] Traditional skin lesion diagnosis relies on doctors' clinical experience, which limits diagnostic efficiency and accuracy for complex conditions. With the rapid development of artificial intelligence (AI), deep learning algorithms have achieved remarkable results in image recognition. By training on massive amounts of skin lesion images, lesion recognition models have been constructed, providing dermatologists with a powerful auxiliary diagnostic tool.
[0004] However, similar skin diseases have a large number of similar visual features such as texture, color, and shape in appearance. The lesion recognition model mainly learns and judges based on image features. If there are too many similar features, it will be difficult for the lesion recognition model to accurately distinguish them during the recognition process, and the characteristics of one skin disease may be misjudged as the characteristics of another skin disease. For example, psoriasis and seborrheic dermatitis have similarities in skin lesion morphology, and both may have manifestations such as erythema and scales, which may confuse the lesion recognition model A during recognition. In view of this, we propose an artificial intelligence-based skin lesion image recognition and auxiliary diagnosis method. Summary of the Invention
[0005] The purpose of this invention is to solve the problem that similar skin diseases have a high degree of overlap in visual features such as texture, color, and morphology, and the lesion recognition model relies on image features for judgment. When the feature similarity exceeds the model discrimination threshold, it is easy to cause feature misjudgment.
[0006] To achieve the above objectives, the present invention provides an artificial intelligence-based skin lesion image recognition and auxiliary diagnosis method, comprising the following steps:
[0007] S1, perceive skin lesion images with labeled lesion types and use convolutional neural networks to train lesion recognition model A;
[0008] S2, converting the output into a probability distribution using an activation function, determining the skin disease category in the skin lesion image, and analyzing skin diseases with similarities;
[0009] S3, perceiving skin diseases A and B that have similarities, and using a model optimization method to calculate the correlation coefficient between the lesion features, which is used to increase the convolution kernel of the convolution layer in lesion recognition model A, and regenerate lesion recognition model B;
[0010] S4. Retrieve the correlation coefficients between lesion features and identify skin lesion images that were incorrectly labeled when training the lesion recognition model A.
[0011] As a further improvement of this technical solution, the working steps of the convolutional neural network training lesion recognition model A are as follows:
[0012] S1.1. Divide the skin lesion images with labeled lesion types into training, test, and validation sets;
[0013] S1.2. Input the training set into the lesion recognition model A. The convolutional neural network includes a convolutional layer, a pooling layer, and a fully connected layer.
[0014] The convolution layer includes multiple convolution kernels, which slide on the skin lesion images in the training set to perform convolution operations and extract lesion features;
[0015] The pooling layer samples the lesion features and flattens the main lesion features obtained after processing by the convolutional and pooling layers into a feature vector, which is then input into the fully connected layer. The fully connected layer performs a linear transformation on the input feature vector and maps it to the output space. The dimension of the output space is the same as the number of skin disease categories, and each dimension represents the score corresponding to a skin disease category.
[0016] S1.3. Define a loss function to measure the difference between the prediction results of the lesion recognition model A and the true label;
[0017] S1.4. Use an optimization algorithm to minimize the loss function: The optimization algorithm updates the lesion recognition model A parameters according to the gradient of the loss function.
[0018] The beneficial effect of the above further scheme is that through the four core steps of data partitioning, feature extraction, loss quantification and parameter optimization, a closed-loop training process is formed to ensure that the lesion recognition model A learns effective diagnostic patterns from the training set and realizes end-to-end mapping from images to diagnostic results.
[0019] On the basis of the above technical solution, the present invention can also be improved as follows: the working principle of determining the convolution kernel in the convolution layer is as follows: when training the lesion recognition model A, the number of convolution kernels increases one by one, and the accuracy of the lesion recognition model A is calculated by continuously perceiving the test set; in the process of gradually increasing the number of convolution kernels, if the accuracy does not improve, the number of convolution kernels when the accuracy does not improve is defined as the number of convolution kernels in the lesion recognition model A.
[0020] The beneficial effect of this further approach is that the number of convolution kernels directly determines the number of parameters and expressive power of the neural network. Too many kernels can cause the model to overfit the noise in the training data, while too few can fail to capture the key features of the lesion. When the test set accuracy stops improving, the number of kernels is immediately stopped, automatically finding the minimum model that just meets the requirements, reducing unnecessary parameters and shortening the training time. For example, while traditional methods require trying 10 combinations of kernel numbers, this method may converge after 3-5 iterations.
[0021] On the basis of the above technical solution, the present invention can also be improved as follows:
[0022] The loss function calculates the average of the squares of the differences between the predicted values and the correct values of the lesion recognition model A, squares the prediction errors of each labeled lesion type skin lesion image, and then averages them to measure the overall error level. When training the lesion recognition model A, the parameters are adjusted in the direction of minimizing the mean square error. The calculation formula is: the number of perceived labeled lesion type skin lesion images is N, the correct value of the i-th labeled lesion type skin lesion image is y i , the prediction value of lesion recognition model A for the i-th sample is Then the loss function MSE is:
[0023] As a further improvement of this technical solution, the working principle of determining the skin disease category in the skin lesion image in S2 is as follows:
[0024] The output layer of the perceptual lesion recognition model A has C neurons, corresponding to C skin disease categories. The output of the i-th neuron is z i , after the activation function is processed, the probability p of the i-th category i The calculation formula is: Where e is a natural constant, the molecule is the exponential value of the i-th output, the denominator is the sum of all output index values, where the category with the highest probability is the skin disease category predicted by the lesion recognition model A.
[0025] As a further improvement of this technical solution, the working principle of analyzing skin diseases with similarity is as follows:
[0026] Set the probability threshold, and the perceptual activation function outputs the probability of skin disease A as P A , the probability of skin disease B is P B , the probability difference is ΔP=|P A -P B|; If the probability difference between skin disease A and skin disease B after conversion by the activation function is less than the probability threshold, it is determined that skin disease A and skin disease B have similarity.
[0027] The beneficial effect of the above further scheme is that by comparing the probabilities of different skin diseases output by the activation function, the similarity between skin diseases is judged, skin diseases with similar characteristics are classified into one category, and the lesion recognition model B is generated in the next step.
[0028] On the basis of the above technical solution, the present invention can also be improved as follows.
[0029] As a further improvement of the present technical solution, the working principle of the model optimization method is as follows: when training the lesion recognition model A, multiple skin lesion images corresponding to skin disease A and skin disease B are retrieved and constructed into image set A and image set B respectively;
[0030] The convolution kernel in the perceived lesion recognition model A extracts multiple lesion features from the image sets A and B, analyzes the correlation between the lesion features in the image sets A and B respectively, generates the correlation between the lesion features into the corresponding correlation convolution kernel, inputs it into the lesion recognition model A, and together with the original convolution kernel forms a new convolution layer to construct the lesion recognition model B, and further uses the loss function and optimization algorithm to optimize the lesion recognition model B.
[0031] The beneficial effect of the above further scheme is that by analyzing the correlation of lesion features in the skin disease A and B image sets, the deep correlation information hidden in the image is excavated, breaking through the limitation of recognizing only a single lesion feature, generating a new convolution kernel based on the feature correlation and integrating it into model A to construct model B, so that the model structure is more in line with the characteristic patterns of similar skin diseases, enhancing the model's targetedness, and enabling the lesion recognition model B to more accurately capture the differences in similar skin disease characteristics. When faced with complex and confusing skin lesion images, the recognition accuracy is significantly improved and misjudgment is reduced.
[0032] On the basis of the above technical solution, the present invention can also be improved as follows:
[0033] The working principle of analyzing the correlation between lesion features is as follows: the skin diseases in the perceived image set A have multiple lesion features, the ratio of the covariance and the standard deviation product of the lesion features is cross-calculated to determine the correlation coefficient between two lesion features, and a correlation threshold is set. If the calculated correlation coefficient of the two lesion features is greater than the correlation threshold, it is determined that there is a correlation between the two lesion features.
[0034] The beneficial effect of the above further scheme is that the correlation coefficient is calculated using the ratio of the covariance and the standard deviation product, which accurately measures the degree of correlation between lesion features in a quantitative manner, provides objective data support for model optimization, and the selected key related features are used to generate new convolution kernels, reducing unnecessary model parameters and improving model training and recognition efficiency.
[0035] On the basis of the above technical solution, the present invention can also be improved as follows:
[0036] When the lesion recognition model A identifies a skin disease, if the activation function outputs a probability difference of the skin disease that is less than the probability threshold, the skin disease corresponding to the probability difference less than the probability threshold and the lesion recognition model B corresponding to the skin disease are called out, and the lesion recognition model B is used to accurately identify the skin disease again. After identifying the skin disease, a prompt signal of the skin disease is output to the doctor. When model A is difficult to distinguish similar skin diseases, model B is called in time for secondary recognition, which adds an accurate guarantee for diagnosis, reduces the possibility of misdiagnosis due to the similarity of skin diseases, and ensures that patients receive correct treatment.
[0037] As a further improvement of the present technical solution, the working principle of the method for identifying and labeling incorrect skin lesion images is as follows: perceiving correlated lesion features; calling out the correlation coefficient between lesion features; if there is an image in the image set whose correlation coefficient of lesion features is less than the correlation threshold, the image is marked and it is determined that there is an error in the labeling cause.
[0038] The beneficial effect of the above further solution is to identify images that may be incorrectly labeled in the skin lesion image dataset, avoid the incorrectly labeled data from interfering with the training and application of the lesion recognition model, and ensure the reliability and accuracy of the data;
[0039] By using the correlation coefficient of the relevant lesion features as a quantitative indicator, the degree of association between lesion features can be accurately measured. By comparing the correlation coefficient based on the correlation threshold, incorrectly labeled images can be accurately located, and anomalies can be identified from a large number of skin lesion image data sets. After excluding incorrectly labeled images, the quality of the lesion recognition model training data is significantly improved. The model can learn more realistic and effective lesion features, enhance generalization ability and recognition accuracy, and improve diagnostic reliability in actual clinical applications.
[0040] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of the working steps of the present invention;
[0042] Figure 2 This is a flow chart of the working principle of Model A of the present invention for predicting skin diseases;
[0043] Figure 3 This is a flowchart of the working principle of analyzing skin diseases with similarity in the present invention;
[0044] Figure 4 This is a flow chart of the working principle of constructing Model B in the present invention;
[0045] Figure 5 This is a flow chart of the principle of analyzing whether the skin lesion image with the labeled lesion type is correct in the present invention. DETAILED DESCRIPTION
[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0047] Example 1: Skin lesion image recognition and diagnosis for the skin color of the local skin population, refer to Figure 1-Figure 5 As shown, a skin lesion image recognition and auxiliary diagnosis method based on artificial intelligence includes the following steps:
[0048] S1. Sense skin lesion images with labeled lesion types and use a convolutional neural network to train a lesion recognition model A. The convolutional neural network works as follows:
[0049] S1.1. Divide the skin lesion images with labeled lesion types into a training set, a test set, and a validation set. (The skin lesion images with labeled lesion types are obtained from publicly stored skin lesion images of yellow skin tones in domestic medical institutions and are obtained by applying to access domestic medical institutions to further reduce the computing power required to train the lesion recognition model A.)
[0050] The training set is used by lesion recognition model A to explore the potential relationship and rules between lesion features and lesion types in skin lesion images; the test set is used to calculate the accuracy of lesion recognition model A in identifying different types of skin diseases after training; the validation set is used to adjust hyperparameters (such as learning rate, number of convolution kernels, etc.) during training to prevent lesion recognition model A from overfitting on the training set.
[0051] S1.2. Input the training set into the lesion recognition model A. The convolutional neural network includes a convolutional layer, a pooling layer, and a fully connected layer.
[0052] The convolution layer includes multiple convolution kernels (multiple convolution kernels are used to extract different lesion features, and each convolution kernel is used to extract a lesion feature). Multiple convolution kernels slide on the skin lesion images of the training set to perform convolution operations and extract lesion features. The specific convolution kernel is a weight matrix. When the convolution kernel slides on the image, the weighted sum of the image area at each position is performed to extract the lesion features.
[0053] Specifically, the shape features of the lesion, including perimeter, area, circularity, etc., are extracted using the edge convolution kernel; the color features are extracted using the color convolution kernel;
[0054] In order to avoid the situation where the lesion recognition model A cannot fully extract the features in the lesion image due to too few convolution kernels, resulting in limited performance and inability to accurately identify lesions, the number of convolution kernels is increased one by one when training the lesion recognition model A, and the accuracy of the lesion recognition model A is calculated based on the continuous perception test set. If the accuracy does not improve during the process of gradually increasing the number of convolution kernels, the number of convolution kernels when the accuracy does not improve is defined as the number of convolution kernels in the lesion recognition model A.
[0055] The pooling layer downsamples the lesion features, reduces the data dimension, and retains the main lesion features. Specifically, the lesion features are divided into multiple non-overlapping sub-regions at equal intervals, and the maximum value in each sub-region is selected as the output.
[0056] The main lesion features obtained after processing by the convolutional layer and the pooling layer are flattened into feature vectors and input into the fully connected layer. In the fully connected layer, the input feature vectors are linearly transformed and mapped to the output space. The dimension of the output space is the same as the number of skin disease categories, and each dimension represents the score corresponding to a skin disease category.
[0057] S1.3. Define a loss function to measure the difference between the prediction results of the lesion recognition model A and the true label;
[0058] The loss function calculates the average of the squares of the differences between the predicted values and the correct values of the lesion recognition model A. The prediction error of each labeled skin lesion image is squared, and the penalty for samples with larger errors is increased. The average is then taken to measure the overall error level. When training, the lesion recognition model A adjusts the parameters in the direction of minimizing the mean square error. The calculation formula is: the number of skin lesion images with labeled lesion types is N, and the correct value of the i-th labeled skin lesion image is y i , the prediction value of lesion recognition model A for the i-th sample is Then the loss function MSE is:
[0059] S1.4. Use optimization algorithm to minimize the loss function: The optimization algorithm updates the parameters of lesion recognition model A according to the gradient of the loss function, so that the predicted value of model A gradually approaches the true value; in each iteration, lesion recognition model A calculates the gradient of the loss function with respect to the parameters and adjusts the parameters according to the direction and magnitude of the gradient: the parameters of the perceived lesion recognition model A are θ, the loss function is L(θ), the learning rate is η, and in the tth iteration, the skin lesion image with the labeled lesion type selected from the training set is x (t) and its corresponding true value y (t) , then the parameter update formula is: in is the loss function L with respect to the parameter θ t In the skin lesion image with labeled lesion type (x (t) ,y (t) ) on the gradient.
[0060] When S1 uses a convolutional neural network to train lesion recognition model A, it uses skin lesion data of yellow-skinned people collected by domestic medical institutions and divides it into training set, test set, and validation set. By taking advantage of the convenient acquisition of local data with the same skin color, it can quickly complete the "data collection → labeling → data set division" closed loop; compared with cross-skin color and cross-national data collection, local data with the same skin color do not require additional coordination of international cooperation and cross-ethnic ethical review, shortening the data preparation cycle and accelerating the initial training and verification of lesion recognition model A and lesion recognition model B.
[0061] Although the loss function can be optimized by using an optimization algorithm, the accuracy of the lesion recognition model A in identifying some skin diseases will still be reduced due to the high similarity of some skin diseases. Figure 2 and Figure 3 As shown, when the lesion recognition model A classifies the skin lesion image, S2 uses the activation function to convert the output into a probability distribution, which represents the probability that the skin lesion image belongs to each skin disease category. The category with the highest probability is the skin disease category predicted by model A: The output layer of the perceptual lesion recognition model A has C neurons, corresponding to C skin disease categories, and the output of the i-th neuron is z i , after the activation function is processed, the probability p of the i-th category i The calculation formula is: Where e is a natural constant (approximately equal to 2.71828), the molecule is the exponential value of the i-th output, the denominator is the sum of all output index values;
[0062] Set the probability threshold, and the perceptual activation function outputs the probability of skin disease A as P A , the probability of skin disease B is P B , the probability difference is ΔP=|P A-P B |; If the probability difference between skin disease A and skin disease B after conversion by the activation function is less than the probability threshold, then skin disease A and skin disease B are judged to be similar. When the lesion recognition model A in S1 recognizes skin disease A and skin disease B, classification errors are likely to occur, that is, images belonging to skin disease A are mistakenly classified as skin disease B.
[0063] S3, perceiving skin diseases A and B that have similarities, using a model optimization method to increase the convolution kernel of the convolution layer in lesion recognition model A, and regenerating lesion recognition model B;
[0064] The working principle of the model optimization method is as follows: when the training lesion recognition model A is called, multiple skin lesion images corresponding to skin disease A and skin disease B are constructed into image set A and image set B respectively;
[0065] The convolution kernel in the perceived lesion recognition model A extracts multiple lesion features from image sets A and B, analyzes the correlation between the lesion features in image sets A and B, generates the corresponding correlation convolution kernel based on the correlation between the lesion features, inputs it into the lesion recognition model A, and together with the original convolution kernel, forms a new convolution layer to construct the lesion recognition model B. The lesion recognition model B is further optimized using a loss function and optimization algorithm.
[0066] The working principle of analyzing the correlation between lesion features is as follows: there are multiple lesion features in the perceived image set A for skin diseases, and the ratio of the covariance and standard deviation product of the lesion features is cross-calculated to determine the correlation coefficient between two lesion features. A correlation threshold is set. If the calculated correlation coefficient of the two lesion features is greater than the correlation threshold, then the two lesion features are judged to be correlated. The calculation formula is: there are n images in the perceived image set A, and each image has m lesion features. Represents m lesion features, lesion feature X i and X j The correlation coefficient r ij for:
[0067]
[0068] where x ki is the lesion feature X in the kth sample i The value of X is the lesion feature i The mean of x kj is the lesion feature X in the kth sample j The value of Lesion characteristics X j The mean of
[0069] When the lesion recognition model A identifies skin diseases, it generates a new correlation convolution kernel by analyzing the correlation of lesion features for skin diseases with similarity, and constructs a new lesion recognition model B to improve the model's recognition ability for similar skin diseases; specifically, if the activation function outputs the probability difference of the skin disease less than the probability threshold, the skin disease corresponding to the probability difference less than the probability threshold and the lesion recognition model B corresponding to the skin disease are called out, and the lesion recognition model B is used to accurately identify the skin disease again. After the skin disease is identified, a prompt signal of the skin disease is output to the doctor to facilitate further diagnosis by the doctor.
[0070] By exploring the intrinsic connections between the features of similar skin diseases and using correlation analysis to enhance the model's feature extraction capabilities, the accuracy of distinguishing similar skin diseases can be improved, enabling the lesion recognition model to more accurately classify similar skin diseases, thereby improving the overall performance and diagnostic accuracy of the lesion recognition model.
[0071] In order to avoid the situation in which the lesion recognition model is trained incorrectly due to the incorrect labeling of the skin lesion images with the lesion type, refer to Figure 2 and Figure 3 As shown, S4, perceives lesion features with correlation; calls out the correlation coefficient between the lesion features, and if there is an image in the image set whose lesion feature correlation coefficient is less than the correlation threshold, the image is marked to provide information on whether the cause of the disease is marked incorrectly, and assist medical staff in checking whether the cause of the disease is marked incorrectly, thereby improving the accuracy of the training data and ensuring the training quality of the lesion recognition model.
[0072] Example 2, based on Example 1, performs skin lesion image recognition and diagnosis for global skin colors (including yellow skin color, white skin color, and black skin color), and forms the following new steps:
[0073] Skin lesion images with labeled lesion types are perceived and divided into a training set, a test set, and a validation set. The skin lesion images with labeled lesion types are obtained from publicly stored skin lesion images of different skin colors in medical institutions around the world. These images are obtained by applying for access to global medical institutions, and then a convolutional neural network is used to train a lesion recognition model A. An activation function is used to convert the output into a probability distribution, and the skin disease categories in the skin lesion images of different skin colors are determined, and similar skin diseases are analyzed. A model optimization method is used to calculate the correlation coefficient between similar skin disease lesion features, which is used to increase the convolution kernel of the convolution layer in the lesion recognition model A, and a lesion recognition model B is regenerated. The correlation coefficient between the lesion features is retrieved to identify skin lesion images of different skin colors that were incorrectly labeled when training the lesion recognition model A.
[0074] In summary, the image recognition and auxiliary diagnosis methods for skin lesions of people with different skin colors around the world (yellow, white, and black) can be developed by training lesion recognition models to avoid missed or misdiagnosed cases of white and black patients due to the model only being adapted to yellow data (for example, melanoma in black skin may appear as hypopigmented spots, which are significantly different from the dark patches of yellow / white people). This allows people of different skin colors to enjoy the accuracy of AI-assisted diagnosis, especially benefiting regions with scarce medical resources and a shortage of dermatologists (such as Africa and Latin America), and promoting the universal access to medical technology.
[0075] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence, characterized in that: The following steps are involved: S1, perceive skin lesion images with labeled lesion types and use convolutional neural networks to train lesion recognition model A; S2, using an activation function to convert the output into a probability distribution, determining the skin disease category in the skin lesion image, and analyzing skin diseases with similarities; S3. Calculate the correlation coefficient between similar skin lesion features using a model optimization method, use it to increase the convolution kernel of the convolution layer in the lesion recognition model A, and regenerate the lesion recognition model B; S4. Retrieve the correlation coefficients between lesion features and identify skin lesion images that were incorrectly labeled when training the lesion recognition model A.
2. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 1, characterized in that: The working steps of the convolutional neural network training lesion recognition model A are as follows: S1.
1. Divide the skin lesion images with labeled lesion types into training, test, and validation sets; S1.
2. Input the training set into the lesion recognition model A. The convolutional neural network includes a convolutional layer, a pooling layer, and a fully connected layer. The convolution layer includes multiple convolution kernels, which slide on the skin lesion images in the training set to perform convolution operations and extract lesion features; The pooling layer samples the lesion features and flattens the main lesion features obtained after processing by the convolutional and pooling layers into a feature vector, which is then input into the fully connected layer. The fully connected layer performs a linear transformation on the input feature vector and maps it to the output space. The dimension of the output space is the same as the number of skin disease categories, and each dimension represents the score corresponding to a skin disease category. S1.
3. Define a loss function to measure the difference between the prediction results of the lesion recognition model A and the true label; S1.
4. Use an optimization algorithm to minimize the loss function: The optimization algorithm updates the lesion recognition model A parameters according to the gradient of the loss function.
3. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 2, characterized in that: The working principle of determining the convolution kernel in the convolution layer is as follows: when training the lesion recognition model A, the number of convolution kernels is increased one by one, and the accuracy of the lesion recognition model A is calculated by continuously perceiving the test set; when the number of convolution kernels is gradually increased, if the accuracy does not improve, the number of convolution kernels when the accuracy does not improve is defined as the number of convolution kernels in the lesion recognition model A.
4. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 2, characterized in that: The loss function calculates the average of the squares of the differences between the predicted values and the correct values of the lesion recognition model A, squares the prediction errors of each labeled lesion type skin lesion image, and then averages them to measure the overall error level. When training the lesion recognition model A, the parameters are adjusted in the direction of minimizing the mean square error. The calculation formula is: the number of perceived labeled lesion type skin lesion images is N, the correct value of the i-th labeled lesion type skin lesion image is y i , the prediction value of lesion recognition model A for the i-th sample is Then the loss function MSE is:
5. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 4, characterized in that: In S2, the working principle of determining the skin disease category in the skin lesion image is as follows: The output layer of the perceptual lesion recognition model A has C neurons, corresponding to C skin disease categories. The output of the i-th neuron is z i , after the activation function is processed, the probability p of the i-th category i The calculation formula is: Where e is a natural constant, the molecule is the exponential value of the i-th output, the denominator is the sum of all output index values, where the category with the highest probability is the skin disease category predicted by the lesion recognition model A.
6. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 5, characterized in that: The analysis of skin diseases with similarity works as follows: Set the probability threshold, and the perceptual activation function outputs the probability of skin disease A as P A , the probability of skin disease B is P B , the probability difference is ΔP=|P A -P B |; If the probability difference between skin disease A and skin disease B after conversion by the activation function is less than the probability threshold, it is determined that skin disease A and skin disease B have similarity.
7. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 1, characterized in that: The working principle of the model optimization method is as follows: when training the lesion recognition model A, multiple skin lesion images corresponding to skin disease A and skin disease B are retrieved and constructed into image set A and image set B respectively; The convolution kernel in the perceived lesion recognition model A extracts multiple lesion features from the image sets A and B, analyzes the correlation between the lesion features in the image sets A and B respectively, generates the correlation between the lesion features into the corresponding correlation convolution kernel, inputs it into the lesion recognition model A, and together with the original convolution kernel forms a new convolution layer to construct the lesion recognition model B, and further uses the loss function and optimization algorithm to optimize the lesion recognition model B.
8. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 7, characterized in that: The working principle of analyzing the correlation between lesion features is as follows: the skin diseases in the perceived image set A have multiple lesion features, the ratio of the covariance and the standard deviation product of the lesion features is cross-calculated to determine the correlation coefficient between two lesion features, and a correlation threshold is set. If the calculated correlation coefficient of the two lesion features is greater than the correlation threshold, it is determined that there is a correlation between the two lesion features.
9. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 8, characterized in that: When the lesion recognition model A identifies a skin disease, if the activation function outputs a probability difference of the skin disease that is less than the probability threshold, the skin disease corresponding to the probability difference less than the probability threshold and the lesion recognition model B corresponding to the skin disease are called out, and the lesion recognition model B is used to accurately identify the skin disease again. After the skin disease is identified, a prompt signal of the skin disease is output to the doctor.
10. The method for skin lesion image recognition and auxiliary diagnosis based on artificial intelligence according to claim 1, characterized in that: The working principle of the identification of incorrectly labeled skin lesion images is as follows: perceiving lesion features with correlation; calling out the correlation coefficient between lesion features; if there is an image in the image set whose correlation coefficient of lesion features is less than the correlation threshold, the image is marked and it is determined that the labeled cause is incorrect.