A tongue image recognition method and system based on a reparameterization multi-scale residual network

CN123015521APending Publication Date: 2026-10-30XIJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611378032.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

在推动舌诊客观化、数字化和智能化方面发挥了一定作用,但仍存在以下不足:一方面,部分方案依赖服务器或云端平台进行图像处理和模型推理,需要将用户原始舌象图像上传至远程端,存在网络依赖强、响应延迟高和隐私泄漏风险,特别是现在的网络防火墙会自动认定舌象图像不通过而无法上传;另一方面,部分舌诊设备结构相对复杂,硬件成本较高,对采集环境、存储空间、计算资源和持续供电能力要求较高,不利于家庭、社区、基层医疗和教学演示等场景的低成本部署

Benefits of technology

本发明针对舌象图像中细小纹理易丢失、不同层级特征利用不充分以及模糊边界定位偏差的问题,对YOLO26舌象识别模型的主干特征提取网络、特征融合网络和检测头进行协同改进。其中,在主干特征提取网络中设置Rep-ELAN舌象重参数化轻量卷积模块,使浅层和中层特征通过3×3卷积、1×1卷积、1×3非对称卷积、3×1非对称卷积及恒等映射分支,对舌面局部纹理、颜色通道、横纵方向边缘及原始特征进行互补提取;深层特征则通过SPPF模块扩大有效感受范围,并通过C2PSA模块增强不同空间位置之间的关联表达。之后再次进入Rep-ELAN舌象重参数化轻量卷积模块对特征进行提取。在此基础上,HFGS-AF模块分别提取浅层高频细节、保留中层结构特征并获取深层全局语义,根据当前舌象图像动态生成不同层级特征的融合权重,使局部裂纹、齿痕、红点等细节信息与舌体整体形态、舌苔分布等全局信息得到有效融合;进一步通过LRDBR局部残差分布边界修正检测头,先获得初始边界框,再根据边界附近的局部残差概率对左、上、右、下四条边进行精细修正,从而有利于提高模型对不同尺度、不同形态以及低对比度舌象特征的识别和定位能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015521A_ABST
    Figure CN123015521A_ABST
Patent Text Reader

Abstract

The application discloses a tongue image recognition method and system based on a reparameterization multi-scale residual network, and the system comprises a tongue image acquisition module, a light edge device, a model training and data management end and an edge model updating module; the light edge device is deployed with a tongue image optimization module, a YOLO26 light tongue image recognition module, an auxiliary analysis module, a privacy protection desensitization data management module and a local display interaction module. The method collects tongue original images and sends the tongue original images into the light edge device, qualified images are input into a recognition module after image optimization processing, tongue categories, confidence and a boundary box are output, and an auxiliary recognition result containing daily conditioning and protection suggestions is generated. After obtaining user authorization, desensitization structured records are generated and uploaded to the management end after encryption. The application realizes localized intelligent tongue diagnosis analysis without relying on the cloud under the premise of protecting user privacy, and can support daily self-testing of the public, grass-roots deployment and long-term continuous health observation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of artificial intelligence, edge computing, image processing and traditional Chinese medicine tongue image recognition technology, specifically involving a tongue image recognition method and system based on reparameterized multi-scale residual networks. Background Technology

[0002] Tongue diagnosis is an important component of traditional Chinese medicine's observational diagnosis. Doctors typically observe tongue characteristics such as color, coating, shape, cracks, teeth marks, and peeling to aid in assessing a person's health status and analyzing health trends. Tongue appearance can reflect changes in a person's condition to a certain extent and is intuitive, convenient, and non-contact, making it suitable for daily health observation and auxiliary analysis in traditional Chinese medicine. However, traditional tongue diagnosis relies heavily on the doctor's experience. Developing the ability to identify tongue appearances in traditional Chinese medicine requires a long period of learning and practical experience. Non-professional users often find it difficult to accurately understand changes in tongue appearance and to obtain timely and standardized health information from tongue appearances when there are no obvious symptoms of disease.

[0003] As residents become more health-conscious, an increasing number of users hope to understand changes in their health status by conducting daily tongue self-tests at fixed times in their homes, communities, primary healthcare settings, or educational settings. They also seek guidance and support for managing their condition before it necessitates medical attention. However, current methods of manual tongue diagnosis typically require face-to-face assessment by a professional TCM practitioner. Users need to visit hospitals or clinics, resulting in high time costs, limited service resources, and difficulties in continuous follow-up, hindering the widespread adoption of tongue diagnosis technology in public health management settings.

[0004] In recent years, artificial intelligence, image processing, and deep learning technologies have been gradually applied to the field of tongue image recognition. While these technologies have played a role in promoting the objectification, digitization, and intelligence of tongue diagnosis, the following shortcomings remain: Firstly, some solutions rely on servers or cloud platforms for image processing and model inference, requiring the upload of the user's original tongue image to a remote location. This presents risks of strong network dependence, high response latency, and privacy leaks, especially since current network firewalls automatically reject tongue images and prevent uploads. Secondly, some tongue diagnosis devices have relatively complex structures and high hardware costs, requiring high levels of resources in the acquisition environment, storage space, computing resources, and continuous power supply, making them unsuitable for low-cost deployment in scenarios such as homes, communities, primary healthcare, and educational demonstrations. Furthermore, existing tongue image recognition models often have a large number of parameters and computational demands. Direct deployment on low-power devices such as Raspberry Pi, embedded AI development boards, or edge computing boxes, which are convenient for the general public to carry and use, can easily lead to slow inference speeds, overheating, high power consumption, and insufficient operational stability. Summary of the Invention

[0005] The purpose of this invention is to provide a tongue image recognition method and system based on reparameterized multiscale residual networks, which enables localized intelligent tongue diagnosis analysis that is independent of cloud reliance while protecting user privacy. This method can support daily self-testing, grassroots deployment, and long-term continuous health monitoring.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A tongue image recognition system based on a reparameterized multi-scale residual network includes a tongue image acquisition module, a lightweight edge device, a model training and data management terminal, and an edge model update module. The lightweight edge device is configured with a tongue image optimization module, a YOLO26 lightweight tongue image recognition module, an auxiliary analysis module, a privacy protection and desensitized data management module, and a local display and interaction module. The YOLO26 lightweight tongue image recognition module is built based on an improved YOLO26 tongue image recognition model, including a backbone feature extraction network (Backbone), a feature fusion network (Neck), and a multi-scale detection head (Head). The backbone feature extraction network includes multiple convolutional layers (Conv) and multiple C3 layers. The network comprises a C3k2 feature extraction module, multiple Rep-ELAN heavily parameterized lightweight feature convolutional modules, a spatial pyramid pooling module (SPPF), and a channel position self-attention module (C2PSA). The tongue image is first input to the convolutional layer (Conv) of the backbone feature extraction network. After initial feature extraction and downsampling by the Conv, the image sequentially passes through multiple C3k2 feature extraction modules. At the output of each of the C3k2 feature extraction modules at different levels, a Rep-ELAN heavily parameterized lightweight feature convolutional module is set. This module is used to extract tongue surface texture, crack direction, tooth mark edges, and tongue contour features through a multi-branch convolutional structure during model training, and to transform these features during model deployment. It is a single-branch convolutional structure; the Spatial Pyramid Pooling Module (SPPF) is located deep within the Backbone feature extraction network, and the Channel Position Self-Attention Module (C2PSA) is located at the output of the SPPF. The Backbone outputs shallow, mid, and deep features respectively, and inputs these features into the Neck feature fusion network. The Neck feature fusion network includes an Upsample layer, a Concat layer, a C3k2 feature fusion module, a Convolutional Downsampled Layer (Conv), and an HFGS-AF module; wherein HFGS-AF... Module F includes a high-frequency detail extraction branch, a high-frequency detail extraction unit, a mid-level structure enhancement branch, a global semantic extraction branch, a fully connected layer, and an adaptive fusion weight generation unit. The feature fusion network Neck first adopts a top-down feature propagation path to upsample deep low-resolution features and concatenate them with mid-level or shallow features from the backbone feature extraction network Backbone to obtain fused features with strong semantic information and high spatial resolution. Subsequently, the feature fusion network Neck adopts a bottom-up feature propagation path to convolutionally downsample the fused features and concatenate and refine them again with features of adjacent scales, thereby enhancing the information transfer between features of different scales.The HFGS-AF module receives shallow, mid-level, and deep features at different scales. It adaptively weights and fuses high-frequency details in the shallow features, global semantics in the deep features, and mid-level structural features, outputting an enhanced multi-scale detection feature map. The multi-scale detection head includes a Detect module for decoding the detection results of the LRDBR local residual distribution boundary refinement detection head and a C3k2 feature refinement module. Each LRDBR detection head includes a classification branch, a coarse localization regression branch, and a local residual distribution branch. For each scale's detection feature map, it is first refined by the C3k2 module and then input into the LRDBR local residual distribution branch. The residual distribution boundary refinement detection head performs boundary regression and classification prediction on the input features, outputting an initial bounding box and category information. It then predicts the local residual distribution on all four sides of this initial bounding box, calculating the correction amount to obtain the final bounding box. Finally, the Detect module decodes, filters, and merges the category prediction results and bounding box prediction results to form the final tongue image feature recognition result. The privacy protection and desensitized data management module, with user authorization, removes the original tongue image and various identity-related information, extracts the tongue image feature category, category confidence, and final bounding box coordinates to generate a desensitized structured record, which is transmitted to the model training and data management terminal via encrypted communication.

[0007] Furthermore, the specific process of building the improved YOLO26 tongue recognition model is as follows: Step 1: Acquire the tongue image to be identified using a camera, or read the tongue image from the local memory of a lightweight edge device; perform quality judgment, cropping of the tongue's region of interest, size adjustment, pixel normalization, and tensor transformation on the tongue image to obtain a tongue image that meets the input requirements of the improved YOLO26 model; Step 2: Input the preprocessed tongue image into the Backbone feature extraction network. The convolutional layer and C3k2 feature extraction module perform stepwise downsampling and layered feature extraction. The features at different stages are input into the Rep-ELAN module. Then, the Rep-ELAN module uses a single equivalent 3×3 convolution formed after reparameterization to extract tongue surface texture, crack direction, tooth mark edge and tongue body contour features. Step 3: Input the deep features output by Backbone into the SPPF module and C2PSA module in sequence. The effective perception range of deep features is expanded by the continuous max pooling and feature concatenation of the SPPF module. Then, the self-attention mechanism of the C2PSA module is used to enhance the feature association between different spatial locations, thereby enhancing the deep features related to the overall tongue area, tongue coating distribution and tongue morphology. Step 4: Input the different levels of tongue features output by the Backbone feature extraction network into the Neck feature fusion network. Through upsampling, feature concatenation, C3k2 feature fusion and convolutional downsampling operations, multi-scale feature transfer is performed sequentially from top to bottom and from bottom to top to form high-resolution intermediate features N3, medium-resolution intermediate features N4 and low-resolution intermediate features N5. Step 5: Input the high-resolution intermediate feature N3, medium-resolution intermediate feature N4, and low-resolution intermediate feature N5 into the HFGS-AF module; extract high-frequency detail information from the high-resolution intermediate feature, structural information from the medium-resolution intermediate feature, and global semantic information from the low-resolution intermediate feature through the HFGS-AF module; generate corresponding adaptive weights based on the high-frequency detail information, structural information, and global semantic information; and perform weighted modulation on the intermediate features at the three scales respectively to obtain high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5. Step 6: Input the high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5 into the LRDBR detection head respectively; obtain the tongue image feature category probability through the classification branch, obtain the initial bounding box parameters through the coarse localization regression branch, obtain the candidate residual probabilities of the left boundary, upper boundary, right boundary, and lower boundary corresponding to the initial bounding box parameters through the local residual distribution branch, and calculate the boundary correction amount based on each candidate residual offset and its corresponding candidate residual probability to obtain the final bounding box; Step 7: Decode and merge the tongue image feature category probabilities and final bounding boxes output by the three detection scales P3, P4 and P5, delete candidate results with category confidence below a preset threshold, and perform duplicate bounding box suppression on candidate results with the same category and bounding box overlap exceeding a preset threshold. Step 8: According to the scaling ratio and cropping position between the model input image and the original tongue image, restore the filtered bounding box to the coordinate system of the original tongue image, output the tongue image feature category, category confidence, final bounding box coordinates and corresponding feature attributes, and send the recognition result to the auxiliary analysis module to generate tongue image auxiliary recognition result.

[0008] Furthermore, the high-resolution detection feature P3, the medium-resolution detection feature P4, and the low-resolution detection feature P5 are generated through the following steps: Step 1: Obtain the high-resolution intermediate features N3, medium-resolution intermediate features N4, and low-resolution intermediate features N5 formed by the Neck front-end structure of the feature fusion network, and input them into the corresponding 1×1 convolutional layers respectively; Step 2: Adjust the channel dimensions of N3, N4, and N5 using three 1×1 convolutional layers respectively to obtain channel-aligned features A3, A4, and A5: in, This represents a 1×1 convolution operation; Step 3: Input the high-resolution feature A3 into the high-frequency detail-guided extraction branch, and perform local average pooling on A3 to obtain the local smoothing feature L3: Where AvgPool represents a local average pooling operation, and the feature space size remains the same before and after pooling; The high-frequency residual feature R3 is obtained by differentiating A3 from the local smoothing feature L3: R3 is input into the high-frequency detail extraction unit for feature transformation to obtain shallow high-frequency guiding features H3: Step 4: Use the channel-aligned medium-resolution feature A4 as the mid-level structure feature, and enter the mid-level structure enhancement branch to perform global feature description on A4 to obtain the mid-level structure description feature M4: Where (GAP) represents the global average pooling operation; Step 5: Input the channel-aligned low-resolution feature A5 into the global semantic extraction branch, and obtain the global context feature G5 through global average pooling. The global context feature G5 is input into the fully connected layer for semantic mapping to obtain the deep semantic embedding feature S5: Where FC represents a fully connected mapping operation; Step 6: Perform global feature description on the shallow high-frequency guiding feature H3 to obtain the shallow high-frequency description feature D3: The shallow high-frequency descriptive features D3, the mid-level structural descriptive features M4, and the deep semantic embedding features S5 are concatenated and input into the adaptive fusion weight generation unit. Wherein, Concat represents the feature concatenation operation; The adaptive fusion weight generation unit generates weight scores corresponding to three scales based on the concatenated feature Z, and normalizes them using the Softmax function to obtain adaptive weights. , and : WeightGen represents the adaptive fusion weight generation operation. , and These correspond to three scales: high resolution, medium resolution, and low resolution, respectively, and satisfy the following conditions: Step 7: Utilize adaptive weights , and Weighted modulation is performed on the channel-aligned A3, A4, and A5 respectively to output high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5: in, This represents the multiplication operation between the adaptive weights and the corresponding scale features.

[0009] Furthermore, the specific steps of the Rep-ELAN tongue image reparameterization lightweight convolution module include: Step 1: Obtain the tongue image feature maps output by different levels of the Backbone feature extraction network, and input the tongue image feature maps into the corresponding Rep-ELAN reparameterized lightweight feature convolution modules; wherein, the first Rep-ELAN module receives the shallow tongue image features output by the shallow C3k2 feature extraction module, the second Rep-ELAN module receives the mid-level tongue image features output by the mid-level C3k2 feature extraction module, and the third Rep-ELAN module receives the deep semantic features output by the C2PSA module; Step 2: During the model training phase, the input feature maps are processed in parallel through five parallel branches of the Rep-ELAN module. These five parallel branches include a 3×3 convolution branch, a 1×1 convolution branch, a 1×3 asymmetric convolution branch, a 3×1 asymmetric convolution branch, and an identity mapping branch. Each of the 3×3, 1×1, 1×3, and 3×1 asymmetric convolution branches includes sequentially connected convolutional layers and batch normalization layers. The 3×3 convolution branch is used to extract the tongue surface. Texture, cracks, red dots, tongue coating boundaries, and local contour features are analyzed. A 1×1 convolutional branch is used for channel dimension transformation and cross-channel information fusion. A 1×3 asymmetric convolutional branch enhances laterally extending cracks, tongue coating boundaries, and local lateral contour features. A 3×1 asymmetric convolutional branch enhances longitudinally extending cracks, tongue side contours, and teeth mark edge features. An identity mapping branch preserves input features. When the number of input channels in the identity mapping branch differs from the target number of channels, channel dimension matching is performed using a 1×1 projective convolution. Step 3: Adjust the feature maps output by the five branches to the same spatial size and number of channels, and add them element by element. Input the fusion result after addition into the activation function to obtain the output features of the Rep-ELAN module during the training phase. Then, backpropagate according to the loss function calculation result of the YOLO26 tongue recognition model to update the trainable parameters of each convolutional branch in the Rep-ELAN module until the model training is completed. Step 4: After model training is completed, equivalent parameter transformation is performed on the five parallel branches of the Rep-ELAN module. For the 3×3 convolution branch, 1×1 convolution branch, 1×3 asymmetric convolution branch, and 3×1 asymmetric convolution branch, the convolution parameters in each branch are fused with their corresponding batch normalization layer parameters to obtain the fused convolution kernel and fused bias for each branch, thereby converting the convolution operation and batch normalization operation in each branch during the training phase into an equivalent convolution operation. For the identity mapping branch, when the number of input channels is the same as the number of output channels and the stride is 1, the identity mapping is converted into the corresponding unit convolution kernel. When the identity mapping branch uses 1×1 projective convolution for channel dimension matching, the 1×1 projective convolution is converted into the corresponding equivalent convolution parameters. Step 4.1: Perform structural reparameterization on the Rep-ELAN module, converting the convolution kernels of each parallel branch into 3×3 convolution kernels: perform zero padding on the outer periphery of the convolution kernels of the 1×1 convolution branch to obtain the first 3×3 convolution kernel; perform zero padding on the top and bottom sides of the convolution kernels of the 1×3 asymmetric convolution branch to obtain the second 3×3 convolution kernel; perform zero padding on the left and right sides of the convolution kernels of the 3×1 asymmetric convolution branch to obtain the third 3×3 convolution kernel. Step 4.2: Convert the identity mapping branch into a fourth 3×3 convolution kernel: Set a unit value at the center position of the convolution kernel of the input channel and the corresponding output channel, and set the rest positions to zero, so that the identity mapping branch participates in the subsequent parameter fusion in the form of a 3×3 convolution. Step 4.3: Add the weight parameters of the original convolution kernel, the first 3×3 convolution kernel, the second 3×3 convolution kernel, the third 3×3 convolution kernel, and the fourth 3×3 convolution kernel of the 3×3 convolution branch element by element, and add the bias parameters of each branch to obtain an equivalent 3×3 fused convolution kernel and fused bias, which are used as the operation units of the Rep-ELAN module in the inference stage; The equivalent 3×3 convolution kernel and equivalent bias can be expressed as: In the formula, and These represent the equivalent 3×3 fused convolutional kernel and fused bias used for deployment after reparameterization; Q represents the set of each convolutional branch during the training phase. and represent the convolution kernel and bias obtained by fusing the convolution parameters and batch normalization parameters in the q-th convolutional branch, respectively; This represents a transformation operation that pads the outer edges with zeros and embeds a 3×3 convolution kernel according to the kernel size of the q-th convolution branch; and These represent the unit convolution kernel and corresponding bias obtained from the identity mapping branch transformation, respectively; by merging the above parameters, the multi-branch structure in the training phase is transformed into a single 3×3 convolution structure in the deployment phase; Step 5: In the model inference stage, construct an equivalent 3×3 convolutional layer using the equivalent 3×3 fusion convolutional kernel and the fusion bias, and replace the five parallel branches in the Rep-ELAN module with the serial connection structure of the equivalent 3×3 convolutional layer and the activation function to obtain the reparameterized single-branch Rep-ELAN module. Step 6: Deploy the model containing the reparameterized single-branch Rep-ELAN module to an edge computing device.

[0010] Furthermore, the specific steps of the LRDBR local residual distribution boundary correction detection head are as follows: Step 1: Input the detection features of the corresponding scale output by the C3k2 feature refinement module into the classification branch, and then perform feature extraction, normalization and nonlinear transformation through a 3×3 convolutional layer, a batch normalization layer and a SiLU activation layer. Finally, perform category dimension mapping through a 1×1 classification prediction convolutional layer to obtain the tongue image feature category score corresponding to each spatial location. Step 2: Perform probability transformation on the scores of the tongue image feature categories to obtain the probability distribution of one or more tongue image feature categories among tongue body, cracks, teeth marks, red spots, coating texture and coating color; Step 3: Obtain the initial bounding box parameters B0 through the convolutional layer in the coarse localization regression branch; Step 4: Determine the coarse localization region of the tongue image feature to be identified based on the initial bounding box parameters, and pass the initial bounding box parameters to the local residual distribution branch as the reference input for boundary refinement; Step 5: Set a preset number of candidate residual offsets in the neighborhood of the left, upper, right and lower boundaries of the initial bounding box parameters, respectively. Step 6: Determine the residual step size based on the downsampling factor corresponding to the current enhanced fusion feature, and map the candidate residual offset at the feature map scale to the original tongue image coordinate scale based on the residual step size to obtain the boundary correction amount at the original image scale. Step 7: Through the convolutional layer in the local residual distribution branch, output the original scores of the left boundary, upper boundary, right boundary and lower boundary at each candidate residual position respectively; Step 8: Perform Softmax normalization on the original residual scores of each candidate residual offset corresponding to each boundary to obtain the residual probability corresponding to each candidate residual offset; wherein, the sum of the residual probabilities of each candidate residual offset for the same boundary is 1. Step 9: Multiply each candidate residual offset of each boundary by its corresponding residual probability and sum them to obtain the left boundary residual correction, upper boundary residual correction, right boundary residual correction and lower boundary residual correction respectively. Step 10: Combine the left boundary residual correction amount, upper boundary residual correction amount, right boundary residual correction amount, and lower boundary residual correction amount in a preset order to obtain the boundary correction amount. The boundary correction amount The final bounding box is obtained by adding the initial bounding box parameter B0 output by the coarse localization regression branch. : In the formula, m represents the detection scale corresponding to P3, P4 or P5; e represents the left, top, right or bottom boundary; K represents the candidate residual position index set; This represents the predicted probability of the e-th edge at the k-th candidate residual position in the m-th detection scale. This represents the residual offset after mapping the corresponding candidate residual position to the coordinate scale of the original tongue image; This represents the continuous boundary correction obtained by calculating the probability expectation of the candidate residual positions; This represents the boundary correction vector consisting of the correction values ​​of the four edges; and These represent the initial bounding box and the final bounding box after refinement, respectively.

[0011] Furthermore, the specific processing procedure of the privacy protection and de-identified data management module is as follows: Step 1: The original tongue image acquired by the tongue image acquisition module, the tongue feature categories and category confidence levels obtained by the YOLO26 lightweight tongue image recognition module, and the tongue feature analysis results and auxiliary suggestions obtained by the auxiliary analysis module are aggregated into input data. Sensitive information is identified through the privacy protection and desensitized data management module, and the identified sensitive information is marked as data to be desensitized. The sensitive information includes at least: the complete face and text record in the original tongue image; the original file name, precise acquisition time, precise geographical location, device serial number, file path and network address; and local user ID or historical record association information that can be associated with the user's real identity. Step 2: Keep the original tongue image, the optimized tongue image, the user's real identity information, and the local user mapping relationship on the lightweight edge device and do not add them to the data to be uploaded. Perform deletion, replacement, or generalization processing on the sensitive fields contained in the records to be uploaded. Step 3: Extract desensitized features from the YOLO26 lightweight tongue image recognition module, tongue image optimization module, and lightweight edge device; the desensitized features include at least one of the following: tongue image feature category, category confidence, bounding box coordinates, image quality score, low confidence marker, model version number, model inference time, input image size, acquisition time period, anonymized device number, processing status, and exception code; Step 4: Generate a one-time random record number for each de-identified feature. The random record number is generated using a random string or a universally unique identifier, and does not use user name, contact information, ID number, local user number, or device hardware serial number as the record number. Step 5: Encapsulate the data after sensitive information stripping, desensitization feature extraction, and de-identification processing into a structured record; the structured record is in the format of a JSON file, database record, or other structured data format, including one or more of the following fields: random record number, tongue image feature category, category confidence, normalized bounding box coordinates, image quality score, low confidence marker, model version number, input image size, generalized acquisition time period, anonymous device category or anonymous device number, model inference time, processing status, and exception code; Step 6: Store the original tongue image and the optimized tongue image, local user information and user mapping relationship, and desensitized structured data in different storage directories or database tables of the lightweight edge device, and set corresponding access permissions for different types of data; Step 7: Upon receiving a user data upload authorization instruction, perform field integrity verification, data format verification, and sensitive field residue verification on the de-identified structured data to be uploaded. If the verification passes, send the de-identified structured data to the model training and data management terminal through an encrypted communication channel for model performance statistics, low-confidence sample analysis, and subsequent model optimization. If the verification fails, stop sending and generate a corresponding error record. If the network connection is abnormal or data transmission fails, store the de-identified structured data in a local queue to be transmitted, and retransmit it when the network is restored and the user authorization status is still valid.

[0012] Furthermore, the specific processing steps for model training and data management are as follows: Step 1: The model training and data management terminal obtains publicly available tongue image datasets, self-built tongue image datasets, and authorized tongue image samples. It performs deduplication, abnormal image removal, category labeling, and bounding box labeling on the tongue image data, and divides it into training set, validation set, and test set according to a preset ratio. At the same time, it records the dataset version, tongue image category, number of samples, and labeling information for model training and data version tracking. Step 2: Train and improve the YOLO26 tongue recognition model using the training set; During training, the corresponding training loss is calculated based on the tongue image feature category prediction results, the initial bounding box, the local residual distribution, and the corrected final bounding box, and the model parameters are updated through backpropagation. After training, the model's recognition accuracy, recall, boundary localization accuracy, model parameter count, and inference speed are evaluated using the validation set and test set, and models that meet the preset performance requirements are saved. Step 3: Deploy and transform the trained model; fuse the parameters of the 3×3 convolutional branch, 1×1 convolutional branch, 1×3 asymmetric convolutional branch, 3×1 asymmetric convolutional branch, and identity mapping branch used by the Rep-ELAN module during the training phase, and convert them into a single equivalent 3×3 convolutional structure; export the reparameterized model as a model file suitable for running on lightweight edge devices, and generate deployment information corresponding to the model file. The deployment information includes at least the model version number, model format, input image size, model file size, supported tongue image categories, model file checksum, and compatible device type. Step 4: When the model that has completed the deployment and transformation meets the preset release conditions, the model training and data management terminal generates the model version to be updated and publishes the model file and its corresponding deployment information to the model update service for the edge model update module to obtain. Step 5: The model training and data management terminal receives the de-identified structured data uploaded by the lightweight edge device after obtaining user authorization, and summarizes and statistically analyzes the de-identified structured data; The statistical analysis includes at least the distribution of tongue image categories, average category confidence, proportion of low-confidence samples, model inference time, and equipment operating status for different model versions. When the proportion of low-confidence or abnormality corresponding to a certain tongue image category reaches a preset threshold, the category is identified as a category to be optimized, and the next round of model training is carried out by supplementing the corresponding training samples, adjusting the category weights, or readjusting the model parameters. The optimized model is then re-executed through steps 2 to 4 to create a new version of the model to be updated, which is then published to the model update service, thus forming a continuous model optimization process.

[0013] Furthermore, the edge model update module includes a model verification unit, a model replacement unit, and an exception rollback unit. The working process of the edge model update module includes: Step 1: The model verification unit sequentially performs integrity and compatibility checks on the model file to be updated. If the integrity check fails, the current model update is terminated and the currently running model continues to be used. If the integrity check passes, the model format, input image size, number of output categories, operating environment, compatible device type, and version information of the model to be updated are further checked to see if they match the current lightweight edge device. The integrity verification includes: reading the model file to be updated through the model verification unit and verifying it according to the model file verification value published by the model training and data management terminal; when the model file to be updated is missing, the file cannot be read normally, or the model file verification value calculated by the lightweight edge device is inconsistent with the verification value provided by the publishing terminal, the integrity verification is determined to be unsuccessful, the current model update is terminated, and the currently running model continues to be used. The compatibility verification includes: after the model to be updated passes the integrity verification, the model verification unit checks whether the model format, input image size, number of output categories, operating environment, compatible device type and version information of the model to be updated match the current lightweight edge device. Step 2: After the model to be updated passes both the integrity check and the compatibility check, the model replacement unit saves the currently running model and its corresponding version information to form a stable model backup before the update. Step 2.1: Load the model to be updated through the model replacement unit, and perform a trial run using a preset test tongue image to detect whether the model to be updated can complete the model loading, forward inference, and output of tongue image category and bounding box results normally; when the trial run results meet the preset running conditions, it is determined that the model to be updated can run normally; otherwise, the model replacement is terminated, and the stable model before the update is continued to be used. Step 2.2: After the model to be updated passes the trial run, the model replacement unit sets the model to be updated as the current running model and updates the model version information synchronously, so that subsequent tongue recognition tasks can call the updated model to perform local inference. Step 3: After the model replacement is completed, monitor the loading status and inference running status of the updated model; when a model loading failure, abnormal exit of the inference program, abnormal prediction output format, or other preset model running abnormality is detected, stop calling the updated model through the abnormal rollback unit, and restore the stable model backup and its corresponding version information saved by the model replacement unit before the model replacement. Step 4: After completing the model replacement or abnormal rollback, record the original model version, the model version to be updated, the verification result, the trial run result, the model replacement result, the rollback status, and the update time for this update. This will serve as the basis for subsequent model version management and system maintenance.

[0014] Furthermore, the tongue image acquisition module includes a camera acquisition unit, an image acquisition unit, an image transmission unit, and an edge device input unit; wherein, the camera acquisition unit is used to acquire the user's original tongue image; the image acquisition unit is used to extract the valid tongue image from the camera output data; the image transmission unit is used to transmit the valid tongue image to the lightweight edge device; and the edge device input unit is used to input the received tongue image to the subsequent processing module inside the lightweight edge device. The tongue image optimization module includes an illumination enhancement unit, a contrast optimization unit, a denoising and sharpening unit, and a ROI cropping unit. The illumination enhancement unit corrects the brightness of tongue images with insufficient or uneven local brightness. The contrast optimization unit enhances the grayscale or color differences between the tongue body and areas such as tongue coating, cracks, teeth marks, and red dots. The denoising and sharpening unit suppresses random noise in the image and enhances the tongue edges, surface texture, and local details. The ROI cropping unit determines the tongue region and crops the region of interest (ROI) containing the complete tongue from the input image to reduce interference from the face, lips, and background regions for subsequent recognition. The auxiliary analysis module receives the tongue feature categories, detection locations, and category confidence levels output by the YOLO26 lightweight tongue image recognition module, and summarizes and performs correlation analysis on the recognition results. Based on the pre-established correspondence between tongue image features and health tips, it combines and analyzes the recognized tongue color, coating color, cracks, teeth marks, red dots, and tongue shape features to generate corresponding tongue image feature descriptions, daily diet suggestions, rest suggestions, lifestyle suggestions, and health attention tips. The recognition results and suggestions are then used to generate a tongue image auxiliary analysis report according to a preset report template for users to view in the local display and interaction module. The local display and interaction module includes a tongue diagnosis result display unit, a historical record query unit, a user information management unit, and a settings and maintenance unit. The tongue diagnosis result display unit is configured to present the tongue image recognition results and corresponding auxiliary analysis reports in a visual manner on the local display interface after tongue image recognition is completed. The historical record query unit is configured to retrieve and display the user's historical tongue image recognition records from local storage in response to the user's query operation. The user information management unit is configured to add, modify, delete, and view user information stored locally. The settings and maintenance unit is configured to provide an operation entry point for system parameter configuration, operational status monitoring, and daily maintenance management, and to update corresponding parameters or maintenance items upon receiving the user's setting instructions.

[0015] This invention also provides a tongue image recognition method based on a reparameterized multi-scale residual network, comprising the following steps: Step 1: The user enters the lightweight tongue image recognition system, acquires the user's original tongue image through the tongue image acquisition module, and transmits the original tongue image to the lightweight edge device; Step 2: The lightweight edge device calls the tongue image optimization module to sequentially perform illumination enhancement, contrast optimization, noise reduction and sharpening, and ROI cropping on the original tongue image to obtain an optimized tongue image. When the brightness, contrast, and ROI integrity indicators all meet preset thresholds, the optimized tongue image is deemed qualified. If any indicator fails to meet the preset threshold, the corresponding processing operation is re-executed for that indicator. If, after a preset number of processing iterations, any indicator still fails to meet the preset threshold, a prompt to re-acquire the image is output. Step 3: Input the qualified optimized tongue image into the YOLO26 lightweight tongue image recognition module, and sequentially perform heavy parameterized lightweight feature extraction, multi-scale feature transfer, high-frequency detail and global semantic adaptive fusion, coarse boundary regression and local residual boundary correction processing, and output the tongue image feature category, category confidence and corresponding bounding box coordinates. Step 4: The auxiliary analysis module performs auxiliary analysis based on the tongue image feature category, category confidence level, and bounding box coordinates to generate tongue image auxiliary recognition results that include daily conditioning and protection suggestions.

[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention addresses the problems of easily lost fine textures, insufficient utilization of features at different levels, and positioning errors in blurred boundaries in tongue image recognition. It collaboratively improves the backbone feature extraction network, feature fusion network, and detection head of the YOLO26 tongue image recognition model. Specifically, the backbone feature extraction network incorporates a Rep-ELAN reparameterized lightweight convolutional module for tongue image recognition. This module allows shallow and mid-level features to be extracted complementaryly from local tongue textures, color channels, horizontal and vertical edges, and original features through 3×3 convolutions, 1×1 convolutions, 1×3 asymmetric convolutions, 3×1 asymmetric convolutions, and identity mapping branches. Deeper features are expanded through an SPPF module to broaden the effective receptive range, and the C2PSA module enhances the correlation between different spatial locations. The features are then extracted again through the Rep-ELAN reparameterized lightweight convolutional module. Building upon this foundation, the HFGS-AF module extracts shallow high-frequency details, preserves mid-level structural features, and acquires deep global semantics. It dynamically generates fusion weights for different levels of features based on the current tongue image, effectively fusing local details such as cracks, teeth marks, and red dots with global information such as the overall shape of the tongue and the distribution of tongue coating. Furthermore, through the LRDBR local residual distribution boundary correction detection head, an initial bounding box is first obtained, and then the left, top, right, and bottom edges are finely corrected based on the local residual probability near the boundary. This helps improve the model's ability to recognize and locate tongue features of different scales, shapes, and low contrast.

[0017] This invention further balances the model's feature representation capabilities with the need for lightweight edge deployment. The Rep-ELAN tongue image reparameterized lightweight convolution module employs a multi-branch structure during training to enhance local feature extraction. After model training, the convolutional parameters and batch normalization parameters in each convolutional branch are fused, and the 1×1, 1×3, and 3×1 convolutional kernels and identity mapping branches are uniformly converted into a single equivalent 3×3 convolutional structure. This eliminates the need to execute multiple parallel branches simultaneously during model deployment, thereby reducing the overhead of branch calls, intermediate feature caching, and feature fusion. The lightweight YOLO26 tongue image recognition model can be deployed on resource-constrained edge devices such as Raspberry Pi, enabling tongue image optimization, model inference, auxiliary analysis, and result display to be completed locally. Model training and data management do not require participation in the current real-time recognition, thus reducing the system's dependence on remote servers and network communication conditions. This improves real-time response capabilities, operational stability, and deployment convenience in weak or offline network environments.

[0018] This invention also combines user data security with continuous model optimization through a privacy protection and desensitized data management module and an edge model update mechanism. Original tongue images and historical recognition records are preferentially stored locally on the edge device. Sensitive information is identified, stripped, desensitized features are extracted, and de-identified. After authorization, desensitized structured data is generated and uploaded to the model training and data management end, thereby reducing the risk of leakage of original tongue images and identity-related information during network transmission and centralized storage. The model training and data management end can analyze the recognition performance of different tongue image categories and the distribution of low-confidence samples based on the returned data, retraining and optimizing the model. The updated lightweight model is securely distributed to the edge device through model verification, model replacement, and anomaly rollback, thus forming a closed loop of "edge inference—desensitized data feedback—model optimization—model update," achieving continuous iteration and stable operation of the model. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the overall structure of the lightweight tongue image recognition system of the present invention; Figure 2 This is a schematic diagram of the overall network structure of the improved YOLO26 tongue image recognition model of the present invention; Figure 3 This is a schematic diagram of the structure of the tongue image reparameterization lightweight convolution module, the tongue image high-frequency detail-global semantic adaptive fusion module, and the local residual distribution boundary correction detection head of the present invention. Detailed Implementation

[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] like Figure 1 As shown in this embodiment, a tongue image recognition system based on a reparameterized multi-scale residual network includes a tongue image acquisition module, a lightweight edge device, a model training and data management terminal, an edge model update module, and a local display and interaction module. The lightweight edge device is specifically a Raspberry Pi, configured with a tongue image optimization module, a YOLO26 lightweight tongue image recognition module, an auxiliary analysis module, a privacy protection and desensitized data management module, and a local display and interaction module.

[0022] The tongue image acquisition module includes a camera acquisition unit, an image acquisition unit, an image transmission unit, and an edge device input unit. The camera acquisition unit acquires raw images of the user's tongue. The image acquisition unit extracts valid tongue images from the camera output data. The image transmission unit transmits the valid tongue images to a lightweight edge device. The edge device input unit inputs the received tongue images into a subsequent processing module within the lightweight edge device.

[0023] The tongue image optimization module includes an illumination enhancement unit, a contrast optimization unit, a denoising and sharpening unit, and a ROI cropping unit. The illumination enhancement unit corrects the brightness of tongue images with insufficient or uneven local brightness. The contrast optimization unit enhances the grayscale or color differences between the tongue body and areas such as tongue coating, cracks, teeth marks, and red dots. The denoising and sharpening unit suppresses random noise in the image and enhances the tongue edges, surface texture, and local details. The ROI cropping unit determines the tongue region and crops the region of interest (ROI) containing the complete tongue from the input image to reduce interference from the face, lips, and background regions for subsequent recognition.

[0024] The YOLO26 lightweight tongue image recognition module is built based on the improved YOLO26 tongue image recognition model. It is configured to receive the tongue image processed by the tongue image optimization module and sequentially perform heavy parameterized lightweight feature extraction, multi-scale feature transfer, adaptive fusion of high-frequency details and global semantics, coarse boundary regression and local residual boundary correction processing, and output the tongue image feature category, category confidence and corresponding bounding box coordinates.

[0025] like Figure 2 , 3 As shown, the improved YOLO26 tongue recognition model includes a backbone feature extraction network, a Neck feature fusion network, and a multi-scale detection head.

[0026] The backbone feature extraction network includes multiple convolutional layers (Conv), multiple C3k2 feature extraction modules, multiple Rep-ELAN reparameterized lightweight feature convolution modules, a spatial pyramid pooling module (SPPF), and a channel position self-attention module (C2PSA).

[0027] Specifically, the tongue image is first input to the convolutional layer Conv of the backbone feature extraction network. After preliminary feature extraction and downsampling by the convolutional layer Conv, it sequentially passes through multiple C3k2 feature extraction modules to extract tongue features at different receptive field scales layer by layer. At the output of the C3k2 feature extraction modules at different levels, Rep-ELAN reparameterized lightweight feature convolution modules are respectively set. These Rep-ELAN reparameterized lightweight feature convolution modules are used to extract tongue surface texture, crack direction, tooth mark edges, and tongue contour features through multi-branch convolutional structures during model training, and are converted to single-branch convolutional structures during model deployment to reduce branch operations and memory access overhead when edge devices perform model inference. The Spatial Pyramid Pooling (SPPF) module is set in the deep layers of the backbone feature extraction network. It is used to construct pooling paths with different receptive ranges through various pooling kernel sizes, gathering multi-scale contextual information from the tongue image, thereby expanding the effective receptive field of deep features. The Channel Position Self-Attention (C2PSA) module is located at the output of the Spatial Pyramid Pooling (SPPF) module. It is used to jointly model the inter-channel dependencies and spatial relationships in the deep feature map, thereby enhancing the deep feature response related to the target tongue image category and suppressing redundant responses from irrelevant background regions. Finally, the Backbone feature extraction network outputs shallow, mid-level, and deep features, which are then input into the Neck feature fusion network for multi-scale feature fusion processing.

[0028] The specific steps of the Rep-ELAN tongue image reparameterized lightweight convolutional module include: Step 1: Obtain the tongue image feature maps output by different levels of the Backbone feature extraction network, and input the tongue image feature maps into the corresponding Rep-ELAN reparameterized lightweight feature convolution modules; wherein, the first Rep-ELAN module receives the shallow tongue image features output by the shallow C3k2 feature extraction module, the second Rep-ELAN module receives the mid-level tongue image features output by the mid-level C3k2 feature extraction module, and the third Rep-ELAN module receives the deep semantic features output by the C2PSA module; Step 2: During the model training phase, the input feature maps are processed in parallel through the five parallel branches of the Rep-ELAN module. The five parallel branches include a 3×3 convolution branch, a 1×1 convolution branch, a 1×3 asymmetric convolution branch, a 3×1 asymmetric convolution branch, and an identity mapping branch. Each of the 3×3 convolution branch, the 1×1 convolution branch, the 1×3 asymmetric convolution branch, and the 3×1 asymmetric convolution branch includes sequentially connected convolutional layers and batch normalization layers.

[0029] Step 2.1: Perform convolution operation on the local neighborhood of the feature map through the 3×3 convolution branch to extract tongue surface texture features, crack features, red dot features, tongue coating boundary features and local contour features; Step 2.2: Transform the channel dimension of the feature map through the 1×1 convolution branch, and perform cross-channel fusion of tongue color information, moss color information, texture information and morphological information in each channel after transformation; Step 2.3: Perform asymmetric convolution operation on the feature map along the horizontal direction through the 1×3 asymmetric convolution branch to extract the horizontally extended crack features, horizontal tongue coating boundary features, and local horizontal contour features of the tongue body. Step 2.4: Perform asymmetric convolution operation on the feature map along the vertical direction through the 3×1 asymmetric convolution branch to extract the longitudinally extended crack features, tongue side contour features and tooth mark edge features; Step 2.5: Perform adaptive dimension matching operation on the feature map through the identity mapping branch: When the number of input channels of the feature map is the same as the number of target channels and the convolution stride is 1, the feature map is directly passed as the output of the identity mapping branch; when the number of input channels is different from the number of target channels, the feature map is transformed by 1×1 projection convolution to make the number of output channels of the identity mapping branch consistent with the number of output channels of other parallel branches. Step 3: Adjust the feature maps output by the five branches to the same spatial size and number of channels, and add them element by element. Input the fusion result after addition into the activation function to obtain the output features of the Rep-ELAN module during the training phase. Then, backpropagate according to the loss function calculation result of the YOLO26 tongue recognition model to update the trainable parameters of each convolutional branch in the Rep-ELAN module until the model training is completed. Step 4: After model training is completed, equivalent parameter transformation is performed on the five parallel branches of the Rep-ELAN module. For the 3×3 convolution branch, 1×1 convolution branch, 1×3 asymmetric convolution branch, and 3×1 asymmetric convolution branch, the convolution parameters in each branch are fused with their corresponding batch normalization layer parameters to obtain the fused convolution kernel and fused bias for each branch, thereby converting the convolution operation and batch normalization operation in each branch during the training phase into an equivalent convolution operation. For the identity mapping branch, when the number of input channels is the same as the number of output channels and the stride is 1, the identity mapping is converted into the corresponding unit convolution kernel. When the identity mapping branch uses 1×1 projective convolution for channel dimension matching, the 1×1 projective convolution is converted into the corresponding equivalent convolution parameters.

[0030] Step 4.1: Perform structural reparameterization on the Rep-ELAN module, converting the convolution kernels of each parallel branch into 3×3 convolution kernels: perform zero padding on the outer periphery of the convolution kernels of the 1×1 convolution branch to obtain the first 3×3 convolution kernel; perform zero padding on the top and bottom sides of the convolution kernels of the 1×3 asymmetric convolution branch to obtain the second 3×3 convolution kernel; perform zero padding on the left and right sides of the convolution kernels of the 3×1 asymmetric convolution branch to obtain the third 3×3 convolution kernel. Step 4.2: Convert the identity mapping branch into a fourth 3×3 convolution kernel: Set a unit value at the center position of the convolution kernel of the input channel and the corresponding output channel, and set the rest positions to zero, so that the identity mapping branch participates in the subsequent parameter fusion in the form of a 3×3 convolution. Step 4.3: Add the weight parameters of the original convolution kernel, the first 3×3 convolution kernel, the second 3×3 convolution kernel, the third 3×3 convolution kernel, and the fourth 3×3 convolution kernel of the 3×3 convolution branch element by element, and add the bias parameters of each branch to obtain an equivalent 3×3 fused convolution kernel and fused bias, which are used as the operation units of the Rep-ELAN module in the inference stage; The equivalent 3×3 convolution kernel and equivalent bias can be expressed as: In the formula, and These represent the equivalent 3×3 fused convolutional kernel and fused bias used for deployment after reparameterization; Q represents the set of each convolutional branch during the training phase. and represent the convolution kernel and bias obtained by fusing the convolution parameters and batch normalization parameters in the q-th convolutional branch, respectively; This represents a transformation operation that pads the outer edges with zeros and embeds a 3×3 convolution kernel according to the kernel size of the q-th convolution branch; and These represent the unit convolution kernel and corresponding bias obtained from the identity mapping branch transformation, respectively. By merging the above parameters, the multi-branch structure during the training phase is transformed into a single 3×3 convolution structure during the deployment phase.

[0031] Step 6: In the model inference stage, construct an equivalent 3×3 convolutional layer using the equivalent 3×3 fusion convolutional kernel and the fusion bias, and replace the five parallel branches in the Rep-ELAN module with the serial connection structure of the equivalent 3×3 convolutional layer and the activation function to obtain the reparameterized single-branch Rep-ELAN module. Step 7: Deploy the model containing the reparameterized single-branch Rep-ELAN module to an edge computing device. The single-branch structure does not require calling multiple convolutional branches separately, nor does it require caching and fusing multiple intermediate features, thereby reducing the amount of computation, memory access, and runtime latency during model inference.

[0032] The feature fusion network Neck includes an upsampling layer (Upsample), a feature concatenation layer (Concat), a C3k2 feature fusion module, a convolutional downsampling layer (Conv), and an HFGS-AF tongue image high-frequency detail-global semantic adaptive fusion module. The HFGS-AF module includes a high-frequency detail guided extraction branch, a high-frequency detail extraction unit, a mid-layer structure enhancement branch, a global semantic extraction branch, a fully connected layer, and an adaptive fusion weight generation unit.

[0033] The feature fusion network Neck first adopts a top-down feature propagation path to upsample deep, low-resolution features and concatenate them with mid- or shallow features from the backbone feature extraction network, resulting in fused features with strong semantic information and high spatial resolution. Subsequently, the feature fusion network Neck adopts a bottom-up feature propagation path to convolutionally downsample the fused features and concatenate and refine them again with features at adjacent scales, thereby enhancing information transfer between features at different scales. The HFGS-AF module receives shallow, mid-, and deep features at different scales, and adaptively weights and fuses high-frequency details in shallow features, global semantics in deep features, and mid-scale structural features to output an enhanced multi-scale detection feature map.

[0034] Specifically, the feature fusion network Neck first performs upsampling, feature concatenation, C3k2 feature extraction, and downsampling on the tongue image features output by the backbone feature extraction network Backbone at different levels to form three intermediate features N3, N4, and N5 at different spatial scales. Among them, N3 is a high-resolution intermediate feature, which mainly includes local details such as tongue surface texture, fine cracks, red dots, and teeth marks edges; N4 is a medium-resolution intermediate feature, which mainly includes medium-scale structural information such as tongue coating areas, crack direction, and local morphology of the tongue; N5 is a low-resolution intermediate feature with a larger effective perception range, which mainly includes the overall morphology of the tongue, the overall distribution of the tongue coating, and deep semantic information between different regions.

[0035] N3, N4, and N5 are input to the HFGS-AF tongue image high-frequency detail-global semantic adaptive fusion module for adaptive enhancement, outputting high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5. Specific processing steps include: Step 1: Obtain the high-resolution intermediate features N3, medium-resolution intermediate features N4, and low-resolution intermediate features N5 formed by the Neck front-end structure of the feature fusion network, and input them into the corresponding 1×1 convolutional layers respectively; Step 2: Adjust the channel dimensions of N3, N4, and N5 using three 1×1 convolutional layers respectively to obtain channel-aligned features A3, A4, and A5: in, This represents a 1×1 convolution operation. The channel alignment only adjusts the channel dimensions of features at each scale, without changing the original spatial resolution of N3, N4, and N5. Therefore, A3, A4, and A5 still maintain three different spatial dimensions: high, medium, and low, respectively.

[0036] Step 3: Input the high-resolution feature A3 into the high-frequency detail guide extraction branch, and perform local average pooling on A3 to obtain the local smooth feature L3: Here, AvgPool represents a local average pooling operation, and the feature space size remains the same before and after pooling.

[0037] The high-frequency residual feature R3 is obtained by differentiating A3 from the local smoothing feature L3: The high-frequency residual feature R3 mainly retains the response caused by rapid changes in local grayscale, color or texture; Further, R3 is input into the high-frequency detail extraction unit for feature transformation to obtain shallow high-frequency guided features H3: .

[0038] Step 4: Use the channel-aligned medium-resolution feature A4 as the mid-level structure feature, and enter the mid-level structure enhancement branch to perform global feature description on A4, obtaining the mid-level structure description feature M4: Wherein, (GAP) represents the global average pooling operation. The mid-level structure description feature M4 is used to characterize mid-scale structural information such as tongue coating regions, crack direction, and local morphology of the tongue body.

[0039] Step 5: Input the channel-aligned low-resolution feature A5 into the global semantic extraction branch, and obtain the global context feature G5 through global average pooling. The global average pooling is used to summarize the feature responses of A5 at all spatial locations to obtain global contextual information corresponding to the overall tongue region, the overall distribution of tongue coating, and the overall morphology of the tongue.

[0040] The global context feature G5 is input into a fully connected layer for semantic mapping to obtain the deep semantic embedding feature S5: , where FC represents a fully connected mapping operation.

[0041] Step 6: Perform global feature description on the shallow high-frequency guiding feature H3 to obtain the shallow high-frequency description feature D3: The shallow high-frequency descriptive features D3, the mid-level structural descriptive features M4, and the deep semantic embedding features S5 are concatenated and input into the adaptive fusion weight generation unit. Where Concat represents the feature concatenation operation.

[0042] The adaptive fusion weight generation unit generates weight scores corresponding to three scales based on the concatenated feature Z, and normalizes them using the Softmax function to obtain adaptive weights. , and : WeightGen represents the adaptive fusion weight generation operation. , and These correspond to three scales: high resolution, medium resolution, and low resolution, respectively, and satisfy the following conditions: The three adaptive weights are jointly determined based on the high-frequency details, mesoscale structure, and deep global semantic information in the current input tongue image, and change with the feature content of the input tongue image.

[0043] Step 7: Utilize adaptive weights , and Weighted modulation is performed on the channel-aligned A3, A4, and A5 respectively to output high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5: in, This represents the multiplication operation between the adaptive weights and the corresponding scale features.

[0044] The multi-scale detection head includes an LRDBR local residual distribution boundary refinement detection head, a detection result decoding module (Detect), and C3k2 feature refinement modules corresponding to the P3, P4, and P5 detection features, respectively. Each LRDBR detection head includes a classification branch, a coarse localization regression branch, and a local residual distribution branch. The three C3k2 feature refinement modules receive the P3, P4, and P5 detection features output by the HFGS-AF module, respectively, and perform further feature extraction and refinement on the detection features at the corresponding scales. The three scale detection features after C3k2 feature refinement are then input into the corresponding LRDBR local residual distribution boundary correction detection heads.

[0045] The detection result decoding module Detect is used to decode, filter, and merge the category prediction results and bounding box prediction results at three scales to form the final tongue image feature recognition result.

[0046] The LRDBR local residual distribution boundary correction detection head is used to first predict the initial bounding box of the target, and then predict the local residual distribution near the left, top, right, and bottom boundaries of the initial bounding box. The boundary correction amount is calculated based on the local residual distribution to obtain the corrected final bounding box. The specific steps are as follows: Step 1: Input the detection features of the corresponding scale output by the C3k2 feature refinement module into the classification branch. These features are then sequentially processed through a 3×3 convolutional layer, a batch normalization layer, and a SiLU activation layer for feature extraction, normalization, and nonlinear transformation. Finally, a 1×1 classification prediction convolutional layer is used for category dimension mapping to obtain the tongue image feature category score corresponding to each spatial location. Step 2: Perform probability transformation on the scores of the tongue image feature categories to obtain the probability distribution of one or more tongue image feature categories among tongue body, cracks, teeth marks, red spots, coating texture and coating color; Step 3: Obtain the initial bounding box parameters B0 through the convolutional layer in the coarse localization regression branch; The initial bounding box includes a left boundary, a top boundary, a right boundary, and a bottom boundary, or it includes distance parameters from the current reference position to the left boundary, the top boundary, the right boundary, and the bottom boundary.

[0047] Step 4: Determine the coarse localization region of the tongue image feature to be identified based on the initial bounding box parameters, and pass the initial bounding box parameters to the local residual distribution branch as the reference input for boundary refinement; Step 5: Set a preset number of candidate residual offsets in the neighborhood of the left, upper, right and lower boundaries of the initial bounding box parameters, respectively. Preferably, five candidate residual positions are set for each boundary, representing: moving two residual steps in the negative direction, moving one residual step in the negative direction, not moving, moving one residual step in the positive direction, and moving two residual steps in the positive direction, respectively.

[0048] Step 6: Determine the residual step size based on the downsampling factor corresponding to the current enhanced fusion feature, and map the candidate residual offset at the feature map scale to the original tongue image coordinate scale based on the residual step size to obtain the boundary correction amount at the original image scale. Step 7: Through the convolutional layer in the local residual distribution branch, output the original scores of the left boundary, upper boundary, right boundary and lower boundary at each candidate residual position respectively; Step 8: Perform Softmax normalization on the original residual scores of each candidate residual offset corresponding to each boundary to obtain the residual probability corresponding to each candidate residual offset; wherein, the sum of the residual probabilities of each candidate residual offset for the same boundary is 1. Step 9: Multiply each candidate residual offset of each boundary by its corresponding residual probability and sum them to obtain the left boundary residual correction, upper boundary residual correction, right boundary residual correction and lower boundary residual correction respectively. The weighted summation described above can obtain continuous residual correction results, reducing the boundary jumps caused by directly selecting a discrete position.

[0049] Step 10: Combine the left boundary residual correction amount, upper boundary residual correction amount, right boundary residual correction amount, and lower boundary residual correction amount in a preset order to obtain the boundary correction amount. The boundary correction amount The final bounding box is obtained by adding the initial bounding box parameter B0 output by the coarse localization regression branch. : In the formula, m represents the detection scale corresponding to P3, P4 or P5; e represents the left, top, right or bottom boundary; K represents the candidate residual position index set; This represents the predicted probability of the e-th edge at the k-th candidate residual position in the m-th detection scale. This represents the residual offset after mapping the corresponding candidate residual position to the coordinate scale of the original tongue image; This represents the continuous boundary correction obtained by calculating the probability expectation of the candidate residual positions; This represents the boundary correction vector consisting of the correction values ​​of the four edges; and These represent the initial bounding box and the refined final bounding box, respectively. By applying probability weights to the discrete candidate residual positions, continuous boundary correction results can be obtained.

[0050] Based on the aforementioned Rep-ELAN module, HFGS-AF module, and LRDBR detection head, the improved YOLOv26 tongue image recognition model completes tongue image feature recognition according to the following steps.

[0051] Step 1: Acquire the tongue image to be identified using a camera, or read the tongue image from the local memory of a lightweight edge device; perform quality judgment, cropping of the tongue's region of interest, size adjustment, pixel normalization, and tensor transformation on the tongue image to obtain a tongue image that meets the input requirements of the improved YOLO26 model; Step 2: Input the preprocessed tongue image into the Backbone feature extraction network. The convolutional layer and C3k2 feature extraction module perform stepwise downsampling and layered feature extraction. The features at different stages are input into the Rep-ELAN module. Then, the Rep-ELAN module uses a single equivalent 3×3 convolution formed after reparameterization to extract tongue surface texture, crack direction, tooth mark edge and tongue body contour features. Step 3: Input the deep features output by Backbone into the SPPF module and C2PSA module in sequence. The effective perception range of deep features is expanded by the continuous max pooling and feature concatenation of the SPPF module. Then, the self-attention mechanism of the C2PSA module is used to enhance the feature association between different spatial locations, thereby enhancing the deep features related to the overall tongue area, tongue coating distribution and tongue morphology. Step 4: Input the different levels of tongue features output by the Backbone feature extraction network into the Neck feature fusion network. Through upsampling, feature concatenation, C3k2 feature fusion and convolutional downsampling operations, multi-scale feature transfer is performed sequentially from top to bottom and from bottom to top to form high-resolution intermediate features N3, medium-resolution intermediate features N4 and low-resolution intermediate features N5. Step 5: Input the high-resolution intermediate feature N3, medium-resolution intermediate feature N4, and low-resolution intermediate feature N5 into the HFGS-AF tongue image high-frequency detail-global semantic adaptive fusion module; extract high-frequency detail information from the high-resolution intermediate feature, structural information from the medium-resolution intermediate feature, and global semantic information from the low-resolution intermediate feature through the HFGS-AF module, and generate corresponding adaptive weights based on the high-frequency detail information, structural information, and global semantic information, and perform weighted modulation on the intermediate features at the three scales respectively to obtain high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5; Step 6: Input the high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5 into the LRDBR detection head respectively; obtain the tongue image feature category probability through the classification branch, obtain the initial bounding box parameters through the coarse localization regression branch, obtain the candidate residual probabilities of the left boundary, upper boundary, right boundary, and lower boundary corresponding to the initial bounding box parameters through the local residual distribution branch, and calculate the boundary correction amount based on each candidate residual offset and its corresponding candidate residual probability to obtain the final bounding box; Step 7: Decode and merge the tongue image feature category probabilities and final bounding boxes output by the three detection scales P3, P4 and P5, delete candidate results with category confidence below a preset threshold, and perform duplicate bounding box suppression on candidate results with the same category and bounding box overlap exceeding a preset threshold. Step 8: According to the scaling ratio and cropping position between the model input image and the original tongue image, restore the filtered bounding box to the coordinate system of the original tongue image, output the tongue image feature category, category confidence, final bounding box coordinates and corresponding feature attributes, and send the recognition result to the auxiliary analysis module to generate tongue image auxiliary recognition result.

[0052] Through the above steps, the Rep-ELAN module is used to enhance the tongue image feature extraction capability and reduce the inference overhead during the deployment phase, the HFGS-AF module is used to adaptively fuse shallow high-frequency details, mid-level structural features and deep global semantics, and the LRDBR detection head is used to complete tongue image feature classification, initial localization and local boundary refinement. The three modules work together in sequence to complete tongue image feature recognition.

[0053] The auxiliary analysis module receives the tongue feature categories, detection locations, and category confidence levels output by the YOLO26 lightweight tongue image recognition module, and summarizes and performs correlation analysis on the recognition results. Based on the pre-established correspondence between tongue image features and health tips, it combines and analyzes the recognized tongue color, coating color, cracks, teeth marks, red dots, and tongue shape features to generate corresponding tongue image feature descriptions, daily diet suggestions, rest suggestions, lifestyle suggestions, and health attention tips. The recognition results and suggestions are then used to generate a tongue image auxiliary analysis report according to a preset report template for users to view in the local display and interaction module.

[0054] The privacy protection and de-identified data management module includes an edge-end local processing unit, a sensitive information identification unit, a sensitive information stripping unit, a de-identification feature extraction unit, an anonymization processing unit, a structured data generation unit, a local storage unit, and an authorized transmission unit. The functional logic of each of these units is implemented by a data processing program; the local storage unit is implemented using a local database; and the authorized transmission unit is implemented by an access control program. The edge-end local processing unit is configured to receive tongue images, tongue image-assisted recognition results, and recorded data related to the current recognition process. It then sequentially calls the sensitive information identification unit, the sensitive information stripping unit, the de-identification feature extraction unit, and the anonymization processing unit locally to perform sensitive information identification, stripping, de-identification feature extraction, and anonymization processing on the received data. After being converted into a structured format by the structured data generation unit, the data is persistently stored locally by the local storage unit. The authorized transmission unit is configured to send the de-identified structured data stored in the local storage unit to the model training and data management terminal upon obtaining user authorization.

[0055] In this embodiment, the data stored locally on the Raspberry Pi (local database) is separated from the data that can be uploaded (anonymized structured data). The data stored locally (local database) includes the original tongue image, the optimized tongue image, the anonymous user ID, and historical identification records; the anonymized structured data only includes anonymized structured data that does not contain the original image or direct identification.

[0056] The specific processing steps of the privacy protection and de-identified data management module are as follows: Step 1: The original tongue image acquired by the tongue image acquisition module, the tongue feature categories and category confidence levels obtained by the YOLO26 lightweight tongue image recognition module, and the tongue feature analysis results and auxiliary suggestions obtained by the auxiliary analysis module are aggregated into input data. Sensitive information is identified through the privacy protection and desensitized data management module, and the identified sensitive information is marked as data to be desensitized. The sensitive information includes at least: the complete face and text record in the original tongue image; the original file name, precise acquisition time, precise geographical location, device serial number, file path and network address; and local user ID or historical record association information that can be associated with the user's real identity.

[0057] For information with fixed field names, field name matching is used for recognition; for text in images, existing text detection or optical character recognition methods can be used for auxiliary recognition.

[0058] Step 2: The original tongue image, optimized tongue image, user's real identity information, and local user mapping relationship are retained locally on the lightweight edge device and not included in the data to be uploaded. Sensitive fields contained in the records to be uploaded are deleted, replaced, or generalized. Specifically, the precise acquisition time is converted into a preset time period. For complete facial or identity-related text information present in the original image, the image is still retained locally and is not sent to the model training and data management terminal as structured data to be uploaded. Step 3: Extract desensitized features from the YOLO26 lightweight tongue image recognition module, tongue image optimization module, and lightweight edge device; the desensitized features include at least one of the following: tongue image feature category, category confidence, bounding box coordinates, image quality score, low confidence marker, model version number, model inference time, input image size, acquisition time period, anonymized device number, processing status, and exception code.

[0059] Specifically, the bounding box coordinates are preferably converted to normalized coordinates relative to the width and height of the tongue image to reduce dependence on the original image size. When the category confidence is lower than a preset threshold, the corresponding recognition result is marked as a low-confidence sample for model training and data management to statistically analyze tongue image categories that are prone to misclassification or omission by the model. The collection time is recorded using a generalized time period; device information is recorded using an anonymous device category or an anonymous device number. When multiple fields such as time period, region, age group, and device type still have a high risk of user association when combined, the corresponding fields are further processed by intervalization, fuzzification, or deletion.

[0060] Step 4: Generate a one-time random record number for each de-identified feature. The random record number is generated using a random string or a universally unique identifier, and does not use user name, contact information, ID number, local user number, or device hardware serial number as the record number. Step 5: Encapsulate the data after sensitive information stripping, desensitization feature extraction, and de-identification processing into a structured record; the structured record is in the format of a JSON file, database record, or other structured data format, including one or more of the following fields: random record number, tongue image feature category, category confidence, normalized bounding box coordinates, image quality score, low confidence marker, model version number, input image size, generalized acquisition time period, anonymous device category or anonymous device number, model inference time, processing status, and exception code; Step 6: Store the original tongue image and the optimized tongue image, local user information and user mapping relationship, and desensitized structured data in different storage directories or database tables of the lightweight edge device, and set corresponding access permissions for different types of data; The original tongue image, user's real identity information, and local user mapping relationship are only accessible to programs with local authorization; the data uploading program only has the permission to read the de-identified structured data, and does not have the permission to read the user's real identity information and the original tongue image.

[0061] When a user uploads data without authorization, the de-identified structured data is stored locally on the lightweight edge device and is not sent to the model training and data management end.

[0062] Step 7: Upon receiving a user data upload authorization instruction, perform field integrity verification, data format verification, and sensitive field residue verification on the de-identified structured data to be uploaded. If the verification passes, send the de-identified structured data to the model training and data management terminal through an encrypted communication channel for model performance statistics, low-confidence sample analysis, and subsequent model optimization. If the verification fails, stop sending and generate a corresponding error record. If the network connection is abnormal or data transmission fails, store the de-identified structured data in a local queue to be transmitted, and retransmit it when the network is restored and the user authorization status is still valid.

[0063] The retransmitted data includes only the structured data after desensitization and deassociation processing, excluding the original tongue image, the optimized tongue image, and the user's real identity information.

[0064] The model training and data management terminal is used to complete tongue image data management, model training, model evaluation, deployment and conversion, version release, and model optimization based on the returned data, specifically including the following steps: Step 1: The model training and data management terminal obtains publicly available tongue image datasets, self-built tongue image datasets, and authorized tongue image samples. It performs deduplication, abnormal image removal, category labeling, and bounding box labeling on the tongue image data, and divides it into training set, validation set, and test set according to a preset ratio. At the same time, it records the dataset version, tongue image category, number of samples, and labeling information for model training and data version tracking.

[0065] Step 2: Use the training set to train and improve the YOLO26 tongue recognition model.

[0066] During training, the corresponding training loss is calculated based on the tongue image feature category prediction results, the initial bounding box, the local residual distribution, and the corrected final bounding box, and the model parameters are updated through backpropagation.

[0067] After training, the model's recognition accuracy, recall, boundary localization accuracy, number of model parameters, and inference speed are evaluated using the validation set and test set, and models that meet the preset performance requirements are saved.

[0068] Step 3: Deploy and convert the trained model. The 3×3 convolutional branch, 1×1 convolutional branch, 1×3 asymmetric convolutional branch, 3×1 asymmetric convolutional branch, and identity mapping branch used by the Rep-ELAN module during training are parameterized and fused to convert into a single equivalent 3×3 convolutional structure. The reparameterized model is exported as a model file suitable for lightweight edge devices, and deployment information corresponding to the model file is generated. This deployment information includes at least the model version number, model format, input image size, model file size, supported tongue image categories, model file checksum, and compatible device type.

[0069] Step 4: When the model that has completed the deployment and transformation meets the preset release conditions, the model training and data management terminal generates the model version to be updated and publishes the model file and its corresponding deployment information to the model update service for the edge model update module to obtain.

[0070] Step 5: The model training and data management terminal receives the de-identified structured data uploaded by the lightweight edge device after obtaining user authorization, and summarizes and statistically analyzes the de-identified structured data.

[0071] The statistical analysis includes at least the distribution of tongue image categories corresponding to different model versions, the average category confidence, the proportion of low-confidence samples, the model inference time, and the equipment operating status. When the proportion of low-confidence or abnormality corresponding to a certain tongue image category reaches a preset threshold, the category is identified as a category to be optimized, and the next round of model training is carried out by supplementing the corresponding training samples, adjusting the category weights, or readjusting the model parameters.

[0072] The optimized model is then re-executed through steps 2 to 4 to create a new version of the model to be updated, which is then published to the model update service, thus forming a continuous model optimization process.

[0073] The edge model update module includes a model verification unit, a model replacement unit, and an exception rollback unit. The model verification unit is configured to perform integrity and compatibility checks on the model to be updated. The model replacement unit is configured to deploy the model to be updated to the edge computing device to replace the currently running model if the model passes the integrity and compatibility checks. The exception rollback unit is configured to restore the model in the edge computing device to its stable version before the update if the model update fails or the model to be updated malfunctions. The working process of the edge model update module includes: Step 1: The model verification unit sequentially performs integrity and compatibility checks on the model file to be updated. If the integrity check fails, the current model update is terminated, and the currently running model continues to be used. If the integrity check passes, the model format, input image size, number of output categories, operating environment, compatible device type, and version information of the model to be updated are further checked to see if they match the current lightweight edge device. The integrity verification includes: reading the model file to be updated through the model verification unit and verifying it according to the model file verification value published by the model training and data management terminal; when the model file to be updated is missing, the file cannot be read normally, or the model file verification value calculated by the lightweight edge device is inconsistent with the verification value provided by the publishing terminal, the integrity verification is determined to be unsuccessful, the current model update is terminated, and the currently running model continues to be used.

[0074] The compatibility verification includes: after the model to be updated passes the integrity verification, the model verification unit checks whether the model format, input image size, number of output categories, operating environment, compatible device type and version information of the model to be updated match the current lightweight edge device.

[0075] Step 2: After the model to be updated passes both the integrity check and the compatibility check, the model replacement unit saves the currently running model and its corresponding version information to form a stable model backup before the update.

[0076] Step 2.1: Load the model to be updated through the model replacement unit, and perform a trial run using a preset test tongue image to detect whether the model to be updated can normally complete model loading, forward inference, and output tongue image category and bounding box results. When the trial run results meet the preset running conditions, it is determined that the model to be updated can run normally; otherwise, the model replacement is terminated, and the stable model before the update continues to be used.

[0077] Step 2.2: After the model to be updated passes the trial run, the model replacement unit sets the model to be updated as the current running model and updates the model version information synchronously, so that subsequent tongue recognition tasks can call the updated model to perform local inference.

[0078] Step 3: After the model replacement is completed, monitor the loading status and inference running status of the updated model; when a model loading failure, abnormal exit of the inference program, abnormal prediction output format, or other preset model running abnormality is detected, stop calling the updated model through the abnormal rollback unit, and restore the stable model backup and its corresponding version information saved by the model replacement unit before the model replacement.

[0079] Step 4: After completing the model replacement or abnormal rollback, record the original model version, the model version to be updated, the verification result, the trial run result, the model replacement result, the rollback status, and the update time for this update. This will serve as the basis for subsequent model version management and system maintenance.

[0080] The local display and interaction module includes a tongue diagnosis result display unit, a historical record query unit, a user information management unit, and a settings and maintenance unit. The tongue diagnosis result display unit is configured to present the tongue image recognition results and corresponding auxiliary analysis reports in a visual manner on the local display interface after tongue image recognition is completed. The historical record query unit is configured to retrieve and display the user's historical tongue image recognition records from local storage in response to user queries. The user information management unit is configured to add, modify, delete, and view user information stored locally. The settings and maintenance unit is configured to provide an entry point for system parameter configuration, operational status monitoring, and daily maintenance management, and to update corresponding parameters or maintenance items upon receiving user setting instructions.

[0081] A tongue image recognition method based on reparameterized multi-scale residual networks includes the following steps: Step 1: The user enters the lightweight tongue image recognition system, acquires the user's original tongue image through the tongue image acquisition module, and transmits the original tongue image to the lightweight edge device; Step 2: The lightweight edge device calls the tongue image optimization module to sequentially perform illumination enhancement, contrast optimization, noise reduction and sharpening, and ROI cropping on the original tongue image to obtain an optimized tongue image. When the brightness, contrast, and ROI integrity indicators all meet preset thresholds, the optimized tongue image is deemed qualified. If any indicator fails to meet the preset threshold, the corresponding processing operation is re-executed for that indicator. If, after a preset number of processing iterations, any indicator still fails to meet the preset threshold, a prompt to re-acquire the image is output. Brightness index: Calculate the average brightness value of the tongue ROI region. When the average brightness value is within the preset brightness range, the overall brightness of the image is determined to meet the requirements. At the same time, the proportion of overly dark pixels and overly bright pixels to the total pixels of the tongue ROI region is counted. When the proportion is less than the preset exposure ratio threshold, the image is determined to not be significantly underexposed or overexposed. Contrast index: Calculate the standard deviation or local contrast of pixel brightness within the ROI region of the tongue body. When the standard deviation or local contrast is greater than the preset contrast threshold, it is determined that the tongue body, tongue coating and local texture have a degree of distinguishability that meets the requirements of subsequent feature extraction. ROI integrity index: Determine whether the cropped tongue ROI includes the complete tongue tip, both sides of the tongue, and the visible area of ​​the tongue root, and calculate the area ratio of the tongue region to the cropped image; when the tongue is not obviously truncated and the area ratio is within a preset range, the ROI cropping is deemed to meet the requirements.

[0082] Step 3: Input the qualified optimized tongue image into the YOLO26 lightweight tongue image recognition module, and sequentially perform heavy parameterized lightweight feature extraction, multi-scale feature transfer, high-frequency detail and global semantic adaptive fusion, coarse boundary regression and local residual boundary correction processing, and output the tongue image feature category, category confidence and corresponding bounding box coordinates. Step 4: The auxiliary analysis module performs auxiliary analysis based on the tongue image feature category, category confidence level, and bounding box coordinates to generate tongue image auxiliary recognition results that include daily conditioning and protection suggestions.

[0083] Through steps 1 to 4 above, the system can obtain tongue image assisted recognition results including tongue image feature categories, confidence levels, bounding box coordinates, and daily care suggestions. Based on this, the lightweight tongue image recognition system of this embodiment can further achieve the following functions: The local display and interaction module receives the tongue image assisted recognition results and visualizes the tongue diagnosis conclusions, historical records, and personalized suggestions in the user interface.

[0084] Under user authorization or system settings, the privacy protection and desensitized data management module performs desensitization processing on the tongue image assisted recognition results and sends the desensitized structured data to the model training and data management terminal. The model training and data management terminal manages the desensitized structured data and combines it with existing tongue image data for model training, evaluation, and validation; when the model meets the release conditions, a version is released. The edge model update module receives the new model version released by the model training and data management terminal, performs model verification first, and then completes model replacement; if the model malfunctions after replacement, an exception rollback is performed to restore the original stable model.

Claims

1. A tongue image recognition system based on a reparameterized multi-scale residual network, characterized in that, It includes a tongue image acquisition module, a lightweight edge device, a model training and data management terminal, and an edge model update module; the lightweight edge device is equipped with a tongue image optimization module, a YOLO26 lightweight tongue image recognition module, an auxiliary analysis module, a privacy protection and desensitized data management module, and a local display and interaction module; The YOLO26 lightweight tongue image recognition module is built based on the improved YOLO26 tongue image recognition model, including a backbone feature extraction network, a Neck feature fusion network, and a multi-scale detection head. The backbone feature extraction network includes multiple convolutional layers (Conv), multiple C3k2 feature extraction modules, multiple Rep-ELAN heavily parameterized lightweight feature convolutional modules, a spatial pyramid pooling module (SPPF), and a channel position self-attention module (C2PSA). The tongue image is first input to the convolutional layers (Conv) of the backbone feature extraction network. After the initial feature extraction and downsampling processing is completed by the convolutional layers (Conv), it passes through multiple C3k2 feature extraction modules in sequence. Rep-ELAN heavily parameterized lightweight feature convolution modules are set at the output ends of the C3k2 feature extraction modules at different levels. These modules are used to extract tongue surface texture, crack direction, tooth mark edges, and tongue contour features through multi-branch convolutional structures during the model training phase, and are converted into single-branch convolutional structures during the model deployment phase. The Spatial Pyramid Pooling Module (SPPF) is set in the deep layer of the Backbone of the Backbone feature extraction network, and the Channel Position Self-Attention Module (C2PSA) is set at the output end of the SPPF. The Backbone outputs shallow, medium, and deep features respectively, and inputs these features into the Neck feature fusion network. The feature fusion network Neck comprises an upsampling layer (Upsample), a feature concatenation layer (Concat), a C3k2 feature fusion module, a convolutional downsampling layer (Conv), and an HFGS-AF module. The HFGS-AF module includes a high-frequency detail guided extraction branch, a high-frequency detail extraction unit, a mid-level structure enhancement branch, a global semantic extraction branch, a fully connected layer, and an adaptive fusion weight generation unit. Neck first employs a top-down feature propagation path to upsample deep, low-resolution features and concatenate them with mid-level or shallow features from the backbone feature extraction network (Backbone) to obtain fused features with strong semantic information and high spatial resolution. Subsequently, Neck uses a bottom-up feature propagation path to convolutionally downsample the fused features and concatenate and refine them again with features at adjacent scales, thereby enhancing information transfer between features at different scales. The HFGS-AF module receives shallow, mid-level, and deep features of different scales and performs adaptive weighted fusion of high-frequency details in shallow features, global semantics in deep features, and mid-level structure features, outputting an enhanced multi-scale detection feature map. The multi-scale detection head includes a Detect module for decoding detection results from an LRDBR local residual distribution boundary refinement detection head and a C3k2 feature refinement module. Each LRDBR detection head includes a classification branch, a coarse localization regression branch, and a local residual distribution branch. For the detection feature map at each scale, the C3k2 module first performs feature refinement processing, and then inputs it to the LRDBR local residual distribution boundary refinement detection head to perform boundary regression and classification prediction, outputting an initial bounding box and category information. Local residual distribution is predicted on the four sides of the initial bounding box, and the correction amount is calculated to obtain the final bounding box. Finally, the Detect module decodes, filters, and merges the category prediction results and bounding box prediction results to form the final tongue image feature recognition result. The privacy protection and desensitized data management module, with the user's authorization, removes the original tongue image and various identity-related information, and extracts the tongue image feature category, category confidence level and final bounding box coordinates to generate a desensitized structured record, which is transmitted to the model training and data management terminal through encrypted communication.

2. The tongue recognition system based on a reparameterized multi-scale residual network according to claim 1, characterized in that, The specific process of building the improved YOLO26 tongue recognition model is as follows: Step 1: Acquire the tongue image to be identified using a camera, or read the tongue image from the local memory of a lightweight edge device; perform quality judgment, cropping of the tongue's region of interest, size adjustment, pixel normalization, and tensor transformation on the tongue image to obtain a tongue image that meets the input requirements of the improved YOLO26 model; Step 2: Input the preprocessed tongue image into the Backbone feature extraction network. The convolutional layer and C3k2 feature extraction module perform stepwise downsampling and layered feature extraction. The features at different stages are input into the Rep-ELAN module. Then, the Rep-ELAN module uses a single equivalent 3×3 convolution formed after reparameterization to extract tongue surface texture, crack direction, tooth mark edge and tongue body contour features. Step 3: Input the deep features output by Backbone into the SPPF module and C2PSA module in sequence. The effective perception range of deep features is expanded by the continuous max pooling and feature concatenation of the SPPF module. Then, the self-attention mechanism of the C2PSA module is used to enhance the feature association between different spatial locations, thereby enhancing the deep features related to the overall tongue area, tongue coating distribution and tongue morphology. Step 4: Input the different levels of tongue features output by the Backbone feature extraction network into the Neck feature fusion network. Through upsampling, feature concatenation, C3k2 feature fusion and convolutional downsampling operations, multi-scale feature transfer is performed sequentially from top to bottom and from bottom to top to form high-resolution intermediate features N3, medium-resolution intermediate features N4 and low-resolution intermediate features N5. Step 5: Input the high-resolution intermediate feature N3, medium-resolution intermediate feature N4, and low-resolution intermediate feature N5 into the HFGS-AF module; extract high-frequency detail information from the high-resolution intermediate feature, structural information from the medium-resolution intermediate feature, and global semantic information from the low-resolution intermediate feature through the HFGS-AF module; generate corresponding adaptive weights based on the high-frequency detail information, structural information, and global semantic information; and perform weighted modulation on the intermediate features at the three scales respectively to obtain high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5. Step 6: Input the high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5 into the LRDBR detection head respectively; obtain the tongue image feature category probability through the classification branch, obtain the initial bounding box parameters through the coarse localization regression branch, obtain the candidate residual probabilities of the left boundary, upper boundary, right boundary, and lower boundary corresponding to the initial bounding box parameters through the local residual distribution branch, and calculate the boundary correction amount based on each candidate residual offset and its corresponding candidate residual probability to obtain the final bounding box; Step 7: Decode and merge the tongue image feature category probabilities and final bounding boxes output by the three detection scales P3, P4 and P5, delete candidate results with category confidence below a preset threshold, and perform duplicate bounding box suppression on candidate results with the same category and bounding box overlap exceeding a preset threshold. Step 8: According to the scaling ratio and cropping position between the model input image and the original tongue image, restore the filtered bounding box to the coordinate system of the original tongue image, output the tongue image feature category, category confidence, final bounding box coordinates and corresponding feature attributes, and send the recognition result to the auxiliary analysis module to generate tongue image auxiliary recognition result.

3. The tongue recognition system based on a reparameterized multi-scale residual network according to claim 2, characterized in that, The high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5 are generated through the following steps: Step 1: Obtain the high-resolution intermediate features N3, medium-resolution intermediate features N4, and low-resolution intermediate features N5 formed by the Neck front-end structure of the feature fusion network, and input them into the corresponding 1×1 convolutional layers respectively; Step 2: Adjust the channel dimensions of N3, N4, and N5 using three 1×1 convolutional layers respectively to obtain channel-aligned features A3, A4, and A5: in, This represents a 1×1 convolution operation; Step 3: Input the high-resolution feature A3 into the high-frequency detail-guided extraction branch, and perform local average pooling on A3 to obtain the local smoothing feature L3: Where AvgPool represents a local average pooling operation, and the feature space size remains the same before and after pooling; The high-frequency residual feature R3 is obtained by differentiating A3 from the local smoothing feature L3: R3 is input into the high-frequency detail extraction unit for feature transformation to obtain shallow high-frequency guiding features H3: Step 4: Use the channel-aligned medium-resolution feature A4 as the mid-level structure feature, and enter the mid-level structure enhancement branch to perform global feature description on A4 to obtain the mid-level structure description feature M4: Where (GAP) represents the global average pooling operation; Step 5: Input the channel-aligned low-resolution feature A5 into the global semantic extraction branch, and obtain the global context feature G5 through global average pooling. The global context feature G5 is input into the fully connected layer for semantic mapping to obtain the deep semantic embedding feature S5: Where FC represents a fully connected mapping operation; Step 6: Perform global feature description on the shallow high-frequency guiding feature H3 to obtain the shallow high-frequency description feature D3: The shallow high-frequency descriptive features D3, the mid-level structural descriptive features M4, and the deep semantic embedding features S5 are concatenated and input into the adaptive fusion weight generation unit. Wherein, Concat represents the feature concatenation operation; the adaptive fusion weight generation unit generates weight scores corresponding to three scales based on the concatenated feature Z, and normalizes them using the Softmax function to obtain adaptive weights. , and : WeightGen represents the adaptive fusion weight generation operation. , and These correspond to three scales: high resolution, medium resolution, and low resolution, respectively, and satisfy the following conditions: ; Step 7: Utilize adaptive weights , and Weighted modulation is performed on the channel-aligned A3, A4, and A5 respectively to output high-resolution detection feature P3, medium-resolution detection feature P4, and low-resolution detection feature P5: in, This represents the multiplication operation between the adaptive weights and the corresponding scale features.

4. The tongue recognition system based on a reparameterized multi-scale residual network according to claim 3, characterized in that, The specific steps of the Rep-ELAN tongue image reparameterized lightweight convolutional module include: Step 1: Obtain the tongue image feature maps output by different levels of the Backbone feature extraction network, and input the tongue image feature maps into the corresponding Rep-ELAN reparameterized lightweight feature convolution modules; wherein, the first Rep-ELAN module receives the shallow tongue image features output by the shallow C3k2 feature extraction module, the second Rep-ELAN module receives the mid-level tongue image features output by the mid-level C3k2 feature extraction module, and the third Rep-ELAN module receives the deep semantic features output by the C2PSA module; Step 2: During the model training phase, the input feature maps are processed in parallel through five parallel branches of the Rep-ELAN module. These five parallel branches include a 3×3 convolution branch, a 1×1 convolution branch, a 1×3 asymmetric convolution branch, a 3×1 asymmetric convolution branch, and an identity mapping branch. Each of the 3×3, 1×1, 1×3, and 3×1 asymmetric convolution branches includes sequentially connected convolutional layers and batch normalization layers. The 3×3 convolution branch is used to extract the tongue surface. Texture, cracks, red dots, tongue coating boundaries, and local contour features are analyzed. A 1×1 convolutional branch is used for channel dimension transformation and cross-channel information fusion. A 1×3 asymmetric convolutional branch enhances laterally extending cracks, tongue coating boundaries, and local lateral contour features. A 3×1 asymmetric convolutional branch enhances longitudinally extending cracks, tongue side contours, and teeth mark edge features. An identity mapping branch preserves input features. When the number of input channels in the identity mapping branch differs from the target number of channels, channel dimension matching is performed using a 1×1 projective convolution. Step 3: Adjust the feature maps output by the five branches to the same spatial size and number of channels, and add them element by element. Input the fusion result after addition into the activation function to obtain the output features of the Rep-ELAN module during the training phase. Then, backpropagate according to the loss function calculation result of the YOLO26 tongue recognition model to update the trainable parameters of each convolutional branch in the Rep-ELAN module until the model training is completed. Step 4: After model training is completed, equivalent parameter transformation is performed on the five parallel branches of the Rep-ELAN module. For the 3×3 convolution branch, 1×1 convolution branch, 1×3 asymmetric convolution branch, and 3×1 asymmetric convolution branch, the convolution parameters in each branch are fused with their corresponding batch normalization layer parameters to obtain the fused convolution kernel and fused bias for each branch, thereby converting the convolution operation and batch normalization operation in each branch during the training phase into an equivalent convolution operation. For the identity mapping branch, when the number of input channels is the same as the number of output channels and the stride is 1, the identity mapping is converted into the corresponding unit convolution kernel. When the identity mapping branch uses 1×1 projective convolution for channel dimension matching, the 1×1 projective convolution is converted into the corresponding equivalent convolution parameters. Step 4.1: Perform structural reparameterization on the Rep-ELAN module, converting the convolution kernels of each parallel branch into 3×3 convolution kernels: perform zero padding on the outer periphery of the convolution kernels of the 1×1 convolution branch to obtain the first 3×3 convolution kernel; perform zero padding on the top and bottom sides of the convolution kernels of the 1×3 asymmetric convolution branch to obtain the second 3×3 convolution kernel; perform zero padding on the left and right sides of the convolution kernels of the 3×1 asymmetric convolution branch to obtain the third 3×3 convolution kernel. Step 4.2: Convert the identity mapping branch into a fourth 3×3 convolution kernel: Set a unit value at the center position of the convolution kernel of the input channel and the corresponding output channel, and set the rest positions to zero, so that the identity mapping branch participates in the subsequent parameter fusion in the form of a 3×3 convolution. Step 4.3: Add the weight parameters of the original convolution kernel, the first 3×3 convolution kernel, the second 3×3 convolution kernel, the third 3×3 convolution kernel, and the fourth 3×3 convolution kernel of the 3×3 convolution branch element by element, and add the bias parameters of each branch to obtain an equivalent 3×3 fused convolution kernel and fused bias, which are used as the operation units of the Rep-ELAN module in the inference stage; The equivalent 3×3 convolution kernel and equivalent bias can be expressed as: In the formula, and These represent the equivalent 3×3 fused convolutional kernel and fused bias used for deployment after reparameterization; Q represents the set of each convolutional branch during the training phase. and represent the convolution kernel and bias obtained by fusing the convolution parameters and batch normalization parameters in the q-th convolutional branch, respectively; This represents a transformation operation that pads the outer edges with zeros and embeds a 3×3 convolution kernel according to the kernel size of the q-th convolution branch; and These represent the unit convolution kernel and corresponding bias obtained from the identity mapping branch transformation, respectively; by merging the above parameters, the multi-branch structure in the training phase is transformed into a single 3×3 convolution structure in the deployment phase; Step 5: In the model inference stage, construct an equivalent 3×3 convolutional layer using the equivalent 3×3 fusion convolutional kernel and the fusion bias, and replace the five parallel branches in the Rep-ELAN module with the serial connection structure of the equivalent 3×3 convolutional layer and the activation function to obtain the reparameterized single-branch Rep-ELAN module. Step 6: Deploy the model containing the reparameterized single-branch Rep-ELAN module to an edge computing device.

5. A tongue recognition system based on a reparameterized multi-scale residual network according to claim 4, characterized in that, The specific steps of the LRDBR local residual distribution boundary correction detection head are as follows: Step 1: Input the detection features of the corresponding scale output by the C3k2 feature refinement module into the classification branch, and then perform feature extraction, normalization and nonlinear transformation through a 3×3 convolutional layer, a batch normalization layer and a SiLU activation layer. Finally, perform category dimension mapping through a 1×1 classification prediction convolutional layer to obtain the tongue image feature category score corresponding to each spatial location. Step 2: Perform probability transformation on the scores of the tongue image feature categories to obtain the probability distribution of one or more tongue image feature categories among tongue body, cracks, teeth marks, red spots, coating texture and coating color; Step 3: Obtain the initial bounding box parameters B0 through the convolutional layer in the coarse localization regression branch; Step 4: Determine the coarse localization region of the tongue image feature to be identified based on the initial bounding box parameters, and pass the initial bounding box parameters to the local residual distribution branch as the reference input for boundary refinement; Step 5: Set a preset number of candidate residual offsets in the neighborhood of the left, upper, right and lower boundaries of the initial bounding box parameters, respectively. Step 6: Determine the residual step size based on the downsampling factor corresponding to the current enhanced fusion feature, and map the candidate residual offset at the feature map scale to the original tongue image coordinate scale based on the residual step size to obtain the boundary correction amount at the original image scale. Step 7: Through the convolutional layer in the local residual distribution branch, output the original scores of the left boundary, upper boundary, right boundary and lower boundary at each candidate residual position respectively; Step 8: Perform Softmax normalization on the original residual scores of each candidate residual offset corresponding to each boundary to obtain the residual probability corresponding to each candidate residual offset; wherein, the sum of the residual probabilities of each candidate residual offset for the same boundary is 1. Step 9: Multiply each candidate residual offset of each boundary by its corresponding residual probability and sum them to obtain the left boundary residual correction, upper boundary residual correction, right boundary residual correction and lower boundary residual correction respectively. Step 10: Combine the left boundary residual correction amount, upper boundary residual correction amount, right boundary residual correction amount, and lower boundary residual correction amount in a preset order to obtain the boundary correction amount. The boundary correction amount The final bounding box is obtained by adding the initial bounding box parameter B0 output by the coarse localization regression branch. : In the formula, m represents the detection scale corresponding to P3, P4 or P5; e represents the left, top, right or bottom boundary; K represents the candidate residual position index set; This represents the predicted probability of the e-th edge at the k-th candidate residual position in the m-th detection scale. This represents the residual offset after mapping the corresponding candidate residual position to the coordinate scale of the original tongue image; This represents the continuous boundary correction obtained by calculating the probability expectation of the candidate residual positions; This represents the boundary correction vector consisting of the correction values ​​of the four edges; and These represent the initial bounding box and the final bounding box after refinement, respectively.

6. A tongue recognition system based on a reparameterized multi-scale residual network according to claim 5, characterized in that, The specific processing procedure of the privacy protection and de-identified data management module is as follows: Step 1: The original tongue image acquired by the tongue image acquisition module, the tongue image feature category and category confidence obtained by the YOLO26 lightweight tongue image recognition module, and the tongue image feature analysis results and auxiliary suggestions obtained by the auxiliary analysis module are aggregated into input data. Sensitive information is identified through the privacy protection and desensitized data management module, and the identified sensitive information is marked as data to be desensitized. The sensitive information includes at least: the complete face and text record in the original tongue image; the original file name, precise acquisition time, precise geographical location, device serial number, file path and network address; and local user ID or historical record association information that can be associated with the user's real identity. Step 2: Keep the original tongue image, the optimized tongue image, the user's real identity information, and the local user mapping relationship on the lightweight edge device and do not add them to the data to be uploaded. Perform deletion, replacement, or generalization processing on the sensitive fields contained in the records to be uploaded. Step 3: Extract desensitized features from the YOLO26 lightweight tongue image recognition module, tongue image optimization module, and lightweight edge device; the desensitized features include at least one of the following: tongue image feature category, category confidence, bounding box coordinates, image quality score, low confidence marker, model version number, model inference time, input image size, acquisition time period, anonymized device number, processing status, and exception code; Step 4: Generate a one-time random record number for each de-identified feature. The random record number is generated using a random string or a universally unique identifier, and does not use user name, contact information, ID number, local user number, or device hardware serial number as the record number. Step 5: Encapsulate the data after sensitive information stripping, desensitization feature extraction, and de-identification processing into a structured record; the structured record is in the format of a JSON file, database record, or other structured data format, including one or more of the following fields: random record number, tongue image feature category, category confidence, normalized bounding box coordinates, image quality score, low confidence marker, model version number, input image size, generalized acquisition time period, anonymous device category or anonymous device number, model inference time, processing status, and exception code; Step 6: Store the original tongue image and the optimized tongue image, local user information and user mapping relationship, and desensitized structured data in different storage directories or database tables of the lightweight edge device, and set corresponding access permissions for different types of data; Step 7: Upon receiving a user data upload authorization instruction, perform field integrity verification, data format verification, and sensitive field residue verification on the de-identified structured data to be uploaded. If the verification passes, send the de-identified structured data to the model training and data management terminal through an encrypted communication channel for model performance statistics, low-confidence sample analysis, and subsequent model optimization. If the verification fails, stop sending and generate a corresponding error record. If the network connection is abnormal or data transmission fails, store the de-identified structured data in a local queue to be transmitted, and retransmit it when the network is restored and the user authorization status is still valid.

7. A tongue recognition system based on a reparameterized multi-scale residual network according to claim 6, characterized in that, The specific processing steps for model training and data management are as follows: Step 1: The model training and data management terminal obtains publicly available tongue image datasets, self-built tongue image datasets, and authorized tongue image samples. It performs deduplication, abnormal image removal, category labeling, and bounding box labeling on the tongue image data, and divides it into training set, validation set, and test set according to a preset ratio. At the same time, it records the dataset version, tongue image category, number of samples, and labeling information for model training and data version tracking. Step 2: Train and improve the YOLO26 tongue recognition model using the training set; During training, the corresponding training loss is calculated based on the tongue image feature category prediction results, the initial bounding box, the local residual distribution, and the corrected final bounding box, and the model parameters are updated through backpropagation. After training, the model's recognition accuracy, recall, boundary localization accuracy, model parameter count, and inference speed are evaluated using the validation set and test set, and models that meet the preset performance requirements are saved. Step 3: Deploy and transform the trained model; fuse the parameters of the 3×3 convolutional branch, 1×1 convolutional branch, 1×3 asymmetric convolutional branch, 3×1 asymmetric convolutional branch, and identity mapping branch used by the Rep-ELAN module during the training phase, and convert them into a single equivalent 3×3 convolutional structure; export the reparameterized model as a model file suitable for running on lightweight edge devices, and generate deployment information corresponding to the model file. The deployment information includes at least the model version number, model format, input image size, model file size, supported tongue image categories, model file checksum, and compatible device type. Step 4: When the model that has completed the deployment and transformation meets the preset release conditions, the model training and data management terminal generates the model version to be updated and publishes the model file and its corresponding deployment information to the model update service for the edge model update module to obtain. Step 5: The model training and data management terminal receives the de-identified structured data uploaded by the lightweight edge device after obtaining user authorization, and summarizes and statistically analyzes the de-identified structured data; The statistical analysis includes at least the distribution of tongue image categories, average category confidence, proportion of low-confidence samples, model inference time, and equipment operating status for different model versions. When the proportion of low-confidence or abnormality corresponding to a certain tongue image category reaches a preset threshold, the category is identified as a category to be optimized, and the next round of model training is carried out by supplementing the corresponding training samples, adjusting the category weights, or readjusting the model parameters. The optimized model is then re-executed through steps 2 to 4 to create a new version of the model to be updated, which is then published to the model update service, thus forming a continuous model optimization process.

8. A tongue recognition system based on a reparameterized multi-scale residual network according to claim 7, characterized in that, The edge model update module includes a model verification unit, a model replacement unit, and an exception rollback unit. The working process of the edge model update module includes: Step 1: The model verification unit sequentially performs integrity and compatibility checks on the model file to be updated. If the integrity check fails, the current model update is terminated and the currently running model continues to be used. If the integrity check passes, the model format, input image size, number of output categories, operating environment, compatible device type, and version information of the model to be updated are further checked to see if they match the current lightweight edge device. The integrity verification includes: reading the model file to be updated through the model verification unit and verifying it according to the model file verification value published by the model training and data management terminal; when the model file to be updated is missing, the file cannot be read normally, or the model file verification value calculated by the lightweight edge device is inconsistent with the verification value provided by the publishing terminal, the integrity verification is determined to be unsuccessful, the current model update is terminated, and the currently running model continues to be used. The compatibility verification includes: after the model to be updated passes the integrity verification, the model verification unit checks whether the model format, input image size, number of output categories, operating environment, compatible device type and version information of the model to be updated match the current lightweight edge device. Step 2: After the model to be updated passes both the integrity check and the compatibility check, the model replacement unit saves the currently running model and its corresponding version information to form a stable model backup before the update. Step 2.1: Load the model to be updated through the model replacement unit, and perform a trial run using a preset test tongue image to detect whether the model to be updated can complete the model loading, forward inference, and output of tongue image category and bounding box results normally; when the trial run results meet the preset running conditions, it is determined that the model to be updated can run normally; otherwise, the model replacement is terminated, and the stable model before the update is continued to be used. Step 2.2: After the model to be updated passes the trial run, the model replacement unit sets the model to be updated as the current running model and updates the model version information synchronously, so that subsequent tongue recognition tasks can call the updated model to perform local inference. Step 3: After the model replacement is completed, monitor the loading status and inference running status of the updated model; when a model loading failure, abnormal exit of the inference program, abnormal prediction output format, or other preset model running abnormality is detected, stop calling the updated model through the abnormal rollback unit, and restore the stable model backup and its corresponding version information saved by the model replacement unit before the model replacement. Step 4: After completing the model replacement or abnormal rollback, record the original model version, the model version to be updated, the verification result, the trial run result, the model replacement result, the rollback status, and the update time for this update. This will serve as the basis for subsequent model version management and system maintenance.

9. A tongue recognition system based on a reparameterized multi-scale residual network according to claim 8, characterized in that, The tongue image acquisition module includes a camera acquisition unit, an image acquisition unit, an image transmission unit, and an edge device input unit. The camera acquisition unit acquires raw images of the user's tongue. The image acquisition unit extracts valid tongue images from the camera output data. The image transmission unit transmits the valid tongue images to a lightweight edge device. The edge device input unit inputs the received tongue images into a subsequent processing module within the lightweight edge device. The tongue image optimization module includes an illumination enhancement unit, a contrast optimization unit, a denoising and sharpening unit, and a ROI cropping unit. The illumination enhancement unit corrects the brightness of tongue images with insufficient or uneven local brightness. The contrast optimization unit enhances the grayscale or color differences between the tongue body and areas such as tongue coating, cracks, teeth marks, and red dots. The denoising and sharpening unit suppresses random noise in the image and enhances the tongue edges, surface texture, and local details. The ROI cropping unit determines the tongue region and crops the region of interest (ROI) containing the complete tongue from the input image to reduce interference from the face, lips, and background regions for subsequent recognition. The auxiliary analysis module receives the tongue feature categories, detection locations, and category confidence levels output by the YOLO26 lightweight tongue image recognition module, and summarizes and performs correlation analysis on the recognition results. Based on the pre-established correspondence between tongue image features and health tips, it combines and analyzes the recognized tongue color, coating color, cracks, teeth marks, red dots, and tongue shape features to generate corresponding tongue image feature descriptions, daily diet suggestions, rest suggestions, lifestyle suggestions, and health attention tips. The recognition results and suggestions are then used to generate a tongue image auxiliary analysis report according to a preset report template for users to view in the local display and interaction module. The local display and interaction module includes a tongue diagnosis result display unit, a historical record query unit, a user information management unit, and a settings and maintenance unit. The tongue diagnosis result display unit is configured to present the tongue image recognition results and corresponding auxiliary analysis reports in a visual manner on the local display interface after tongue image recognition is completed. The historical record query unit is configured to retrieve and display the user's historical tongue image recognition records from local storage in response to the user's query operation. The user information management unit is configured to add, modify, delete, and view user information stored locally. The settings and maintenance unit is configured to provide an operation entry point for system parameter configuration, operational status monitoring, and daily maintenance management, and to update corresponding parameters or maintenance items upon receiving the user's setting instructions.

10. A tongue image recognition method based on reparameterized multi-scale residual networks, characterized in that, The tongue image recognition system based on a reparameterized multi-scale residual network as described in claim 9 includes the following steps: Step 1: The user enters the lightweight tongue image recognition system, acquires the user's original tongue image through the tongue image acquisition module, and transmits the original tongue image to the lightweight edge device; Step 2: The lightweight edge device calls the tongue image optimization module to sequentially perform illumination enhancement, contrast optimization, noise reduction and sharpening, and ROI cropping on the original tongue image to obtain an optimized tongue image. When the brightness, contrast, and ROI integrity indicators all meet preset thresholds, the optimized tongue image is deemed qualified. If any indicator fails to meet the preset threshold, the corresponding processing operation is re-executed for that indicator. If, after a preset number of processing iterations, any indicator still fails to meet the preset threshold, a prompt to re-acquire the image is output. Step 3: Input the qualified optimized tongue image into the YOLO26 lightweight tongue image recognition module, and sequentially perform heavy parameterized lightweight feature extraction, multi-scale feature transfer, high-frequency detail and global semantic adaptive fusion, coarse boundary regression and local residual boundary correction processing, and output the tongue image feature category, category confidence and corresponding bounding box coordinates. Step 4: The auxiliary analysis module performs auxiliary analysis based on the tongue image feature category, category confidence level, and bounding box coordinates to generate tongue image auxiliary recognition results that include daily conditioning and protection suggestions.