Tongue image segmentation method based on improved Unet network, electronic equipment and storage medium

Through the improved Unet network method, the multi-branch module, the spatial-coordinated attention module and the fully connected conditional random field module are used to solve the subjectivity problem of tongue body segmentation in traditional tongue diagnosis and achieve accurate segmentation of the tongue body and facial areas. , improving the objectivity and accuracy of diagnosis.

CN118608533APending Publication Date: 2024-09-06HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410668910.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Traditional tongue diagnosis methods are highly subjective and difficult to achieve accurate segmentation of the tongue body, affecting the objectivity and accuracy of diagnosis.

Method used

The improved Unet network method is used to perform tongue image segmentation through the multi-branch module, spatial-coordinated attention module and Multi up-sample module, combined with the fully connected conditional random field module, to enhance spatial information extraction and upsampling processing, and achieve tongue body and Accurate segmentation of facial regions.

Benefits of technology

It improves the accuracy and detail retention of tongue body segmentation, enhances the detail and accuracy of subsequent feature extraction, and reduces the boundary ambiguity of segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608533A
    Figure CN118608533A
Patent Text Reader

Abstract

The invention provides a tongue image segmentation method based on an improved Unet network. The tongue image segmentation method comprises the following steps: acquiring an image to be segmented; an image is input into the improved Unet network to obtain a coarse segmentation image, a convolution block in the improved Unet network comprises a multivariate branch module, a cascade layer comprises a space-coordination attention module, down-sampling is carried out by using a cavity convolution module, and up-sampling is carried out by using a Multi up-sample module; and inputting the roughly segmented image to a full-connection conditional random field module to obtain a precisely segmented binary image, and outputting the precisely segmented binary image. According to the method, a multi-element branch module is utilized to replace a convolution block in a traditional UNet network, so that the network can retain more detail information of a feature region in an image, an initial spatial position can be reserved to a great extent by utilizing a space-attention coordinating module, channel information is reserved to the maximum extent, and the image quality is improved. Therefore, accurate segmentation of the tongue body, the face, the teeth and other areas is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a tongue image segmentation method based on an improved Unet network, an electronic device and a storage medium. Background Art

[0002] Health has always been a concern for people. The development of science and technology and the improvement of industrialization have accelerated the pace of people's lives, changed their living habits and dietary structure, and led to a surge in the number of sub-healthy people. When the human body is in a sub-healthy state, if it is not prevented and treated in time, it may cause many chronic diseases. However, the early symptoms of some diseases are almost imperceptible, and they are often discovered only after they worsen to the point where the human body has obvious reactions and seeks medical treatment. Therefore, people hope to obtain a faster, more convenient and more accurate diagnostic method to understand their personal physical condition, and then realize personal disease warning and health management.

[0003] Tongue diagnosis is an important part of TCM's "observation" diagnosis, providing an important basis for TCM diagnosis, and has played an indispensable role in TCM for thousands of years. Clinical studies of TCM have shown that the tongue is closely connected to the internal organs through the meridians. Therefore, tongue diagnosis can help us understand the deficiency and excess of the internal organs, qi, blood, and body fluids, as well as the nature, severity, and changes of pathogenic factors. Traditional tongue diagnosis mainly involves doctors observing the patient's tongue body information, such as tongue color, coating color, thickness of tongue coating, and area of ​​tongue coating, through naked eye observation. The diagnosis results are highly subjective and are affected by factors such as the doctor's diagnosis and treatment level and the external environment. Objective research on tongue diagnosis has become the current mainstream trend, and more and more studies have begun to process user tongue images, but the first step in processing is to accurately segment the tongue. Summary of the invention

[0004] In view of the above defects in the prior art, the present invention provides a tongue image segmentation method, an electronic device and a storage medium based on an improved Unet network to solve the technical problem that the tongue cannot be accurately segmented.

[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a tongue image segmentation method based on an improved Unet network, comprising the following steps: obtaining an image to be segmented; inputting the image into an improved Unet network to obtain a coarse segmentation image, wherein the convolution block in the improved Unet network includes a multi-branch module, and in the encoder part, a space-coordinated attention module is used to enhance the extraction of spatial information, a hole convolution module is used for down-sampling, and a Multi up-sample module is used for up-sampling; the coarse segmentation image is input into a fully connected conditional random field module to obtain a precisely segmented binary image and output it.

[0006] In one embodiment of the present invention, each of the convolution blocks is composed of two of the multi-branch modules.

[0007] In one embodiment of the present invention, the multi-branch module performs the following operation on the input feature Input1 to obtain the output feature Output1:

[0008] Output1 = BN(ReLU(Conv 1×1 (Input1)))+BN(ReLU(Conv k×k (BN(ReLU(Conv 1×1 (I

[0009] nput1))))))+BN(ReLU(Conv 1×1 (Input1))).

[0010] In one embodiment of the present invention, in the encoder part, the spatial-coordinated attention module is used to extract spatial position features from the output features of the second multi-branch module in each layer; in the decoder part, the features output by the spatial-coordinated attention module are spliced ​​with the upsampling results of the corresponding layer.

[0011] In one embodiment of the present invention, the spatial-coordinated attention module performs the following operations on the input feature Input2 to obtain the output feature Output2: performing maximum pooling and average pooling operations on the input feature Input2 respectively to obtain feature weight layers of two channels; after connecting the two feature weight layers in series, the concatenated feature layer is adjusted to one channel using a convolution with a channel number of 1; the adjusted feature layer is activated using an activation function to obtain the spatial context information weight feature Output2 of the input feature layer.

[0012] In one embodiment of the present invention, the Multi up-sample module performs the following operations on the input feature Input3 to obtain the output feature Output3: upsampling the input feature Input3 using a sub-pixel convolution operation; upsampling the input feature Input3 using a bilinear interpolation operation; and fusing the above two upsampling results to obtain the output feature Output3.

[0013] In one embodiment of the present invention, the downsampling times and upsampling times of the improved Unet network are both 4 times.

[0014] In one embodiment of the present invention, before the step of inputting the image into the improved Unet network to obtain a coarse segmented image, the step further includes: performing a 3×3 convolution operation on the image;

[0015] After the step of inputting the image into the improved Unet network to obtain a coarsely segmented image, the method further includes: performing a 1×1 convolution operation on the image.

[0016] To achieve the above-mentioned purpose and other related purposes, the present invention also provides an electronic device, including a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement a method provided in any one of the above embodiments.

[0017] To achieve the above-mentioned object and other related objects, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to enable a computer to execute the method provided in any one of the above-mentioned embodiments.

[0018] Beneficial effects of the present invention: The present invention proposes a tongue image segmentation method, electronic device and storage medium based on an improved Unet network. The method improves the Unet network model and uses a multi-branch module to replace the convolution block in the traditional Unet network, so that the network can retain more detail information of the feature area in the image. The space-coordinated attention module can retain the initial spatial position to a great extent, and the channel information is retained to the greatest extent, thereby achieving accurate segmentation of the tongue and facial, teeth and other areas, and making the subsequent feature extraction of the tongue more detailed and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart provided for an embodiment of the present invention;

[0021] Figure 2 A structural diagram based on an improved Unet network provided by an embodiment of the present invention;

[0022] Figure 3 A structural diagram of a multi-branch module provided by an embodiment of the present invention;

[0023] Figure 4 A structural diagram of a spatial-coordinated attention module provided by an embodiment of the present invention;

[0024] Figure 5 A structural diagram of a Multi up-sample module provided in one embodiment of the present invention;

[0025] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following describes the embodiments of the present invention through specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. It should be noted that the following embodiments and the features in the embodiments can be combined with each other without conflict. In addition to the specific methods, equipment, and materials used in the embodiments, according to the technical personnel in this technical field's grasp of the prior art and the records of the present invention, any methods, equipment, and materials of the prior art that are similar or equivalent to the methods, equipment, and materials described in the embodiments of the present invention can also be used to implement the present invention.

[0027] It should be understood that the terms used in the embodiments of the present invention are for describing specific embodiments rather than for limiting the scope of protection of the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those generally understood by those skilled in the art.

[0028] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In some of the embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0029] The flowchart and block diagram in the accompanying drawings illustrate the system architecture, functions and operations that may be implemented according to the methods and computer program products of various embodiments disclosed in the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0030] See also Figure 1 and Figure 2, an embodiment of the present invention provides a tongue image segmentation method based on an improved Unet network, comprising the following steps: S100, obtaining an image to be segmented, which may be, for example, an RGB image, a pseudo-color image obtained by converting a hyperspectral image through a color matching function, or other types of images. The user's tongue image can be obtained by directly photographing it with a camera or a spectrometer, or by using a dedicated device. In addition, when photographing, it is necessary to ensure that the image taken is of the user's tongue in a normal state. For example, eating may be prohibited one hour before photographing to ensure that the tongue can objectively reflect the true health status of the human body, or the user needs to complete the photographing in a short time after extending the tongue to avoid the production of saliva when the tongue is extended for a long time and the influence of blood filling of the tongue.

[0031] The tongue image segmentation method based on the improved Unet network also includes the following steps: S200, inputting the image into the improved Unet network to obtain a coarse segmentation image, the convolution block in the improved Unet network includes a multi-branch module (i.e. Figure 1 In the encoder part, a spatial-coordinated attention module (i.e. Figure 1 SPCA in the image) to enhance the extraction of spatial information and use the hole convolution module (i.e. Figure 1 The DilatedConv in the image is used for downsampling, and the Multi up-sample module is used for upsampling. The Unet network is a neural network structure commonly used for image segmentation tasks. The structure of the Unet looks like the letter "U" and consists of a contraction path (left side) and an expansion path (right side). The contraction path is used to capture the contextual information of the image, while the expansion path is used to accurately locate the object. The Unet network structure mainly includes the encoder part and the decoder part, as well as the skip connection.

[0032] The encoder is the left part of Unet, which is mainly responsible for feature extraction of the input image. This process is completed by repeatedly applying convolutional layers and pooling layers, gradually reducing the spatial size of the feature map while increasing the channel depth to capture the high-level semantic information of the image.

[0033] The decoder is the right part of Unet, which is responsible for upsampling the features extracted by the encoder and restoring them to the same size as the original image. The decoder consists of a series of upsampling operations, each of which is usually followed by a jump connection fusion with the output of the corresponding encoder layer to restore detailed information and improve segmentation accuracy.

[0034] Skip Connection is a key design in Unet, which allows the network to skip some layers and directly connect the output of the encoder with the upsampled result of the decoder. This connection method helps to preserve the spatial information of the image and provide accurate positioning information during the upsampling process.

[0035] In this embodiment, the convolution block, downsampling and upsampling parts in the Unet network are improved to make them more suitable for tongue image segmentation.

[0036] The tongue image segmentation method based on the improved Unet network also includes the following steps: S300, inputting the coarse segmentation image to the fully connected conditional random field module, obtaining the accurately segmented binary image and outputting it. Fully connected conditional random field (CRF) is a technology used for image segmentation post-processing, which can improve classification accuracy and boundary quality. It is an important concept in the field of image processing, especially playing an important role in the image semantic segmentation task. CRF is a probabilistic graph model that can model the conditional probability distribution of another set of output data under the condition of a set of input data. In image processing, the input data is usually the features of the pixels, and the output is the category label of the pixels. In image semantic segmentation, CRF is usually used as a post-processing step to optimize the preliminary classification results of deep learning models (such as the improved Unet network mentioned above). By considering the relationship between all pixels in the image, CRF can improve the quality of the segmentation boundary and enhance the overall segmentation effect. The CRF model can be regarded as an undirected graph, in which the vertices represent random variables (i.e., pixels), and the lines between the vertices represent the mutual dependence between the pixels. This structure enables CRF to capture the contextual information between pixels, thereby more accurately performing pixel-level classification.

[0037] It can be understood that after the multi up-sampling operation in the decoding process, the coarse segmentation image obtained by segmentation will have blurred boundaries due to the loss of feature information. Therefore, a fully connected conditional random field module is used for further processing to optimize the uncertain or blurred marks in the coarse segmentation image and improve the accuracy of the segmentation result.

[0038] This method improves the Unet network model and uses a multi-branch module to replace the convolution block in the traditional Unet network, so that the network can retain more detailed information of the feature area in the image. The spatial-coordinated attention module can retain the initial spatial position to a great extent and retain the channel information to the greatest extent, thereby achieving accurate segmentation of the tongue and face, teeth and other areas, and making the subsequent feature extraction of the tongue more detailed and accurate.

[0039] See also Figure 2In a specific embodiment of the present invention, each convolution block is composed of two multi-branch modules to enrich the diversity of the feature space and enhance the learning and expression capabilities of the convolutional network. In the encoder part, the size of the feature layer of the first multi-branch module remains unchanged, and the number of channels in the feature layer increases. The second multi-branch module is used for feature integration, and the size and number of channels of the feature layer remain unchanged. In the decoder part, the size of the feature layer of the first multi-branch module remains unchanged, and the number of channels in the feature layer decreases. The second multi-branch module is also used for feature integration.

[0040] See also Figure 3 In a specific embodiment of the present invention, the multi-branch module processes the input feature Input1 (i.e. Figure 3 The following operation is performed to obtain the output feature Output1 (i.e. Figure 3 Output1 = BN(ReLU(Conv 1×1 (Input1)))+BN(ReLU(Conv k×k (BN(ReLU(Conv 1×1 (Input1))))))+BN(ReLU(Conv 1×1 (Input1))). The Diverse Branch Block (DBB) is a Diverse Branch Block (DBB) with the 1*1 convolution and average pooling sequence convolution removed. The Diverse Branch Block (DBB) replaces the convolution block in the traditional Unet network with the Diverse Branch Block to strengthen the backbone network, so that the network can retain more detailed information of the feature area in the image and improve the network's ability to extract multi-scale features. The module consists of a multi-branch topological structure of three parallel 1*1 convolutions, 1*1 convolutions, 1*1 and k*k sequence convolutions, and the calculation results of the three branches are fused as output. In addition, a BN (BatchNormalization) layer is added after each convolution, and a ReLU activation function is added to the convolution operation of the structural block, so that the multi-branch has nonlinear mapping learning capabilities and avoids network generalization.

[0041] See also Figure 2In a specific embodiment of the present invention, in the encoder part, the spatial-coordinated attention module is used to extract the spatial position features of the output features of the second multi-branch module in each layer; in the decoder part, the features output by the spatial-coordinated attention module are spliced ​​with the upsampling results of the corresponding layer. In the traditional Unet network structure, the features output by the encoder part are directly connected to the upsampling results of the decoder. This connection method helps to retain the spatial information of the image and provide accurate positioning information during the upsampling process. In this embodiment, we have improved the existing coordinated attention module (CA) and designed a spatial-coordinated attention module (SPCA) to process the features output by the decoder part and then connect them, which can enhance the extraction of spatial information.

[0042] See also Figure 4 In a specific embodiment of the present invention, the spatial-coordinated attention module performs the input feature Input2 (i.e. Figure 4 The following operation is performed on the input of the output feature Output2 (i.e. Figure 4 Output in): perform maximum pooling and average pooling operations on the input feature Input2 respectively to obtain feature weight layers of two channels, which respectively contain the maximum value and average value information of the tongue image spatial level context information; after connecting the two feature weight layers in series, use convolution with a channel number of 1 to adjust the connected feature layer to one channel, so as to fuse the captured effective information; use the activation function to activate the adjusted feature layer to obtain the spatial context information weight feature Output2 of the input feature layer. This process helps to capture the spatial features of the human facial structure more comprehensively. In a specific embodiment of the present invention, the processing process of the spatial-coordinated attention module is as follows Figure 4 As shown in the figure, X and Y represent the horizontal and vertical directions of the feature map respectively, AvgPool represents average pooling, MaxPool represents maximum pooling, Concat represents concatenation, Conv2d represents ordinary convolution, BatchNorm represents batch normalization, Non-linear represents nonlinear activation function, Split represents segmentation, Sigmoid represents Sigmoid activation function, C, H and W represent the number of channels, height and width of the feature map respectively.

[0043] In a specific embodiment of the present invention, the traditional Unet network usually uses convolutional layers and pooling layers to increase the receptive field. During the downsampling process, the original image will be reduced and then restored by upsampling. This process will cause the loss of information in the image. Therefore, in this embodiment, a hole convolution layer is used instead of a pooling layer. The hole convolution does not change the size of the image and can also increase the receptive field. That is, the downsampling operation is performed through a hole convolution module. The hole convolution module is also called a dilated convolution, which is a special convolution operation. This convolution operation increases the size of the receptive field by inserting holes (i.e., increasing the step size) in the standard convolution kernel while keeping the size of the feature map unchanged. The advantage of this is that more contextual information in the image can be captured without using a pooling layer and upsampling, which is particularly important for tasks such as image segmentation.

[0044] See also Figure 5 In a specific embodiment of the present invention, the Multi up-sample module performs the input feature Input3 (i.e. Figure 5 2W*2H*C in , perform the following operations to obtain the output feature Output3 (i.e. Figure 5 2W*2H*C / 2): Using sub-pixel convolution operation (i.e. Figure 5 The input feature Input3 is upsampled by using the Bilinear module in ; the bilinear interpolation operation (i.e. Figure 5 Pixel shuffle in the image) is used to upsample the input feature Input3; the above two upsampling results are fused to obtain the output feature Output3. After downsampling, the Unet network also needs to restore the image size through upsampling. Traditional methods such as deconvolution upsampling and degenerate maximum pooling upsampling will cause checkerboard effects or destroy features. Therefore, in this embodiment, the original upsampling method of Unet is replaced by the Multi up-sample module, that is, the sub-pixel convolution and bilinear interpolation upsampling are fused and the ReLU activation function is added to improve the feature extraction capability during upsampling and the clarity of the image edges. The module includes two convolution layers, a ReLU layer, a sub-pixel convolution layer, a bilinear interpolation layer, and an upsampling structure composed of two channels.

[0045] In a specific embodiment of the present invention, the number of downsampling and upsampling of the improved Unet network are both 4 times. Different data sets may require different levels of feature extraction, so the number of downsampling will be determined according to the complexity of the data set and the resolution of the image, and the number of upsampling is the same as the number of upsampling. At present, in some common applications, the Unet encoder usually performs 4 downsampling, so that the decoder part performs 4 upsampling accordingly to restore the high-level semantic feature map to the resolution of the original image. This design allows the network to capture features of different scales and fuse low-level features through jump connections, thereby performing multi-scale prediction and fine edge recovery. It can be understood that the number of downsampling of the Unet network should be determined according to the specific application scenario and experimental results, and there is no fixed standard. In practical applications, different downsampling times can be tried, and the best network structure can be selected based on the performance on the validation set.

[0046] In a specific embodiment of the present invention, before the step of inputting the image into the improved Unet network to obtain the coarse segmentation image, the step further includes: performing a 3×3 convolution operation on the image; after the step of inputting the image into the improved Unet network to obtain the coarse segmentation image, the step further includes: performing a 1×1 convolution operation on the image.

[0047] Combine the following Figure 2 , the process of improving the Unet network is further described in detail. After obtaining the image to be segmented, in the encoder part, it first undergoes the first 3*3 convolution operation, and then passes through two multi-branch modules. The size of the first feature layer remains unchanged, and the number of feature layer channels increases to 64. The second entry module is used for feature integration, and the size and number of feature layer channels remain unchanged. In order to avoid the problem of network generalization, the module adds the ReLU activation function. After that, downsampling is achieved by introducing a 2*2 hole convolution, so that the image size is reduced to half. Then the feature layer of the next layer is obtained, and this operation is repeated for a total of 5 times to obtain 5 feature layers. Then, before the decoding operation, the spatial position feature extraction of the feature layer obtained after the second multi-branch convolution operation of each layer is performed by the spatial-coordinated attention module. Finally, the obtained fifth feature layer is upsampled by the Multi up-sample module, and the size of the feature layer becomes twice the original size, and the number of channels remains unchanged. The first 4 layers are captured by the spatial-coordinated attention module for enhancement and decoding operations and spliced ​​with the corresponding layers, which largely retains the initial spatial position information. Then continue the 3*3 convolution operation, the number of channels changes to 512, 256, 128 and 64, and then perform the second multi-branch feature integration, up-sample and perform the decoding operation of the previous layer. Repeat this 4 times, and finally get the size of the original image. The coarse image is obtained by 1*1 convolution segmentation, and then optimized by the fully connected conditional random field to obtain the final accurate tongue area image.

[0048] See also Figure 6 In a specific embodiment of the present invention, the present invention also provides an electronic device, including a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement a method provided in any one of the above embodiments.

[0049] In a specific embodiment of the present invention, the present invention further provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is used to enable a computer to execute the method provided in any of the above embodiments.

[0050] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A tongue image segmentation method based on an improved Unet network, characterized in that: The steps include: Obtain an image to be segmented; Input the image into an improved Unet network to obtain a coarse segmentation image, wherein the convolution block in the improved Unet network includes a multi-branch module, and in the encoder part, a spatial-coordinated attention module is used to enhance the extraction of spatial information, a dilated convolution module is used to perform downsampling, and a Multi up-sample module is used to perform upsampling; The coarse segmentation image is input into a fully connected conditional random field module to obtain a precisely segmented binary image and output it.

2. The tongue image segmentation method based on the improved Unet network according to claim 1, characterized in that: Each of the convolution blocks is composed of two of the multi-branch modules.

3. The tongue image segmentation method based on the improved Unet network according to claim 2 is characterized in that: The multi-branch module performs the following operations on the input feature Input1 to obtain the output feature Output1: Output1=BN(ReLU(Conv 1×1 (Input1)))+BN(ReLU(Conv k×k (BN(ReLU(Conv 1×1 (I nput1))))))+BN(ReLU(Conv 1×1 (Input1)))。 4. The tongue image segmentation method based on the improved Unet network according to claim 2, characterized in that: In the encoder part, the spatial-coordinated attention module is used to extract the spatial position features of the output features of the second multi-branch module in each layer; in the decoder part, the features output by the spatial-coordinated attention module are spliced ​​with the upsampling results of the corresponding layer.

5. The tongue image segmentation method based on the improved Unet network according to claim 4, characterized in that: The spatial-coordinated attention module performs the following operation on the input feature Input2 to obtain the output feature Output2: Perform maximum pooling and average pooling operations on the input feature Input2 to obtain the feature weight layers of the two channels; After connecting the two feature weight layers in series, the concatenated feature layers are adjusted to one channel using a convolution with a channel number of 1; The adjusted feature layer is activated using the activation function to obtain the spatial context information weight feature Output2 of the input feature layer.

6. The tongue image segmentation method based on the improved Unet network according to claim 1, characterized in that: The Multiup-sample module performs the following operations on the input feature Input3 to obtain the output feature Output3: Upsampling the input feature Input3 using a sub-pixel convolution operation; Upsampling the input feature Input3 using a bilinear interpolation operation; The above two upsampling results are fused to obtain the output feature Output3.

7. The tongue image segmentation method based on the improved Unet network according to claim 1, characterized in that: The downsampling times and upsampling times of the improved Unet network are both 4 times.

8. The tongue image segmentation method based on the improved Unet network according to claim 1, characterized in that: Before the step of inputting the image into the improved Unet network to obtain a coarse segmented image, the step further includes: performing a 3×3 convolution operation on the image; After the step of inputting the image into the improved Unet network to obtain a coarsely segmented image, the method further includes: performing a 1×1 convolution operation on the image.

9. An electronic device, characterized in that: The method comprises a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to enable a computer to execute the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Tongue picture segmentation method and device, medium and equipment

    CN120235840A