Tongue image indentation detection method, device, equipment, medium and program product
By constructing a tooth mark semantic segmentation data set and a medical image segmentation network, combined with K-means clustering technology, and dynamically adjusting data input, the problem of imbalance of TCM tongue image data is solved, the accuracy and performance of tongue image semantic segmentation are improved, and the promotion of The progress of tongue analysis in traditional Chinese medicine.
Patent Information
- Application Number
- CN202410640385.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-22
AI Technical Summary
There are problems of data shortage and data imbalance in tongue pathology research in traditional Chinese medicine, which affects the accuracy of tongue image analysis. In particular, the segmentation of tongue image-related diseases is progressing slowly and there is a lack of effective semantic segmentation methods.
By constructing a tooth mark semantic segmentation data set and using a medical image segmentation network for training, K-means clustering is used to cluster the data, dynamically adjust the input number of data in each cluster, and balance the data distribution. An adaptive data adjustment based on clustering is proposed. Tongue image semantic segmentation model.
It improves the performance and accuracy of tongue image semantic segmentation, reduces the losses caused by labeling ambiguity and data skew, and improves the diagnostic capabilities in the field of tongue image segmentation in traditional Chinese medicine.
Smart Images

Figure CN118587437A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tooth mark detection, and in particular to a tongue image tooth mark detection method, device, equipment, medium and program product. Background Art
[0002] TCM tongue analysis observes the color, shape, and coating of the tongue to understand the health of the human body. Through a comprehensive analysis of the tongue, TCM physicians can gain insight into the pathological changes in the patient's body, identify the type and stage of the disease, and thus develop a more accurate treatment strategy.
[0003] As a key branch in the field of artificial intelligence, deep learning technology has achieved significant leaps in recent years, and the objective research on tongue images has also ushered in a new stage of rapid development by riding the express train of deep learning. High-quality data sets can provide more accurate and comprehensive information, and are the basis for training and optimizing deep learning models. However, since TCM clinical data involves the privacy protection of patients, there is a certain resistance to the collection of tongue image pathology research data, and TCM tongue image pathology research has long faced a data shortage problem. Normal tongue images are relatively easy to observe and record, with more samples, while some special tongue image types (such as abnormal tongue images such as tooth marks) may have fewer samples because of their low frequency of occurrence or difficulty in capturing.
[0004] In addition, due to the differences in the sampled populations, some people may be more prone to certain types of tongue characteristics due to specific health conditions or lifestyle habits. Therefore, the existing tongue image data usually have serious imbalances. The unavoidable subjective factors in the labeling process also make the labeling results uncertain, further affecting the accuracy of tongue image analysis.
[0005] The segmentation of tongue-related diseases can distinguish the pathological features in the tongue from normal tissues, providing an important basis for subsequent disease analysis and diagnosis, and is a key link in improving the performance of computer-aided diagnosis systems. However, due to the above-mentioned data limitations and the lack of more accurate and objective methods, the research on the objectification of TCM tongue diagnosis, especially the segmentation of tongue-related diseases, has been slow, and effective semantic segmentation methods are urgently needed to promote further development in this field. Summary of the invention
[0006] In order to solve the deficiencies of the prior art, the present invention provides a tongue image tooth mark detection method, device, equipment, medium and program product;
[0007] On the one hand, a tongue image tooth mark detection method is provided, comprising:
[0008] Constructing a tooth mark semantic segmentation dataset, the tooth mark semantic segmentation dataset comprising: a tongue image with known tooth mark labels; dividing the tooth mark semantic segmentation dataset into a training set and a test set;
[0009] Construct a medical image segmentation network, use a training set to train the network, and use a test set to test the network, and use the network with a test accuracy higher than a set threshold as the trained medical image segmentation network;
[0010] The trained medical image segmentation network is used to perform tooth mark detection on the tongue image to be detected, and the tooth mark detection result is obtained;
[0011] Among them, during the training process, the trained medical image segmentation network classifies the images of the training set to obtain several clusters; during the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster; during the i+1th 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 during the i+1th round of training is determined; based on the number of images input into the network for each cluster in the i+1th round, a corresponding number of images are randomly selected from the cluster and input into the network to train the network.
[0012] On the other hand, a tongue image tooth mark detection device is provided, comprising:
[0013] A data set construction module is configured to: construct a tooth mark semantic segmentation data set, wherein the tooth mark semantic segmentation data set includes: a tongue image with a known tooth mark annotated label; and divide the tooth mark semantic segmentation data set into a training set and a test set;
[0014] A network training module is configured to: construct a medical image segmentation network, train the network using a training set, and 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 the trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected to obtain a tooth mark detection result;
[0016] Among them, during the training process, the trained medical image segmentation network classifies the images of the training set to obtain several clusters; during the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster; during the i+1th 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 during the i+1th round of training is determined; based on the number of images input into the network for each cluster in the i+1th round, a corresponding number of images are randomly selected from the cluster and input into the network to train the network.
[0017] On the other hand, there is also provided an electronic device, comprising:
[0018] a memory for non-transitory storage of computer-readable instructions; and
[0019] a processor for executing the computer readable instructions,
[0020] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.
[0021] On the other hand, a storage medium is provided, which non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.
[0022] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.
[0023] The above technical solution has the following advantages or beneficial effects:
[0024] In response to the problem of data imbalance, the present invention proposes a tongue image semantic segmentation model based on clustering adaptive data adjustment. First, Kmeans is used to cluster the data and divide the data into different groups. The present invention changes the data transmission method and dynamically adjusts the number of data inputs for each cluster according to the score ratio of the validation set during the network training process, thereby balancing the imbalance of data distribution and finding a unified standard for semantic segmentation learning of cluster data with different standards.
[0025] This method achieved good results in qualitative and quantitative aspects. Compared with other medical image segmentation methods, the tongue semantic segmentation model based on clustering adaptive data adjustment was applied to the dataset, and the segmentation performance reached the best, and the segmentation effect was also greatly improved compared with the baseline method. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0027] Figure 1 This is a flow chart of the method of embodiment 1. DETAILED DESCRIPTION
[0028] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0029] The present invention has observed that both the annotators and the TCM physicians who examine the annotated results have different definition standards for the symptoms on the tongue surface, and the annotations are more or less ambiguous. Therefore, it is difficult to achieve absolute standardization and quantification in the field of tongue image objectification research. This is also an important reason why there has been no standard data set used for performance comparison between different models in the field of TCM tongue image objectification research for many years. Thirdly, the data volumes from different sources are different, and some categories of tongue images are more common or easier to obtain than other categories, which makes the data seriously unbalanced.
[0030] In order to solve the problems of subjectivity in tongue image data annotation and uneven distribution of tongue image data, the tongue image data set is annotated and grouped by clustering, and on this basis, a tongue image semantic segmentation model based on clustering adaptive data adjustment is proposed to minimize the loss caused by annotation ambiguity and data tilt. Extensive experiments have verified the effectiveness of the method proposed in the present invention and proved the potential application value of the method in the field of traditional Chinese medicine tongue image segmentation.
[0031] Embodiment 1
[0032] This embodiment provides a method for detecting tooth marks on a tongue image;
[0033] like Figure 1 As shown, the tongue image tooth mark detection method includes:
[0034] S101: constructing a tooth mark semantic segmentation dataset, wherein the tooth mark semantic segmentation dataset includes: a tongue image with known tooth mark labels; dividing the tooth mark semantic segmentation dataset into a training set and a test set;
[0035] S102: constructing a medical image segmentation network, training the network using a training set, and testing the network using a test set, and taking a network with a test accuracy higher than a set threshold as a trained medical image segmentation network;
[0036] S103: using the trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected, and obtaining a tooth mark detection result;
[0037] Among them, during the training process, the trained medical image segmentation network classifies the images of the training set to obtain several clusters; during the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster; during the i+1th 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 during the i+1th round of training is determined; based on the number of images input into the network for each cluster in the i+1th round, a corresponding number of images are randomly selected from the cluster and input into the network to train the network.
[0038] In order to realize the input of the i+1th round of training, the proportion of the input data volume of the clusters with low scores in the i-th round of training to the total input data is increased, and the proportion of the input data volume of the clusters with high scores in the i-th round is reduced when the input is in the i+1th round.
[0039] Furthermore, the step S101: constructing a tooth mark semantic segmentation dataset specifically includes:
[0040] Acquire several tongue images;
[0041] Performing a primary cleaning operation on a plurality of tongue images, wherein the primary cleaning operation is used to filter out unreal tongue images, incomplete tongue images, or tongue images with an image resolution lower than a set threshold, and retaining tongue images with tooth marks;
[0042] Performing a secondary cleaning on the images after the initial cleaning, wherein the secondary cleaning is used to delete duplicate images in the data set;
[0043] The tooth mark locations of the dataset after two cleanings were manually annotated.
[0044] Furthermore, the tooth mark semantic segmentation dataset is divided into a training set and a test set according to a set ratio.
[0045] Furthermore, the medical image segmentation network is constructed as a U-Net network.
[0046] Furthermore, the S102: constructs a medical image segmentation network, uses a training set to train the network, and during the training process, the loss function used is a binary cross entropy loss function.
[0047]
[0048] Where y is a binary label 0 or 1, p(y) is the probability that the output is equal to the label, and N is the number of groups of objects predicted by the model.
[0049] In order to measure the difference between the probability distribution predicted by the model and the probability distribution of the true label, and to optimize the model parameters, the present invention introduces a binary cross entropy loss function (BCE Loss) as a loss function in the tongue image semantic segmentation model based on clustering adaptive data adjustment proposed in the present invention. This loss function is usually used to judge the prediction performance of a binary classification model.
[0050] Furthermore, in the S103: trained medical image segmentation network, during the training process, the images in the training set are classified to obtain a number of clusters, and the classification includes:
[0051] S103-1: Use Kmeans clustering algorithm to cluster the data set and 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 divide each sample into the cluster that is most similar to it;
[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; eventually, K clusters are obtained, and the centroid of each cluster represents the center point of the current cluster.
[0056] Furthermore, the S103-3: calculating the similarity between each sample and all centroids uses the sum of squared errors within the cluster as a measure of similarity.
[0057]
[0058] k represents the number of cluster centers, C k represents a cluster, x represents a sample in a cluster, μ k Represents the centroid point.
[0059] It should be understood that Kmeans is mainly used for automatic classification of similar samples and is a typical unsupervised learning algorithm. The clustering result is affected by the similarity calculation method. Different calculation methods will lead to different clustering effects. Commonly used similarity calculation methods include Euclidean distance method and the like.
[0060] The specific implementation process of tongue image clustering based on Kmeans in the present invention is as follows:
[0061] First, assume that the data in the dataset D is divided into K clusters by the Kmeans algorithm, {C1, C2, C3, ..., C K}, the constant K represents the number of cluster categories. At the beginning of the algorithm, the initial points are randomly selected as the centroids of each cluster, namely {μ1, μ2, μ3, ..., μ k}.
[0062] Next, the algorithm divides each sample into the cluster that is most similar to it by calculating the similarity between each sample and all centroids.
[0063] Subsequently, the mean of all samples in each cluster is recalculated and updated as the new centroid of the cluster.
[0064] This process is iterated continuously until the centroids of all clusters no longer change significantly (or change very little), or the preset number of iterations is reached.
[0065] Finally, the dataset D is divided into K clusters with clear boundaries, and the centroid of each cluster represents the center point of the cluster.
[0066] The goal of the Kmeans algorithm is to minimize the intra-cluster sum of squared errors (SSE). The formula for SSE is shown in (2.1). The smaller the SSE, the higher the intra-cluster similarity. The present invention uses the Kmeans algorithm and adopts a greedy strategy to gradually approach the optimal solution. First, the centroids of K clusters are preset, and then each data point is assigned to the nearest cluster based on the distance from these centroids. Next, the centroids of the clusters are recalculated based on the data points in 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] The present invention tests the impact of setting K to different values on the semantic segmentation performance, and gives corresponding analysis in the ablation experiment part.
[0068] Furthermore, in the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster. The score calculation formula is:
[0069]
[0070] Where TP represents the sample correctly predicted as a positive example by the model, and its actual label is the positive class; FN represents the sample incorrectly predicted as a negative example by the model, but its actual label is a positive example; FP represents the sample incorrectly predicted as a positive example by the model, but its actual label is a negative example; Assume that X represents the true annotation (ground truth), Y represents the prediction result, where |X| and |Y| represent the number of X and Y elements respectively.
[0071] Furthermore, during the i+1th round of training, based on the score of each cluster in the i-th round, determining the number of images input into the network for each cluster during the i+1th round of training specifically includes:
[0072] Assume that the score data set S∈{S1,S2,S3,…,S n}, the total number of data input in each round must be set to X, and the proportion of each cluster's score to all cluster scores is taken as the proportion of the cluster input in this round. The formula for the proportion of the i-th cluster is Then the number of inputs of this cluster in the next round is X×P i .
[0073] After dividing the data set, the present 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 labeling ambiguity and uneven data distribution. Therefore, the present invention designs a tongue image semantic segmentation model based on clustering adaptive data adjustment, which changes the data transmission mode.
[0074] Based on the tongue image semantic segmentation model adjusted by clustering adaptive data, in the first round of training, the present invention divides the six clusters C∈{C1,C2,C3,...,C n}(In order to be consistent with subsequent training, the first input data is represented as The data is sent to the semantic segmentation model for training, and the number of each cluster of data is recorded before transmission. After the first round of training, calculate the Dice score set of each cluster of data on its corresponding validation set And sort them, and then assign new values to the data input corresponding to each cluster according to the score ratio before the second round of data input The data random selector will randomly select a corresponding number of tongue images according to the data volume value of each cluster, and transmit 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 mode, that is, in the next round of input, the proportion of the input data volume of the cluster with low training score in the previous round will be increased, and the proportion of the input data volume of the cluster with high score in the next round of input will be reduced, so as to provide dynamic data distribution for the learning of semantic segmentation network and alleviate the loss caused by the uneven distribution of data from different sources and different annotation standards.
[0075] The invention proposes a clustered adaptive data adjustment segmentation model for tooth mark semantic segmentation. Specifically, the invention first constructs a tooth mark semantic segmentation dataset, annotates the tooth mark locations in detail, and obtains the mask information required for semantic segmentation. Secondly, based on the constructed tooth mark semantic segmentation dataset, the invention uses the U-Net network as the baseline network, changes its data transmission mode, and groups the data in the dataset into different clusters in a K-means clustering manner; in the first round of training, all data in all clusters are input and the basic score of each cluster on the validation set is obtained, and then before a new round of training begins, the input amount of each cluster of data is adaptively adjusted based on the feedback results of the validation set, so that the network continuously adjusts the distribution of data based on the data source and annotation standards, thereby improving the accuracy of tooth mark semantic segmentation.
[0076] In summary, the specific contributions of the present invention are as follows:
[0077] (1) The present invention pays attention to the sample skew problems caused by uneven data distribution and ambiguous annotations, and takes the above two aspects as grouping targets. The original tongue images in the data set and their corresponding segmentation masks are used as the basis for division in a clustering manner, and the data are autonomously divided into different related clusters, providing a data basis for subsequent adaptive data adjustment training.
[0078] (2) A tongue semantic segmentation model based on clustering adaptive data adjustment was proposed. The adaptive data adjustment module dynamically adjusted the input quantity of different cluster data in each round. By adjusting the sample distribution, the data sample imbalance phenomenon was improved, and the accuracy of tooth mark segmentation was improved. At the same time, it provided a new idea for avoiding the subjectivity of tongue data labeling.
[0079] The present invention uses the U-Net network as the basic framework, and on this basis proposes a clustering adaptive data adjustment segmentation model for tooth mark semantic segmentation. In order to introduce the clustering adaptive data adjustment strategy, the present invention first divides the tooth mark semantic segmentation sub-dataset in the instance-level tongue image dataset into different clusters by using the K-means clustering method, and inputs the original image and the annotation file simultaneously during clustering.
[0080] Tongue images from different sources have certain similarities in shooting angles, lighting, imaging equipment, etc. Different annotators and reviewers have different annotation standards for disease annotations. Therefore, inputting the original image and annotations at the same time can comprehensively measure and obtain relatively accurate divisions from the above two perspectives. Cluster adaptive data distribution adjustment training is performed on the divided clusters.
[0081] The present invention simultaneously inputs all data into a semantic segmentation network, obtains a score corresponding to each cluster of data, and uses the score as a basic value; then the present invention dynamically adjusts the input amount of each cluster of data in the next round of training based on the basic value, thereby adjusting the distribution of input data, reducing the number of images in clusters with high scores, and increasing the number of images in clusters with low scores, and continuously adaptively adjusting to a balanced state in subsequent training, and finally obtaining a general solution for all clusters (that is, data from different sources and with subtle annotation standard differences).
[0082] Embodiment 2
[0083] This embodiment provides a tongue image tooth mark detection device;
[0084] Tongue image tooth mark detection device, comprising:
[0085] A data set construction module is configured to: construct a tooth mark semantic segmentation data set, wherein the tooth mark semantic segmentation data set includes: a tongue image with a known tooth mark annotated label; and divide the tooth mark semantic segmentation data set into a training set and a test set;
[0086] A network training module is configured to: construct a medical image segmentation network, train the network using a training set, and 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 the trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected to obtain a tooth mark detection result;
[0088] Among them, during the training process, the trained medical image segmentation network classifies the images of the training set to obtain several clusters; during the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster; during the i+1th 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 during the i+1th round of training is determined; based on the number of images input into the network for each cluster in the i+1th round, a corresponding number of images are randomly selected from the cluster and input into the network to train the network.
[0089] It should be noted that the above-mentioned data set construction module, network training module and detection output module correspond to steps S101 to S103 in Embodiment 1, and the examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0090] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0091] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0092] Embodiment 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 so that the electronic device executes the method described in the above embodiment one.
[0094] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0095] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0096] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
[0097] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0098] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0099] Embodiment 4
[0100] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.
[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting tooth marks on a tongue image, characterized in that: include: Constructing a tooth mark semantic segmentation dataset, the tooth mark semantic segmentation dataset comprising: a tongue image with known tooth mark labels; dividing the tooth mark semantic segmentation dataset into a training set and a test set; Construct a medical image segmentation network, use a training set to train the network, and use a test set to test the network, and use the network with a test accuracy higher than a set threshold as the trained medical image segmentation network; The trained medical image segmentation network is used to perform tooth mark detection on the tongue image to be detected, and the tooth mark detection result is obtained; Among them, during the training process, the trained medical image segmentation network classifies the images of the training set to obtain several clusters; during the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster; during the i+1th 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 during the i+1th round of training is determined; based on the number of images input into the network for each cluster in the i+1th round, a corresponding number of images are randomly selected from the cluster and input into the network to train the network.
2. The tongue image tooth mark detection method according to claim 1, characterized in that: Construct a tooth mark semantic segmentation dataset, including: Acquire several tongue images; Performing a primary cleaning operation on a plurality of tongue images, wherein the primary cleaning operation is used to filter out unreal tongue images, incomplete tongue images, or tongue images with an image resolution lower than a set threshold, and retaining tongue images with tooth marks; Performing a secondary cleaning on the images after the initial cleaning, wherein the secondary cleaning is used to delete duplicate images in the data set; The tooth mark locations of the dataset after two cleanings were manually annotated.
3. The tongue image tooth mark detection method according to claim 1, characterized in that: After training, the medical image segmentation network classifies the images in the training set to obtain several clusters. The classification includes: (1) Use the Kmeans clustering algorithm to cluster the data set and 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 divide each sample into the cluster that is most similar to it; (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; eventually, K clusters are obtained, and the centroid of each cluster represents the center point of the current cluster.
4. The tongue image tooth mark detection method according to claim 3, characterized in that: The similarity between each sample and all centroids is calculated by taking the sum of squared errors within the cluster as a measure of similarity; k represents the number of cluster centers, C k represents a cluster, x represents a sample in a cluster, μ k Represents the centroid point.
5. The tongue image tooth mark detection method according to claim 1, characterized in that: In the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster. The score calculation formula is: Where TP represents the sample correctly predicted as a positive example by the model, and its actual label is the positive class; FN represents the sample incorrectly predicted as a negative example by the model, but its actual label is a positive example; FP represents the sample incorrectly predicted as a positive example by the model, but its actual label is a negative example; Assume that X represents the true label and Y represents the prediction result, where |X| and |Y| represent the number of X and Y elements respectively.
6. The tongue image tooth mark detection method according to claim 1, characterized in that: In the process of the i+1th round of training, based on the score of each cluster in the i-th round, determining the number of images input into the network for each cluster in the i+1th round of training specifically includes: Assume that the score data set S∈{S1,S2,S3,…,S n }, the total number of data input in each round must be set to X, and the proportion of each cluster's score to all cluster scores is taken as the proportion of the cluster input in this round. The formula for the proportion of the i-th cluster is Then the number of inputs of this cluster in the next round is X×P i .
7. A tongue image tooth mark detection device, characterized in that: include: A data set construction module is configured to: construct a tooth mark semantic segmentation data set, wherein the tooth mark semantic segmentation data set includes: a tongue image with a known tooth mark annotated label; and divide the tooth mark semantic segmentation data set into a training set and a test set; A network training module is configured to: construct a medical image segmentation network, train the network using a training set, and 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 the trained medical image segmentation network to perform tooth mark detection on the tongue image to be detected, and obtain a tooth mark detection result; Among them, during the training process, the trained medical image segmentation network classifies the images of the training set to obtain several clusters; during the first round of training, all images of each cluster are input into the medical image segmentation network to obtain the score of each cluster; during the i+1th 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 during the i+1th round of training is determined; based on the number of images input into the network for each cluster in the i+1th round, a corresponding number of images are randomly selected from the cluster and input into the network to train the network.
8. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; as well as a processor for executing the computer readable instructions, Wherein, when the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 6 is executed.
9. A storage medium characterized by being non-temporary The computer-readable instructions are stored, 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 to 6 are executed.
10. A computer program product, characterized in that The invention comprises a computer program for implementing the method according to any one of claims 1 to 6 when the computer program is run on one or more processors.
Citation Information
Patent Citations
Unlabeled sample selection method based on confidence coefficients and clustering
CN104156438A
Depth sample learning method based on iteration mean clustering
CN108877947A
Data classification method based on MCWD -KSMOTE-AdaBoost-DenseNet algorithm
CN110659682A
Practical effect evaluation and learning path recommendation system and method based on cognitive diagnosis
CN110930274A
Method for constructing large-scale remote sensing image semantic segmentation model training sample set
CN112884791A
