A tongue image enhancement system and method based on deep learning

By generating tongue image enhancement methods that include tongue body, tongue coating, background, and highlight masks, the problem of mutual staining of tongue body redness oversaturation and tongue coating redness in tongue image is solved. This achieves visual consistency and detail restoration under low light conditions, reducing dependence on ambient light and doctor's experience.

CN120953107BActive Publication Date: 2026-02-03BINGKUI XIAOYI (GUANGDONG) INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511494289.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-02-03
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing technologies for tongue image enhancement suffer from issues such as oversaturation of redness in the tongue body or mutual staining of red tongue coating. Furthermore, they are difficult to simultaneously improve visibility and suppress highlight artifacts under low illumination, leading doctors to rely on experience and ambient light for their judgment.

Method used

By preprocessing and normalizing the tongue image, tongue body, tongue coating, background and specular mask are generated. Chromaticity decoupling is performed in HSV space to suppress mutual staining. Structure-preserving filtering is performed on the boundary band, and local brightness and redness are controlled. Finally, specular suppression is performed to restore detailed texture.

Benefits of technology

It enhances the visibility and contrast of tongue images under low light conditions, suppresses the mutual staining between the tongue body and tongue coating, reduces dependence on ambient light and physician experience, and outputs stable and consistent enhancement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953107B_ABST
    Figure CN120953107B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image data processing, and particularly discloses a tongue image enhancement system and method based on deep learning, which comprises a collection and input module, a preprocessing module, a tongue area analysis module, a low-illumination enhancement module, a highlight suppression module, a post-processing and reading module, and a processor and memory module. After standardized collection, the system uses tongue body / tongue fur / background multi-masks and highlight masks to perform regional perception enhancement on low-illumination tongue images; a non-reference exposure improvement is realized by an illumination curve estimation branch; tongue area color desorption is performed in an HSV space to separate reflectivity and illumination, to suppress mutual staining of tongue body red and white fur; and high-light segmentation-guided repair is used to reduce saliva high-light interference. The application improves detail visibility and true color restoration, reduces dependence of doctors on experience and ambient light during reading, and is suitable for outpatient screening and follow-up scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and more specifically, to a tongue image enhancement system and method based on deep learning. Background Technology

[0002] Tongue diagnosis plays an important role in both traditional Chinese medicine's visual diagnosis and modern intelligent assisted diagnosis. However, clinically acquired tongue images are often affected by insufficient ambient light, individual differences, and specular reflection from saliva, resulting in color shifts and obscured details. Doctors' judgments are highly dependent on experience and lighting conditions. Regarding low-light image enhancement, deep learning methods have evolved from model-driven Retinex decomposition to end-to-end curve estimation and depth unrolling. Representative works include RetinexNet, which proposes reflectivity-illumination separation and enhancement on the LOL pairwise dataset, significantly improving contrast and noise suppression; Zero-DCE models enhancement as pixel-level high-order curve estimation, achieving exposure correction and color constraints without a reference image, and is lightweight and deployable; and URetinex-Net, which deeply unrolls the Retinex optimization process, achieves more stable illumination estimation and reflectivity recovery in real-world scenarios.

[0003] Specialized research on tongue imaging focuses on tongue body / coating segmentation and feature analysis. For example, existing literature (TongueNet: A precise and fast tongue segmentation system using U-Net with amorphological processing layer, 2019) documents the use of TongueNet and improved U-Net for high-precision tongue region segmentation and boundary refinement, providing a reliable mask and regional statistical basis for downstream tasks related to tongue imaging. Several reviews have summarized recent progress in AI in tongue segmentation, classification, and disease association, pointing out that standardized data acquisition, data annotation quality, and cross-domain generalization remain bottlenecks. On the other hand, specular highlights (such as saliva reflection) can disrupt reflectivity consistency. Medical imaging commonly employs a two-stage strategy of "highlight detection + repair / texture enhancement" to reduce artifacts. Existing patents (A computer vision-based method for enhancing TCM visual diagnosis images, CN119251122A) enhance the detailed features and contrast of the tongue body in tongue images, such as... Figure 2As shown. However, directly applying general low-light enhancement to tongue imaging can easily lead to problems such as oversaturation of the red color of the tongue body or mutual staining of the red tongue coating; simultaneously achieving "brightness enhancement, color destaining, and highlight suppression" in the same enhancement chain also presents coordination challenges. Therefore, there is an urgent need for a region-aware enhancement method oriented towards tongue image semantics that can improve visibility under low light conditions, suppress mutual staining between the red of the tongue body and the white of the tongue coating, suppress highlight artifacts, and reduce dependence on physician experience and ambient light. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of existing technologies, this invention provides a tongue image enhancement system and method based on deep learning. This system preprocesses and normalizes the collected original tongue images, outputting a tongue mask, a tongue coating mask, a background mask, and a highlight mask. It then generates an exposure gain map that satisfies monotonicity and range constraints. Next, it performs chromaticity decoupling in the HSV space. Within the background mask, it enhances redness by "first slightly brightening and contrasting, then steadily increasing redness and limiting saturation." Within the tongue coating mask, it maintains whiteness and suppresses "reddishness" by focusing on hue convergence. Finally, it constrains color mixing in the boundary band using structure-preserving filtering and distance attenuation weights, thus solving the problems mentioned in the aforementioned background technologies.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A deep learning-based tongue image enhancement system includes:

[0007] The acquisition and input module is used to receive the standardized acquired raw images of the tongue.

[0008] The preprocessing module is used for color space conversion and normalization to obtain a working color gamut image.

[0009] The tongue region analysis module is used to output tongue body mask, tongue coating mask, background mask, and highlight mask.

[0010] The low-light enhancement module, combined with prior knowledge of the tongue body mask and tongue coating mask areas, constrains the whiteness of the tongue coating to maintain consistency with the redness of the tongue body, thus inhibiting cross-staining.

[0011] The highlight suppression module performs residual repair on the highlight areas of the saliva mirror under the guidance of the background mask.

[0012] The post-processing and reading module is used to generate images for doctors to read.

[0013] The processor and memory module is used to store and execute the instructions and intermediate data structures of the above modules.

[0014] As a further aspect of this invention, an acquisition and input module is used to receive standardized acquired raw tongue images, including the following specific components: The acquisition and input module includes an image sensor interface, a buffer and synchronization unit, and a calibration information parsing unit. The acquisition and input module supports 12-bit RAW, 10-bit YUV, and lossless JPEG formats for input, and synchronously reads exposure time, ISO, aperture / gain, lens ID, shutter speed, and device number. The acquisition and input module performs integrity checks, timestamp and shooting pose recording, lens distortion / dark current marking, and sharpness, overexposure, and highlight ratio quality checks based on Laplacian variance and saturated pixel ratio on the raw tongue images; unqualified samples are prompted for re-acquisition or marked with low confidence. Finally, the raw tongue image, exposure parameters, white balance reference, and gray card calibration data are uniformly encapsulated into a standard input data structure, written into a circular buffer, and delivered to the preprocessing module via a message queue.

[0015] As a further aspect of this invention, a preprocessing module is used for color space conversion and normalization to obtain a working color gamut image. This includes the following specific steps: After receiving the original tongue image and its metadata from the acquisition and input module, the preprocessing module first performs decoding / de-mosaicing, black level correction, and compensation for bad pixels and lens shading. The camera's native color gamut is linearized to the working color gamut, and the display gamma is simultaneously removed to obtain a 0–1 normalized working color gamut image. Subsequently, single-point / multi-point white balance calibration is performed on a gray card or reference white film: the reference area is automatically located in the calibration frame or the first frame, highlight and shadow outliers are removed, R / G / B channel gain and correlated color temperature (CCT) are calculated, and a 3×3 color correction matrix is ​​generated. For single-point calibration, the global gain is output; for multi-point calibration, a spatial gain field is fitted to correct non-uniform illumination. If explicit calibration is missing, backsliding estimation is performed using a gray world / skin color prior. After completing color space conversion and white balance, the preprocessing module outputs a uniform image with dynamic range compression based on luminance cropping at the 1%–99th percentile and soft roll-off to suppress overexposure. It also extracts indicators such as exposure time, ISO, sensor analog / digital gain, lens aperture, frame average luminance, histogram peak position, saturated pixel ratio, and estimated noise level, and writes them, along with white balance parameters, CCT, and color correction matrix, into the enhanced metadata.

[0016] As a further aspect of the present invention, a tongue region analysis module is used to output a tongue mask, a tongue coating mask, a background mask, and a highlight mask, including the following specific content: The tongue region analysis module inputs a preprocessed working color gamut image into a first neural network to obtain the tongue mask, tongue coating mask, background mask, and highlight mask. The first neural network adopts a lightweight U-Net structure. The first neural network has four parallel multi-task heads at its end, such as... Figure 3As shown, the confidence maps of the tongue mask, tongue coating mask, background mask, and specular mask are output respectively, and the activation is Sigmoid. The loss function adopts a BCE+Dice hybrid form, and learnable class weights are introduced for class imbalance. Boundary pixels are additionally superimposed with distance transformation boundary loss to constrain contour fitting. The specular branch also incorporates prior consistency regularization for saturation and brightness to improve sensitivity to saliva specular reflection. The tongue region analysis module finally outputs four types of masks and their corresponding confidence scores and boundary polylines for subsequent region perception enhancement and specular suppression.

[0017] As a further aspect of this invention, a low-light enhancement module, combining prior knowledge of the tongue body mask and tongue coating mask regions, constrains the whiteness of the tongue coating to maintain consistency with the redness of the tongue body, suppressing cross-coloration. This includes the following specific components: The low-light enhancement module comprises an illumination curve estimation branch, a tongue region color decolorization branch, and a branch fusion unit. The illumination curve estimation branch takes a pre-processed working color gamut image as input, and uses a second neural network to predict high-order correction curve parameters and optional channel gating coefficients pixel-by-pixel, to generate an exposure gain map and complete referenceless exposure correction. The second neural network employs a lightweight encoder and shallow decoder structure. The second neural network outputs both per-pixel parameter tensors and scene-level exposure descriptors to adjust the curve intensity. The curve acts on pixels recursively, satisfying monotonicity and pixel value range constraints.

[0018] The tongue region color desaturation branch takes the preprocessed working color gamut image as input. Under the dual constraints of the tongue body mask and the tongue coating mask, it performs reflectivity and illumination separation, and performs regionalized chromaticity decoupling within the HSV color space to suppress the mutual staining between the red of the tongue body and the white of the tongue coating. The tongue region color desaturation branch first divides the working color gamut image into tongue body region and tongue coating region based on the tongue body mask and the tongue coating mask, and loads two types of priors: a prior distribution of redness and saturation is established with the tongue body region as the main body, and a prior distribution of whiteness and neutral hue is established with the tongue coating region. At the same time, the specular mask is used as a protective layer to shield the specular reflection of saliva. The original tongue image is then transferred to HSV space. Priority is given to limiting the hue convergence and saturation upper limit of the tongue coating area, while the saturation and brightness of the tongue body area are increased in tandem to ensure that the redness enhancement does not exceed the limits. A priori assumption of "tongue body leaning red, tongue coating leaning neutral white" is established. A light reflection and illumination separation is performed, ensuring that subsequent color adjustments primarily affect the reflective components rather than the illumination components. Within the tongue coating area, the color desaturation branch applies a neutral prior by introducing two types of constraints: "whiteness preservation" and "hue convergence," converging pixel chromaticity towards the neutral axis and adjusting saturation... To suppress over-enhancement, upper limits are set for brightness and local contrast. Guided filtering or bilateral filtering is used to preserve texture fidelity, thus avoiding excessive smoothing of details while improving visual consistency. In the tongue region, the color desaturation branch follows a processing sequence of "first enhancing brightness and local contrast, then progressively enhancing redness," applying controlled gain only to redness-related chromaticity components. Saturation peak constraints and skin tone priors are combined to suppress oversaturation and false colors, ensuring both improved visual recognizability and the stability and physiological rationality of color enhancement. To suppress chromaticity crosstalk at the boundary between the tongue and tongue coating regions, the color desaturation branch constructs boundary bands based on the tongue mask, tongue coating mask, and highlight mask from the partitioning results. Boundary-guided structure-preserving filtering is used to smooth the chromaticity residuals within the boundary bands. The distance from each pixel in the tongue image to the boundary line between the tongue and tongue coating regions is calculated, forming a distance map. The distance map is then monotonically mapped to attenuation weights, and then the attenuation weights are used to tighten the chromaticity gain on both sides of the boundary line, which limits the range of color adjustment and reduces the risk of redness leaking out of the tongue coating and whiteness invading the tongue body.

[0019] After completing independent color correction for each region, the branch fusion unit synthesizes the multiple candidate results into a single enhanced image with pixel-level weights. It introduces an adaptive weighting strategy based on segmentation confidence as a priori: using the continuous confidence map output by the first neural network as the weight map, it performs pixel-level confidence fusion of the chromaticity control results for the tongue body and tongue coating, supplemented by a Laplacian pyramid transition to reduce stitching marks. The color desaturation branch and the illumination curve estimation branch are linked through a gating mechanism: under the premise that the exposure gain is determined, only secondary correction of chromaticity and micro-brightness is performed to avoid conflicting adjustments to the brightness of the same pixel; when the global exposure is too high or the local contrast of the boundary band increases sharply, the gating automatically lowers the upper limit of chromaticity gain to maintain stability. Online quality monitoring calculates the chromaticity variance in the tongue coating region and tracks the redness index in the tongue body region. Once a trend of reddening of the tongue coating or fading of the tongue body is detected, a fallback strategy is immediately triggered: reducing the chromaticity gain of the corresponding region, increasing the constraint strength for maintaining whiteness or redness consistency, and enabling a threshold and time window with hysteresis to suppress oscillations. Finally, the color desaturation branch output is fused with the global enhancement result according to regional confidence level under the constraint of "neutral convergence of tongue coating and discernible redness of tongue body".

[0020] The multi-path candidate results include a tongue body correction image, a tongue coating correction image, a background preservation image, an exposure enhancement base image, and highlight processing candidates. The tongue body correction image is a regionalized correction result performed within the tongue body mask area, which first enhances local brightness and micro-contrast, then steadily increases redness and limits saturation. The tongue coating correction image is a regionalized correction result within the tongue coating mask area after maintaining whiteness, converging hues, and constraining the upper limit of saturation. The background preservation image is a preservation result with only color constancy and mild noise reduction / equalization within the background mask area to avoid over-processing non-diagnostic areas. The exposure enhancement base image is derived from the global low-light enhancement result of the illumination curve estimation branch and serves as the "carrying base image" for the color desaturation branch. The highlight processing candidates are two types of candidates, "repaired version" and "preserved version," generated by the highlight suppression module for the highlight mask area, and are used for selection based on confidence during fusion.

[0021] As a further aspect of this invention, a specular highlight suppression module performs residual repair on the specular highlight area of ​​saliva under the guidance of a background mask, including the following specific contents: The specular highlight suppression module includes a detection branch, a decomposition branch, a repair branch, and a backfill branch. The detection branch combines brightness peak, saturation reduction, gradient abrupt change, and specular morphology prior to output a continuously confident specular mask and specular intensity map, and estimates the local reflection components; the decomposition branch distinguishes the specular and diffuse reflection components of pixels accordingly, and identifies "high-brightness but not specular" areas such as tongue coating under the constraint of the tongue body / tongue coating mask, avoiding misjudgment and over-suppression. The repair branch adopts guided filling: guided by neighborhood structural lines (tongue edge, cracks, teeth marks) and texture samples, the geometric structure is first reconstructed, and then detailed textures and low-frequency tones are added back. During the process, boundary gradient consistency and color consistency constraints are superimposed to suppress halo and color shift. The backfilling branch weights and fuses the repair results with the original image according to the confidence level, performs residual fine suppression on the residual highlights and sets the amplitude limit. Finally, the highlight suppression module performs color constancy and contrast calibration on the repaired area and outputs the suppressed image. At the same time, the highlight mask, repair parameters and residual energy are written into the metadata for subsequent enhancement links and consistent reproduction with the doctor's reading end.

[0022] As a further aspect of this invention, a post-processing and reading module is used to generate images for doctors to read. This module takes enhancement results, masks, and metadata as input to generate output images for doctors to read. Within the same view, it supports side-by-side comparison of the original / enhanced image and sliding comparison using a "wiping bar," overlaying tongue body, tongue coating, highlight contours, and enhancement intensity heatmaps. It provides regional statistics and annotations under arbitrary magnification, with statistical items including brightness, contrast, color difference, and histogram overview. Doctors can switch to a "standard light" viewing mode with one click to stabilize the display and lock the current parameters to the case template for reproduction. The post-processing and reading module supports longitudinal comparison of multiple cases and comparison of the same case at different time points. It can display the current curve intensity, color constraint, and highlight restoration status on the ROI and write these parameters, along with version number, device information, and timestamp, into the exported report (PDF / image) for archiving and quality control. To avoid misreading, the interface includes built-in color consistency prompts and oversaturation warnings, and allows for one-click reverting to a more conservative enhancement configuration when necessary.

[0023] As a further aspect of this invention, a processor and memory module is used to store and execute the instructions and intermediate data structures of the aforementioned modules, including the following specific contents: The processor and memory module is used to carry and execute end-to-end instructions and intermediate data: the processor can be an edge AI SoC (ARM+NPU) with an embedded Linux operating system; the memory includes on-chip cache, main memory (LPDDR4 / DDR4), and non-volatile memory (eMMC / SSD). The intermediate data structure uses a zero-copy shared memory organization as a circular buffer to uniformly manage the original tongue image, working color gamut image, tongue mask / tongue coating mask / highlight mask, exposure gain map, enhanced image, output image for doctors to read, and curve parameters, color threshold, model weights, and version number.

[0024] A deep learning-based tongue image enhancement method includes the following steps:

[0025] Step 1: Receive the original image of the tongue.

[0026] Step 2: Obtain the tongue mask, tongue coating mask, background mask, and highlight mask through the tongue region analysis module.

[0027] Step 3: Calculate the exposure gain map by estimating the branch of the illumination curve and adjust the brightness of the working color gamut image.

[0028] Step 4: Perform reflectivity-illumination separation and color decoupling under the constraints of tongue body mask and tongue coating mask, and output the destaining results.

[0029] Step 5: Based on the mask and confidence level, fuse the results of Step 3 and Step 4 to obtain the enhanced image.

[0030] Step 6: Perform specular suppression and structural consistency restoration in the specular mask area.

[0031] Step 7: Output the image and visualization overlay information on the doctor's reading end.

[0032] The technical effects and advantages of this invention, a tongue image enhancement system and method based on deep learning, are as follows: This invention, through an end-to-end link of "tongue region analysis—low-light enhancement—color desaturation—highlight suppression—branch fusion—reading presentation," simultaneously solves pain points such as insufficient brightness, mutual staining between the tongue body and tongue coating, and interference from saliva highlights in low-light tongue image scenarios: The exposure gain generated by pixel-level high-order curves significantly improves the visibility and contrast of dark areas under monotonicity and range constraints; Based on the regional desaturation of the tongue body / tongue coating mask, whiteness preservation, redness consistency, and boundary band structural constraints suppress "reddening of the tongue coating and leakage of redness," so that "brightening does not cause reddening and redness enhancement does not cause color bleeding." High-resolution binary classification combined with guided inpainting effectively eliminates the stretching and blurring caused by specular reflection, restoring detailed textures. The fusion unit performs pixel-level weighting based on mask and confidence level, and applies upper bounds and hysteresis management to tongue gain and tongue coating color. Combined with online monitoring and a rollback mechanism, it outputs stable and consistent enhancement results. An adaptive strategy driven by grayscale calibration and metadata such as exposure and color temperature improves color consistency across devices and scenes. A lightweight network and zero-copy pipeline ensure near real-time operation on the edge. Finally, the output image for doctors to read provides comparison, thermal overlay, and ROI statistics, and can display parameters, ensuring reproducible results and traceable quality control. This reduces doctors' reliance on ambient light and experience, improving the consistency, reliability, and usability of clinical reading. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the structure of a tongue image enhancement system based on deep learning according to the present invention;

[0034] Figure 2 A flowchart illustrating the steps of a computer vision-based method for enhancing images used in traditional Chinese medicine visual diagnosis.

[0035] Figure 3 This is a schematic diagram of the tongue mask, tongue coating mask, background mask, and highlight mask of the present invention;

[0036] Figure 4 This is a schematic diagram of the doctor's reading interface of the present invention;

[0037] Figure 5 This is a flowchart illustrating a deep learning-based tongue image enhancement method according to the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Example 1. As... Figure 1 As shown, the present invention provides a tongue image enhancement system based on deep learning, which includes:

[0040] The acquisition and input module is used to receive the standardized acquired raw images of the tongue.

[0041] The preprocessing module is used for color space conversion and normalization to obtain a working color gamut image.

[0042] The tongue region analysis module is used to output tongue body mask, tongue coating mask, background mask, and highlight mask.

[0043] The low-light enhancement module, combined with prior knowledge of the tongue body mask and tongue coating mask areas, constrains the whiteness of the tongue coating to maintain consistency with the redness of the tongue body, thus inhibiting cross-staining.

[0044] The highlight suppression module performs residual repair on the highlight areas of the saliva mirror under the guidance of the background mask.

[0045] The post-processing and reading module is used to generate images for doctors to read.

[0046] The processor and memory module is used to store and execute the instructions and intermediate data structures of the above modules.

[0047] Further, the acquisition and input module, used to receive standardized acquired raw tongue images, includes: an image sensor interface (USB / CSI / Ethernet), a buffer and synchronization unit, and a calibration information parsing unit. The acquisition and input module supports 12-bit RAW, 10-bit YUV, and lossless JPEG formats for input, and synchronously reads exposure time, ISO, aperture / gain, lens ID, shutter speed, and device number. When a white balance reference or grayscale calibration exists, it automatically locates the reference area in the first frame / calibration frame, extracts the RGB equalization coefficient and correlated color temperature, generates a white balance reference and initial exposure value, and degenerates into a histogram and gray world estimate when no explicit parameters are available. The acquisition and input module performs integrity checks, timestamp and shooting pose recording, lens distortion / dark current marking, and sharpness, overexposure, and highlight ratio quality checks based on Laplacian variance and saturated pixel ratio on the raw tongue images; unqualified samples are prompted for re-sampling or marked with low confidence. Finally, the original tongue image, exposure parameters, white balance reference, and gray card calibration data are uniformly encapsulated into a standard input data structure, written into a circular buffer, and delivered to the preprocessing module via a message queue.

[0048] Further, the preprocessing module, used for color space conversion and normalization to obtain a working color gamut image, includes: after receiving the original tongue image and its metadata output by the acquisition and input module, the preprocessing module first completes decoding / de-mosaicing, black level correction, and compensation for bad pixels and lens shading. The camera's native color gamut is linearized to the working color gamut (preferably linear sRGB), and the display gamma is simultaneously removed to obtain a 0–1 normalized working color gamut image; subsequently, single-point / multi-point white balance calibration is performed on a gray card or reference white film: the reference area is automatically located in the calibration frame or the first frame, highlight and shadow outliers are removed, R / G / B channel gain and correlated color temperature (CCT) are calculated and a 3×3 color correction matrix is ​​generated, the global gain is output for single-point calibration, and the spatial gain field is fitted for multi-point calibration to correct non-uniform illumination; if explicit calibration is missing, backtracking estimation is performed using a gray world / skin color prior. After completing color space conversion and white balance, the preprocessing module outputs a uniform image with dynamic range compression based on luminance cropping at the 1%–99th percentile and soft roll-off to suppress overexposure. It also extracts indicators such as exposure time, ISO, sensor analog / digital gain, lens aperture, frame average luminance, histogram peak position, saturated pixel ratio, and estimated noise level (inferred from the ISO curve), and writes them together with white balance parameters, CCT, and color correction matrix into the enhanced metadata.

[0049] Further, the tongue region analysis module, used to output tongue body mask, tongue coating mask, background mask, and highlight mask, includes: the tongue region analysis module inputs the preprocessed working color gamut image into the first neural network to obtain the tongue body mask, tongue coating mask, background mask, and highlight mask. The first neural network adopts a lightweight U-Net structure, with an encoder depth of 4 and a channel configuration of {32, 64, 128, 256}, and a symmetrical decoder connected to each level of features via jumpers; the convolutional units of the first neural network are preferably 3×3 depthwise separable convolutions + 1×1 pointwise convolutions to reduce the number of parameters, activation uses Leaky-ReLU or GELU, and normalization uses group normalization to adapt to mini-batch training. To improve boundary quality, a "boundary refinement layer" is added after decoding. This layer works in conjunction with dilated convolution (with a dilation rate of 2) and guided edge branches. The edge branches are generated by fusing gradient maps extracted by the Laplacian operator with the high-level semantics of the encoder to produce boundary attention maps. These maps apply channel and spatial weighting to the decoded features, achieving sub-pixel-level correction at the tongue edge and cracks. The first neural network has four parallel multi-task heads at its end, outputting confidence maps for the tongue mask, tongue coating mask, background mask, and specular mask, respectively, activated by the Sigmoid algorithm. The loss function uses a BCE+Dice hybrid approach, introducing learnable class weights to address class imbalance. Boundary pixels are additionally superimposed with a distance transformation boundary loss to constrain contour fit. The specular branch also incorporates prior consistency regularization for saturation and brightness to improve sensitivity to saliva specular reflection. The input to the first neural network during training is standardized to 640×640, and enhancement strategies such as random affine transformation (rotation, scaling, translation), elastic deformation, color perturbation, and contrast jitter are employed. The optimizer used is AdamW with an initial learning rate of 1e-3, and early stopping is based on the Dice metric of the validation set. During inference, four confidence maps are first output and temperature-calibrated. Then, a binary mask is obtained using the Otsu / threshold upper limit adaptive method, combined with morphological opening and closing operations, maximum connected component filtering, and small-hole filling to remove pseudo-segments. The tongue mask prioritizes maintaining connectivity and constrains the smoothness of the circumscribed contour; the tongue coating mask undergoes secondary refinement within the background mask to suppress "coating overflow"; and the highlight mask is cross-validated with the brightness peak histogram and local reflectivity inconsistency detection results to improve reliability. The tongue region analysis module ultimately outputs four types of masks along with their corresponding confidence scores and boundary lines for subsequent region perception enhancement and highlight suppression.

[0050] Furthermore, the low-light enhancement module, combining prior knowledge of the tongue body mask and tongue coating mask regions, constrains the whiteness of the tongue coating to maintain consistency with the redness of the tongue body, suppressing cross-coloration. This includes: the low-light enhancement module comprising an illumination curve estimation branch, a tongue region color decolorization branch, and a branch fusion unit. The illumination curve estimation branch takes the preprocessed working color gamut image as input, and uses a second neural network to predict high-order correction curve parameters and optional channel gating coefficients pixel-by-pixel to generate an exposure gain map and complete referenceless exposure correction. The second neural network employs a lightweight encoder and shallow decoder structure. The encoder has four stages with channels {32, 64, 128, 256}. Each stage consists of a DWConv+PWConv residual block and SE attention, with a stride of 2 for downsampling. The top layer uses ASPP-lite and global average pooling to obtain the scene descriptor. The decoder performs three upsampling steps and fuses with skip-connected features. Each stage generates FiLM affine modulation from the scene descriptor and metadata via MLP for adaptive modulation. The parameter header uses a 1×1 convolutional branch to output 2-8 order curve parameters per pixel and channel gating g, and uses TV regularization to constrain parameter graph smoothing. The second neural network outputs both per-pixel parameter tensors and scene-level exposure descriptors to adjust curve intensity. The curves act on pixels recursively, satisfying monotonicity and pixel value range constraints. The training of the second neural network employs a two-stage strategy: The first stage involves pre-training on paired low / normal illumination data such as the low-light image dataset (LOw-Light), using only the exposure control loss function, color constancy loss function, and illumination smoothing loss function to learn a stable exposure-contrast mapping. The second stage uses a tongue image dataset (containing tongue body masks, tongue coating masks, highlight masks, and annotations) for transfer learning, incorporating discoloration consistency loss and highlight consistency loss to adapt the semantics of the tongue region. The optimizer uses AdamW (weight decay 1×10⁻⁶). -4 ), initial learning rate Combining cosine annealing or One-Cycle scheduling, the batch size adapts between 8 and 32 based on the explicit existence.

[0051] The tongue region color desaturation branch takes the preprocessed working color gamut image as input. Under the dual constraints of the tongue body mask and the tongue coating mask, it performs reflectivity and illumination separation, and performs regionalized chromaticity decoupling within the HSV color space to suppress the mutual staining between the red of the tongue body and the white of the tongue coating. The tongue region color desaturation branch first divides the working color gamut image into tongue body region and tongue coating region based on the tongue body mask and the tongue coating mask, and loads two types of priors: a prior distribution of redness and saturation is established with the tongue body region as the main body, and a prior distribution of whiteness and neutral hue is established with the tongue coating region. At the same time, the specular mask is used as a protective layer to shield the specular reflection of saliva. The original tongue image is then transferred to HSV space. Priority is given to limiting the hue convergence and saturation upper limit of the tongue coating area, while the saturation and brightness of the tongue body area are increased in tandem to ensure that the redness enhancement does not exceed the limits. A priori assumption of "tongue body leaning red, tongue coating leaning neutral white" is established. A light reflection and illumination separation is performed, ensuring that subsequent color adjustments primarily affect the reflective components rather than the illumination components. Within the tongue coating area, the color desaturation branch applies a neutral prior by introducing two types of constraints: "whiteness preservation" and "hue convergence," converging pixel chromaticity towards the neutral axis and adjusting saturation... The brightness and local contrast are set to an upper limit to suppress over-enhancement, while guided filtering or bilateral filtering is combined to achieve texture fidelity, thereby avoiding excessive smoothing of details while improving visual consistency. In the tongue area, the color desaturation branch follows the processing sequence of "first increasing brightness and local contrast, then gradually enhancing redness", applying controlled gain only to the redness-related chromaticity components, and combining saturation peak constraints and skin color priors to suppress oversaturation and false color generation, thereby maintaining the stability and physiological rationality of color enhancement while ensuring improved visual recognition. To suppress chromatic crosstalk at the boundary between the tongue body region and the tongue coating region, the color desaturation branch constructs a boundary band based on the tongue body mask, tongue coating mask, and highlight mask of the partitioning results (obtained by morphological dilation of the union of the tongue body mask and the tongue coating mask), and uses boundary-guided structure-preserving filtering (structure-preserving operators represented by guided filtering / bilateral filtering) to smooth the chromatic residuals within the boundary band; the distance from each pixel in the tongue image to the boundary line between the tongue body region and the tongue coating region is calculated to form a distance map: when Euclidean distance is used, the distance is the straight-line pixel interval from the pixel to the boundary; when geodesic distance is used, the distance is measured along the structure and texture of the image. The distance map is then monotonically mapped to attenuation weights, with smaller weights closer to the boundary line and larger weights farther from the boundary line. Subsequently, the attenuation weights are used to tighten the chroma gain on both sides of the boundary line (tongue body side and tongue coating side), which limits the range of color adjustment and reduces the risk of redness leaking into the tongue coating and whiteness invading the tongue body. Pixels closer to the boundary line (small weight) are only allowed to have very small color stretching to prevent redness from "seeping" from the tongue body to the tongue coating or whiteness from "invading" from the tongue coating into the tongue body; pixels farther from the boundary line (large weight) are allowed to have normal or larger color adjustments.

[0052] After completing independent color correction for each region, the branch fusion unit synthesizes the multiple candidate results into a single enhanced image with pixel-level weights. It introduces an adaptive weighting strategy based on segmentation confidence as a priori: using the continuous confidence map output by the first neural network as the weight map, it performs pixel-level confidence fusion of the chromaticity control results for the tongue body and tongue coating, supplemented by a Laplacian pyramid transition to reduce stitching marks. The color desaturation branch and the illumination curve estimation branch are linked through a gating mechanism: under the premise that the exposure gain is determined, only secondary correction of chromaticity and micro-brightness is performed to avoid conflicting adjustments to the brightness of the same pixel; when the global exposure is too high or the local contrast of the boundary band increases sharply, the gating automatically lowers the upper limit of chromaticity gain to maintain stability. Online quality monitoring calculates the chromaticity variance in the tongue coating region and tracks the redness index in the tongue body region. Once a trend of reddening of the tongue coating or fading of the tongue body is detected, a fallback strategy is immediately triggered: reducing the chromaticity gain of the corresponding region, increasing the constraint strength for maintaining whiteness or redness consistency, and enabling a threshold and time window with hysteresis to suppress oscillations. Finally, the color desaturation branch output is fused with the global enhancement results based on region confidence, under the constraints of "neutral and convergent tongue coating and discernible redness of the tongue body". To improve robustness, the boundary band is implemented using a small-kernel separable convolution and a GPU kernel optimized for shared memory to ensure real-time performance. At the same time, all control parameters and statistics are written into the case metadata for consistent presentation and traceable reproducibility across terminals.

[0053] The multi-path candidate results include a tongue body correction image, a tongue coating correction image, a background preservation image, an exposure enhancement base image, and highlight processing candidates. The tongue body correction image is a regionalized correction result performed within the tongue body mask area, which first enhances local brightness and micro-contrast, then steadily increases redness and limits saturation. The tongue coating correction image is a regionalized correction result within the tongue coating mask area after maintaining whiteness, converging hues, and constraining the upper limit of saturation. The background preservation image is a preservation result with only color constancy and mild noise reduction / equalization within the background mask area to avoid over-processing non-diagnostic areas. The exposure enhancement base image is derived from the global low-light enhancement result of the illumination curve estimation branch and serves as the "carrying base image" for the color desaturation branch. The highlight processing candidates are two types of candidates, "repaired version" and "preserved version," generated by the highlight suppression module for the highlight mask area, and are used for selection based on confidence during fusion.

[0054] Furthermore, the highlight suppression module performs residual repair on the specular highlight areas of saliva under the guidance of the background mask. This includes a detection branch, a decomposition branch, a repair branch, and a backfilling branch. The detection branch combines brightness peaks, saturation reduction, gradient abrupt changes, and specular morphology priors to output a continuously confident highlight mask and highlight intensity map, and estimates local reflection components. The decomposition branch distinguishes between specular and diffuse reflection components of pixels and identifies "high-brightness but not specular" areas such as tongue coating under the constraint of the tongue / tongue coating mask, avoiding misjudgment and over-suppression. The repair branch employs guided filling: guided by neighborhood structural lines (tongue edge, cracks, teeth marks) and texture samples, it first reconstructs the geometric structure, then replenishes detailed textures and low-frequency tones. During this process, boundary gradient consistency and color consistency constraints are superimposed to suppress halos and color shifts. The backfilling branch weights and fuses the repair result with the original image according to confidence level, performs residual suppression on residual highlights and sets amplitude limit, and performs small-scale multi-scale iterations when necessary to improve smooth transition. Finally, the highlight suppression module performs color constancy and contrast calibration on the repaired area, outputs the suppressed image, and writes the highlight mask, repair parameters and residual energy into metadata for consistent reproduction by subsequent enhancement links and doctors' reading terminals.

[0055] Furthermore, the post-processing and reading module, used to generate images for the doctor's reading end, includes: the post-processing and reading module taking the enhancement results, mask, and metadata as input to generate an output image for the doctor to read, such as... Figure 4 As shown, the system supports side-by-side comparison of the original and enhanced images within the same view, as well as sliding comparison using a "wiping bar." It overlays heatmaps of the tongue body, tongue coating, highlight contours, and enhanced intensity, providing regional statistics and annotations under arbitrary zoom levels. Statistical items include brightness, contrast, color difference, and histogram overview. Doctors can switch to the "standard light" viewing mode with one click to stabilize the display and lock the current parameters as a case template for reproduction. The post-processing and reading module supports longitudinal comparison of multiple cases and comparison of the same case at different time points. It can display the current curve intensity, color constraint, and highlight restoration status on the ROI and write these parameters, along with the version number, device information, and timestamp, into the exported report (PDF / image) for archiving and quality control. To avoid misreading, the interface has built-in color consistency prompts and oversaturation warnings, and can revert to a more conservative enhancement configuration with one click when necessary.

[0056] Furthermore, the processor and memory module, used to store and execute the instructions and intermediate data structures of the aforementioned modules, includes: the processor and memory module carries and executes end-to-end instructions and intermediate data; the processor can be an edge AI SoC (ARM+NPU) or x86+GPU, with an embedded Linux / Windows operating system; the memory includes on-chip cache, main memory (LPDDR4 / DDR4), and non-volatile memory (eMMC / SSD). The intermediate data structure uses a zero-copy shared memory organization as a circular buffer to uniformly manage the original tongue image, working color gamut image, tongue mask / tongue coating mask / highlight mask, exposure gain map, enhanced image, output image for doctor's reading, and curve parameters, color threshold, model weights, and version number.

[0057] Example 2. (As shown) Figure 5 As shown, this invention provides a tongue image enhancement method based on deep learning, comprising the following steps:

[0058] Step 1: Receive the original image of the tongue.

[0059] Step 2: Obtain the tongue mask, tongue coating mask, background mask, and highlight mask through the tongue region analysis module.

[0060] Step 3: Calculate the exposure gain map by estimating the branch of the illumination curve and adjust the brightness of the working color gamut image.

[0061] Step 4: Perform reflectivity-illumination separation and color decoupling under the constraints of tongue body mask and tongue coating mask, and output the destaining results.

[0062] Step 5: Based on the mask and confidence level, fuse the results of Step 3 and Step 4 to obtain the enhanced image.

[0063] Step 6: Perform specular suppression and structural consistency restoration in the specular mask area.

[0064] Step 7: Output the image and visualization overlay information on the doctor's reading end.

[0065] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0066] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A tongue image enhancement system based on deep learning, characterized in that, include: The acquisition and input module is used to receive the standardized acquired raw images of the tongue. The preprocessing module is used for color space conversion and normalization to obtain a working color gamut image; The tongue region analysis module is used to output tongue body mask, tongue coating mask, background mask, and highlight mask; The low-light enhancement module, combined with prior knowledge of the tongue body mask and tongue coating mask areas, constrains the whiteness of the tongue coating to maintain consistency with the redness of the tongue body, thus inhibiting cross-staining. The highlight suppression module performs residual repair on the highlight areas of the saliva mirror under the guidance of the background mask; The post-processing and reading module is used to generate images for the doctor's reading end; The processor and memory module is used to store and execute the instructions and intermediate data structures of the above modules; The low-light enhancement module includes an illumination curve estimation branch, a tongue region color desaturation branch, and a branch fusion unit. The tongue region color desaturation branch takes the working color gamut image as input and partitions the working color gamut image into a tongue region and a tongue coating region based on the tongue body mask and tongue coating mask. The tongue region color desaturation branch constructs a boundary band based on the partitioning results to suppress color intercoloration at the boundary between the tongue body region and the tongue coating region. It also uses boundary-guided structure-preserving filtering to smooth the color residuals within the boundary band. It calculates the distance from each pixel in the tongue image to the boundary line between the tongue body region and the tongue coating region to form a distance map. The distance map is then monotonically mapped to attenuation weights. Subsequently, the attenuation weights are used to tighten the color gain on both sides of the boundary line to reduce the risk of redness leaking into the tongue coating and whiteness invading the tongue body. The structure-preserving filtering uses structure-preserving operators such as guided filtering or bilateral filtering.

2. The tongue image enhancement system based on deep learning according to claim 1, characterized in that... The tongue region color desaturation branch establishes a priori distributions of redness and saturation primarily in the tongue body region, and a priori distributions of whiteness and neutral hue in the tongue coating region. Simultaneously, a specular mask is used as a protective layer to shield against specular reflections from saliva. Subsequently, the original tongue image is transferred to HSV space, prioritizing hue convergence and saturation limits in the tongue coating region, while simultaneously enhancing saturation and brightness in the tongue body region to ensure redness enhancement does not exceed limits. This establishes a priori assumptions of a reddish tongue body and a neutral white tongue coating. A light separation of reflectivity and illumination is performed, ensuring subsequent color adjustments primarily affect reflective components rather than illumination components. Within the tongue coating region, the tongue region... The color desaturation branch applies a neutral prior by introducing two types of constraints: whiteness preservation and hue convergence. This converges pixel chromaticity toward the neutral axis and sets upper limits on saturation and local contrast to suppress over-enhancement. It also combines guided filtering or bilateral filtering to achieve texture fidelity, thereby avoiding excessive smoothing of details while improving visual consistency. In the tongue region, the tongue region color desaturation branch follows a processing sequence of first enhancing brightness and local contrast, and then gradually enhancing redness. It applies controlled gain only to redness-related chromaticity components and combines saturation peak constraints and skin tone priors to suppress the mutual staining between the red of the tongue and the white of the tongue coating.

3. The tongue image enhancement system based on deep learning according to claim 2, characterized in that... The illumination curve estimation branch takes the preprocessed working color gamut image as input and consists of high-order correction curve parameters of the second neural network predicting the order pixel by pixel, as well as optional channel gating coefficients. It is used to generate an exposure gain map and complete no-reference exposure correction. The branch fusion unit synthesizes the multi-path candidate results into a single enhanced image according to pixel-level weights and introduces an adaptive weighting strategy with segmentation confidence as a priori: the continuous confidence map output by the first neural network is used as a weight map to perform pixel-level confidence fusion of the color control results of the tongue body and tongue coating, and is supplemented by Laplacian pyramid transition to reduce suture scars.

4. The tongue image enhancement system based on deep learning according to claim 1, characterized in that, The acquisition and input module includes an image sensor interface, a buffer and synchronization unit, and a calibration information parsing unit. It synchronously reads exposure time, ISO, lens ID, and shutter speed, performs integrity verification, timestamp recording, distortion or dark current marking, and sharpness, overexposure, and highlight ratio quality checks on the samples. It encapsulates the image, white balance reference, and gray card calibration data into a standard input data structure and writes it into a circular buffer.

5. The tongue image enhancement system based on deep learning according to claim 1, characterized in that... The preprocessing module linearizes the camera's native color gamut to linear sRGB, performs black level correction, dead pixel and lens shading compensation, and calculates RGB gain and a 3×3 color correction matrix under gray card or reference white film calibration. For missing calibration, gray world or skin color prior estimation is used. Based on 1%–99% quantile brightness cropping and soft roll-off to suppress overexposure, a dynamic range compressed image is output. At the same time, the exposure time, ISO, analog or digital gain, aperture, frame average brightness, histogram peak position, saturated pixel ratio, estimated noise level, CCT and color correction matrix are written into the enhanced metadata.

6. The tongue image enhancement system based on deep learning according to claim 1, characterized in that... The detection branch of the highlight suppression module generates a highlight confidence map and a highlight intensity map by integrating the brightness peak, saturation reduction and gradient abrupt change features; the decomposition branch distinguishes between specular reflection and diffuse reflection components and avoids misjudging bright but non-specular white coating areas as highlights under the constraint of tongue body or tongue coating mask; the repair branch uses tongue edge, crack or tooth mark structure lines and texture samples as guides to first reconstruct geometry and then fill in texture; the backfilling branch merges with the original image according to confidence and performs amplitude limiting and small-scale multi-scale iteration on residual highlights.

7. The tongue image enhancement system based on deep learning according to claim 1, characterized in that... The post-processing and reading module is configured to provide original or enhanced images side-by-side with a wiping strip for comparison in a single view, and to overlay tongue body, tongue coating, highlight contours, and enhanced intensity heatmaps; to output ROI statistics at any magnification, and to support standard light viewing mode, case template parameter locking, and PDF or image export with device information, timestamps, and version numbers.

8. The tongue image enhancement system based on deep learning according to claim 1, characterized in that... The processor and memory module includes an edge AI SoC with an embedded Linux operating system; intermediate data is organized in a zero-copy shared memory as a circular buffer, which uniformly manages the original tongue image, working color gamut image, various masks, exposure gain map, enhanced image, reading end output, model weights and version number.

9. A method for tongue image enhancement based on deep learning, characterized in that, The tongue image enhancement system based on deep learning, as described in any one of claims 1-8, comprises the following steps: Step 1: Receive the original image of the tongue; Step 2: Obtain the tongue mask, tongue coating mask, background mask, and highlight mask through the tongue region analysis module; Step 3: Calculate the exposure gain map by estimating the branch of the illumination curve and adjust the brightness of the working color gamut image; Step 4: Under the constraints of tongue body mask and tongue coating mask, reflectivity-illumination separation and color decoupling are performed, and the destaining results are output. Step 5: Based on the mask and confidence level, fuse the results of Step 3 and Step 4 to obtain the enhanced image; Step 6: Perform specular suppression and structural consistency restoration in the specular mask area; Step 7: Output the image and visualization overlay information on the doctor's reading end.

Citation Information

Patent Citations

  • Chip defect detection method and system based on Gaussian attention mechanism

    CN120689302A

  • Infrared thermal imaging gas leakage image recognition and positioning method based on deep learning

    CN120808006A