CN115375690A - Tongue picture putrefaction classification and identification method - Google Patents
Tongue picture putrefaction classification and identification method Download PDFInfo
- Publication number
- CN115375690A CN115375690A CN202211315242.0A CN202211315242A CN115375690A CN 115375690 A CN115375690 A CN 115375690A CN 202211315242 A CN202211315242 A CN 202211315242A CN 115375690 A CN115375690 A CN 115375690A
- Authority
- CN
- China
- Prior art keywords
- greasy
- tongue
- tongue picture
- blocks
- sub
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/54—Extraction of image or video features relating to texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
- G06V10/763—Non-hierarchical techniques, e.g. based on statistics of modelling distributions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/80—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
- G06V10/806—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Medical Informatics (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Quality & Reliability (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to putrefaction identification, in particular to a tongue picture putrefaction classification identification method, which comprises the steps of preprocessing a tongue picture image, clustering and segmenting the tongue picture image into a plurality of tongue picture sub-blocks with different colors; selecting color features and texture features, and determining the optimal color texture feature combination reflecting the greasy tongue picture characteristic; calculating a feature vector corresponding to the tongue picture subblock based on the optimal color texture feature combination, and classifying the tongue picture subblocks by using a trained tongue picture subblock classifier; outputting a greasy region thermodynamic diagram based on the tongue picture subblock classification result, and carrying out qualitative analysis on the whole tongue greasy result; the technical scheme provided by the invention can overcome the defects that the areas with different greasy degrees in the tongue picture image cannot be effectively identified and the identification result of the whole tongue greasy coating has lower accuracy in the prior art.
Description
Technical Field
The invention relates to putrefaction identification, in particular to a method for classifying and identifying putrefaction of tongue picture.
Background
The traditional Chinese medicine thinks that the coating is thick, the particles are thick and loose, and the shape of the coating is like the accumulation of the soybean curb residues on the tongue surface, and the coating can be removed by wiping, so that the coating is called as 'rotten coating'; the tongue coating is fine and dense, and the tongue coating is not removed by wiping and is not peeled off, and a layer of greasy mucus is covered on the tongue coating, which is called as 'greasy tongue coating', as shown in figure 10. The greasy coating is one of the important characteristics of the tongue proper, and the greasy coating reflects the waning and waxing of yang-qi and damp-turbidity.
The color and texture distribution of a greasy coating area in a tongue picture image is obviously different from that of a normal tongue coating, the tongue coating in the image is firstly extracted by a coating-mass separation method, then a rectangular area is extracted from the center position of an irregular tongue coating area, the statistical texture feature structure classifier is used for identifying the greasy coating, the algorithm has strong interpretability and good repeatability, but the accuracy is limited by the pretreatment result of coating-mass separation in the preposition step, and if the coating-mass separation is inaccurate, the over-segmentation or under-segmentation of the tongue coating can interfere with the analysis of the greasy coating.
The prior identification method of greasy tongue coating refers to three Chinese patent documents with application publication numbers of CN 106682562A, CN 105160346A and CN 111476260A. After removing the edge effect based on Gabor wavelet transform, extracting mean values and standard deviations from different directions and scales of a tongue image as greasy characteristics, and performing classification and identification by using a LibSVM (support vector machine); the method comprises the steps of extracting Gabor texture, tamura roughness and tongue coating distribution characteristics on a tongue coating image after coating separation according to a patent document with application publication number CN 105160346A, forming 51-dimensional characteristic vectors in total, and establishing a classifier for classification and identification; the patent document with the application publication number of CN 111476260A generates a greasy feature extractor based on AlexNet neural network training, and establishes a multi-example support vector machine classifier for classification and identification after the greasy feature extractor is used for extracting the greasy feature of tongue picture sub-images.
The former two are recognition methods based on the traditional image algorithm for extracting greasy characteristics and then applying statistical classification, and the latter one is recognition method based on deep learning CNN convolutional neural network for extracting greasy characteristics. The traditional image algorithm has strong interpretability but low analysis accuracy, and the convolutional neural network has high speed but poor controllability.
The three methods represent two mainstream techniques for identifying the greasy coating at present, but after careful observation and analysis of a typical greasy tongue, it can be found that: a) Traditional Chinese medicine generally gives a general impression of the degree of greasiness of tongue picture images, but the greasiness degree of different sub-regions can be different; b) The greasy coating particles in the tongue picture image are different in size, the texture elements are different in shape, and the interference of cracks and pricks brings great difficulty to the identification work. Therefore, a method is needed for effectively identifying the areas with different greasy degrees in the tongue picture image and providing qualitative analysis of the greasy result of the whole tongue by combining with the quantitative calculation of the greasy coating.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects in the prior art, the invention provides a method for classifying and identifying the greasy tongue coating, which can effectively overcome the defects that the prior art cannot effectively identify areas with different greasy degrees in a tongue image and the accuracy of the identification result of the greasy coating on the whole tongue is low.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme:
a method for classifying and identifying greasy tongue coating comprises the following steps:
s1, preprocessing a tongue picture image, and clustering and dividing the tongue picture image into a plurality of tongue picture sub-blocks with different colors;
s2, selecting color features and texture features, and determining an optimal color texture feature combination reflecting the greasy tongue picture characteristic;
s3, calculating a feature vector corresponding to the tongue picture subblock based on the optimal color texture feature combination, and classifying the tongue picture subblocks by using a trained tongue picture subblock classifier;
and S4, outputting a pyrogram of the greasy region based on the classification result of the tongue picture subblocks, and carrying out qualitative analysis on the whole tongue greasy result.
Preferably, the selecting of the color feature and the texture feature in S2 and the determining of the optimal color texture feature combination reflecting the greasy tongue picture comprise:
arranging color texture characteristic values corresponding to the tongue picture subblocks into a line based on the selected color characteristic and texture characteristic to form a characteristic vector V;
the importance of the tongue picture greasy characteristic is sorted through the output characteristics of the XGboost selector, the preference is carried out according to the order of importance from high to low, and the preferred characteristics are used as the optimal color texture characteristic combination reflecting the tongue picture greasy characteristic.
Preferably, said priority is performed in order of importance, and the preferred features are taken as the best color texture feature combination reflecting the greasy characteristic of the tongue picture, including:
and selecting the first N characteristics according to the order of importance from high to low as the optimal color texture characteristic combination reflecting the greasy tongue picture.
Preferably, the color features comprise first order moment, second order moment and third order moment of each channel of RGB, and the texture features comprise energy, contrast, correlation, entropy, inverse difference moment, tamura roughness and LBP features.
Preferably, the preprocessing is performed on the tongue image in S1, and the clustering segmentation of the tongue image into a plurality of tongue sub-blocks with different colors includes:
extracting a tongue picture image from the tongue extending picture by using a tongue picture segmentation algorithm, and unifying the tongue picture image to 299 x 299 size;
and (4) clustering and segmenting the tongue image into a plurality of irregular tongue image sub-blocks according to the color similarity by using a SLIC superpixel segmentation algorithm in OpenCV.
Preferably, in S3, the feature vectors corresponding to the tongue picture sub-blocks are calculated based on the optimal color texture feature combinations, and the tongue picture sub-blocks are classified by using the trained tongue picture sub-block classifier, including:
calculating color texture characteristic values corresponding to the tongue picture sub-blocks based on the optimal color texture characteristic combination, and arranging the color texture characteristic values into a line to form a characteristic vector V';
subtracting the corresponding Mean value from each color texture feature value in the feature vector V i After that, divided by the corresponding variance Var i Obtaining a feature vector V '' after data normalization;
inputting the feature vector V' into the trained tongue picture sub-block classifier SVM fn Obtaining the category of each tongue picture subblock;
wherein, the tongue picture sub-block classifier SVM fn The output tongue manifestation sub-block belongs to the category of thick, rotten, thick, greasy, thin, greasy and normal.
Preferably, the tongue picture sub-block classifier performs model training by using a tongue picture training image set containing an optimal color texture feature combination, and the specific process includes:
selecting a preset number of tongue picture training images to form a tongue picture training image set, and calculating color texture characteristic values corresponding to tongue picture sub-blocks of all tongue picture training images to form a sample vector set X;
calculating the Mean of the color texture characteristic values of each column in the sample vector set X i Sum variance Var i Subtracting the corresponding Mean value Mean from each color texture feature value in the sample vector set X i After that, divided by the corresponding variance Var i Obtaining a sample vector set X' after data normalization;
dividing the sample vector set X' into a training sample set and a verification sample set according to a preset proportion, and inputting the training sample set and corresponding class labels into a tongue picture sub-block classifier SVM fn And (5) training, and verifying the advantages and disadvantages of the model by using the verification sample set and the corresponding class label.
Preferably, in S4, a comprehensive evaluation method is adopted to perform qualitative analysis on the result of tongue putrefaction, including:
when the number of tongue picture sub-blocks in the thick and rotten category is not less than 3, judging that the whole tongue is rotten;
when the number of the tongue picture sub-blocks in the thick and greasy category is less than 3 and the number of the tongue picture sub-blocks in the thick and greasy category is not less than 3, judging that the whole tongue is greasy and the result is thick and greasy with little rot;
when the number of the tongue picture sub-blocks in the thick and greasy category is less than 3, and the number of the tongue picture sub-blocks in the thin and greasy category is not less than 3, judging that the whole tongue is greasy and slightly greasy;
when the number of the tongue picture sub-blocks in the thick and greasy category is 0 and the number of the tongue picture sub-blocks in the thick and greasy category is not less than 4, judging that the whole tongue is greasy and the result is thick and greasy;
when the number of the tongue picture sub-blocks in the thick greasy category is 0, the number of the tongue picture sub-blocks in the thick greasy category is less than 4, and the number of the tongue picture sub-blocks in the thin greasy category is not less than 5, judging that the whole tongue is greasy;
and when the number of the tongue picture sub-blocks in the thick greasy type, the thick greasy type and the thin greasy type is less than 3, or the number of the tongue picture sub-blocks in the thick greasy type is 0, the number of the tongue picture sub-blocks in the thick greasy type is less than 4, and the number of the tongue picture sub-blocks in the thin greasy type is less than 5, judging that the whole tongue greasy result is normal.
(III) advantageous effects
Compared with the prior art, the method for classifying and identifying the greasy tongue picture and the greasy fur has the following beneficial effects:
1) The super-pixel areas which are adjacent in position on the tongue surface and similar in characteristics such as color, brightness and texture are used as the minimum evaluation unit of the greasy characteristics through an SLIC super-pixel segmentation algorithm, so that the effect similar to the separation of the fur and the texture is achieved, and the risk caused by inaccurate separation of the fur and the texture is fully reduced;
2) The optimal color texture feature combination of the super-pixel region has a remarkable effect on the classification of the region greasy degree and can be linearly classified, and the accuracy of the tongue fur greasy degree classification of the tongue picture sub-block classifier formed by the method reaches 89%;
3) The method reduces the dependence on the separation of the tongue coating, improves the accuracy of the classification and identification of the greasy degree of the tongue coating, applies the thermodynamic diagram of a greasy area to visually express the distribution of the greasy coating, and simultaneously adopts a comprehensive judgment method to realize the qualitative analysis of the result of the greasy coating of the whole tongue.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a schematic diagram of clustering and segmenting a tongue picture image into a plurality of tongue picture sub-blocks with different colors by using a SLIC superpixel segmentation algorithm in the present invention;
FIG. 3 is a diagram of the result of the ranking of importance of the output characteristics of the XGboost selector on the greasy tongue;
FIG. 4 is a graph of the first moment characteristic and the degree of greasiness of the present invention;
FIG. 5 is a distribution diagram of GLCM and greasiness degree of the first moment feature and gray level co-occurrence matrix;
FIG. 6 is a schematic view of the process of identifying putrefaction of tongue image to be identified;
FIG. 7 is a diagram of a greasy region thermodynamic diagram output based on tongue manifestation sub-block classification results in the present invention;
FIG. 8 is a decision tree diagram of qualitative analysis of the tongue putrefaction results using comprehensive evaluation in the present invention;
FIG. 9 is a graph of the cluster segmentation effect of the SLIC superpixel segmentation algorithm and three algorithms of K-means clustering and graph segmentation in the present invention;
FIG. 10 is a schematic view of the tongue with typical rotten coating, typical greasy coating and normal coating.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A method for classifying and identifying greasy tongue coating, as shown in figure 1, comprises the following steps:
1. preprocessing the tongue picture image, clustering and dividing the tongue picture image into a plurality of tongue picture sub-blocks with different colors, comprising the following steps:
extracting a tongue picture image from the tongue extending picture by using a tongue picture segmentation algorithm, and unifying the tongue picture image to 299 x 299;
and (4) clustering and segmenting the tongue image into a plurality of irregular tongue image sub-blocks according to the color similarity by using a SLIC superpixel segmentation algorithm in OpenCV.
As shown in fig. 2, the super-pixel segmentation is to cluster and segment adjacent pixels with similar texture, color, brightness, etc. into irregular pixel blocks with certain visual significance, and uses the similarity of features between pixels to group the pixels, and uses a small number of super-pixels to replace a large number of pixels to express picture features. And SLIC (simple linear iterative clustering) is simple linear iterative clustering, and the main principle is to convert a color image into a CIELAB color space and 5-dimensional feature vectors under x and y coordinates, then construct a distance measurement standard for the 5-dimensional feature vectors, and perform local clustering on image pixels.
As shown in fig. 9, it can be seen that the granularity of the segmented block of the K-means clustering algorithm is too fine, the tongue coating is too segmented, and the time consumption is longest; the time consumption and the operation result of the graph segmentation Felzenzwalb algorithm and the SLIC superpixel segmentation algorithm are similar, but the graph segmentation Felzenzwalb algorithm is insensitive to the tongue texture and the tongue fur and is easy to cluster the tongue texture and the tongue fur into one block, while the SLIC superpixel segmentation algorithm is sensitive to the tongue texture and the tongue fur, and the tongue texture is distributed in different blocks.
In the technical scheme of the application, when the SLIC superpixel segmentation algorithm is adopted to perform clustering segmentation on the tongue picture image with the resolution of 299 x 299, the selection parameters are as shown in the following table:
TABLE 1 parameter Table for SLIC superpixel segmentation algorithm
Parameter name | Description of parameters | Parameter value |
n_segments | A parameter defining how many superpixel blocks to generate, by |
36 |
compactness | Controlling the balance between color and space, the higher the value, the more obvious the blocking of the segmentation result | 5 |
sigma | The Gaussian smoothing kernel width when preprocessing is carried out on each dimension of the image, the default value is 0, and the unsmooth effect is meant | 0 |
max_iter | Maximum number of k-means iterations | 10 |
2. Selecting color features and texture features, and determining the optimal color texture feature combination reflecting the greasy tongue picture.
1) The color features include color moments which can reflect color distribution information, such as first moment, second moment and third moment of each channel of RGB, and the texture features include energy, contrast, correlation, entropy, inverse difference moment, tamura roughness and LBP features which reflect texture density.
2) Selecting color features and texture features, and determining an optimal color texture feature combination reflecting the greasy tongue picture characteristic, comprising:
arranging color texture characteristic values corresponding to the tongue picture subblocks into a line based on the selected color characteristic and texture characteristic to form a characteristic vector V;
the importance of the tongue picture greasy characteristic is sorted through the output characteristics of the XGboost selector, the preference is carried out according to the order of importance from high to low, and the preferred characteristics are used as the optimal color texture characteristic combination reflecting the tongue picture greasy characteristic.
Wherein, the optimization is carried out according to the order of importance from high to low, and the optimized feature is taken as the optimal color texture feature combination reflecting the greasy characteristic of the tongue picture, which comprises the following steps:
and selecting the first N characteristics according to the order of importance from high to low as the optimal color texture characteristic combination reflecting the greasy tongue picture.
In general, color distribution information is mainly concentrated on low-order moments, so the first three-order moments are used to indicate the color features of the image, i.e., first, second, and third moments, as shown in the following table:
TABLE 2 paraphrase tables of first, second and third moments in color characteristics
Different from color features, texture features need to be statistically calculated in a region containing a plurality of pixel points, and as a statistical feature, the texture features are usually rotation invariant and have strong resistance to noise, and common texture analysis methods include a statistical method, a geometric method, a model method and a frequency spectrum method. The following table is a texture feature definition table of the gray-scale spatial correlation properties (mainly including gray-scale co-occurrence matrix GLCM, tamura coarseness and LBP features):
TABLE 3 paraphrase table of textural features
The importance of the decision tree is calculated by the amount that each attribute segmentation point improves the performance metric, weighted by the number of observations for which the node is responsible. The more attributes of a critical decision made using a decision tree, the higher its relative importance. The color features and the texture features are used as independent variables, the degree of greasiness is used as dependent variables, the importance of the feature statistics is analyzed by using a gradient lifting decision tree XGboost algorithm, and when one statistic is used in a model more to construct a decision tree, the importance of the feature is relatively higher.
The selection of the optimal color texture feature combination is explained below with reference to specific examples:
selecting 80 thick and rotten, 100 thick and greasy, 100 thin and greasy and 120 normal tongue picture sub-blocks, and counting 271 color texture characteristic values to form a data set as shown in the following table:
table 4 color feature and texture feature table
And arranging the 271 color texture characteristic values into a column in sequence to form a characteristic vector V, forming a characteristic vector set by 400 tongue picture sub-blocks, adding a category label of each tongue picture sub-block, dividing the tongue picture sub-blocks into a training set and a verification set according to the proportion of 9.
After training, in the result of ranking the importance of the characteristics of the XGboost selector on the tongue picture greasy characteristic, the following can be found:
1) The LBP feature has no separability from normal and rotten mosses;
2) The first moment and the gray level co-occurrence matrix GLCM have good effect, and the inverse difference distance IDM and the correlation COR (moment of inertia) of the gray level co-occurrence matrix GLCM have good effect of detecting the greasy coating;
3) The sensitivity of the greasy to color characteristics is greater than that of texture characteristics, perhaps related to the diversity of tongue coating textures;
4) Color features play a more important dominant role than texture features, probably due to the greasy diversity and irregularity of the tongue coating.
As shown in fig. 3, in the result of ranking the importance of the output features of the XGBoost selector on the tongue image greasy characteristic, the first 9 features with importance greater than 55 are preferably used as the optimal color texture feature combination reflecting the tongue image greasy characteristic, which specifically includes: the first moment of the green channel, the first moment of the red channel, the first moment of the blue channel, the inverse difference IDM of the gray level co-occurrence matrix GLCM, tamura roughness, the second moment of the red channel, the correlation COR of the gray level co-occurrence matrix GLCM, the third moment of the green channel, and the entropy ENT of the gray level co-occurrence matrix GLCM.
The two characteristics of the green channel first moment and the red channel first moment ranked at the top in fig. 3 are linearly separable for the degree of greasiness, as shown with reference to fig. 4; the three characteristics of the green channel first moment, the red channel first moment, and the blue channel first moment ranked in fig. 3 are linearly separable from the degree of greasiness, as shown with reference to fig. 5.
3. Calculating the feature vectors corresponding to the tongue picture subblocks based on the optimal color texture feature combination, and classifying the tongue picture subblocks by using a trained tongue picture subblock classifier, wherein the method comprises the following steps of:
calculating color texture characteristic values corresponding to the tongue picture sub-blocks based on the optimal color texture characteristic combination, and arranging the color texture characteristic values into a line to form a characteristic vector V';
subtracting the corresponding Mean value from each color texture feature value in the feature vector V i After that, divide by the corresponding variance Var i Obtaining a feature vector V '' after data normalization;
inputting the feature vector V' into the trained tongue picture sub-block classifier SVM fn Obtaining the category of each tongue picture subblock;
wherein, the tongue picture sub-block classifier SVM fn The output tongue manifestation sub-block belongs to the category of thick, rotten, thick, greasy, thin, greasy and normal.
The tongue picture sub-block classifier adopts a tongue picture training image set containing the optimal color texture feature combination to carry out model training, and the specific process comprises the following steps:
selecting a preset number of tongue picture training images to form a tongue picture training image set, and calculating color texture characteristic values corresponding to tongue picture subblocks of all tongue picture training images to form a sample vector set X;
calculating the Mean of the color texture characteristic values of each column in the sample vector set X i Sum variance Var i Subtracting the corresponding Mean value Mean from each color texture feature value in the sample vector set X i After that, divided by the corresponding variance Var i Obtaining a sample vector set X' after data normalization;
dividing the sample vector set X' into a training sample set and a verification sample set according to a preset proportion, and inputting the training sample set and corresponding class labels into a tongue picture sub-block classifier SVM fn And (5) training, and verifying the advantages and disadvantages of the model by using the verification sample set and the corresponding class label.
The following verification tests are performed on the tongue manifestation sub-block classifier obtained by performing model training on the tongue manifestation training image set containing the optimal color texture feature combination by combining with a specific example:
100 human face tongue-stretching pictures are adopted, the greasy result is determined by a Chinese medicine expert, and the accuracy of the tongue picture sub-block classification result is calculated. After 60 greasy tongue picture images are clustered and segmented by SLIC superpixel segmentation algorithm, the typical areas identified by the traditional Chinese medicine experts are used as training sample blocks to generate 870 tongue picture sub-blocks. Meanwhile, 30 tongue picture images are randomly extracted from 100 tongue picture images, and 545 tongue picture sub-blocks are generated as verification sample blocks after clustering segmentation by the SLIC superpixel segmentation algorithm. The test results are given in the following table:
TABLE 5 tongue manifestation sub-block classifier verification test results
Categories | Training sample number/block | Verifying sample number/block | Correctly identifying sample numbers/blocks | Accuracy rate |
Thick rot | 147 | 78 | 69 | 0.88 |
Thick putty | 221 | 141 | 124 | 0.88 |
Thin putty | 230 | 162 | 131 | 0.81 |
Is normal | 272 | 164 | 138 | 0.84 |
Total up to | 870 | 545 | 462 | 0.85 |
And (4) test conclusion: as can be seen from the above data, the overall coincidence rate of the tongue manifestation subblock classification result and the judgment of the traditional Chinese medicine expert reaches 85%, wherein the accuracy of thin greasiness is low, probably because the difference between thin greasiness and normal greasiness is not very obvious.
The optimized optimal color texture feature combination is verified and tested by combining the existing gray level co-occurrence matrix GLCM:
two groups were selected for validation experiments: 1) Inputting characteristic values generated by a contrast group through a gray level co-occurrence matrix GLCM into XGboost for training; 2) And inputting the characteristic value generated by the optimal color texture characteristic combination into the XGboost for training by the experimental group, and finally recording and comparing the accuracy obtained by identifying the same batch of test sets by the tongue picture sub-block classifiers obtained based on the two groups of schemes so as to verify the effectiveness of the characteristic selection method. The results of the validation experiment are shown in the following table:
TABLE 6 verification experiment results of optimal color texture feature combinations
The experimental conclusion is that: the accuracy of the tongue picture sub-block classification result obtained by singly using the gray level co-occurrence matrix GLCM is lower than that obtained by combining the optimal color texture characteristics, which shows that the color characteristics, tamura roughness and LBP characteristics have certain contribution to reflecting the greasy tongue picture characteristics.
4. Outputting a thermodynamic diagram of the greasy region based on the classification result of the tongue picture subblocks (as shown in fig. 7, wherein a blue region is represented by "1", a green region is represented by "2", a yellow region is represented by "3", a red region is represented by "4", and the red indicates the highest degree of greasiness according to the sequence of blue < green < yellow < red), and performing qualitative analysis on the whole tongue greasiness result.
Wherein, the qualitative analysis of the whole tongue greasy result is performed by adopting a comprehensive evaluation method, as shown in fig. 8, comprising the following steps:
when the number of tongue picture sub-blocks in the thick and rotten category is not less than 3, judging that the whole tongue is rotten;
when the number of the tongue picture sub-blocks in the thick and greasy category is less than 3 and the number of the tongue picture sub-blocks in the thick and greasy category is not less than 3, judging that the whole tongue is greasy and has a slightly greasy result;
when the number of the tongue picture sub-blocks in the thick and greasy category is less than 3, and the number of the tongue picture sub-blocks in the thin and greasy category is not less than 3, judging that the whole tongue is greasy and slightly greasy;
when the number of the tongue picture sub-blocks in the thick and greasy category is 0 and the number of the tongue picture sub-blocks in the thick and greasy category is not less than 4, judging that the whole tongue is greasy and the result is thick and greasy;
when the number of the tongue picture sub-blocks in the thick greasy category is 0, the number of the tongue picture sub-blocks in the thick greasy category is less than 4, and the number of the tongue picture sub-blocks in the thin greasy category is not less than 5, judging that the whole tongue is greasy;
and when the number of the tongue picture sub-blocks in the thick, greasy and thin greasy categories is less than 3, or the number of the tongue picture sub-blocks in the thick greasy category is 0, the number of the tongue picture sub-blocks in the thick greasy category is less than 4, and the number of the tongue picture sub-blocks in the thin greasy category is less than 5, judging that the whole tongue greasy result is normal.
The overall tongue putrefaction result was qualitatively analyzed by comprehensive evaluation method, as shown in the following table:
TABLE 7 explanation table for qualitative analysis of the whole tongue greasy result by comprehensive evaluation method
And randomly extracting 56 from 60 greasy tongue picture images shot by experiments, and adding 76 typical normal tongue picture images to determine the accuracy of the comprehensive judgment method for judging the greasy degree of the whole tongue. The results are shown in the following table:
TABLE 8 verification result of qualitative analysis of the whole tongue greasy result by comprehensive evaluation method
Rotten and greasy whole tongue | Number/number of test images | Correctly identifying number/number of images | Accuracy rate |
Thick rot | 6 | 5 | 0.83 |
Thick greasy with slight decay | 7 | 6 | 0.86 |
Thin greasy and slightly rotten | 11 | 9 | 0.82 |
Thick putty | 14 | 13 | 0.93 |
Thin putty | 18 | 15 | 0.83 |
Is normal | 20 | 18 | 0.9 |
In total | 76 | 66 | 0.87 |
80 greasy tongue picture images with greasy coating and 20 normal tongue picture images without greasy coating are extracted from the tongue picture library to form a test data set, and the accuracy is calculated for the classification results of the tongue picture sub-blocks and the whole tongue picture image respectively. After clustering and segmentation by the SLIC superpixel segmentation algorithm, taking typical areas identified by traditional Chinese medicine experts as test sample blocks, generating 920 tongue picture sub-blocks, and carrying out classification and labeling by the traditional Chinese medicine experts.
The classification test results of the tongue picture sub-blocks are shown in the following table:
TABLE 9 tongue manifestation sub-block classification test results
Categories | Number of test samples/block | Correctly identifying sample numbers/blocks | Percent accuracy% |
Thick rot | 104 | 94 | 90.38 |
Thick putty | 215 | 192 | 89.30 |
Thin putty | 293 | 251 | 85.67 |
Is normal | 308 | 269 | 87.34 |
Total up to | 920 | 806 | 87.61 |
The results of the classification test of the whole tongue image are shown in the following table:
TABLE 10 tongue image Classification test results
Rotten and greasy whole tongue | Number/number of test images | Correctly identifying number/number of images | Percent of accuracy% |
Thick rot | 11 | 11 | 100 |
Thick greasy with slight decay | 15 | 13 | 86.67 |
Thin greasy with slight decay | 12 | 11 | 91.67 |
Thick putty | 19 | 17 | 89.47 |
Thin putty | 23 | 19 | 82.61 |
Is normal and normal | 20 | 18 | 90 |
Total of | 100 | 89 | 89 |
And (4) test conclusion: as can be seen from table 9, the overall coincidence rate of the tongue picture sub-block classification result and the judgment of the expert in traditional Chinese medicine reaches 87.61%, and the accuracy of thick-rotten and thick-greasy classification is higher than that of thin greasy classification; as can be seen from Table 10, the consistency between the classification result of the whole tongue with greasy taste and the labeling result is 89%.
The accuracy of the algorithm is evaluated according to positive categories (including thick rot, thick greasy and slightly rotten, thin greasy and slightly rotten, thick greasy and thin greasy) and negative categories (namely normal), and the result is shown in the following table:
TABLE 11 evaluation results of the accuracy of the present algorithm
Wherein, the accuracy rate is 89%, the accuracy rate is 97.26%, the sensitivity is 88.75%, and the specificity is 90%. The accuracy rate represents the proportion of all correctly judged results of the classification model in the total observed value; the accuracy rate represents the specific gravity of the prediction pair in all results of which the model prediction is a positive class; the specificity represents the specific gravity of the prediction pair in all the results of which the true values are positive; sensitivity represents the specific gravity of the predicted pair in all results where the true value is negative.
Comparing the algorithm with a tongue fur texture identification method based on Gabor wavelet transform, an identification method based on texture and distribution characteristics, a greasy classification algorithm based on a convolutional neural network and a greasy identification method based on subspace characteristics, wherein 56 greasy tongue picture images and 20 normal tongue picture images without greasy fur form a test data set, the execution time of different algorithms is counted according to average time, and the calculation rule is as follows:
the accuracy evaluation is carried out on the five algorithms, and the results are shown in the following table:
table 12 accuracy evaluation results of five algorithms
From the above table, it can be known that the accuracy and execution time of different recognition algorithms are obviously different, wherein the "greasy recognition method based on subspace feature" takes the longest time, the "recognition method based on texture and distribution feature" has the lowest accuracy, and the "tongue fur texture recognition method based on Gabor wavelet transform" has the lowest specificity, which indicates that the misjudgment rate of the method is higher.
The accuracy rate close to that of the neural network algorithm can be obtained within 0.9 second of execution time by the algorithm, and meanwhile, the false judgment rate and the missing rate are lower than those of the neural network algorithm, so that the optimal optimization of putrefaction classification and identification is realized.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.
Claims (8)
1. A method for classifying and identifying greasy tongue coating is characterized in that: the method comprises the following steps:
s1, preprocessing a tongue picture image, and clustering and dividing the tongue picture image into a plurality of tongue picture sub-blocks with different colors;
s2, selecting color features and texture features, and determining an optimal color texture feature combination reflecting the greasy tongue picture characteristic;
s3, calculating a feature vector corresponding to the tongue picture subblocks based on the optimal color texture feature combination, and classifying the tongue picture subblocks by using a trained tongue picture subblock classifier;
and S4, outputting a greasy region thermodynamic diagram based on the tongue picture sub-block classification result, and performing qualitative analysis on the whole tongue greasy result.
2. The method for classifying and identifying the greasy tongue coating according to claim 1, wherein: s2, selecting color features and texture features, and determining the optimal color texture feature combination reflecting the greasy tongue picture, wherein the optimal color texture feature combination comprises the following steps:
arranging color texture characteristic values corresponding to the tongue picture subblocks into a line based on the selected color characteristic and texture characteristic to form a characteristic vector V;
the importance of the tongue picture greasy characteristic is sorted through the output characteristics of the XGboost selector, the preference is carried out according to the order of importance from high to low, and the preferred characteristics are used as the optimal color texture characteristic combination reflecting the tongue picture greasy characteristic.
3. The method for classifying and identifying the greasy tongue coating according to claim 2, wherein: the optimization is performed from high importance to low importance, and the optimized features are used as the optimal color texture feature combination reflecting the greasy tongue picture, and the method comprises the following steps:
and selecting the first N characteristics according to the order of importance from high to low as the optimal color texture characteristic combination reflecting the greasy tongue picture.
4. The method for classifying and identifying the greasy tongue coating according to claim 2, wherein: the color features comprise first moment, second moment and third moment of each RGB channel, and the texture features comprise energy, contrast, correlation, entropy, inverse difference moment, tamura roughness and LBP features.
5. The method for classifying and identifying the greasy tongue coating according to claim 2, wherein: the step S1 of preprocessing the tongue picture image and clustering and dividing the tongue picture image into a plurality of tongue picture sub-blocks with different colors comprises the following steps:
extracting a tongue picture image from the tongue extending picture by using a tongue picture segmentation algorithm, and unifying the tongue picture image to 299 x 299 size;
and (4) clustering and segmenting the tongue image into a plurality of irregular tongue image sub-blocks according to the color similarity by using a SLIC superpixel segmentation algorithm in OpenCV.
6. The method for classifying and identifying the greasy tongue coating according to claim 1, wherein: and S3, calculating a feature vector corresponding to the tongue picture subblock based on the optimal color texture feature combination, and classifying the tongue picture subblocks by using the trained tongue picture subblock classifier, wherein the method comprises the following steps of:
calculating color texture characteristic values corresponding to the tongue picture sub-blocks based on the optimal color texture characteristic combination, and arranging the color texture characteristic values into a line to form a characteristic vector V';
subtracting the corresponding Mean value from each color texture feature value in the feature vector V i After that, divided by the corresponding variance Var i Obtaining a feature vector V '' after data normalization;
inputting the feature vector V' into the trained tongue picture sub-block classifier SVM fn Obtaining the category of each tongue picture subblock;
wherein, the tongue picture sub-block classifier SVM fn The output tongue manifestation sub-block belongs to the category of thick, rotten, thick, greasy, thin, greasy and normal.
7. The method for classifying and identifying the greasy tongue coating according to claim 6, wherein: the tongue picture sub-block classifier adopts a tongue picture training image set containing the optimal color texture feature combination to carry out model training, and the specific process comprises the following steps:
selecting a preset number of tongue picture training images to form a tongue picture training image set, and calculating color texture characteristic values corresponding to tongue picture sub-blocks of all tongue picture training images to form a sample vector set X;
calculating Mean value of color texture characteristic value of each column in sample vector set X i Sum variance Var i Subtracting the corresponding Mean value Mean from each color texture feature value in the sample vector set X i After that, divided by the corresponding variance Var i Obtaining a sample vector set X' after data normalization;
dividing the sample vector set X' into a training sample set and a verification sample set according to a preset proportion, and inputting the training sample set and corresponding class labels into a tongue picture sub-block classifier SVM fn And (5) training, and verifying the advantages and disadvantages of the model by using the verification sample set and the corresponding class label.
8. The method for classifying and identifying the greasy tongue coating according to claim 6, wherein: and S4, carrying out qualitative analysis on the whole tongue greasy result by adopting a comprehensive judgment method, which comprises the following steps:
when the number of the tongue picture sub-blocks in the thick rotten category is not less than 3, judging that the whole tongue is rotten and the result is thick rotten;
when the number of the tongue picture sub-blocks in the thick and greasy category is less than 3 and the number of the tongue picture sub-blocks in the thick and greasy category is not less than 3, judging that the whole tongue is greasy and has a slightly greasy result;
when the number of the tongue picture sub-blocks in the thick and greasy category is less than 3, and the number of the tongue picture sub-blocks in the thin and greasy category is not less than 3, judging that the whole tongue is greasy and slightly greasy;
when the number of the tongue picture subblocks in the thick and greasy category is 0 and the number of the tongue picture subblocks in the thick and greasy category is not less than 4, judging that the whole tongue is greasy;
when the number of the tongue picture sub-blocks in the thick greasy category is 0, the number of the tongue picture sub-blocks in the thick greasy category is less than 4, and the number of the tongue picture sub-blocks in the thin greasy category is not less than 5, judging that the whole tongue is greasy;
and when the number of the tongue picture sub-blocks in the thick, greasy and thin greasy categories is less than 3, or the number of the tongue picture sub-blocks in the thick greasy category is 0, the number of the tongue picture sub-blocks in the thick greasy category is less than 4, and the number of the tongue picture sub-blocks in the thin greasy category is less than 5, judging that the whole tongue greasy result is normal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211315242.0A CN115375690B (en) | 2022-10-26 | 2022-10-26 | Classification and identification method for greasy tongue coating |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211315242.0A CN115375690B (en) | 2022-10-26 | 2022-10-26 | Classification and identification method for greasy tongue coating |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115375690A true CN115375690A (en) | 2022-11-22 |
CN115375690B CN115375690B (en) | 2023-06-13 |
Family
ID=84073417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211315242.0A Active CN115375690B (en) | 2022-10-26 | 2022-10-26 | Classification and identification method for greasy tongue coating |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115375690B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115797352A (en) * | 2023-02-08 | 2023-03-14 | 长春中医药大学 | Tongue picture image processing system for traditional Chinese medicine health-care physique detection |
CN115953392A (en) * | 2023-03-09 | 2023-04-11 | 四川博瑞客信息技术有限公司 | Tongue body coating quality evaluation method based on artificial intelligence |
CN117197139A (en) * | 2023-11-07 | 2023-12-08 | 天津市肿瘤医院(天津医科大学肿瘤医院) | Tongue diagnosis image multi-label classification method based on AI |
CN117392138A (en) * | 2023-12-13 | 2024-01-12 | 四川大学 | Tongue picture image processing method, storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1931087A (en) * | 2006-10-11 | 2007-03-21 | 哈尔滨工业大学 | Automatic tongue picture grain analysis method |
CN1973757A (en) * | 2006-10-11 | 2007-06-06 | 哈尔滨工业大学 | Computerized disease sign analysis system based on tongue picture characteristics |
CN105160346A (en) * | 2015-07-06 | 2015-12-16 | 上海大学 | Tongue coating greasyness identification method based on texture and distribution characteristics |
CN113538398A (en) * | 2021-07-28 | 2021-10-22 | 平安科技(深圳)有限公司 | Tongue coating classification method, device, equipment and medium based on feature matching |
-
2022
- 2022-10-26 CN CN202211315242.0A patent/CN115375690B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1931087A (en) * | 2006-10-11 | 2007-03-21 | 哈尔滨工业大学 | Automatic tongue picture grain analysis method |
CN1973757A (en) * | 2006-10-11 | 2007-06-06 | 哈尔滨工业大学 | Computerized disease sign analysis system based on tongue picture characteristics |
CN105160346A (en) * | 2015-07-06 | 2015-12-16 | 上海大学 | Tongue coating greasyness identification method based on texture and distribution characteristics |
CN113538398A (en) * | 2021-07-28 | 2021-10-22 | 平安科技(深圳)有限公司 | Tongue coating classification method, device, equipment and medium based on feature matching |
Non-Patent Citations (3)
Title |
---|
(美)布奇.昆托: "《基于Spark的下一代机器学习XGBoost、LightGBM、Spark NLP与Keras分布式深度学习实例》", 31 May 2021 * |
陈宗海: "《***仿真技术及其应用》", 31 August 2017 * |
马超: "中医舌诊图像分割和特征提取方法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115797352A (en) * | 2023-02-08 | 2023-03-14 | 长春中医药大学 | Tongue picture image processing system for traditional Chinese medicine health-care physique detection |
CN115797352B (en) * | 2023-02-08 | 2023-04-07 | 长春中医药大学 | Tongue picture image processing system for traditional Chinese medicine health-care physique detection |
CN115953392A (en) * | 2023-03-09 | 2023-04-11 | 四川博瑞客信息技术有限公司 | Tongue body coating quality evaluation method based on artificial intelligence |
CN117197139A (en) * | 2023-11-07 | 2023-12-08 | 天津市肿瘤医院(天津医科大学肿瘤医院) | Tongue diagnosis image multi-label classification method based on AI |
CN117197139B (en) * | 2023-11-07 | 2024-02-02 | 天津市肿瘤医院(天津医科大学肿瘤医院) | Tongue diagnosis image multi-label classification method based on AI |
CN117392138A (en) * | 2023-12-13 | 2024-01-12 | 四川大学 | Tongue picture image processing method, storage medium and electronic equipment |
CN117392138B (en) * | 2023-12-13 | 2024-02-13 | 四川大学 | Tongue picture image processing method, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN115375690B (en) | 2023-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115375690B (en) | Classification and identification method for greasy tongue coating | |
CN110334706B (en) | Image target identification method and device | |
CN115082683B (en) | Injection molding defect detection method based on image processing | |
Wang et al. | A simple guidance template-based defect detection method for strip steel surfaces | |
CN108562589B (en) | Method for detecting surface defects of magnetic circuit material | |
CN103593670B (en) | A kind of copper plate/strip detection method of surface flaw based on online limit of sequence learning machine | |
Jagadev et al. | Detection of leukemia and its types using image processing and machine learning | |
Xie et al. | TEXEMS: Texture exemplars for defect detection on random textured surfaces | |
CN111340824B (en) | Image feature segmentation method based on data mining | |
CN115249246B (en) | Optical glass surface defect detection method | |
CN113724231A (en) | Industrial defect detection method based on semantic segmentation and target detection fusion model | |
CN107730499A (en) | A kind of leucocyte classification method based on nu SVMs | |
CN108961265A (en) | A kind of precision target dividing method based on color conspicuousness and Gauss model | |
CN110619336B (en) | Goods identification algorithm based on image processing | |
CN108280469A (en) | A kind of supermarket's commodity image recognition methods based on rarefaction representation | |
CN111783885A (en) | Millimeter wave image quality classification model construction method based on local enhancement | |
CN113221956A (en) | Target identification method and device based on improved multi-scale depth model | |
CN113743421B (en) | Method for segmenting and quantitatively analyzing anthocyanin developing area of rice leaf | |
CN114897825A (en) | Solid wood floor sorting method and system based on computer vision | |
CN112070116B (en) | Automatic artistic drawing classification system and method based on support vector machine | |
KR101151739B1 (en) | System for color clustering based on tensor voting and method therefor | |
Rotem et al. | Combining region and edge cues for image segmentation in a probabilistic gaussian mixture framework | |
CN114937042B (en) | Plastic product quality evaluation method based on machine vision | |
Nammalwar et al. | Integration of feature distributions for colour texture segmentation | |
CN113034454B (en) | Underwater image quality evaluation method based on human visual sense |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |