A tongue image segmentation method based on a deep neural network
By using a multi-space global feature learning network and a feature channel difference guidance module, the problems of insufficient global feature extraction and shape distortion in tongue image segmentation are solved, achieving more accurate and complete tongue image segmentation and supporting highly reliable diagnosis in intelligent tongue diagnosis systems.
Patent Information
- Application Number
- CN202310489876.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-05-04
AI Technical Summary
Existing tongue segmentation methods have weak global feature extraction capabilities, making it difficult to maintain the integrity of the tongue shape. They are also susceptible to background noise interference, leading to distorted segmentation results.
A multi-space global feature learning network sub-model and a feature channel difference-guided global correction module are adopted. The global features of the tongue image are learned from multiple spatial perspectives, and the segmentation label mask is randomly degraded. Combined with feature channel difference guidance for global correction, the segmentation accuracy is improved.
It improves the reconstruction accuracy of the tongue image segmentation model and its ability to correct erroneous masks, ensuring the integrity and accuracy of the tongue image segmentation results, and is suitable for highly reliable medical diagnosis in intelligent tongue diagnosis systems.
Smart Images

Figure CN116543150B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image semantic segmentation technology, and more particularly to a tongue image segmentation method based on a deep neural network. BACKGROUND
[0002] At present, with the development of image segmentation technology, tongue image segmentation has gradually emerged, but so far, the performance accuracy of tongue image segmentation in natural scenes is still not high. The main problem of tongue recognition segmentation accuracy not meeting the actual demand is in the following three aspects: 1) the scale of reliable tongue image dataset is small, and reliable tongue image data needs to be shot in a controlled scene, which usually limits its scale; 2) different individuals show different tongue appearances such as tongue shape and texture, which puts higher requirements on the generalization performance of the segmentation algorithm; 3) tongue and lips and other parts are easily confused.
[0003] In order to alleviate these challenges, many researchers have proposed many tongue image segmentation methods in previous work. Most of them are based on traditional image processing techniques, so they are particularly susceptible to changes in light or clustered backgrounds. For example, the initial contour of the active contour model is obtained by using watershed transformation, and the tongue image is diffused and blocked by gradient vector flow and watershed algorithm respectively, and then the complete tongue region is obtained by merging the blocks.
[0004] With the rapid development of deep learning related technology, researchers have proposed a series of deep learning methods for solving tongue image segmentation tasks, all of which have achieved better performance than most traditional tongue image segmentation methods. The related prior art is as follows: 1) using an advanced residual convolutional network (ResNet) to automatically extract high-level image features of tongue images, obtaining reliable segmentation results; 2) first using an enhanced HSV color model to preprocess the tongue image, then using it as the input of the convolutional neural network, which significantly enhances the tongue image edge detection performance; 3) an end-to-end multi-task learning model TongueNet for tongue positioning and segmentation, which uses a more powerful feature pyramid network based on context-aware residual blocks for multi-scale tongue feature extraction, obtains tongue position, and then obtains an accurate segmentation prediction mask, not only achieving high segmentation accuracy, but also being able to distinguish tongue images from complex areas such as lips and faces, and having more stable performance on multiple datasets; 4) TU-Net is used to achieve accurate tongue segmentation, which integrates the proposed dense dilated convolution module and residual multi-kernel pooling module into the encoder-decoder structure, and performs weighted sum on the two inputs in the skip connection, which can extract multi-scale and multi-channel high-level features, and enhance the ability of the encoder-decoder model to analyze pixel-level tasks; 5) a loss function to better guide the optimization of the convolutional network, which minimizes the intra-class difference and maximizes the inter-class difference to reduce the problem of false prediction in similar image areas; 6) an adversarial generative semi-supervised semantic segmentation is used for tongue image segmentation task, and a SemiTongue network model is designed. The model combines image reconstruction and adversarial learning, consisting of an encoder, two decoders and a discriminator. The tongue image data is first encoded by the encoder to obtain the mean and variance of the data and synthesize the corresponding hidden feature vector, then input into two decoders to obtain the predicted segmentation mask and pseudo original image respectively, and the discriminator receives the predicted mask and the real mask to output the true and false probability of each pixel. A large amount of unlabeled data can be supervised to train the encoder and decoder by using the pseudo label output by the discriminator, so that the network can break through the limitation of the number of labeled data and discover more tongue features to achieve better and more stable segmentation performance.
[0005] However, although the above research has achieved certain results, the global feature extraction capability of existing human tongue image segmentation methods is weak, and it is difficult to maintain the characteristics of the target object in the final segmentation prediction. Secondly, the existing tongue image segmentation method does not specifically handle the boundary area prone to false prediction. And although some existing methods have achieved certain results in tongue image segmentation tasks, current methods are mostly limited to the microscopic level of improving pixel classification performance, and do not consider the preservation of the inherent macroscopic characteristics of the target object, such as shape distortion or being easily disturbed by invalid background noise, resulting in false background area activation.
[0006] Therefore, in the tongue image segmentation process, how to improve the global feature extraction capability while preventing the tongue image shape from being distorted is a problem that needs to be solved by those skilled in the art. SUMMARY
[0007] Therefore, the tongue image segmentation method based on a deep neural network is provided to at least partially solve the above technical problems.
[0008] To achieve the above-mentioned purpose, the technical scheme is adopted as follows:
[0009] Obtaining a target tongue image;
[0010] Inputting the target tongue image into a trained tongue image segmentation network model to output a tongue image segmentation prediction result; the tongue image segmentation network model comprises a multi-space global feature learning network sub-model and a feature channel difference value guided global correction module.
[0011] Further, the training process of the multi-space global feature learning network sub-model comprises the following steps:
[0012] P1, obtaining a large number of segmentation label masks and defect label masks of tongue images;
[0013] P2, performing random degradation processing on the segmentation label masks;
[0014] P3, using a first neural network encoder to extract features from the randomly degraded segmentation label masks to obtain a defect feature vector, an Euclidean global feature vector and a hyperbolic global feature vector;
[0015] P4, decoding the defect feature vector, the Euclidean global feature vector and the hyperbolic global feature vector through a first neural network decoder to obtain a defect prediction result and a reconstruction prediction result;
[0016] P5, minimizing the binary cross-entropy loss between the defect label mask and the defect prediction result; and minimizing the binary cross-entropy loss between the segmentation label mask and the defect prediction result, and training the multi-space global feature learning network sub-model based on this.
[0017] Further, in the step P2, the random degradation processing comprises adding random noise, random geometric patterns and random background activation.
[0018] Further, the step P3 specifically comprises:
[0019] Using a first neural network encoder to extract features from the randomly degraded segmentation label masks to obtain a two-dimensional encoded feature map;
[0020] decoupling and vectorization processing on the two-dimensional coding feature map through a defect information decoupling module, to obtain a defect information vector and a global information vector;
[0021] dimension compression processing on the defect information vector and the global information vector respectively through a full connection layer, to obtain a corresponding defect feature vector and a Euclidean global feature vector;
[0022] hyperbolic embedding processing and compression on the global information vector, to obtain a hyperbolic global feature vector.
[0023] Further, the step P4 specifically comprises:
[0024] The first neural network decoder comprises a decoder I, a decoder II and a decoder III;
[0025] inputting the defect feature vector into the decoder I to output a defect prediction result;
[0026] inputting the Euclidean global feature vector into the decoder II to output a reconstruction prediction result II;
[0027] inputting the hyperbolic global feature vector into the decoder III to output a reconstruction prediction result III;
[0028] combining the reconstruction prediction result II and the reconstruction prediction result III to form a reconstruction prediction result.
[0029] Further, the training process of the multi-space global feature learning network submodel further comprises:
[0030] inputting the defect feature vector into a classifier to output a probability of existence of a defect of the segmentation label mask;
[0031] The classifier is composed of a multi-layer perception mechanism.
[0032] Further, the training process of the tongue image segmentation network model is as follows:
[0033] S1, obtaining a large number of tongue images;
[0034] S2, performing feature extraction on the tongue images through a second neural network encoder to obtain encoded features;
[0035] S3, performing pixel prediction on the encoded features to obtain a rough mask of tongue image;
[0036] S4, inputting the rough mask into the trained multi-space global feature learning network submodel to output a corrected mask of tongue image;
[0037] S5, performing a channel replication operation on the corrected mask to obtain a mask feature;
[0038] S6, based on the mask feature, a feature channel difference guided global correction module is used to globally correct the encoded feature to obtain a corrected feature map;
[0039] S7, a second neural network decoder is used to decode the corrected feature map to output a tongue image segmentation prediction result;
[0040] S8, the binary cross-entropy loss between the tongue image segmentation prediction result and the segmentation label mask obtained in step P1 is minimized, and the tongue image segmentation network model is trained based on this.
[0041] Further, the S6 specifically comprises:
[0042] After normalizing the encoded feature and the mask feature respectively, the feature difference between the encoded feature and the mask feature is calculated by bit-by-bit pixel subtraction;
[0043] The feature difference is input into the first convolution processing module and the second convolution processing module respectively, and the corresponding first pixel weight map and the second pixel weight map are output;
[0044] Based on the first pixel weight map and the second pixel weight map, the encoded feature is globally corrected to obtain a corrected feature map.
[0045] According to the above technical solution, compared with the prior art, the tongue image segmentation method based on deep neural network has the following beneficial effects:
[0046] The tongue image segmentation network model of the present application introduces a multi-space global feature learning network sub-model and a feature channel difference guided global correction module, realizes the multi-space perspective learning of the tongue image global feature, obtains rich tongue image global information, improves the model reconstruction accuracy, and the correction ability of the error mask, provides effective and accurate tongue image global feature information for the tongue image segmentation model.
[0047] The multi-space global feature learning network sub-model of the present application learns the tongue image global information and the feature fusion learning, so that the output tongue image segmentation prediction result, i.e. tongue image segmentation prediction mask, can better maintain the global characteristics of the tongue, reduce the pixel error prediction of large area region, and make the obtained tongue image segmentation prediction result more reasonable, complete and accurate, which provides strong support for the high credible professional medical diagnosis of intelligent tongue diagnosis system.
[0048] The application is helpful to prevent the segmentation label mask from appearing distortion, or being interfered by invalid background noise and the like, and ensures the precision of the model. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only a part of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.
[0050] Figure 1 The application provides a multi-space global feature learning network submodel structure diagram.
[0051] Figure 2 The application provides a tongue mask random degradation operation diagram.
[0052] Figure 3 The application provides a defect information decoupling module structure diagram.
[0053] Figure 4 The application provides a tongue segmentation network model structure diagram.
[0054] Figure 5 The application provides a tongue segmentation network model training flow diagram.
[0055] Figure 6 The application provides a feature channel difference value guided global correction module structure diagram. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the protection scope of the present application.
[0057] The embodiment of the application discloses a tongue image segmentation method based on a deep neural network, comprising the following steps: obtaining a target tongue image; inputting the target tongue image into a trained tongue image segmentation network model, outputting a tongue image segmentation prediction result, that is, outputting a predicted tongue image two-dimensional segmentation mask, that is, outputting the probability of each pixel belonging to a human tongue image; wherein the tongue image segmentation network model comprises a multi-space global feature learning network submodel and a feature channel difference value guided global correction module.
[0058] Next, the training processes of the multi-space global feature learning network submodel and the tongue image segmentation network model are described respectively.
[0059] Referring to Figure 1 The multi-space global feature learning network submodel (MSDAE) is used to compress and vectorize the tongue image segmentation label mask and perform decoding and reconstruction tasks; the training process of the submodel comprises the following steps.
[0060] P1, a large number of tongue image segmentation label masks and defect label masks are obtained; the obtained segmentation label masks and defect label masks are binary mask images with only 0 and 1;
[0061] P2, the segmentation label mask is subjected to random degradation processing, specifically including adding random noise, random geometric patterns and random background activation to the segmentation label mask, which can be seen from Figure 2 .
[0062] P3, a first neural network encoder composed of a deep convolutional neural network is used to extract features from the randomly degraded segmentation label mask to obtain a defect feature vector, an Euclidean global feature vector and a hyperbolic global feature vector; specifically including:
[0063] Firstly, the first neural network encoder is used to extract features from the randomly degraded segmentation label mask to obtain an abstract two-dimensional code feature map; secondly, a defect information decoupling module is used to decouple and vectorize the two-dimensional code feature map to obtain a defect information vector describing defect information and a global information vector describing complete object information, realizing separation of different types of information; a structure diagram of the defect information decoupling module can be seen from Figure 3As shown, the module performs global maximum pooling and global average pooling operations on the feature map and adds the respective feature vectors obtained, so that it can consider both the details of each channel and the overall features, which helps the weight vector obtained subsequently to more accurately distinguish channels containing different information, and realizes decoupling of defect information and target object feature information; finally, a fully connected layer of the defect space is used to perform dimension compression processing on the above defect information vector to obtain a corresponding defect feature vector; at the same time, a fully connected layer of the Euclidean global feature is used to perform dimension compression processing on the above global information vector to obtain a corresponding Euclidean global feature vector; and the above global information vector is processed by hyperbolic embedding to obtain a hyperbolic information vector, and a fully connected layer on the hyperbolic global feature space is used to perform dimension reduction compression on the hyperbolic information vector to obtain a hyperbolic global feature vector. This step realizes modeling of input data distribution information in multiple spatial perspectives.
[0064] P4, decoding and processing the defect feature vector, the Euclidean global feature vector and the hyperbolic global feature vector by the first neural network decoder to obtain a defect prediction result and a reconstruction prediction result; specifically:
[0065] The first neural network decoder includes a decoder I, a decoder II and a decoder III; the defect feature vector is input into the decoder I for decoding and upsampling operation, and the defect prediction result is output; the Euclidean global feature vector is input into the decoder II for decoding and upsampling operation, and the reconstruction prediction result II is output, which is the tongue image mask reconstructed in the Euclidean global feature space; the hyperbolic global feature vector is input into the decoder III for decoding and upsampling operation, and the reconstruction prediction result III is output, which is the tongue image mask reconstructed in the hyperbolic global feature space; finally, the reconstruction prediction result II and the reconstruction prediction result III are combined to form a complete and accurate tongue image mask, which is the final reconstruction prediction result.
[0066] P5, minimizing the binary cross entropy loss between the defect label mask and the defect prediction result; and minimizing the binary cross entropy loss between the segmentation label mask and the defect prediction result, based on which the multi-space global feature learning network sub-model is trained.
[0067] The loss function of the multi-space global feature learning network sub-model in the training process mainly uses a binary cross entropy (Binary Cross Entropy, BCE) loss function BCE(.), which is defined as follows:
[0068]
[0069] wherein, denotes the reconstruction prediction result of the defect feature vector, in the embodiment of the present application, the reconstruction prediction result of the defect feature vector, the reconstruction prediction result of the Euclidean global feature vector, the reconstruction prediction result of the hyperbolic global feature vector and the defect prediction result output by the classifier are all included; Y gt denotes the segmentation label mask; N denotes the number of batch samples, in the embodiment of the present application, the number of batch segmentation label masks; HxW denotes the height and width of the image input into the network, i.e. the number of rows and columns respectively; n denotes the nth image sample in an arbitrary training batch; i denotes the ith row in an arbitrary image sample; j denotes the jth column in an arbitrary image sample; denotes the pixel located at the ith row and the jth column in the segmentation prediction mask obtained by the model for the nth sample in the batch, denotes the pixel located at the ith row and the jth column in the segmentation label mask of the nth sample in the batch.
[0070] The overall optimization objective function of the multi-space global feature learning network submodel is represented as:
[0071]
[0072] wherein, denotes the reconstruction prediction result of the defect feature vector, in the embodiment of the present application, the reconstruction prediction result of the defect feature vector, the reconstruction prediction result of the Euclidean global feature vector, the reconstruction prediction result of the hyperbolic global feature vector and the defect prediction result output by the classifier are all included; Y denotes the reconstruction prediction result of the Euclidean global feature vector, in the embodiment of the present application, the reconstruction prediction result II is included; denotes the reconstruction prediction result of the hyperbolic global feature vector, in the embodiment of the present application, the reconstruction prediction result III is included; denotes the defect prediction result output by the classifier; denotes the indicator function 1 is output when the segmentation label mask Y contains a defect, otherwise 0 is output; denotes the mapping relationship between the Euclidean global feature space and the hyperbolic global feature space; both a1 and a2 denote hyperparameters, used to adjust the weight of different losses; Z eu denotes the Euclidean global feature vector; Z hy denotes the hyperbolic global feature vector; denotes the Euclidean global feature vector corresponding to the nth image sample in the training batch; denotes the hyperbolic global feature vector corresponding to the nth image sample in the training batch.
[0073] In particular, the training process of the multi-space global feature learning network submodel further includes: inputting the defect feature vector into a classifier composed of a multilayer perception mechanism, outputting a probability of a segmentation label mask existing a defect, and minimizing an error loss value between the real probability and the corresponding sample containing a defect. This method can effectively drive the network to expand the distance between the high-dimensional embedding vectors of the input segmentation masks with defects and without defects, and is beneficial to obtaining more accurate corrected mask results for the rough segmentation mask.
[0074] The embodiment of the present application realizes the learning of tongue image global information in the Euclidean global feature space and the hyperbolic global feature space at the same time, and the prediction of the defect information that may be contained in the sample, by training a multi-space global feature learning network submodel, thereby improving the reconstruction accuracy of the multi-space global feature learning network and the correction ability of the error mask, and obtaining more rich data distribution information.
[0075] Referring to FIGS. 1 and 2, Figure 4 and Figure 5 As shown in FIGS. 1 and 2, the tongue image segmentation network model is implemented by an end-to-end deep neural network, the input is a tongue image, and the output is a predicted tongue image two-dimensional segmentation mask, that is, the probability of each pixel belonging to the human tongue image is output. The tongue image segmentation network model adopts the encoder-decoder structure commonly used in the field of semantic segmentation, which is specifically a second neural network encoder and a second neural network decoder in the embodiment of the present application; wherein:
[0076] The second neural network encoder adopts a deep convolutional neural network basic architecture VGG16, which has 5 stages, each of which is composed of multiple convolutional layers and max-pooling layers, for extracting abstract visual semantic features, and the last stage does not perform downsampling operation, so that when the input image size is 224x224, the feature map scales output by the encoder at each stage are 112x112, 56x56, 28x28, 14x14 and 14x14 respectively;
[0077] The second neural network decoder is composed of convolutional layers and up-sampling layers, and is divided into 4 stages, each of which is 2 times up-sampling, and finally outputs a segmentation prediction of 224x224;
[0078] The result of each encoding stage is transmitted to the corresponding decoding stage through a jump connection, which aims to reduce the information loss caused by downsampling. The second neural network encoder is responsible for feature extraction and downsampling of the input three-dimensional RGB tongue image to obtain the encoded features; the encoded features are first input into the feature channel difference guided global refinement module (GRM) to perform feature refinement to make the encoded features conform to the inherent global characteristics of the tongue image, and then the output feature map is up-sampled by the decoder to restore the size, and finally the segmentation prediction result is output.
[0079] The training process of the tongue image segmentation network model includes the following steps:
[0080] S1, obtaining a large number of tongue images;
[0081] S2, using a second neural network encoder to extract features from the tongue images, and obtaining encoded features
[0082] S3, performing pixel prediction on the obtained encoded features, specifically, the encoded features After passing through the 1x1 convolution layer and the Sigmoid activation function, a rough mask of the tongue image is obtained
[0083] S4, inputting the rough mask into the trained multi-space global feature learning network sub-model MSDAE to output a corrected mask of the tongue image; after correcting the mask, the step S4 can better maintain the global features of the target object, which helps to improve the final segmentation prediction result;
[0084] S5, performing a channel replication operation on the corrected mask to obtain a mask feature The number of channels of the mask feature is consistent with the number of channels of the encoded feature at this stage;
[0085] S6, based on the mask feature, using a feature channel difference guided global correction module to globally correct the encoded feature to obtain a corrected feature map; as shown in Figure 6 , specifically comprising:
[0086] After normalizing the encoded feature and the mask feature (Instance Normalization, IN) respectively, the feature difference between the encoded feature and the mask feature is calculated by bit-by-bit pixel subtraction; since different channels in the encoded feature map represent different encoding positioning and activation results, the image information concerned is also different, so the difference information between each encoded feature channel and the corrected segmentation mask is obtained, which can drive the encoder to change the incorrect encoding result and achieve the purpose of global correction; then the obtained feature difference is input into the first convolution processing module and the second convolution processing module arranged side by side, respectively, to output the corresponding first pixel weight map Ω1 and the second pixel weight map Ω2; wherein, the first pixel weight map Ω1 ∈ [0,1] 14×14×1 The role of the second pixel weight map is to additionally reactivate the pixel positions of the target object related to the encoded feature that are suppressed; therefore, the current encoded feature F dec After the above processing, the final corrected feature map is represented as:
[0087]
[0088] S7, decoding the above modified feature map by using a second neural network decoder to output a tongue appearance segmentation prediction result;
[0089] S8, minimizing a binary cross-entropy loss between the tongue appearance segmentation prediction result and a segmentation label mask, and training the tongue appearance segmentation network model based on the minimization.
[0090] The overall loss function of the tongue appearance segmentation network model is represented as:
[0091]
[0092] wherein, represents the tongue appearance segmentation prediction result; represents a coarse mask; Y gt represents a segmentation label mask; L seg represents a loss function between the tongue appearance segmentation prediction result and the segmentation label; L global represents a loss function in the global modification operation.
[0093] In summary, the embodiment of the present application provides a tongue appearance segmentation method based on a deep neural network, introduces a multi-space global feature learning network, performs global feature embedding learning on the tongue appearance segmentation label mask in the Euclidean space and the hyperbolic space, and thus obtains the tongue appearance global features in multiple space perspectives. Moreover, the multi-space global feature learning network also performs a defect information decoupling operation, separates the feature information and the defect information, improves the correction ability of the network to the error mask, and drives the construction of a feature space that accurately reflects the global characteristics of the tongue appearance. In addition, a feature channel difference guided global correction module is introduced, difference calculation and fusion learning are performed between the modified mask and the encoded features, the ability of the tongue appearance segmentation network model to maintain the macroscopic characteristics of the tongue appearance is improved, and the segmentation prediction result is more complete.
[0094] The embodiment of the present application is implemented by using a deep learning framework PyTorch and a model library timm, and all experiments are run on a server equipped with 2 NVIDIA RTX 3090 GPUs. In addition, the CPU is Intel i9-10850K, the memory is 64G, and the operating system is Ubuntu 18.04. When training the multi-space global feature learning network MSDAE, the Adam optimizer is used, the initial learning rate is set to 2.5x10-4, the batch size is 10, the total training rounds are 50, the learning rate is reduced by 75% every 10 rounds in the first 30 rounds, the parameters are al=0.1 and a2=0.001, and the hyperbolic space curvature parameter c=0.1.
[0095] In training the tongue image segmentation network model, the Adam optimizer is used, the initial learning rate is set to 1x10-4, the batch size is 10, the total training round is 50 rounds, and the learning rate is reduced by 75% every 15 rounds. In the process of training the segmentation network, the weight parameters of the pre-trained multi-space global feature learning network submodel MSDAE are fixed, which can be regarded as a normal function, and the input is the rough segmentation mask.
[0096] In training the tongue image segmentation network model, only the general data enhancement method is used, and random horizontal flip and random color transformation are performed. At the same time, in the training and testing stages, the image is scaled to 224x224 before entering the network. Experiments show that the tongue image segmentation method of the present application outperforms all the compared tongue image segmentation methods, and the segmentation prediction output result can better maintain the global characteristics of the tongue image, and better performance is achieved, which shows the effectiveness of the method.
[0097] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0098] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A tongue image segmentation method based on a deep neural network, characterized in that, The method comprises the following steps: obtaining a target tongue image; inputting the target tongue image into a trained tongue image segmentation network model to output a tongue image segmentation prediction result; the tongue image segmentation network model comprises a multi-space global feature learning network sub-model and a feature channel difference value guided global correction module; the training process of the multi-space global feature learning network sub-model comprises the following steps: P1, obtaining a large number of segmentation label masks and defect label masks of tongue images; P2, performing random degradation processing on the segmentation label masks; P3, using a first neural network encoder to extract features of the segmentation label masks after random degradation processing to obtain defect feature vectors, Euclidean global feature vectors and hyperbolic global feature vectors; P4, decoding the defect feature vectors, Euclidean global feature vectors and hyperbolic global feature vectors through a first neural network decoder to obtain defect prediction results and reconstruction prediction results; P5, minimizing the binary cross-entropy loss between the defect label masks and the defect prediction results; and minimizing the binary cross-entropy loss between the segmentation label masks and the defect prediction results, based on which the multi-space global feature learning network sub-model is trained; the P3 specifically comprises: using a first neural network encoder to extract features of the segmentation label masks after random degradation processing to obtain a two-dimensional encoding feature map; performing information decoupling and vectorization processing on the two-dimensional encoding feature map through a defect information decoupling module to obtain defect information vectors and global information vectors; using a fully connected layer to respectively perform dimension compression processing on the defect information vectors and the global information vectors to obtain corresponding defect feature vectors and Euclidean global feature vectors; performing hyperbolic embedding processing and compression on the global information vectors to obtain hyperbolic global feature vectors. 2.The tongue image segmentation method based on deep neural network according to claim 1, characterized in that, In the P2, the random degradation processing comprises adding random noise, random geometric patterns and random background activation. 3.The tongue image segmentation method based on deep neural network according to claim 1, characterized in that, the P4 specifically comprises: the first neural network decoder comprises a decoder I, a decoder II and a decoder III; inputting the defect feature vectors into the decoder I to output defect prediction results; inputting the Euclidean global feature vectors into the decoder II to output reconstruction prediction results II; inputting the hyperbolic global feature vectors into the decoder III to output reconstruction prediction results III; combining the reconstruction prediction results II and the reconstruction prediction results III to form reconstruction prediction results. 4.The tongue image segmentation method based on deep neural network according to claim 2, characterized in that, The training process of the multi-space global feature learning network sub-model further comprises: inputting the defect feature vectors into a classifier to output a probability that the segmentation label mask has defects; the classifier is composed of a multi-layer perception mechanism. 5.The tongue image segmentation method based on deep neural network according to claim 1, characterized in that, The training process of the tongue image segmentation network model is as follows: S1, obtaining a tongue image; S2, using a second neural network encoder to extract features of the tongue image to obtain encoding features; S3, performing pixel prediction on the encoding features to obtain a rough mask of tongue images; S4, inputting the rough mask into the trained multi-space global feature learning network sub-model to output a corrected mask of tongue images; S5, performing a channel replication operation on the modified mask to obtain mask features; S6, based on the mask features, using a feature channel difference to guide a global correction module to perform global correction on the encoded features to obtain a corrected feature map; S7, using a second neural network decoder to decode the corrected feature map to output a tongue image segmentation prediction result; S8, minimizing the binary cross-entropy loss between the tongue image segmentation prediction result and the segmentation label mask obtained in P1, and training the tongue image segmentation network model based on this.
6. The tongue image segmentation method based on deep neural network according to claim 5, characterized in that, The S6 specifically comprises: After normalizing the encoded features and the mask features respectively, the feature difference between the encoded features and the mask features is calculated by bit-by-bit pixel subtraction; The feature difference is input into a first convolution processing module and a second convolution processing module respectively, and corresponding first pixel weight maps and second pixel weight maps are output; Based on the first pixel weight map and the second pixel weight map, the encoded features are globally corrected to obtain a corrected feature map.
Citation Information
Patent Citations
Tongue picture segmentation method of tongue picture instrument based on deep learning
CN114581432A