Tongue image segmentation method, device and medium
By combining standard color processing, deep learning network, and color space conversion algorithm, the use of mobile devices to collect tongue elephants in natural environments to collect and identify difficulties, achieve efficient and accurate tongue image division, reduce hardware costs and calculations Complexity.
Patent Information
- Application Number
- CN202110881511.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-02
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-08-02
AI Technical Summary
The existing tongue image diagnosis system requires the collection of tongue image in a confined space with stable light, and relies on expensive professional equipment, which limits its wide application. Especially when using mobile devices for tongue image collection and analysis in natural environments, there is segmentation. and identify the puzzles.
Through standard color processing, VGG16 classification, return to network, Y-CB-CR color space conversion algorithm, SRGAN ultra-resolution generation network, and neural connection network based on encoder-decoder structure to achieve the division and recognition of tongue image images.
This method can effectively divide and identify the tongue image under natural light conditions, reduce the cost of hardware, improve the calculation speed and accuracy, and enhance the applicability of the model.
Smart Images

Figure CN113781488B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computers and medicine, and in particular to a tongue image segmentation method, electronic equipment and medium. Background Art
[0002] For medical research, focusing on people's comprehensive physical condition rather than just a single disease has become an important research direction. This is consistent with the idea of Chinese medicine that people are regarded as a whole and the body is made healthy by regulating the overall system circulation. For individuals, with the continuous improvement of living standards, people pay more and more attention to physical health, and pay more attention to non-invasive and painless detection of diseases. Chinese medicine theory believes that "what is inside must be reflected outside", and the human body is an organic whole. The tongue is connected to the five internal organs through meridians. Chinese medicine believes that looking at the tongue can understand the patient's lungs, cold and heat, the location of the pathogenic factors, and the rise and fall of qi and blood, which plays an important role in the assessment of the condition and the prescription of medicine. Tongue diagnosis diagnoses and analyzes the patient's pathological condition by observing the tongue. Therefore, one of the most obvious advantages of Chinese medicine tongue diagnosis is that it is painless and non-invasive. These fits provide opportunities for the future development of Chinese medicine tongue diagnosis.
[0003] Image processing technology has developed rapidly in recent years, and more and more researchers are committed to achieving the quantification and standardization of tongue diagnosis. From tongue image collection to tongue segmentation, tongue coating separation, to tongue image feature extraction and attribute recognition, research on multiple aspects of tongue diagnosis objectification has achieved remarkable results. Tongue image diagnosis systems, tongue diagnosis instruments and other related products have been launched and even put into practical use in clinical practice.
[0004] Although there are tongue image diagnosis systems, tongue diagnosis instruments and other related equipment available, these diagnostic systems generally require tongue image collection in a closed space with stable lighting and require specific collection equipment. Although high-quality tongue images can be obtained through constant lighting and professional equipment, which reduces the difficulty of subsequent tongue image processing, on the one hand, most of these collection or diagnosis devices are relatively expensive and difficult to carry. Only some hospitals and a few families have relevant equipment, which has certain limitations and has not been widely used. On the other hand, considering that smartphones have become popular, mobile phone camera technology has made great progress. Therefore, the use of mobile devices for tongue image collection and intelligent analysis in natural environments has gradually become a new development direction. The segmentation and recognition of tongue images taken by different devices under natural light conditions has also become one of the main research tasks of computer tongue diagnosis, which is also the main content of the research. In order to more accurately identify and analyze the tongue image, two preprocessing operations, color correction and tongue segmentation, were performed on the tongue image.
[0005] At present, to process tongue images, it is necessary to first train a light condition classifier based on the color of the tongue images under different ambient lighting conditions, then train a color correction matrix under different lighting conditions, and finally pass the corrected images through the tongue segmentation network to finally output the segmented tongue images.
[0006] On the one hand, training multiple classifiers will inevitably increase hardware costs, and it will take a lot of time to accurately label information in order to obtain a better classifier; on the other hand, the algorithm model is not an end-to-end model, and multiple models and multiple decomposition steps will be used, which increases the computational complexity and time complexity of the model. The standard U-Net network is a lightweight end-to-end encoding and decoding structure network. Because the encoding model and the decoding model use the same symmetrical structure, and the image is processed by downsampling in the encoding stage, and the image is processed by upsampling in the decoding stage, the shape of the entire network presents a U-shaped structure, so it is called a U-Net network. The unique mirror operation and simple network model of the U-Net network have fast and effective segmentation for small amounts of data, but the unequal input and output sizes increase the difficulty of network design. At the same time, the feature map merging and cropping operation is cumbersome, and the upsampling method has the problem of mismatch between the image and the feature map after cropping. Therefore, it is necessary to improve the U-Net network to achieve better segmentation results. Summary of the invention
[0007] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art, and to provide a tongue image segmentation method, device and medium to solve the deficiencies of the prior art.
[0008] The technical solution of the present invention includes a tongue image segmentation method, characterized in that the method includes: obtaining a tongue image, performing standard color processing on the tongue image to obtain a first image; creating a VGG16 classification and regression network, classifying the first image, obtaining tongue information of the first image, box-selecting the tongue information and performing color space conversion processing on the first image, and then performing tongue image detection to obtain a second image including a rough position of the tongue image; determining a corresponding threshold range for the second image according to a Y-Cb-Cr color space conversion algorithm and intersecting it with the box-selected range, performing tongue image cropping processing to obtain a third image; creating an SRGAN super-resolution generation network, performing multi-detail restoration on the third image, and generating a fourth image with higher clarity; creating a neural connection network based on an encoder-decoder structure, training and testing the fourth image, and outputting a complete segmented tongue image.
[0009] According to the segmentation method of the tongue image, the standard color processing of the tongue image includes: creating a BP neural connection network, training the tongue image with the standard color card value as a known input, wherein the known input color card value is used as a supervision value, performing supervised training, and obtaining a trained parameter value; initializing the BP neural connection network with the parameter value, inputting the tongue image for calculation, and outputting a corrected first image, wherein the first image is the corrected tongue image.
[0010] According to the segmentation method of the tongue image, the training of the tongue image using the standard color card value as the known input includes: using the 24 colors of the standard color card value as the sample values of the BP neural connection network, performing multiple hidden layer calculations on the RGB channel value of each sample value, and outputting the corrected RGB channel value; comparing the corrected RGB channel value with the standard color card value, calculating the error and performing back propagation, and correcting all parameter values on the path according to the LM algorithm; and repeating the previous step until the errors of all parameter values are reduced to within the set range.
[0011] According to the segmentation method of the tongue image, the BP neural connection network includes: a standard color processing network, through the difference between the 24-color real color card values and the color card values in different scene pictures, the neural network learns the nonlinear relationship between them, and the weight model of the network is trained by back propagation to update the gradient value; the network is trained by the VGG16 classification regression network through the existing tongue image label, and the network is trained by the image augmentation strategy through the existing data to obtain the results of 5 dimensions, whether it is a tongue image and position information; the Y-Cb-Cr color space conversion algorithm is used for processing, including roughly determining the position information of the tongue image through the color clustering strategy; the SRGAN super-resolution generation network and the tongue image segmentation network are used; the ReLU (Rectified Linear Unit) function is used as the activation function of the BP neural connection network, and the ReLU function is set to:
[0012]
[0013]
[0014] Wherein x represents the output result of each forward propagation, the output result is mapped to a fixed range through the activation function, and the overall average pooling layer and the Softmax layer are used as the output function of the BP neural connection network.
[0015] According to the tongue image segmentation method, performing tongue image detection includes: converting the first image into a Y-Cb-Cr color space through a VGG16 classification regression network, calculating the similarity of all pixels in the first image according to the two-dimensional Gaussian distribution of Cb and Cr of the chromaticity of different tongue colors in the first image, and calculating the tongue color probability, the calculation method is as follows:
[0016]
[0017]
[0018]
[0019] Among them, x a is the tongue color sample value of each pixel a, t represents the pixel average, C is the covariance matrix, and m represents the total number of training samples.
[0020] According to the tongue image segmentation method, performing tongue image detection further includes: calculating the first image by using the AdaBoost algorithm to obtain the second image of a relatively rough tongue image position, and then performing normalization to extract a 10x10 pixel area from the center of the detected tongue image as a tongue image color reference, and the calculation method is:
[0021]
[0022]
[0023] t m =[Cb m ,Cr m ]
[0024] t m Represents the average value of different components of all pixels. The probability value of the pixel is determined by calculating the Euclidean distance D between the pixel and the average value.
[0025]
[0026] The Euclidean distances D of all extracted pixels are sorted from small to large, and the pixels with closer distances are taken to obtain the extraction ratio. The threshold range is set by different extraction ratios, and the t obtained by repeating the above steps is the final adaptive parameter; the position of the corresponding tongue image is obtained by displaying it in different color spaces, and the position of the tongue image is cropped to obtain the third picture including the entire complete tongue image.
[0027] According to the segmentation method of the tongue image, the position of the tongue image is cropped including: making an intersection between the tongue image range selected by the VGG16 network and the tongue image range identified by the Y-Cb-Cr color space, taking the center point of the intersection as the center of the circle, and cropping with a radius of 1.25 times the boundary distance.
[0028] According to the segmentation method of the tongue image, the neural connection network based on the encoder-decoder structure is created, including: a standard color processing strategy, the network standardizes and corrects the color of the image by learning the difference between the standard color card and the color card in the image; roughly locates the position of the tongue image through the VGG16 classification regression network and the Y-Cb-Cr color space conversion algorithm; improves the texture clarity of the cropped tongue image through the SRGAN super-resolution generation network; uses the adversarial generation network model and generates similar available data based on a number of data, and expands the data set through data augmentation; performs convolution and deconvolution on the third image, wherein the same filling method is used in the convolution process, wherein the image remains unchanged in size after the convolution operation; the deconvolution process uses bilinear difference to expand the image information; at the same time, the ResNet18 residual module is used as the convolution layer in each convolution block, and 1 / 2 is randomly discarded during the convolution process to obtain a tongue image including tongue texture information and high-level information.
[0029] According to the tongue image segmentation method, the training and testing of the third image include: in the training phase, the existing data is divided into a training set and a validation set according to a proportion, and the final model parameters are obtained through multiple groups of cross-validation; in the testing phase, the tongue image obtained by color space conversion is used as the input of the neural connection network, and a complete tongue image segmentation image is obtained.
[0030] The technical solution of the present invention includes a tongue image segmentation device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and is characterized in that the processor implements any of the method steps described when executing the computer program.
[0031] The technical solution of the present invention is a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, any of the method steps described above is implemented.
[0032] The beneficial effects of the present invention are as follows: by performing color restoration and color space conversion on the original tongue image, the collected tongue image is no longer dependent on the hardware used to collect the tongue image, thereby improving the credibility of the tongue image result. Furthermore, through the conversion of the color space, the position of the complete tongue image is quickly and roughly obtained, most of the useless information is eliminated, the calculation pressure of the deep convolutional neural network is reduced, the calculation speed is improved, the accuracy is improved, the hardware cost is reduced, and the applicability of the model is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The present invention is further described below in conjunction with the accompanying drawings and embodiments;
[0034] Figure 1 Shown is a flow chart of tongue image segmentation according to an embodiment of the present invention;
[0035] Figure 2 Shown is an overall flow chart according to an embodiment of the present invention;
[0036] Figure 3 Shown is a BP neural connection network processing flow chart according to an embodiment of the present invention;
[0037] Figure 4 Shown is a schematic diagram of a device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.
[0039] In the description of the present invention, “several” means one or more, “more” means more than two, “greater than”, “less than”, “exceed”, etc. are understood as not including the number itself, and “above”, “below”, “within”, etc. are understood as including the number itself.
[0040] In the description of the present invention, the consecutive numbering of the method steps is for the convenience of review and understanding. Combined with the overall technical scheme of the present invention and the logical relationship between the various steps, adjusting the implementation order between the steps will not affect the technical effect achieved by the technical scheme of the present invention.
[0041] In the description of the present invention, unless otherwise clearly defined, words such as "setting" should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above words in the present invention in combination with the specific content of the technical solution.
[0042] Figure 1The figure shows a flow chart for segmenting a tongue image according to an embodiment of the present invention, the flow includes: obtaining a tongue image from an acquisition device, performing standard color processing on the tongue image, and outputting a first image; performing VGG16 classification regression network on the first image to detect whether a tongue image exists, and selecting a position, and then performing color space conversion processing, and then performing tongue image detection to obtain a second image including a rough position of the tongue image; determining a corresponding threshold range for the second image using a Y-Cb-Cr color space conversion algorithm and intersecting it with the selected range, taking the center point of the intersection as the center of the circle, and using 1.25 times the boundary distance as the radius, and performing tongue image cropping processing to obtain a third image; creating a Connect-Net neural network, training and testing the third image, and outputting a complete segmented tongue image.
[0043] Figure 2 The figure shows the overall flow chart according to the embodiment of the present invention. RGB color correction is because the display of the three primary colors of RGB is related to the hardware device. Different devices will have corresponding error values. Therefore, in order to obtain an objective evaluation of the results, the image must be processed with standard colors. The calibration image is divided into two stages, a training stage and a testing stage:
[0044] The training phase includes:
[0045] i. Use the standard color card value as the known input, use the color card value for training, and use the known color card value as the supervision value for supervised training
[0046] ii. The 24-color color card is 24 sample values for the Connect-Net neural network.
[0047] iii. Each sample has three channel values of R, G, and B. After multiple hidden layer calculations, the final output is the corrected R, G, and B values. They are compared with the 24-color color chart, the error is calculated, and back propagation is performed. All parameter values on the path are corrected according to the LM (Levenberg-Marquardt algorithm) method.
[0048] iv. Repeat step iii until the error stabilizes and falls within the ideal range
[0049] v. Training VGG16 classification regression network
[0050] vi. Training the SRGAN super-resolution generation network
[0051] vii. Training GAN against the Generative Adversarial Network
[0052] viii. Training Connect-Net Segmentation Network
[0053] The testing phase includes:
[0054] i. Initialize the Connect-Net neural network with trained parameter values
[0055] ii. Calculate each pixel value of the tongue image to be corrected and output the corrected image
[0056] iii. The color-corrected image is passed through VGG16, Y-Cb-Cr color space conversion algorithm, SRGAN super-resolution generation network and Connect-Net segmentation network in sequence.
[0057] iv. The Connect-Net segmentation neural network model has fewer training samples and a relatively simple output dimension, so the network structure is designed to be relatively simple. In order to prevent overfitting, the Dropout strategy is used to randomly discard some neuron information, the ReLU function is used as the activation function of the network, and the Global Average Pooling and Softmax layers are used as the output functions of the Connect-Net neural network. Where x represents the output result of each forward propagation, which is mapped to a fixed range through the formula.
[0058]
[0059]
[0060] Where x represents the output result of each forward propagation, which is mapped to a fixed range through the formula.
[0061] In the RGB color space, tongue color and non-tongue color have a lot of overlap in the three components of R, G, and B. Generally, the image needs to be converted to the Y-Cb-Cr color space, which is independent of brightness and chromaticity, to improve the detection rate. In the Y-Cb-Cr color space, tongue color has certain clustering characteristics, and the Cb and Cr distribution of the chromaticity of different tongue colors is approximately equal to the two-dimensional Gaussian distribution. The tongue color probability can be estimated by calculating the similarity of all pixels. The probability estimation formula is:
[0062]
[0063] Where: x a is the tongue color sample value of each pixel a, t represents the pixel average, C is the covariance matrix, and m represents the total number of training samples.
[0064] In order to improve the robustness of the detection model, the above formula is improved as follows.
[0065] The VGG16 classification and regression network algorithm and the Y-Cb-Cr color space algorithm are used to obtain a relatively rough tongue image position, which is then normalized and a 10x10 pixel area is extracted from the center of the tongue image as the tongue image color reference. Then:
[0066]
[0067] t m =[Cb m ,Cr m ]
[0068] Where: t m Represents the average value of different components of all pixels. The probability value to which the pixel belongs is determined by calculating the Euclidean distance D between the pixel and the average value.
[0069]
[0070] Sort the Euclidean distances of all pixels from small to large, take the pixels with closer distances, get the extraction ratio σ, and set the threshold range through different ratios.
[0071] The t obtained by repeating the above steps is the final adaptive parameter.
[0072] The corresponding threshold range is determined by the Y-Cb-Cr color space conversion algorithm and intersected with the frame selection range. The center point of the intersection is taken as the center of the circle, and 1.25 times the boundary distance is used as the radius. The tongue image is cropped to obtain a picture containing the entire tongue image.
[0073] Figure 3 The figure shows a BP neural connection network processing flow chart according to an embodiment of the present invention. Using the Connect-Net network to obtain accurate segmentation of tongue images requires three stages:
[0074] Design network phase
[0075] i. Redesigned the network model to address the above issues;
[0076] ii. First, use the adversarial generative network model to generate similar available data based on the existing small amount of data, and expand the data set through data augmentation;
[0077] iii. Use the same padding method in the convolution step to keep the image at its original size after the convolution operation;
[0078] iv. The deconvolution process uses bilinear interpolation to expand image information;
[0079] v. In each block module, the ResNet18 residual module is used as the convolutional layer. The random drop1 / 2 parameter operation is performed to prevent overfitting of the network training, and more tongue texture information and high-level information can be obtained.
[0080] Training phase
[0081] i. Use the existing data to divide it into training set and test set according to (8:2);
[0082] ii. Divide the training set into a training set and a validation set in a ratio of (5:1);
[0083] ii. The final model parameters were obtained through 5 groups of cross-validation.
[0084] Testing Phase
[0085] i. The tongue image obtained by color space conversion is used as the input of the improved network;
[0086] ii. Get the complete segmented image.
[0087] Figure 4 The device is shown as a schematic diagram of an embodiment of the present invention. The device includes a memory 100 and a processor 200, wherein the processor 200 stores a computer program, and when the computer program is executed by the processor 200, the following method flow is implemented: obtaining a tongue image, performing standard color processing on the tongue image, and obtaining a first image; creating a VGG16 classification and regression network, classifying the first image, obtaining tongue information of the first image, selecting the tongue information and performing color space conversion processing on the first image, and then performing tongue image detection to obtain a second image including a rough position of the tongue image; determining the corresponding threshold range of the second image according to the Y-Cb-Cr color space conversion algorithm and intersecting it with the selected range, performing tongue image cropping processing, and obtaining a third image; creating an SRGAN super-resolution generation network, performing multi-detail restoration on the third image, and generating a fourth image with higher clarity; creating a neural connection network based on an encoder-decoder structure, training and testing the fourth image, and outputting a complete segmented tongue image.
[0088] It should be appreciated that the method steps in the embodiments of the present invention can be implemented or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The method can use standard programming techniques. Each program can be implemented in a high-level process or object-oriented programming language to communicate with a computer system. However, if necessary, the program can be implemented in an assembly or machine language. In any case, the language can be a compiled or interpreted language. In addition, the program can be run on a programmed ASIC for this purpose.
[0089] Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.
[0090] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or portions thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention also includes the computer itself.
[0091] The computer program can be applied to input data to perform the functions described herein, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as consumers. In a preferred embodiment of the present invention, the converted data represents physical and tangible objects, including specific visual depictions of physical and tangible objects produced on consumers.
[0092] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.
Claims
1. A tongue image segmentation method, characterized in that: The method includes: Obtaining a tongue image, and performing standard color processing on the tongue image to obtain a first image; Create a VGG16 classification and regression network, classify the first image, obtain tongue information of the first image, select the tongue information and perform color space conversion processing on the first image, and then perform tongue image detection to obtain a second image including a rough position of the tongue image; Determine the corresponding threshold range of the second image according to the Y-Cb-Cr color space conversion algorithm and make an intersection with the frame selection range, perform tongue image cropping processing, and obtain a third image; Create an SRGAN super-resolution generation network to restore multiple details of the third image and generate a fourth image with higher definition; Creating a neural connection network based on an encoder-decoder structure, training and testing the fourth image, and outputting a complete segmented tongue image; The standard color processing of the tongue image comprises: Creating a BP neural connection network, training the tongue image with a standard color card value as a known input, wherein the known input color card value is used as a supervision value, performing supervised training, and obtaining a trained parameter value; Initialize the BP neural connection network by using the parameter value, input the tongue image for calculation, and output a corrected first image, where the first image is the corrected tongue image; The training of the tongue image using the standard color card value as a known input comprises: Using the 24 colors of the standard color card values as sample values of the BP neural connection network, performing multiple hidden layer calculations on the RGB channel value of each sample value, and outputting the corrected RGB channel value; Compare the corrected RGB channel value with the standard color card value, calculate the error and perform back propagation, and correct all parameter values on the path according to the LM algorithm; Repeat the previous step until the errors of all parameter values are reduced to the set range; The BP neural connection network includes: The standard color processing network uses the difference between the 24-color real color card values and the color card values in different scene pictures to let the neural network learn the nonlinear relationship between them, and train the network's weight model by updating the gradient value through back propagation; The network is trained through the VGG16 classification regression network using the existing tongue image labels. The network is trained through the existing data using the image augmentation strategy to obtain the results of 5 dimensions, including whether it is a tongue image and location information. The Y-Cb-Cr color space conversion algorithm is used for processing, including the use of color clustering strategy to roughly determine the location information of the tongue image; Through SRGAN super-resolution generation network and tongue segmentation network; The ReLU (Rectified Linear Unit) function is used as the activation function of the BP neural network, and the ReLU function is set to: Wherein x represents the output result of each forward propagation, the output result is mapped to a fixed range through the activation function, and the overall average pooling layer and the Softmax layer are used as the output function of the BP neural connection network; The performing of tongue image detection further comprises: The first image is calculated by the AdaBoost algorithm to obtain the second image of a relatively rough tongue image position, and then normalization is performed to extract a 10x10 pixel area from the center of the detected tongue image as the tongue image color reference. The calculation method is: t m =[Cb m ,Cr m ] t m Represents the average value of different components of all pixels. The probability value of the pixel is determined by calculating the Euclidean distance D between the pixel and the average value. Sort the Euclidean distances D of all extracted pixels from small to large, take the pixels with closer distances, get the extraction ratio, set the threshold range by different extraction ratios, and repeat the above steps to get t m is the final adaptive parameter; The position of the corresponding tongue image is obtained by displaying in different color spaces, and the position of the tongue image is cropped to obtain the third image including the entire tongue image.
2. The tongue image segmentation method according to claim 1, characterized in that: The performing of tongue image detection comprises: The first image is converted to the Y-Cb-Cr color space after passing through the VGG16 classification regression network. According to the two-dimensional Gaussian distribution of Cb and Cr of the chromaticity of different tongue colors in the first image, the similarity of all pixels in the first image is calculated, and the tongue color probability is calculated. The calculation method is as follows: Among them, x a is the tongue color sample value of each pixel a, t represents the pixel average, C is the covariance matrix, and m represents the total number of training samples.
3. The tongue image segmentation method according to claim 1, characterized in that: The clipping of the tongue image position includes: intersecting the tongue image range selected by the VGG16 network frame and the tongue image range recognized by the Y-Cb-Cr color space, taking the center point of the intersection as the center of the circle, and clipping with a radius of 1.25 times the boundary distance.
4. The tongue image segmentation method according to claim 1, characterized in that: The creation of a neural connection network based on an encoder-decoder structure includes: Standard color processing strategy: the network standardizes the color of the image by learning the difference between the standard color card and the color card in the image; The tongue image is roughly located using the VGG16 classification and regression network and the Y-Cb-Cr color space conversion algorithm. The texture clarity of the cropped tongue image is improved through the SRGAN super-resolution generation network; Use the adversarial generative network model to generate similar available data based on several data, and expand the data set through data augmentation; Performing convolution and deconvolution on the third image, wherein the convolution uses a same padding method, and the image remains unchanged in size after the convolution operation; The deconvolution process uses bilinear interpolation to expand the image information; At the same time, the ResNet18 residual module is used as the convolution layer in each convolution block, and 1 / 2 of the layers are randomly discarded during the convolution process to obtain a tongue image that includes tongue texture information and high-level information.
5. The tongue image segmentation method according to claim 1, characterized in that: The training and testing of the fourth picture includes: In the training phase, the existing data is divided into a training set and a validation set in proportion, and the final model parameters are obtained through multiple groups of cross-validation; In the testing phase, the tongue image obtained by color space conversion is used as the input of the neural connection network, and a complete tongue image segmentation image is obtained.
6. A tongue image segmentation device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method steps described in any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method steps according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
ROS-based modularized hand part area detection method and device
CN106909883A
Deep convolutional neural network-based traditional Chinese medicine tongue image automatic segmentation method
CN107316307A
Tongue picture classification method based on multitask convolution neural network
CN107977671A
Fissured tongue identification method based on SSD network
CN108734108A
Traditional Chinese medicine tongue diagnosis image color correction method, electronic equipment and storage medium
CN109815860A