Methods, devices, equipment, media, and programs for detecting teeth marks in tongue images.

By constructing a semantic segmentation dataset for teeth marks and using K-means clustering to adaptively adjust the amount of data input, the problems of imbalanced and ambiguous annotations in TCM tongue image data were solved, thereby improving the accuracy of teeth mark detection and tongue image segmentation performance.

CN118587437BActive Publication Date: 2026-11-17SHANDONG UNIV OF FINANCE & ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410640385.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2026-11-17
Estimated Expiration
2044-05-22

Smart Images

  • Figure CN118587437B_ABST
    Figure CN118587437B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, medium, and program product for detecting teeth marks in tongue images. The method includes: using a trained medical image segmentation network to detect teeth marks in a tongue image to be detected, and obtaining teeth mark detection results; wherein, during the training process, the trained medical image segmentation network classifies the images in the training set to obtain several clusters; in the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster; in the (i+1)th round of training, based on the score of each cluster in the i-th round, the number of images input into the network for each cluster in the (i+1)th round of training is determined; based on the number of images input into the network for each cluster in the (i+1)th round, a corresponding number of images are randomly selected from the clusters and input into the network to train the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of teeth mark detection technology, and in particular to methods, devices, equipment, media, and program products for detecting teeth marks on tongue images. Background Technology

[0002] Traditional Chinese medicine (TCM) tongue diagnosis involves observing the tongue's color, shape, and coating to understand the body's health status. Through a comprehensive analysis of the tongue, TCM practitioners can discern pathological changes within the patient's body, identify the type and stage of disease, and thus formulate more precise treatment strategies.

[0003] As a key branch of artificial intelligence, deep learning technology has achieved significant leaps in recent years, and the objective study of tongue appearance has also entered a new stage of rapid development, riding the wave of deep learning. High-quality datasets can provide more accurate and comprehensive information, which is the foundation for training and optimizing deep learning models. However, due to the privacy protection issues involved in TCM clinical data, the collection of tongue pathology research data faces certain obstacles, and TCM tongue pathology research has long faced a data shortage problem. Normal tongue appearances are relatively easy to observe and record, and there are many samples, while some special tongue appearance types (such as abnormal tongue appearances like teeth marks) may have fewer samples because they occur less frequently or are difficult to capture.

[0004] In addition, due to the different sampling populations, some people may have certain types of tongue features due to specific health conditions or lifestyle habits. Therefore, the existing tongue image data usually has a serious imbalance. The subjective factors that cannot be avoided in the annotation process also make the annotation results uncertain, which further affects the accuracy of tongue image analysis.

[0005] Segmentation of tongue-related symptoms can distinguish pathological features from normal tissue, providing crucial information for subsequent symptom analysis and diagnosis, and is a key element in improving the performance of computer-aided diagnostic systems. However, due to the aforementioned data limitations and the lack of more precise and objective methods, progress in the objective study of TCM tongue diagnosis, especially in the segmentation of tongue-related symptoms, has been slow, and effective semantic segmentation methods are urgently needed to drive further development in this field. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a method, apparatus, device, medium, and program product for detecting teeth marks in tongue images;

[0007] On the one hand, a method for detecting teeth marks in tongue images is provided, including:

[0008] Construct a tooth mark semantic segmentation dataset, which includes: tongue images with known tooth mark labels; divide the tooth mark semantic segmentation dataset into a training set and a test set;

[0009] A medical image segmentation network was constructed. The network was trained using a training set and tested using a test set. The network with a test accuracy higher than a set threshold was used as the trained medical image segmentation network.

[0010] A trained medical image segmentation network was used to detect teeth marks in the tongue image to be tested, and the teeth mark detection results were obtained.

[0011] The trained medical image segmentation network classifies the images in the training set into several clusters during training. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. In the (i+1)th round of training, based on the score of each cluster in the i-th round, the number of images input into the network for each cluster in the (i+1)th round is determined. Based on the number of images input into the network for each cluster in the (i+1)th round, a corresponding number of images are randomly selected from the clusters and input into the network to train the network.

[0012] On the other hand, a tongue image tooth mark detection device is provided, including:

[0013] The dataset construction module is configured to: construct a tooth mark semantic segmentation dataset, which includes: tongue images with known tooth mark labels; and divide the tooth mark semantic segmentation dataset into a training set and a test set.

[0014] The network training module is configured to: construct a medical image segmentation network, train the network using a training set, test the network using a test set, and use the network with a test accuracy higher than a set threshold as the trained medical image segmentation network.

[0015] The detection output module is configured to: use a trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected, and obtain the tooth mark detection result;

[0016] The trained medical image segmentation network classifies the images in the training set into several clusters during training. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. In the (i+1)th round of training, based on the score of each cluster in the i-th round, the number of images input into the network for each cluster in the (i+1)th round is determined. Based on the number of images input into the network for each cluster in the (i+1)th round, a corresponding number of images are randomly selected from the clusters and input into the network to train the network.

[0017] Furthermore, an electronic device is also provided, including:

[0018] Memory, used for non-transitory storage of computer-readable instructions; and

[0019] Processor, for executing the computer-readable instructions,

[0020] When the computer-readable instructions are executed by the processor, they perform the method described in the first aspect above.

[0021] In another aspect, a storage medium is also provided for non-transitory storage of computer-readable instructions, wherein when the non-transitory computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0022] In another aspect, a computer program product is also provided, including a computer program that, when run on one or more processors, is used to implement the method described in the first aspect above.

[0023] The above technical solution has the following advantages or beneficial effects:

[0024] To address the problem of imbalanced data, this invention proposes a tongue image semantic segmentation model based on clustered adaptive data adjustment. First, the data is clustered using K-means, dividing it into different groups. This invention changes the data delivery method, dynamically adjusting the amount of data input to each cluster based on the score ratio of the validation set during network training, thus balancing the imbalanced data distribution. It also provides a unified standard for semantic segmentation learning of clustered data with different criteria.

[0025] This method achieved good results in both qualitative and quantitative aspects. Compared with other medical image segmentation methods, the tongue image semantic segmentation model based on clustered adaptive data adjustment was applied to the dataset, and the segmentation performance was optimal. It also showed a significant improvement in segmentation effect compared with the baseline method. Attached Figure Description

[0026] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0027] Figure 1 This is a flowchart of the method in Example 1. Detailed Implementation

[0028] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0029] This invention observes that both annotators and TCM physicians who verify the annotation results have different definitions of tongue surface symptoms, leading to varying degrees of ambiguity in the annotation process. Therefore, achieving absolute standardization and quantification in the field of tongue image objectification research is difficult. This is a major reason why a standard dataset for comparing the performance of different models has not been used in TCM tongue image objectification research for many years. Furthermore, the data volume varies across different sources; some categories of tongue images are more common or easier to obtain than others, resulting in a severe data imbalance.

[0030] To address the subjectivity of tongue image data annotation and the uneven distribution of tongue image data, this invention uses clustering to group the tongue image dataset. Based on this, a tongue image semantic segmentation model based on clustered adaptive data adjustment is proposed, minimizing the losses caused by annotation ambiguity and data skew. Extensive experiments have validated the effectiveness of the proposed method, demonstrating its potential application value in the field of tongue image segmentation in Traditional Chinese Medicine.

[0031] Example 1

[0032] This embodiment provides a method for detecting teeth marks in tongue images;

[0033] like Figure 1 As shown, the method for detecting teeth marks in tongue images includes:

[0034] S101: Construct a tooth mark semantic segmentation dataset, which includes: tongue images with known tooth mark labels; divide the tooth mark semantic segmentation dataset into a training set and a test set;

[0035] S102: Construct a medical image segmentation network, train the network using a training set, and test the network using a test set. The network with a test accuracy higher than a set threshold is used as the trained medical image segmentation network.

[0036] S103: The trained medical image segmentation network is used to detect teeth marks in the tongue image to be tested, and the teeth mark detection results are obtained.

[0037] The trained medical image segmentation network classifies the images in the training set into several clusters during training. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. In the (i+1)th round of training, based on the score of each cluster in the i-th round, the number of images input into the network for each cluster in the (i+1)th round is determined. Based on the number of images input into the network for each cluster in the (i+1)th round, a corresponding number of images are randomly selected from the clusters and input into the network to train the network.

[0038] To achieve the input for the (i+1)th round of training, increase the proportion of input data for clusters with low scores in the i-th round to the total input data, and decrease the proportion of input data for clusters with high scores in the i-th round to the total input data in the (i+1)th round.

[0039] Further, S101: Constructing a tooth mark semantic segmentation dataset specifically includes:

[0040] Acquire several images of the tongue;

[0041] A preliminary cleaning process is performed on several tongue images. The preliminary cleaning process is used to filter out unreal tongue images, incomplete tongue images, or tongue images with a resolution lower than a set threshold, while retaining tongue images with teeth marks.

[0042] A second cleaning process is performed on the images after the initial cleaning process. This second cleaning process is used to remove duplicate images from the dataset.

[0043] The locations of the teeth marks on the dataset after two cleaning processes were manually labeled.

[0044] Furthermore, the division of the tooth mark semantic segmentation dataset into training and testing sets is done according to a set ratio.

[0045] Furthermore, the medical image segmentation network described is a U-Net network.

[0046] Further, in S102: a medical image segmentation network is constructed, and the network is trained using a training set. During the training process, the loss function used is the binary cross-entropy loss function.

[0047]

[0048] Where y is the binary label 0 or 1, p(y) is the probability that the output is equal to the label, and N represents the number of groups of objects predicted by the model.

[0049] To measure the difference between the probability distribution predicted by the model and the probability distribution of the true labels, and to optimize the model parameters, this invention introduces the binary cross-entropy loss function (BCE Loss) as a loss function in the tongue image semantic segmentation model based on clustered adaptive data adjustment proposed in this invention. This loss function is usually used to evaluate the prediction performance of a binary classification model.

[0050] Furthermore, in S103: the trained medical image segmentation network, during the training process, classifies the images in the training set into several clusters, including:

[0051] S103-1: The K-means clustering algorithm is used to cluster the dataset to obtain K clusters;

[0052] S103-2: Randomly select an initial point for each cluster as the centroid of the cluster;

[0053] S103-3: Calculate the similarity between each sample and all centroids, and assign each sample to the cluster with the most similar centroids;

[0054] S103-4: Calculate the mean of all samples in each cluster and update the mean to the centroid of the current cluster;

[0055] S103-5: Repeat S103-3 to S103-4 until the centroids of all clusters no longer change, or the set number of iterations is reached; finally, K clusters are obtained, and the centroid of each cluster represents the center point of the current cluster.

[0056] Furthermore, in S103-3, the similarity between each sample and all centroids is calculated by using the sum of squared errors within the cluster as a measure of similarity.

[0057]

[0058] k represents the number of cluster centers, C k Let x represent a cluster, and μ represent a sample within that cluster. k This represents the center of mass.

[0059] It should be understood that K-means is mainly used for the automatic classification of similar samples and is a typical unsupervised learning algorithm. The clustering results are affected by the similarity calculation method; different calculation methods will lead to different clustering effects. Commonly used similarity calculation methods include Euclidean distance.

[0060] The specific implementation process of tongue image clustering based on K-means in this invention is as follows:

[0061] First, assume that the data in dataset D is divided into K clusters by the K-means algorithm, {C1, C2, C3, ..., C6}. K}, where the constant K represents the number of clusters. At the start of the algorithm, initial points are randomly selected as the centroids of each cluster, namely {μ1, μ2, μ3, ..., μ...}. k}

[0062] Next, the algorithm assigns each sample to the cluster with which it is most similar by calculating the similarity between each sample and all centroids.

[0063] Subsequently, the mean of all samples in each cluster is recalculated, and this mean is used to update the new centroid of the cluster.

[0064] This process iterates until the centroids of all clusters no longer change significantly (or change very little), or until a preset number of iterations is reached.

[0065] Ultimately, dataset D will be divided into K clusters with well-defined boundaries, where the centroid of each cluster represents the center point of that cluster.

[0066] The goal of the K-means algorithm is to minimize the sum of squared errors (SSE) within clusters, as shown in formula (2.1). A smaller SSE indicates higher intra-cluster similarity. This invention uses the K-means algorithm and a greedy strategy to gradually approach the optimal solution. First, K centroids of clusters are preset. Then, based on the distance of each data point to these centroids, they are assigned to the nearest cluster. Next, the centroids of each cluster are recalculated based on the data points within each cluster. If the assumed centroid does not match the current actual centroid, the current actual centroid is used as the assumed centroid, and the above process is repeated until they match.

[0067] This invention tested the impact of setting K to different values ​​on semantic segmentation performance and provided corresponding analysis in the ablation experiment section.

[0068] Furthermore, during the first round of training, all images from each cluster are input into the medical image segmentation network to obtain a score for each cluster. The score calculation formula is as follows:

[0069]

[0070] Where TP represents a sample correctly predicted as a positive example by the model, and its actual label is positive; FN represents a sample incorrectly predicted as a negative example by the model, but its actual label is positive; FP represents a sample incorrectly predicted as a positive example by the model, but its actual label is negative; assume X represents the ground truth and Y represents the prediction result, where |X| and |Y| represent the number of elements in X and Y, respectively.

[0071] Furthermore, in the (i+1)th round of training, based on the score of each cluster in the i-th round, the number of images input to the network for each cluster in the (i+1)th round of training is determined, specifically including:

[0072] Suppose the score data set of all clusters is S∈{S1,S2,S3,…,S…} n Let X be the total number of data points input in each round. The proportion of each cluster's score relative to the total scores of all clusters is taken as the proportion of that cluster in that round's input. The formula for the proportion of the i-th cluster is: Then the number of inputs to this cluster in the next round is X×P. i .

[0073] After partitioning the dataset, this invention attempts to design a model that can adaptively adjust the distribution of different clusters during semantic segmentation network learning, and minimize the losses caused by label ambiguity and uneven data distribution. Thus, this invention designs a tongue image semantic segmentation model based on clustered adaptive data adjustment, which changes the data delivery mode.

[0074] Based on the clustered adaptive data adjustment tongue image semantic segmentation model, in the first round of training, this invention divides the data into 6 pre-defined clusters C∈{C1,C2,C3,...,C...} n (In order to maintain consistency with subsequent training, the initial input data in the figure is represented as...) The data are fed together into the semantic segmentation model for training, and the number of data in each cluster is recorded before feeding them in. After the first round of training, the Dice score set for each cluster of data on its corresponding validation set is calculated. The data is then sorted, and new values ​​are assigned to the data input quantity corresponding to each cluster based on the score ratio before the second round of data input. The data random selector will randomly select a corresponding number of tongue images based on the data volume value of each cluster and send them to the next round of training. In each subsequent round of training, the distribution of input data will be adaptively adjusted according to this pattern. That is, in the next round of input, the proportion of input data of clusters with low scores in the previous round of training will be increased, and the proportion of input data of clusters with high scores in the next round of input will be decreased. This provides a dynamic data distribution for the learning of the semantic segmentation network and alleviates the loss caused by the uneven distribution of data from different sources and with different annotation standards.

[0075] This invention proposes a clustered adaptive data-adjusted segmentation model for tooth mark semantic segmentation. Specifically, the invention first constructs a tooth mark semantic segmentation dataset, annotating the edge contours of the tooth mark locations in detail to obtain the mask information required for semantic segmentation. Secondly, based on the constructed tooth mark semantic segmentation dataset, the invention uses a U-Net network as the baseline network and changes its data input mode, grouping the data in the dataset into different clusters using K-means clustering. In the first round of training, all data from all clusters are input, and the basic score of each cluster on the validation set is obtained. Subsequently, before the start of a new round of training, the input amount of data for each cluster is adaptively adjusted based on the feedback from the validation set. This allows the network to continuously adjust the data distribution based on the data source and annotation standards, thereby improving the accuracy of tooth mark semantic segmentation.

[0076] In summary, the specific contributions of this invention are as follows:

[0077] (1) This invention addresses the problem of sample skew caused by uneven data distribution and ambiguous labeling. It takes the above two aspects as the grouping target and uses the original tongue image in the dataset and its corresponding segmentation mask as the division basis in the way of clustering. The data is autonomously divided into different related clusters, which provides a data foundation for subsequent adaptive data adjustment training.

[0078] (2) A tongue image semantic segmentation model based on clustered adaptive data adjustment is proposed. Through the adaptive data adjustment module, the number of input data of different clusters in each round is dynamically adjusted. By adjusting the sample distribution, the imbalance of data samples is improved, the accuracy of tooth mark segmentation is improved, and a new idea is provided to avoid the subjectivity of tongue image data annotation.

[0079] This invention uses the U-Net network as its basic framework and proposes a clustered adaptive data adjustment segmentation model for tooth mark semantic segmentation. To introduce the clustered adaptive data adjustment strategy, this invention first divides the tooth mark semantic segmentation subset in the instance-level tongue image dataset into different clusters using the K-means clustering method, inputting both the original image and the annotation file simultaneously during clustering.

[0080] Tongue images from different sources share certain similarities in terms of shooting angle, lighting, and imaging equipment. Different annotators and reviewers have different annotation standards for symptom descriptions. Therefore, inputting the original image and the annotation simultaneously allows for a comprehensive evaluation from both perspectives, resulting in a relatively accurate classification. The classified clusters are then trained using adaptive data distribution adjustment.

[0081] This invention simultaneously inputs all data into a semantic segmentation network to obtain a score for each cluster of data, and uses this score as a base value. Subsequently, based on this base value, this invention dynamically adjusts the input amount of each cluster of data in the next round of training, thereby adjusting the distribution of input data, reducing the number of images in high-scoring clusters, increasing the number of images in low-scoring clusters, and continuously adaptively adjusting to a balanced state in subsequent training, ultimately obtaining the general solution for all clusters (i.e., data from different sources with subtle differences in annotation standards).

[0082] Example 2

[0083] This embodiment provides a tongue image teeth mark detection device;

[0084] A tongue image teeth mark detection device, comprising:

[0085] The dataset construction module is configured to: construct a tooth mark semantic segmentation dataset, which includes: tongue images with known tooth mark labels; and divide the tooth mark semantic segmentation dataset into a training set and a test set.

[0086] The network training module is configured to: construct a medical image segmentation network, train the network using a training set, test the network using a test set, and use the network with a test accuracy higher than a set threshold as the trained medical image segmentation network.

[0087] The detection output module is configured to: use a trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected, and obtain the tooth mark detection result;

[0088] The trained medical image segmentation network classifies the images in the training set into several clusters during training. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. In the (i+1)th round of training, based on the score of each cluster in the i-th round, the number of images input into the network for each cluster in the (i+1)th round is determined. Based on the number of images input into the network for each cluster in the (i+1)th round, a corresponding number of images are randomly selected from the clusters and input into the network to train the network.

[0089] It should be noted that the dataset construction module, network training module, and detection output module described above correspond to steps S101 to S103 in Embodiment 1. The examples and application scenarios implemented by these modules and their corresponding steps are the same, but they are not limited to the content disclosed in Embodiment 1. It should also be noted that these modules, as part of the system, can be executed in a computer system, such as a set of computer-executable instructions.

[0090] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0091] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0092] Example 3

[0093] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform the method described in Embodiment 1.

[0094] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0095] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.

[0096] In the implementation process, each step of the above method can be completed by the integrated logic circuits in the processor hardware or by software instructions.

[0097] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.

[0098] Those skilled in the art will recognize that the units and algorithm steps described in connection with the various examples of this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0099] Example 4

[0100] This embodiment also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the method described in Embodiment 1.

[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting teeth marks in tongue images, characterized in that, include: Construct a tooth mark semantic segmentation dataset, which includes: tongue images with known tooth mark labels; divide the tooth mark semantic segmentation dataset into a training set and a test set; A medical image segmentation network was constructed. The network was trained using a training set and tested using a test set. The network with a test accuracy higher than a set threshold was used as the trained medical image segmentation network. A trained medical image segmentation network was used to detect teeth marks in the tongue image to be tested, and the teeth mark detection results were obtained. The trained medical image segmentation network, during training, uses the K-means clustering algorithm to classify the images in the training set into several clusters. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. During the training round, based on the first The score of each cluster in each round determines the score of the first cluster. During each round of training, the number of images input to the network for each cluster; based on the first round of training... The number of images input into the network for each cluster is determined by the number of images in the cluster. A corresponding number of images are randomly selected from the cluster and input into the network to train the network. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. The score calculation formula is as follows: ; Where TP represents a sample correctly predicted as a positive example by the model, and its actual label is positive; FN represents a sample incorrectly predicted as a negative example by the model, but its actual label is positive; FP represents a sample incorrectly predicted as a positive example by the model, but its actual label is negative; assuming X represents the true label and Y represents the prediction result, where |X| and |Y| represent the number of elements in X and Y, respectively; The data random selector will randomly select a corresponding number of tongue images based on the data volume value of each cluster and send them to the next round of training. In each subsequent round of training, the distribution of input data will be adaptively adjusted. That is, in the next round of input, the proportion of input data of clusters with low scores in the previous round of training will be increased, and the proportion of input data of clusters with high scores in the next round of input will be decreased. Constructing a semantic segmentation dataset for tooth marks, specifically including: Acquire several images of the tongue; A preliminary cleaning process is performed on several tongue images. The preliminary cleaning process is used to filter out unreal tongue images, incomplete tongue images, or tongue images with a resolution lower than a set threshold, while retaining tongue images with teeth marks. A second cleaning process is performed on the images after the initial cleaning process. This second cleaning process is used to remove duplicate images from the dataset. The locations of the tooth marks in the dataset after two cleaning processes were manually labeled. In the first During the training round, based on the first The score of each cluster in each round determines the score of the first cluster. During each round of training, the number of images input into the network for each cluster.

2. The tongue image teeth mark detection method as described in claim 1, characterized in that, The trained medical image segmentation network, during training, classifies the images in the training set into several clusters. These clusters include: (1) The K-means clustering algorithm is used to cluster the dataset to obtain K clusters; (2) Randomly select an initial point for each cluster as the centroid of the cluster; (3) Calculate the similarity between each sample and all centroids, and assign each sample to the cluster with the most similar centroids; (4) Calculate the mean of all samples in each cluster and update the mean to the centroid of the current cluster; (5) Repeat (3) to (4) until the centroids of all clusters no longer change, or the set number of iterations is reached; finally, K clusters are obtained, and the centroid of each cluster represents the center point of the current cluster.

3. The tongue image teeth mark detection method as described in claim 2, characterized in that, The similarity between each sample and all centroids is calculated by using the sum of squared errors within the cluster as a measure of similarity. k represents the number of cluster centers. Let x represent a cluster, and let x represent a sample within that cluster. This represents the center of mass.

4. A tongue image tooth mark detection device, characterized in that, include: The dataset construction module is configured to: construct a tooth mark semantic segmentation dataset, which includes: tongue images with known tooth mark labels; and divide the tooth mark semantic segmentation dataset into a training set and a test set. The network training module is configured to: construct a medical image segmentation network, train the network using a training set, test the network using a test set, and use the network with a test accuracy higher than a set threshold as the trained medical image segmentation network. The detection output module is configured to: use a trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected, and obtain the tooth mark detection result; The trained medical image segmentation network classifies the images in the training set into several clusters during training. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. During the training round, based on the first The score of each cluster in each round determines the score of the first cluster. During each round of training, the number of images input to the network for each cluster; based on the first round of training... The number of images input into the network for each cluster is determined by the number of images in the cluster. A corresponding number of images are randomly selected from the cluster and input into the network to train the network. In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain a score for each cluster. The score calculation formula is as follows: ; Where TP represents a sample correctly predicted as a positive example by the model, and its actual label is positive; FN represents a sample incorrectly predicted as a negative example by the model, but its actual label is positive; FP represents a sample incorrectly predicted as a positive example by the model, but its actual label is negative; assuming X represents the true label and Y represents the prediction result, where |X| and |Y| represent the number of elements in X and Y, respectively; The data random selector will randomly select a corresponding number of tongue images based on the data volume value of each cluster and send them to the next round of training. In each subsequent round of training, the distribution of input data will be adaptively adjusted. That is, in the next round of input, the proportion of input data of clusters with low scores in the previous round of training will be increased, and the proportion of input data of clusters with high scores in the next round of input will be decreased. Constructing a semantic segmentation dataset for tooth marks, specifically including: Acquire several images of the tongue; A preliminary cleaning process is performed on several tongue images. The preliminary cleaning process is used to filter out unreal tongue images, incomplete tongue images, or tongue images with a resolution lower than a set threshold, while retaining tongue images with teeth marks. A second cleaning process is performed on the images after the initial cleaning process. This second cleaning process is used to remove duplicate images from the dataset. The locations of the tooth marks in the dataset after two cleaning processes were manually labeled. In the first During the training round, based on the first The score of each cluster in each round determines the score of the first cluster. During each round of training, the number of images input into the network for each cluster.

5. An electronic device, characterized in that it comprises: Memory is used to store computer-readable instructions in a non-transitory manner. as well as Processor, for executing the computer-readable instructions, When the computer-readable instructions are executed by the processor, they perform the method described in any one of claims 1-2.

6. A storage medium characterized by being non-transitory. The system stores computer-readable instructions, wherein, when the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1-3 are executed.

7. A computer program product, characterized in that, Includes a computer program that, when run on one or more processors, is used to implement the method of any one of claims 1-3.

Citation Information

Patent Citations

  • Artificial intelligence-based tongue picture recognition method and system

    CN113139971A

  • Training sample screening method and device, equipment and storage medium

    CN115565030A