A periodontal disease image classification method and system based on transfer learning

Through transfer learning and end-to-end data processing, the problem of small and unbalanced periodontal disease imaging data is solved, and a periodontal disease image classification model with good generalization performance is trained to improve classification accuracy and reduce the burden on doctors.

CN118351367BActive Publication Date: 2025-09-12NANJING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410462765.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2025-09-12
Estimated Expiration
2044-04-17

AI Technical Summary

Technical Problem

Periodontal disease medical imaging data is small in quantity, unbalanced, poorly labeled, and not very transferable, which makes it difficult to train deep learning models with good generalization performance in this field, affecting classification accuracy.

Method used

By adopting the transfer learning method, pre-training the model on mature datasets, combining it with an end-to-end data processing process, and using dental expert annotation and data augmentation technology, a periodontal disease image classification model with good generalization performance was trained.

Benefits of technology

With limited periodontal image data, the model can be quickly generalized and the classification accuracy can be improved, which can reduce the workload of doctors and provide an automated solution for data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118351367B_ABST
    Figure CN118351367B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for periodontal disease image classification based on transfer learning, including the identification and screening of patient periodontal images, preprocessing of periodontal images and preparation of data sets, acquisition of pre-trained models, and training and updating of deep models based on transfer learning. First, a sequence of patient photos actually taken in the hospital is obtained, and the patient's periodontal frontal photos are identified therefrom, and the identified data are pre-processed; then, based on the transfer learning method, the pre-trained model is trained and fine-tuned using the periodontal data, and finally a generalized prediction model is obtained. The present invention utilizes the transfer learning method to enable the deep model to still achieve good classification accuracy on a small amount of data, thereby reducing the difficulty of data collection and improving the accuracy of periodontal disease image recognition and classification. Based on the end-to-end idea, the target image is automatically identified and predicted for the original image sequence, thereby reducing the workload of doctors and having good application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a periodontal disease image classification method and system based on transfer learning, belonging to the technical field of image data processing. Background Art

[0002] Clinical diagnosis of periodontal disease has entered a digital and intelligent phase. Image classification methods for periodontal disease based on artificial intelligence and deep learning have attracted widespread attention from researchers and industry professionals. However, unlike AI applications, which already have large-scale, mature data, medical imaging data for periodontal disease classification must be obtained from actual patients in practice, making bulk collection difficult. Furthermore, medical imaging data for periodontal disease classification requires extensive expertise from dentists to carefully annotate, requiring high-quality, specialized data annotation. Consequently, authoritative public datasets for periodontal disease-related tasks are generally lacking. Furthermore, the types of patient data collected often correlate with disease severity and morbidity, leading to significant imbalances between data categories. Furthermore, in real-world applications, periodontal medical imaging data from different application scenarios and sources often have varying capture quality and standards, resulting in significant variations in texture features. In summary, medical imaging data in the periodontal disease field often suffers from numerous challenges, including small quantity, imbalance, and poorly annotated data. Furthermore, labeling these data often requires significant time and effort from professional clinicians, and image data from different sources can vary in texture and distribution, lacking transferability. Such problems make it difficult to train a model with strong generalization performance from scratch on actual periodontal disease medical imaging datasets, which affects the accuracy of model classification and makes it impossible to put it into practical application. Summary of the Invention

[0003] Purpose of the invention: Medical imaging data has many problems such as small quantity, imbalance, few annotations, and weak transferability. It is difficult for existing deep learning algorithms to train models with good generalization performance on them. To address this problem, we adopt the idea of ​​transfer learning. By obtaining a pre-trained model on a mature data set task, we help the downstream task learn an initialization parameter with good generalization, and use the downstream medical imaging data to obtain the target model. Due to task limitations, the medical imaging data applicable to this method are all periodontal frontal images of patients. The method of the present invention can help the deep learning model to quickly generalize to the current task in the case of limited periodontal image data, while ensuring the stability of the accuracy. In addition, based on the end-to-end idea, we use traditional image processing methods to complete the automation of the screening process of "image sequence-target high-quality image data", which greatly reduces the workload of doctors and provides the possibility for large-scale data collection.

[0004] Technical solution: A periodontal disease image classification method based on transfer learning algorithm, which includes four parts: end-to-end raw data recognition and preprocessing, preparation of pre-trained model, training of a model with good generalization performance on a small number of periodontal images based on transfer learning algorithm, and recognition and classification of periodontal disease images.

[0005] In the end-to-end raw data recognition and preprocessing, the following steps are performed: collect patient image sequences taken by digital cameras; identify the patient's frontal periodontal images from the sequences; perform preprocessing on the periodontal images, including cropping and rotation, to form an unlabeled dataset S_1;

[0006] In the preparation of the pre-training model: select an appropriate deep learning model and initialize its parameters, denoted as M_0; collect available public annotated datasets, denoted as H; use the cross entropy loss function and the labeled data in H to perform multiple rounds of gradient descent and backpropagation on the initial model M_0 to update the parameters until the model overfits on the training set and the accuracy on the test set no longer increases significantly. At this point, the training is considered complete and the model is denoted as M_1.

[0007] Based on the transfer learning algorithm, a model with good generalization performance is trained on a small number of periodontal images: for the dataset S_1 obtained in the original data preprocessing, periodontal experts are invited to annotate it to obtain the annotated dataset S_2; the data in S_2 are divided, randomly cropped and enhanced to form the training dataset S; according to the number of samples in each category, weights are generated for the data in the dataset S to form a weighted dataset S_w; using the cross-entropy loss function and the labeled data in S, multiple rounds of gradient descent and parameter updates are first performed on the pre-trained model M_1; then, using the weighted cross-entropy loss function and the labeled data and their weights in S_w, further gradient descent and parameter updates are performed on the pre-trained model M_1, and the final trained model is recorded as M_f.

[0008] In the recognition and classification of periodontal disease images: end-to-end raw data recognition and preprocessing steps are used to re-collect patient image data to form an unlabeled dataset, denoted as T_1; the data in T_1 are randomly cropped to form a dataset T, and each original data in T_1 corresponds to k data in the enhanced T; the fc layer of M_f is taken out, and each sample in the dataset T is input into the model M_f to obtain the feature vector of the sample; using the obtained sample feature vector and the weight and bias parameters of the fc layer, the τ-norm classification method is used to calculate the output of each sample in T; the output vectors of the k samples in T corresponding to the same data in the original T_1 dataset are regarded as a group, and the average of the k outputs is calculated, and the category with the highest confidence in the result is used as the classification judgment result of the patient's periodontal image corresponding to the original data.

[0009] The end-to-end raw data recognition and preprocessing are as follows:

[0010] Step 100 , collecting a patient image sequence taken by a digital camera, wherein each patient's image sequence begins with the patient's nameplate and includes a varying number of images, at least one of which is a frontal periodontal image of the patient;

[0011] Step 101 , identifying an image whose width is less than its length and whose R channel mean is greater than at least one of the GB channel means from the original sequence of all patient images, and using it as the location of the patient nameplate;

[0012] Step 102, using the patient nameplate as a segmentation criterion, segmenting the image subsequence corresponding to each patient;

[0013] Step 103: for each patient image subsequence, remove images with width greater than length;

[0014] Step 104: for the remaining images in the sequence, remove the images whose pixel mean is less than the threshold t_1;

[0015] Step 105: For the remaining images in the sequence, remove the images whose pixel mean is greater than a threshold value t_2; the threshold values ​​t_1 and t_2 are selected as 20 and 200 respectively;

[0016] Step 106: for the image obtained in step 105, respectively calculate the mean and variance of the RGB channels after center cropping, and calculate the Euclidean distance L_1 with the mean of the standard periodontal frontal image;

[0017] Step 107: for the image obtained in step 105, calculate the pixel mean after center cropping, denoted as L_2;

[0018] Step 108: For the image obtained in step 105, respectively calculate the mean and variance of the RGB channels of the left and right half images, and calculate the Euclidean distance L_3 between the mean and variance of the left and right images;

[0019] Step 109 , let L=L_1-L_2+L_3. For the images obtained in step 105 , calculate their L values ​​respectively, and find the image corresponding to the minimum L from the sequence, and use it as the patient's periodontal frontal image, recorded as data set S_1.

[0020] The preparation of the pre-training model is as follows:

[0021] Step 200: Select and initialize a deep image classification model. This is referred to as model M_0.

[0022] Step 201: obtain similar dental film data for pre-training from public datasets such as the Tufts Dental Database (TDD), denoted as dataset H;

[0023] In step 202, the cross entropy loss function and the labeled data in H are used to perform multiple rounds of gradient descent and backpropagation to update the parameters of the initial model M_0 until the model is overfitted on the training set and the accuracy on the test set no longer increases significantly. At this point, the training is considered complete and the model at this time is recorded as M_1.

[0024] The model with good generalization performance trained on a small number of periodontal images based on the transfer learning algorithm is as follows:

[0025] Step 300: Invite periodontal experts to annotate the dataset S_1 obtained in the raw data preprocessing to obtain an annotated dataset, which is recorded as dataset S_2.

[0026] Step 301: partition, randomly resize, and enhance the data in S_2, which is recorded as dataset S.

[0027] Step 302: Generate weights for the data in the dataset S according to the number of samples in each category to form a weighted dataset S_w, where the weight calculation formula for each category is: Among them, α is a parameter for adjusting the degree of difference in weights between categories. The value of parameter α is selected as 0.999, w c represents the sample weight of class c, n c represents the number of samples in class c;

[0028] Step 303: Using the cross entropy loss function and the labeled data in S, perform multiple rounds of gradient descent and parameter updates on the pre-trained model M_1.

[0029] In step 304, the weighted cross entropy loss function and the labeled data and their weights in S_w are used to further perform gradient descent and parameter update on the pre-trained model M_1. The final trained model is recorded as M_f.

[0030] The recognition and classification of periodontal disease images are as follows:

[0031] Step 400: Using the end-to-end raw data recognition and preprocessing steps, an unlabeled dataset of patients in a real scenario is collected again, which is recorded as dataset T_1;

[0032] Step 401: Randomly crop the data in T_1 to form a data set T. Each original data in T_1 corresponds to k data in T after enhancement.

[0033] Step 402: Take the fc layer of M_f, denote the weight matrix of the fc layer as W, the bias vector as b, and input each sample in the dataset T into the model M_f to obtain the output of the sample before the fc layer, denote it as the feature vector x;

[0034] Step 403, using the obtained sample feature vector x and the weight W and bias parameter b of the fc layer, the τ-norm classification method is used to calculate the output of each sample in T. The formula used is in The calculation method is represents the sample weight after adjustment by the τ-norm method, τ is the weight normalization parameter, and the value of parameter τ is 0.8;

[0035] Step 404: treat the output vectors of the k samples in T corresponding to the same original sample i in the original T_1 data set as a group, and calculate the average value of the k outputs. where logit i Represents the final output result of the original sample i in T_1, logit i.k Represents the output result of the kth sample corresponding to the original sample i in T, and logit i The category with the highest confidence is taken as the classification judgment result of the periodontal image of the patient corresponding to the original sample i.

[0036] The purpose of further preprocessing samples in the training and prediction stages is to increase the diversity of the sample space by scaling, adding noise, random perturbations, random cropping, normalization, and other operations. This not only improves the generalization ability of the model, but also improves the prediction performance of the model through integration.

[0037] The gradient descent refers to the stochastic gradient descent method, which iteratively updates the model parameters by calculating the gradient of the loss function on a small batch of data to help the model converge to a (local) optimal solution.

[0038] A periodontal disease image classification system based on a transfer learning algorithm includes: an end-to-end raw data recognition and preprocessing module, a pre-trained model preparation module, a module for training a model with good generalization performance on a small number of periodontal images based on a transfer learning algorithm, and a periodontal disease image recognition and classification module.

[0039] End-to-end raw data recognition and preprocessing module: collects patient image sequences taken by digital cameras; identifies the patient's frontal periodontal images from the sequences; and preprocesses the periodontal images, including cropping and rotation, to form an unlabeled dataset S_1.

[0040] Pre-training model preparation module: Select an appropriate deep learning model and initialize its parameters, denoted as M_0; collect available publicly annotated datasets, denoted as H; use the cross-entropy loss function and the labeled data in H to perform multiple rounds of gradient descent and backpropagation on the initial model M_0 to update the parameters until the model overfits on the training set and the accuracy on the test set does not increase significantly. At this point, training is considered complete and the model is denoted as M_1;

[0041] A model module with good generalization performance is trained on a small number of periodontal images based on the transfer learning algorithm: for the dataset S_1 obtained in the original data preprocessing, periodontal experts are invited to annotate it to obtain the annotated dataset S_2; the data in S_2 are divided, randomly cropped and enhanced to form the training dataset S; according to the number of samples in each category, weights are generated for the data in dataset S to form a weighted dataset S_w; using the cross-entropy loss function and the labeled data in S, multiple rounds of gradient descent and parameter updates are first performed on the pre-trained model M_1; then, using the weighted cross-entropy loss function and the labeled data and their weights in S_w, further gradient descent and parameter updates are performed on the pre-trained model M_1, and the final trained model is recorded as M_f;

[0042] Periodontal disease image recognition and classification module: Use end-to-end raw data recognition and preprocessing steps to re-collect the patient's unlabeled data set, denoted as T_1; randomly resize and enhance the data in T_1 to form a training data set T, where each original data in T_1 corresponds to k data in T after enhancement; take out the fc layer of M_f, input each sample in the data set T into the model M_f to obtain the sample's feature vector; use the obtained sample feature vector and the weight and bias parameters of the fc layer, and adopt the τ-norm classification method to calculate the output of each sample in T; regard the output vectors of the k samples in T corresponding to the same data in the original T_1 data set as a group, and calculate the average of the k outputs, and take the category with the highest confidence in the result as the classification judgment result of the patient's periodontal image corresponding to the original data.

[0043] The system implementation process and method are the same.

[0044] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the periodontal disease image classification method based on the transfer learning algorithm as described above is implemented.

[0045] A computer-readable storage medium stores a computer program for executing the periodontal disease image classification method based on the transfer learning algorithm as described above.

[0046] The model obtained in the source task stage can generalize quickly on the periodontal image task with only a small number of labeled samples.

[0047] During the model fine-tuning phase, multi-step gradient descent is required to optimize the inner parameters of the pre-trained model and to deal with the class imbalance problem.

[0048] During the evaluation phase, the τ-norm classification method is used for the model output, and the prediction results of multiple enhanced copies of the original sample are integrated to improve the accuracy of the prediction.

[0049] Beneficial Effects: Compared with existing technologies, the transfer learning-based periodontal disease image classification method and system provided by this invention offers a viable solution to numerous issues, such as the limited quantity, imbalance, and lack of annotation in medical imaging data. It has been successfully applied to the recognition and classification of periodontal disease images. Furthermore, based on an end-to-end approach, this invention utilizes traditional image processing methods to automate the "image sequence to target high-quality image data" screening process, significantly reducing physician workload and facilitating the collection of large amounts of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Flowchart of end-to-end raw data identification and preprocessing in an embodiment of the present invention;

[0051] Figure 2 A flowchart of the preparation of a pre-trained model in an embodiment of the present invention;

[0052] Figure 3 This is a flowchart of training a model with good generalization performance on a small number of periodontal images based on a transfer learning algorithm in an embodiment of the present invention;

[0053] Figure 4 Flowchart of the recognition and classification of periodontal disease images in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The present invention is further illustrated below with reference to specific examples. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, modifications of various equivalent forms of the present invention made by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0055] A periodontal disease image classification method based on a transfer learning algorithm includes four major processes: end-to-end raw data recognition and preprocessing, pre-training model preparation, training a model with good generalization performance based on a small number of periodontal images based on a transfer learning algorithm, and recognition and classification of periodontal disease images.

[0056] The end-to-end raw data recognition and preprocessing process is as follows Figure 1 First, a sequence of patient images taken by a digital camera is collected. Each patient's sequence begins with the patient's nameplate and contains a varying number of images, at least one of which is a frontal periodontal image of the patient (step 10). Next, an image whose width is less than its length and whose R channel mean is greater than at least one of the GB channel mean values ​​is identified from the original sequence containing all patient images, and this image is used as the location of the patient's nameplate (step 11).

[0057] Then, using the patient nameplate as the segmentation standard, the image subsequence corresponding to each patient is segmented (step 12); for each patient image subsequence, the images with width greater than length are eliminated (step 13); then, for the remaining images in the sequence, the images whose pixel mean is less than a certain threshold are eliminated (step 14); then, for the remaining images in the sequence, the images whose pixel mean is greater than a certain threshold are eliminated (step 15); then, for the images obtained in step 15, the mean and variance of the RGB channels after center cropping are calculated respectively, and the Euclidean distance L_1 is calculated with the mean of the standard periodontal frontal image (step 16-1); at the same time ...). Calculate the pixel mean after center cropping, denoted as L_2 (step 16-2); at the same time, for the image obtained in step 105, calculate the mean and variance of the RGB channels of the left and right half images respectively, and calculate the Euclidean distance L_3 between the means and variances of the left and right images (step 16-3); then, calculate L = L_1 - L_2 + L_3 (step 17); finally, find the image corresponding to the minimum L from the sequence, use it as the patient's periodontal front image, and add it to the preliminary periodontal front dataset (step 18); if the image subsequence set is empty after this step, output the periodontal front dataset (step 19), otherwise jump to step 13.

[0058] The pre-training model preparation process is as follows Figure 2 First, an appropriate model is selected and initialized (step 20). Next, the ImageNet dataset, a publicly available dataset, is obtained as the source task dataset (step 21). Subsequently, the initial model is updated using multiple rounds of gradient descent and backpropagation using the cross-entropy loss function and labeled data from the dataset until the model overfits on the training set and the accuracy on the test set no longer increases significantly (steps 22 and 23). Finally, training is completed and the pre-trained model is output (step 24).

[0059] The process of training a model with good generalization performance based on a small number of periodontal images based on the transfer learning algorithm is as follows: Figure 3As shown. First, for the dataset obtained in the raw data preprocessing, a periodontal expert is invited to annotate it to obtain an annotated dataset (step 30). Then, the data in the annotated dataset is partitioned, randomly resized, and enhanced to form training and test datasets (step 31). Next, weights are generated for the data in the training dataset according to the number of samples in each category to form a weighted dataset (step 32). Then, using the cross-entropy loss function and the labeled data in the training set, multiple rounds of gradient descent and parameter updates are performed on the pre-trained model until the epoch number requirement is met (steps 33 and 34). Furthermore, using the weighted cross-entropy loss function and the labeled data in the training set and their weights, further gradient descent and parameter updates are performed on the pre-trained model until the epoch number requirement is met (steps 35 and 36). Finally, the trained final model is output (step 37).

[0060] The process of recognition and classification of periodontal disease images is as follows Figure 4 As shown. First, the unlabeled dataset of patients in the actual scenario is re-collected using the steps of original data identification and preprocessing to form a target unlabeled dataset (step 40); then, the data in the dataset is randomly cropped to form a predicted dataset, and each original data in the target dataset corresponds to k data in the enhanced predicted dataset (step 41); then, the fc layer of the final model is taken out, and the weight matrix of the fc layer is denoted as W, and the bias vector is denoted as b. At the same time, each sample in the predicted dataset is input into the model M_f to obtain the output of the sample before the fc layer, which is denoted as the feature vector x (step 42); then, the obtained sample feature vector x and the weight W and bias parameter b of the fc layer are used to adopt the τ-norm classification method to calculate the output of each sample in the predicted dataset (step 43);

[0061] Next, the output vectors of the k samples in the prediction dataset corresponding to the same original sample i in the original target dataset are regarded as a group, and the average of the k outputs is calculated as the output result of the original sample i (step 44); finally, the category with the highest confidence in the output logit is used as the classification judgment result of the patient's periodontal image corresponding to the original sample i (step 45).

[0062] A periodontal disease image classification system based on a transfer learning algorithm includes: an end-to-end raw data recognition and preprocessing module, a pre-trained model preparation module, a module for training a model with good generalization performance on a small number of periodontal images based on a transfer learning algorithm, and a periodontal disease image recognition and classification module.

[0063] End-to-end raw data recognition and preprocessing module: collects patient image sequences taken by digital cameras; identifies the patient's frontal periodontal images from the sequences; and preprocesses the periodontal images, including cropping and rotation, to form an unlabeled dataset S_1.

[0064] Pre-training model preparation module: Select an appropriate deep learning model and initialize its parameters, denoted as M_0; collect available publicly annotated datasets, denoted as H; use the cross-entropy loss function and the labeled data in H to perform multiple rounds of gradient descent and backpropagation on the initial model M_0 to update the parameters until the model overfits on the training set and the accuracy on the test set does not increase significantly. At this point, training is considered complete and the model is denoted as M_1;

[0065] A model module with good generalization performance is trained on a small number of periodontal images based on the transfer learning algorithm: for the dataset S_1 obtained in the original data preprocessing, periodontal experts are invited to annotate it to obtain the annotated dataset S_2; the data in S_2 are divided, randomly cropped and enhanced to form the training dataset S; according to the number of samples in each category, weights are generated for the data in dataset S to form a weighted dataset S_w; using the cross-entropy loss function and the labeled data in S, multiple rounds of gradient descent and parameter updates are first performed on the pre-trained model M_1; then, using the weighted cross-entropy loss function and the labeled data and their weights in S_w, further gradient descent and parameter updates are performed on the pre-trained model M_1, and the final trained model is recorded as M_f;

[0066] Periodontal disease image recognition and classification module: Use the original data recognition and preprocessing steps to re-collect the patient's unlabeled data set, denoted as T_1; randomly crop and enhance the data in T_1 to form a training data set T, and each original data in T_1 corresponds to k data in T after enhancement; take out the fc layer of M_f, input each sample in the data set T into the model M_f to obtain the sample's feature vector; use the obtained sample feature vector and the weight and bias parameters of the fc layer, and adopt the τ-norm classification method to calculate the output of each sample in T; regard the output vectors of the k samples in T corresponding to the same data in the original T_1 data set as a group, and calculate the average of the k outputs, and take the category with the highest confidence in the result as the classification judgment result of the patient's periodontal image corresponding to the original data.

[0067] Obviously, those skilled in the art should understand that the various steps of the periodontal disease image classification method based on the transfer learning algorithm or the various modules of the periodontal disease image classification system based on the transfer learning algorithm of the above-mentioned embodiment of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific hardware and software combination.

Claims

1. A periodontal disease image classification method based on transfer learning algorithm, characterized in that: Includes: end-to-end raw data recognition and preprocessing, preparation of pre-trained models, training of models with good generalization performance on a small number of periodontal images based on transfer learning algorithms, and recognition and classification of periodontal disease images; In the end-to-end raw data recognition and preprocessing: collect patient image sequences; identify the position of the patient nameplate from the original sequence containing all patient images, segment the image subsequence corresponding to each patient, eliminate images that do not meet the pixel size requirements in the image subsequence, calculate the mean and variance of the RGB channels after the image center is cropped, and calculate the Euclidean distance L_1 with the mean of the standard periodontal front image; calculate the pixel mean after the image center is cropped, recorded as L_2; calculate the mean and variance of the RGB channels of the left and right half images, and calculate the Euclidean distance L_3 between the mean and variance of the left and right images; record L = L_1-L_2+L_3, calculate the image L value respectively, and find the image corresponding to the minimum L from the sequence, which is used as the patient's periodontal front image, recorded as data set S_1; In the preparation of the pre-training model: select a deep learning model and initialize its parameters, denoted as M_0; obtain a labeled dataset, denoted as H; use the cross entropy loss function and the labeled data in H to perform multiple rounds of gradient descent and backpropagation on the initial model M_0 to update the parameters until the model converges. At this point, the training is considered complete and the model is denoted as M_1; In a model with good generalization performance trained on a small number of periodontal images based on a transfer learning algorithm, the following steps are performed: the dataset S_1 obtained in the original data preprocessing is annotated to obtain the annotated dataset S_2; the data in S_2 is partitioned, randomly resized, and enhanced to form the training dataset S; Generate weights for the data in dataset S according to the number of samples in each category to form a weighted dataset S_w; use the cross entropy loss function and the labeled data in S to first perform multiple rounds of gradient descent and parameter updates on the pre-trained model M_1; then, use the weighted cross entropy loss function and the labeled data and their weights in S_w to further perform gradient descent and parameter updates on the pre-trained model M_1, and record the final trained model as M_f; In the recognition and classification of periodontal disease images: end-to-end raw data recognition and preprocessing steps are used to re-collect patient image data to form an unlabeled dataset, denoted as T_1; the data in T_1 are randomly cropped to form a dataset T, and each original data in T_1 corresponds to k data in the enhanced T; the fc layer of M_f is taken out, and each sample in the dataset T is input into the model M_f to obtain the feature vector of the sample; using the obtained sample feature vector and the weight and bias parameters of the fc layer, the τ-norm classification method is used to calculate the output of each sample in T; the output vectors of the k samples in T corresponding to the same data in the original T_1 dataset are regarded as a group, and the average of the k outputs is calculated, and the category with the highest confidence in the result is used as the classification judgment result of the patient's periodontal image corresponding to the original data.

2. The periodontal disease image classification method based on transfer learning algorithm according to claim 1 is characterized in that: The end-to-end raw data recognition and preprocessing are as follows: Step 100 , collecting patient image sequences, each patient's image sequence begins with the patient's nameplate and includes varying numbers of images, at least one of which is a frontal periodontal image of the patient; Step 101 , identifying an image whose width is less than its length and whose R channel mean is greater than at least one of the GB channel means from the original sequence of all patient images, and using it as the location of the patient nameplate; Step 102, using the patient nameplate as a segmentation criterion, segmenting the image subsequence corresponding to each patient; Step 103: for each patient image subsequence, remove images with width greater than length; Step 104: for the remaining images in the sequence, remove the images whose pixel mean is less than the threshold t_1; Step 105: for the remaining images in the sequence, remove the images whose pixel mean is greater than the threshold t_2; Step 106: for the image obtained in step 105, respectively calculate the mean and variance of the RGB channels after center cropping, and calculate the Euclidean distance L_1 with the mean of the standard periodontal frontal image; Step 107: for the image obtained in step 105, calculate the pixel mean after center cropping, denoted as L_2; Step 108: For the image obtained in step 105, respectively calculate the mean and variance of the RGB channels of the left and right half images, and calculate the Euclidean distance L_3 between the mean and variance of the left and right images; Step 109 , let L=L_1-L_2+L_3. For the images obtained in step 105 , calculate their L values ​​respectively, and find the image corresponding to the minimum L from the sequence, and use it as the patient's periodontal frontal image, recorded as data set S_1.

3. The periodontal disease image classification method based on transfer learning algorithm according to claim 1, characterized in that: The preparation of the pre-training model is as follows: Step 200: Select and initialize a deep learning model, denoted as model M_0; Step 201: obtaining a dental film dataset for pre-training, denoted as dataset H; In step 202, the cross entropy loss function and the labeled data in H are used to perform multiple rounds of gradient descent and backpropagation to update the parameters of the initial model M_0 until the model is overfitted on the training set and the accuracy on the test set no longer increases significantly. At this point, the training is considered complete and the model at this time is recorded as M_1.

4. The periodontal disease image classification method based on transfer learning algorithm according to claim 1, characterized in that: The model with good generalization performance trained on a small number of periodontal images based on the transfer learning algorithm is as follows: Step 300: annotate the dataset S_1 obtained in the original data preprocessing to obtain an annotated dataset, which is recorded as dataset S_2; Step 301: partition, randomly resize, and enhance the data in S_2, which is recorded as dataset S. Step 302: Generate weights for the data in the dataset S according to the number of samples in each category to form a weighted dataset S_w, where the weight calculation formula for each category is: Among them, α is the parameter for adjusting the degree of difference in weight between categories, w c represents the sample weight of class c, n c represents the number of samples in class c; Step 303: Using the cross entropy loss function and the labeled data in S, perform multiple rounds of gradient descent and parameter updates on the pre-trained model M_1. In step 304, the weighted cross entropy loss function and the labeled data and their weights in S_w are used to further perform gradient descent and parameter update on the pre-trained model M_1. The final trained model is recorded as M_f.

5. The periodontal disease image classification method based on transfer learning algorithm according to claim 1, characterized in that: The recognition and classification of periodontal disease images are as follows: Step 400: Using the end-to-end raw data recognition and preprocessing steps, an unlabeled dataset of patients in a real scenario is collected again, which is recorded as dataset T_1; Step 401: Randomly crop the data in T_1 to form a data set T. Each original data in T_1 corresponds to k data in T after enhancement. Step 402: Take the fc layer of M_f, denote the weight matrix of the fc layer as W, the bias vector as b, and input each sample in the dataset T into the model M_f to obtain the output of the sample before the fc layer, denote it as the feature vector x; Step 403, using the obtained sample feature vector x and the weight W and bias parameter b of the fc layer, the τ-norm classification method is used to calculate the output of each sample in T. The formula used is in The calculation method is τ is the weight normalization parameter; Step 404: treat the output vectors of the k samples in T corresponding to the same original sample i in the original T_1 data set as a group, and calculate the average value of the k outputs. where logit i Represents the final output result of the original sample i in T_1, logit i.k Represents the output result of the kth sample corresponding to the original sample i in T, and logit i The category with the highest confidence is taken as the classification judgment result of the periodontal image of the patient corresponding to the original sample i.

6. A periodontal disease image classification system based on transfer learning algorithm, characterized in that: It includes: an end-to-end raw data recognition and preprocessing module, a pre-trained model preparation module, a module for training a model with good generalization performance on a small number of periodontal images based on a transfer learning algorithm, and a module for recognizing and classifying periodontal disease images; End-to-end raw data recognition and preprocessing module: collect patient image sequences; identify the location of the patient nameplate from the original sequence containing all patient images, segment the image subsequence corresponding to each patient, eliminate images that do not meet the pixel size requirements in the image subsequence, calculate the mean and variance of the RGB channels after the image center is cropped, and calculate the Euclidean distance L_1 with the mean of the standard periodontal front image; calculate the pixel mean after the image center is cropped, recorded as L_2; calculate the mean and variance of the RGB channels of the left and right half images, and calculate the Euclidean distance L_3 between the mean and variance of the left and right images; record L = L_1-L_2+L_3, calculate the image L value respectively, and find the image corresponding to the minimum L from the sequence, which is used as the patient's periodontal front image, recorded as dataset S_1; The pre-training model preparation module: select a deep learning model and initialize its parameters, denoted as M_0; collect available publicly annotated datasets, denoted as H; use the cross-entropy loss function and the labeled data in H to perform multiple rounds of gradient descent and backpropagation on the initial model M_0 to update the parameters until the model converges. At this point, training is considered complete and the model is denoted as M_1; Based on the transfer learning algorithm, a model module with good generalization performance is trained on a small number of periodontal images: the dataset S_1 obtained in the original data preprocessing is annotated to obtain the annotated dataset S_2; the data in S_2 is divided, randomly cropped and enhanced to form the training dataset S; Generate weights for the data in dataset S according to the number of samples in each category to form a weighted dataset S_w; use the cross entropy loss function and the labeled data in S to first perform multiple rounds of gradient descent and parameter updates on the pre-trained model M_1; then, use the weighted cross entropy loss function and the labeled data and their weights in S_w to further perform gradient descent and parameter updates on the pre-trained model M_1, and record the final trained model as M_f; Periodontal disease image recognition and classification module: Use end-to-end raw data recognition and preprocessing steps to re-collect the patient's unlabeled data set, denoted as T_1; randomly resize and enhance the data in T_1 to form a training data set T, and each original data in T_1 corresponds to k data in T after enhancement; take out the fc layer of M_f, input each sample in the data set T into the model M_f to obtain the sample's feature vector; use the obtained sample feature vector and the weight and bias parameters of the fc layer, and adopt the τ-norm classification method to calculate the output of each sample in T; regard the output vectors of the k samples in T corresponding to the same data in the original T_1 data set as a group, and calculate the average of the k outputs, and take the category with the highest confidence in the result as the classification judgment result of the patient's periodontal image corresponding to the original data.

7. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for classifying periodontal disease images based on a transfer learning algorithm as described in any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the periodontal disease image classification method based on the transfer learning algorithm according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Tooth type identification method and device

    CN115439409A

  • Deep learning-based qualification image classification method and system

    CN117788957A