Intelligent oral lesion recognition system based on deep learning

CN123015567APending Publication Date: 2026-10-30NANJING FIRST HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0003]针对现有技术存在的口腔黏膜图像中镜面反射与唾液干扰导致病灶识别准确率低的问题,本申请通过基于深度学习的口腔病灶智能识别系统,实现了对复杂口腔环境下病灶区域的精准分割与识别

Benefits of technology

[0019]本申请通过多帧纹理熵分析与亮度联合判定,能够精准定位镜面反射区域,并利用时序信息中纹理最清晰的帧进行像素级填补,从源头上恢复了被反光遮蔽的黏膜纹理细节,避免了单帧修复带来的信息丢失或模糊。在此基础上,结合边缘梯度径向对称度与内部纹理熵检测唾液气泡,利用两侧梯度对向性检测唾液拉丝,实现了对不同类型唾液干扰的精细化区分;进而根据干扰类型对边缘梯度进行差异化衰减处理,在抑制伪影梯度的同时保留了真实组织的结构梯度,显著降低了干扰因素对分割网络的误导。进一步地,通过干扰位置编码模块将干扰掩膜的距离变换特征融入分割网络,使模型能够显式感知干扰区域的空间分布,增强了网络对病灶与伪影的辨别能力。最后,通过对识别结果边界进行曲率连续性检测与平滑修正,消除了因残留干扰导致的边界锯齿或突变,提升了病灶边界的几何合理性与临床诊断参考价值。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015567A_ABST
    Figure CN123015567A_ABST
Patent Text Reader

Abstract

The application relates to the field of medical image processing, and provides an oral cavity lesion intelligent identification system based on deep learning, which comprises the following steps: acquiring multiple oral mucosa images and calculating a texture entropy graph, and combining a brightness graph to mark a surface reflection area; selecting a frame with the maximum texture entropy to fill the reflection area to obtain a reflection suppression image; detecting saliva bubbles based on edge gradient radial symmetry and internal texture entropy, and detecting saliva drawing based on gradient directionality to generate an interference mask; obtaining an interference suppression image according to the differentiated attenuation of edge gradient according to the interference type; and inputting the interference suppression image and the interference mask into a lesion segmentation network to obtain an identification result. The application effectively suppresses mirror reflection and saliva interference, and improves the accuracy and boundary rationality of oral cavity lesion identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image processing, specifically to a deep learning-based intelligent recognition system for oral lesions. Background Technology

[0002] In the clinical diagnosis and screening of oral diseases, oral mucosal imaging technology based on handheld acquisition devices is widely used. However, due to the complex internal environment of the oral cavity, the moist mucosal surface is prone to specular reflection, and the presence of saliva can create air bubbles or stringy bright areas. These optical interference factors manifest as bright or textured abnormalities similar to lesions in the image, severely interfering with feature extraction by subsequent image processing algorithms. Existing lesion recognition systems typically employ general image enhancement or a single deep learning segmentation model, which struggles to effectively distinguish between the true lesion edges and artifact edges caused by reflections and saliva. This results in numerous false positives or blurred boundaries in the lesion segmentation results, reducing the accuracy and clinical usability of intelligent recognition. Summary of the Invention

[0003] To address the problem of low accuracy in lesion identification caused by specular reflection and saliva interference in oral mucosal images in existing technologies, this application utilizes a deep learning-based intelligent oral lesion identification system to achieve accurate segmentation and identification of lesion areas in complex oral environments.

[0004] To achieve the above objectives, this application adopts the following technical solution:

[0005] A deep learning-based intelligent oral lesion recognition system includes: at least one processor; and,

[0006] A memory that is communicatively connected to at least one processor; wherein,

[0007] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor to cause at least one processor to perform:

[0008] Acquire multiple frames of oral mucosa images continuously captured by a handheld acquisition device within a preset acquisition time; calculate the texture entropy value of each local window in each frame of the oral mucosa image to obtain the texture entropy map corresponding to each frame; based on the difference between the texture entropy maps of adjacent frames and the brightness map of the corresponding frame, mark the specular reflection areas in each frame; for each target pixel position in the specular reflection area of ​​each frame, select the frame with the largest texture entropy value at the target pixel position from the multiple frames of oral mucosa images as the infill source frame, and replace the pixel value of the target pixel position in the current frame with the pixel value at the corresponding position in the infill source frame to obtain the corresponding texture entropy map for each frame. A reflection-suppressed image is generated. On this image, saliva bubble regions are detected based on the radial symmetry of the edge gradient of candidate circular regions and the entropy value of the texture within the region. Saliva string regions are detected based on the antagonism of the gradient directions on both sides of the elongated, bright region. The saliva bubble regions and saliva string regions are merged to generate an interference mask. Based on the type of each interference region in the interference mask, the gradient amplitude of the edges of the interference regions in the reflection-suppressed image is differentially attenuated to obtain the interference-suppressed image. The interference-suppressed image and the interference mask are input into a pre-trained lesion segmentation network to obtain the oral lesion recognition results.

[0009] Optionally, based on the difference between the texture entropy maps of adjacent frames and the brightness map of the corresponding frame, the specular reflection region in each frame is marked, including: calculating the absolute value of the pixel-by-pixel difference between the texture entropy maps of two adjacent frames to obtain a texture entropy fluctuation map; marking the region in the texture entropy fluctuation map where the pixel value is greater than a preset fluctuation threshold as a texture unstable region; in the texture unstable region, filtering the pixel positions in the brightness map of the current frame where the brightness value is greater than a preset brightness threshold, and marking the connected region where the filtered pixel position is located as a specular reflection region.

[0010] Optionally, the texture entropy value of each local window in each frame of the oral mucosa image is calculated, including: sliding the window on the oral mucosa image with a preset window size and a preset step size to obtain each local window; calculating the gray-level histogram of the pixel gray-level values ​​in each local window, and calculating the occurrence probability of each gray level based on the gray-level histogram; calculating the information entropy of each local window based on the occurrence probability of each gray level to obtain the texture entropy value; and assigning the texture entropy value of each local window to the corresponding window center pixel position to generate a texture entropy map.

[0011] Optionally, after selecting the frame with the largest texture entropy value at the target pixel position from multiple frames of oral mucosa images as the filling source frame, the method further includes: determining whether the texture entropy value at the target pixel position in the filling source frame is greater than a preset lower limit of texture entropy; if it is greater than the preset lower limit of texture entropy, then performing the step of replacing the pixel value at the target pixel position in the current frame with the pixel value at the corresponding position in the filling source frame; if it is not greater than the preset lower limit of texture entropy, then searching for effective neighboring pixels within a preset radius in the pixel positions that have been filled in the current frame with the target pixel position as the center, performing bilinear interpolation based on the pixel values ​​of the effective neighboring pixels to obtain interpolated pixel values, and replacing the pixel value at the target pixel position in the current frame with the interpolated pixel values.

[0012] Optionally, the detection of saliva bubble regions based on the radial symmetry of the edge gradient of candidate circular regions and the texture entropy value inside the region includes: performing adaptive threshold segmentation on the reflection suppression image and extracting each closed contour as a candidate contour; filtering candidate contours whose roundness is greater than a preset roundness threshold and whose area is within a preset area range to obtain candidate circular regions; calculating the texture entropy value of pixels inside each candidate circular region to obtain the texture entropy inside the region; calculating the angle deviation between the gradient direction of each sampling point on the edge of each candidate circular region and the direction pointing from the sampling point to the center of the region, and using the standard deviation of the angle deviation of each sampling point as the radial symmetry of the edge gradient; and confirming candidate circular regions whose texture entropy inside the region is less than a preset internal entropy threshold and whose radial symmetry of the edge gradient is less than a preset symmetry threshold as saliva bubble regions.

[0013] Optionally, the detection of saliva-stringing regions based on the opposing gradient directions on both sides of the elongated bright region includes: performing directional gradient filtering on the reflection suppression image to extract linear bright regions with a width less than a preset width threshold and a length greater than a preset length threshold; sampling along the center line of each linear bright region at preset distances on both sides of the center line to obtain a left sampling point sequence and a right sampling point sequence; calculating the angle between the gradient direction of each sampling point in the left sampling point sequence and the gradient direction of the corresponding sampling point in the right sampling point sequence to obtain an opposing angle sequence; calculating the mean of the opposing angle sequence, and identifying linear bright regions with a mean greater than a preset opposing threshold as saliva-stringing regions.

[0014] Optionally, based on the type of each interference region in the interference mask, differential attenuation processing is performed on the gradient magnitude of the edges of the interference regions in the reflection suppression image, including: for the saliva bubble region in the interference mask, calculating the direction vector from each pixel at the bubble edge to the bubble center, multiplying the gradient component of each pixel along the direction vector within a preset width range of the bubble edge in the reflection suppression image by a first attenuation coefficient to obtain the bubble region correction gradient; the first attenuation coefficient increases with the increase of the distance from the pixel to the bubble edge; for the saliva string region in the interference mask, calculating the tangent direction of the string center line, multiplying the gradient component of each pixel along the direction perpendicular to the tangent within a preset width range of the string region in the reflection suppression image by a second attenuation coefficient, while retaining the gradient component along the tangent direction unchanged, to obtain the string region correction gradient; replacing the original gradient of the corresponding region in the reflection suppression image with the bubble region correction gradient and the string region correction gradient to reconstruct the interference suppression image.

[0015] Optionally, the lesion segmentation network includes a feature extraction backbone network, an interference location encoding module, and a segmentation head. The interference suppression image and the interference mask are input into the pre-trained lesion segmentation network to obtain oral lesion recognition results. This includes: inputting the interference suppression image into the feature extraction backbone network to extract multi-scale feature maps; downsampling the interference mask to a spatial size matching the multi-scale feature maps and then inputting it into the interference location encoding module to generate interference location encoding features; fusing the interference location encoding features and the multi-scale feature maps element-wise to obtain a fused feature map; and inputting the fused feature map into the segmentation head for upsampling and classification to obtain oral lesion recognition results.

[0016] Optionally, the process of generating interference location coding features by the interference location coding module includes: performing a distance transformation on the downsampled interference mask to obtain the distance value of each pixel to the boundary of the nearest interference region, generating a distance transformation map; mapping the distance transformation map to a feature tensor with the same number of channels as the multi-scale feature map through a convolutional layer; applying a negative bias to the channel values ​​inside the corresponding interference region in the feature tensor, and applying a positive bias to the channel values ​​outside the corresponding interference region, to obtain the interference location coding features.

[0017] Optionally, acquiring multiple frames of oral mucosa images continuously acquired by a handheld acquisition device within a preset acquisition time period includes: controlling the handheld acquisition device to continuously acquire images at a preset frame rate within the preset acquisition time period to obtain an initial image sequence; calculating the global displacement between adjacent frames in the initial image sequence; filtering adjacent frame pairs whose global displacement is within a preset displacement range, retaining the corresponding frames, and obtaining multiple frames of oral mucosa images; wherein, the upper limit of the preset displacement range ensures that the field of view overlap rate between adjacent frames is greater than a preset overlap rate threshold.

[0018] Beneficial effects:

[0019] This application, through multi-frame texture entropy analysis and joint brightness determination, can accurately locate specular reflection areas and utilize the frame with the clearest texture in the temporal information for pixel-level filling, restoring the mucosal texture details obscured by reflections from the source, avoiding information loss or blurring caused by single-frame restoration. Based on this, it combines edge gradient radial symmetry and internal texture entropy to detect saliva bubbles and utilizes lateral gradient antagonism to detect saliva strands, achieving refined differentiation of different types of saliva interference. Furthermore, it performs differentiated attenuation processing on edge gradients according to interference type, suppressing artifact gradients while preserving the structural gradient of real tissue, significantly reducing the misleading influence of interference factors on the segmentation network. Further, by integrating the distance transformation features of the interference mask into the segmentation network through an interference location encoding module, the model can explicitly perceive the spatial distribution of interference areas, enhancing the network's ability to distinguish lesions from artifacts. Finally, by performing curvature continuity detection and smoothing correction on the boundaries of the recognition results, it eliminates boundary jaggedness or abrupt changes caused by residual interference, improving the geometric rationality of lesion boundaries and their clinical diagnostic reference value. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of a deep learning-based intelligent oral lesion recognition system according to an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0023] Example 1

[0024] like Figure 1 As shown, this application provides a deep learning-based intelligent oral lesion recognition system. The system constructs an end-to-end processing closed loop from original image acquisition to final lesion segmentation, aiming to solve the recognition challenges caused by reflections and saliva interference in the complex oral environment. Specifically, the system includes:

[0025] At least one processor; and,

[0026] A memory that is communicatively connected to at least one processor; wherein,

[0027] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor to cause the at least one processor to perform the following steps:

[0028] Step S100: Acquire multiple frames of oral mucosa images continuously acquired by the handheld acquisition device within a preset acquisition time.

[0029] Specifically, this step forms the data foundation for the entire recognition process. Considering the dynamic nature of the oral cavity environment and the unavoidable shaking of handheld devices, single-frame images often suffer from information loss or motion blur. Therefore, this application employs a temporal multi-frame strategy. The preset acquisition duration is typically set to a time window that covers the entire scanning process of the target area, such as 1 to 3 seconds, to ensure a sufficient number of valid frames are acquired. The introduction of multiple frames not only provides redundant information sources for subsequent reflection restoration but also lays the data foundation for eliminating random noise and transient artifacts.

[0030] Step S200: Calculate the texture entropy value of each local window in each frame of oral mucosa image to obtain the texture entropy map corresponding to each frame; based on the difference between the texture entropy maps of adjacent frames and the brightness map of the corresponding frame, mark the specular reflection area in each frame.

[0031] Specifically, texture entropy is a key indicator for measuring the richness of local information in an image. In oral mucosal imaging, normal mucosal tissue possesses rich texture details, exhibiting a high texture entropy value; while specular reflection areas, due to overexposure under strong light, result in pixel saturation and uniformity, leading to a significant decrease in texture entropy. By calculating the texture entropy of local windows, this visual "reflection" can be transformed into a quantifiable numerical feature. Furthermore, by utilizing the difference in texture entropy maps between adjacent frames, the dynamic fluctuation characteristics of reflective areas as the viewing angle changes can be captured. Combined with highlight filtering from the brightness map, it is possible to accurately distinguish true specular reflection areas from lesions or tooth areas that are themselves bright but have stable textures, thereby avoiding mislabeling.

[0032] Step S300: For each target pixel position in the specular reflection region of each frame, select the frame with the largest texture entropy value at the target pixel position from the multi-frame oral mucosa images as the filling source frame, and replace the pixel value of the target pixel position in the current frame with the pixel value of the corresponding position in the filling source frame to obtain the reflection suppression image corresponding to each frame.

[0033] Specifically, this is the core step in image inpainting based on temporal information. Due to the movement of handheld devices, the probability of the same spatial location being obscured by reflections varies in different frames. Selecting the frame with the highest texture entropy value as the inpainting source essentially means choosing the moment when the information at that location is most complete and least affected by reflections for data restoration. This inpainting strategy, based on content quality rather than simple averaging, can preserve the true texture details of the mucosal surface to the greatest extent, avoiding the ghosting or blurring phenomena produced at reflective edges by traditional multi-frame averaging fusion methods. The reflection-suppressed image output after this step visually eliminates most of the highlight white spots and restores the obscured tissue structure.

[0034] In step S400, on the reflection suppression image, the saliva bubble region is detected based on the radial symmetry of the edge gradient of the candidate circular region and the texture entropy value inside the region; the saliva string region is detected based on the opposition of the gradient directions on both sides of the slender bright region; the saliva bubble region and the saliva string region are merged to generate an interference mask.

[0035] Specifically, although step S300 removes specular reflection, saliva-formed bubbles and strands may still remain and exhibit lesion-like bright features. This step designs a dedicated geometric and texture joint detection mechanism for these two interference morphologies. For bubbles, their perfectly circular outline and low-texture internal features, determined by their physical origin, are specifically identified using the geometric descriptor of radial symmetry of edge gradients. For strands, their elongated shape and the opposing characteristics of gradients on both sides pointing towards the center line are used for extraction. The interference mask generated by merging these two types of detection results accurately identifies all non-lesion artifact regions, providing spatial priors for subsequent targeted processing.

[0036] Step S500: Based on the type of each interference region in the interference mask, perform differential attenuation processing on the gradient magnitude of the edge of the interference region in the reflection suppression image to obtain the interference suppression image.

[0037] Specifically, this is a crucial bridge connecting traditional image processing and deep learning. Directly erasing interference regions may disrupt image continuity or lose real lesion information located at the edges of interference. The core idea of ​​differentiated attenuation processing lies in "tailored approach": for isotropic bubbles, omnidirectional gradient suppression is used to smooth the transition; for directional filaments, gradients in the perpendicular tangential direction are suppressed while gradients in the parallel tangential direction are preserved, thereby maintaining the linear structural features of the tissue. The interference-suppressed image generated by this processing method weakens the misleading effect of artifacts on the segmentation network while preserving potential lesion edge clues to the greatest extent, achieving a balance between artifact removal and truth preservation.

[0038] In step S600, the interference suppression image and the interference mask are input together into the pre-trained lesion segmentation network to obtain the oral lesion recognition result.

[0039] Specifically, unlike conventional segmentation models that rely solely on a single image input, this application employs a dual-channel collaborative input architecture. The interference-suppressed image provides enhanced visual features, while the interference mask provides explicit spatial location priors. The fusion of these two within the network enables the model to not only learn the morphological features of the lesion itself but also perceive and avoid the influence of residual interference, significantly improving segmentation robustness in complex oral environments. It should be understood that although this embodiment describes the specific processing sequence described above, in practical applications, as long as the logical dependencies of the data flow remain unchanged, the execution order of some steps or the combination of modules can be adjusted according to hardware computing power or real-time requirements, which does not depart from the scope of protection of this application.

[0040] Example 2

[0041] In this embodiment, the generation process of the texture entropy map and the marking mechanism of the specular reflection region in step S200 are further refined. Specifically, the texture entropy value of each local window in each frame of the oral mucosa image is calculated, including: sliding the image on the oral mucosa image with a preset window size and a preset step size to obtain each local window; calculating the gray-level histogram of the pixel gray-level values ​​in each local window, and calculating the occurrence probability of each gray level based on the gray-level histogram; calculating the information entropy of each local window based on the occurrence probability of each gray level to obtain the texture entropy value; and assigning the texture entropy value of each local window to the corresponding window center pixel position to generate a texture entropy map. This process transforms the visual texture features of the image into a quantifiable numerical distribution. The preset window size is typically set between 7×7 and 15×15 pixels, and the step size can be set to 1 to ensure that the spatial resolution of the texture entropy map is consistent with the original image. Figure 1 The value can also be set to 2 or higher to accelerate calculations, depending on real-time requirements. The formula for calculating information entropy is... ,in Indicates the grayscale level within the window The probability of its occurrence, This represents the total number of gray levels. Texture entropy, rather than simply the gray-level mean, is used as the criterion for reflectivity because the oral mucosa itself exhibits physiological characteristics of varying color depths. Some normal tissues (such as the gingival margin) may appear brighter, but their surfaces still retain rich microscopic texture structures, resulting in higher texture entropy values. Conversely, specular reflection areas, due to overexposure, cause sensor saturation, leading to uniform pixel values ​​and a sharp decrease in information content, resulting in a significant reduction in texture entropy values. Therefore, texture entropy can effectively distinguish between "bright but textured normal tissues" and "bright but textureless reflective areas" from an information theory perspective, avoiding false detections caused by a single brightness threshold.

[0042] Based on this, specular reflection regions in each frame are marked according to the difference between the texture entropy maps of adjacent frames and the brightness map of the corresponding frame. This includes: calculating the absolute value of the pixel-by-pixel difference between the texture entropy maps of two adjacent frames to obtain a texture entropy fluctuation map; marking regions in the texture entropy fluctuation map where the pixel value is greater than a preset fluctuation threshold as texture unstable regions; and in texture unstable regions, selecting pixel positions in the brightness map of the current frame where the brightness value is greater than a preset brightness threshold, and marking the connected regions where the selected pixel positions are located as specular reflection regions. The core physical basis for introducing the texture entropy difference between adjacent frames lies in the dynamic characteristics of the handheld acquisition device. During actual scanning, the relative position between the light source and the mucosal surface changes continuously, causing specular reflection spots to move rapidly or flicker in the image sequence. This causes the texture entropy of the same spatial location to jump drastically between different frames, thus forming a high response value in the texture entropy fluctuation map. In contrast, although teeth, ulcers, or other bright lesions may also appear as low texture entropy in a single frame image, they are usually continuously changing or relatively static between adjacent frames, and do not produce abrupt texture entropy fluctuations. By setting a preset fluctuation threshold (e.g., between 0.5 and 1.5), this temporal instability caused by reflection can be accurately captured. Subsequent filtering using a brightness map eliminates low-entropy fluctuations caused by shadow areas or dark noise, ensuring that the final marked area simultaneously meets both the necessary conditions of "drastic temporal texture change" and "instantaneous highlighting." This joint determination mechanism constructs a dual defense for reflection detection, significantly improving robustness in complex oral cavity environments compared to methods relying solely on single-frame features.

[0043] For each target pixel location in the specular reflection region of each frame, after selecting the frame with the largest texture entropy value at the target pixel location from multiple frames of oral mucosa images as the infill source frame, the process further includes: determining whether the texture entropy value at the target pixel location in the infill source frame is greater than a preset lower limit of texture entropy; if it is greater than the preset lower limit, then the pixel value at the target pixel location in the current frame is replaced with the pixel value at the corresponding location in the infill source frame; if it is not greater than the preset lower limit, then effective neighboring pixels within a preset radius are searched in the already infilled pixel locations in the current frame, with the target pixel location as the center, and bilinear interpolation is performed based on the pixel values ​​of the effective neighboring pixels to obtain the interpolated pixel value, which is then used to replace the pixel value at the target pixel location in the current frame. This step constitutes the safety fallback strategy of the multi-frame texture infill mechanism. Prioritizing the selection of the frame with the largest texture entropy for infill essentially utilizes the optimal sample in the temporal redundancy information. Compared with the traditional multi-frame averaging fusion method, it can preserve the high-frequency texture details of the mucosa surface to the greatest extent and avoid edge blurring or ghosting effects caused by averaging. However, in certain extreme cases, such as when the reflective spot area is large and consistently covers the same region across multiple frames, or when device jitter causes the region to be underexposed or motion-blurred in all frames, even if the frame with the highest texture entropy is selected, its value may still be lower than the preset lower limit of texture entropy (e.g., between 2.0 and 3.0) representing effective texture information. Forcibly replacing this with a low-quality pixel not only fails to restore the true texture but may also introduce new artifacts or noise. Therefore, this embodiment designs an interpolation compensation mechanism based on spatial neighborhood. When an unreliable filling source is detected, the system automatically switches to spatial domain repair mode, searches for effective neighboring pixels within a preset radius (e.g., 10 to 20 pixels) in the current frame that have already undergone high-quality filling, and estimates the pixel value at the target location using a bilinear interpolation algorithm. This approach utilizes the assumption of the continuity of oral mucosal texture in local space, generating a visually smooth transition filling result even in the case of complete loss of temporal effective information. This effectively avoids black holes or breaks in the repaired image, ensuring the integrity and continuity of the input data for subsequent lesion segmentation networks. It should be understood that the aforementioned preset window size, fluctuation threshold, texture entropy lower limit, and search radius are merely illustrative examples. In practical applications, they can be adaptively adjusted or calibrated according to the resolution of the imaging device, lighting conditions, and mucosal type, which does not depart from the scope of protection of this application.

[0044] Example 3

[0045] In this embodiment, the detection mechanism for saliva bubble regions in step S400 is further refined. Specifically, the detection of saliva bubble regions based on the radial symmetry of the edge gradient of candidate circular regions and the texture entropy value inside the region includes: performing adaptive threshold segmentation on the reflection suppression image and extracting each closed contour as a candidate contour; filtering candidate contours whose roundness is greater than a preset roundness threshold and whose area is within a preset area range to obtain candidate circular regions; calculating the texture entropy value of the pixels inside each candidate circular region to obtain the texture entropy inside the region; calculating the angle deviation between the gradient direction of each sampling point on the edge of each candidate circular region and the direction pointing from the sampling point to the center of the region, and using the standard deviation of the angle deviation of each sampling point as the radial symmetry of the edge gradient; and confirming candidate circular regions whose texture entropy inside the region is less than a preset internal entropy threshold and whose radial symmetry of the edge gradient is less than a preset symmetry threshold as saliva bubble regions.

[0046] This detection path is a defensive subsystem specifically designed for "point-like" or "quasi-circular" interference in the oral environment. Although most specular reflections have been removed through multi-frame fusion in the preceding steps, saliva bubbles attached to the mucosal surface may still remain as locally bright or abnormally contrasting circular areas in the reflection-suppressed image due to their spherical lens effect. If not distinguished, these bubbles are easily misidentified by the subsequent segmentation network as ulcers, herpes, or other quasi-circular lesions. This embodiment establishes a strong binding relationship between interference features and physical causes by introducing the geometric descriptor "edge gradient radial symmetry," thereby achieving high-precision specific identification.

[0047] Specifically, when performing adaptive thresholding segmentation on reflection-suppressed images, the Otsu algorithm or a local adaptive thresholding method can be used to adapt to the uneven illumination characteristics of oral images, thereby robustly extracting all potential closed contours. Subsequent morphological screening is the first line of defense in reducing computational load. The preset roundness threshold is typically set between 0.75 and 0.9, preferably 0.85. This is because saliva bubbles, due to surface tension, tend to be perfectly spherical at the microscopic scale, resulting in extremely high roundness values; while real oral lesions (such as erosions and ulcers), although potentially approximately circular, often exhibit irregular boundaries due to the randomness of biological tissue growth and edge infiltration characteristics, resulting in roundness values ​​typically below 0.8. Simultaneously, the preset area range should be calibrated according to the field of view and resolution of the imaging device; for example, in a 640×480 resolution endoscopic image, it can be set to 15 to 400 pixels. This range eliminates excessively small noise spots and excessively large reflective areas of teeth or tongue, focusing the detection on candidate targets that match the physical size of saliva bubbles.

[0048] After obtaining the candidate circular regions, dual verification of texture and geometry is required. The process of calculating the texture entropy within the region is similar to that in the previous embodiment, but here the focus is on the amount of information within the closed region. The interior of saliva bubbles is usually composed of uniform saliva liquid or air, lacking the papillary or folded microstructures of the mucosal surface. Therefore, its internal texture entropy value is significantly lower than that of normal tissue or lesion areas. The preset internal entropy threshold can be dynamically set based on the average texture entropy of the entire image, or an empirical value such as 2.5 to 3.5 can be used. Low texture entropy alone is not sufficient for diagnosis, because some smooth tooth surfaces or overexposed areas may also exhibit low entropy. This leads to the core innovation of this embodiment—the calculation of the radial symmetry of the edge gradient.

[0049] The calculation logic for the radial symmetry of the edge gradient is as follows: First, select N sampling points along the edge of the candidate circular region with a fixed step size (e.g., N=36, i.e., one point every 10 degrees); for each sampling point, calculate its image gradient direction angle. and the vector direction angle pointing from that point to the geometric center of the region. Next, calculate the angle deviation between the two. Ideally, for a perfectly circular highlight or shadow, the edge gradient direction should be strictly parallel to the radial vector (i.e., pointing towards or away from the center of the circle). Approaching 0 or 180 degrees; finally, calculate all sampling points. Standard deviation As a measure of symmetry, standard deviation. The smaller the value, the higher the consistency of the edge gradient direction, and the closer the shape is to a perfect circular symmetry. For saliva bubbles, due to their smooth and continuous optical interface, The values ​​are usually extremely low; however, for lesions, even if their overall outline is approximately circular, the gradient direction at their edges is often chaotically distributed due to the breakage of tissue texture and the coverage of exudate, leading to... The value is relatively large. It is recommended to set the preset symmetry threshold between 0.15 and 0.3, for example, 0.2. Only when a candidate region simultaneously meets both conditions—"internal texture entropy < preset internal entropy threshold" and "edge gradient radial symmetry < preset symmetry threshold"—is it finally identified as a salivary bubble region. This joint determination mechanism effectively avoids the limitations of a single feature: for example, a circular white ulcer may have high symmetry but high internal texture entropy (because of necrotic tissue texture); a low texture entropy shaded region may have low entropy but asymmetrical edge gradient. Only when both conditions are met can bubble interference be accurately located, providing a reliable mask for subsequent differential gradient decay processing. It should be understood that the above thresholds are merely exemplary values ​​based on typical clinical data. In actual deployment, ROC curve analysis can be performed on labeled datasets to determine the optimal operating point, which does not depart from the scope of protection of this application. Example 4

[0050] In this embodiment, the detection mechanism for the saliva stringing region in step S400 is further refined. Parallel to the detection path for dot-like bubbles in Embodiment 3, this embodiment specifically constructs recognition logic for linear saliva interference in the oral cavity environment. Specifically, based on the directional detection of the saliva stringing region according to the gradient directions on both sides of the elongated bright region, the method includes: performing directional gradient filtering on the reflection suppression image to extract linear bright regions with a width less than a preset width threshold and a length greater than a preset length threshold; sampling along the center line of each linear bright region at preset distances on both sides of the center line to obtain a left sampling point sequence and a right sampling point sequence; calculating the angle between the gradient direction of each sampling point in the left sampling point sequence and the gradient direction of the corresponding sampling point in the right sampling point sequence to obtain a directional angle sequence; calculating the mean of the directional angle sequence, and identifying linear bright regions with a mean greater than a preset directional threshold as saliva stringing regions.

[0051] The core of this detection approach lies in utilizing the unique physical and optical properties of saliva strands to distinguish them from other linear anatomical structures. In the moist environment of the oral cavity, saliva often forms liquid bridges, or strands, between teeth and mucosa or between mucosal folds. Due to the surface tension of the liquid, the strands are microscopically approximately cylindrical. When illuminated by an endoscopic light source, their cross-sectional brightness distribution exhibits typical Gaussian or parabolic characteristics: the central ridge is the brightest due to the strongest specular reflection or transmission, and the brightness gradually decreases towards the edges. This specific brightness distribution determines that at the edges of the strands, the direction of the image gradient vector must be perpendicular to the direction of the strands and point towards the central bright ridge. Therefore, if sampling is performed symmetrically on both sides of the center line of the strands, the gradient direction of the sampling point on the left should be approximately to the right, and the gradient direction of the sampling point on the right should be approximately to the left, with the two exhibiting a significant "opposing" or "converging" trend geometrically. In contrast, while blood vessels in the oral cavity also appear linear, they are filled with blood and have strong light absorption, typically appearing as dark lines or uniformly bright reddish-brown bands. Their edge gradients often have inconsistent directions or point towards the external background. Mucosal folds, although they may have highlights, usually have wider, flatter tops and lack the sharp, symmetrical gradient convergence characteristic of cylindrical fluid bridges. Therefore, "lateral gradient opposition" becomes a specific fingerprint for distinguishing salivary silk from actual anatomical structures.

[0052] In practical implementation, directional gradient filtering is first applied to the reflection suppression image. This step is not only to enhance the linear structure but also to suppress residual point noise and non-directional texture interference. Directional gradient filtering can be achieved using a set of Gabor filters or SteerableFilters at different angles; the direction with the strongest response represents the local orientation of the linear region. Based on this, connected linear skeletons are extracted through non-maximum suppression and hysteresis thresholding, and morphological constraints are used to screen candidate targets that conform to the physical dimensions of saliva strands. The preset width threshold is recommended to be set to 3 to 15 pixels to exclude excessively wide tongue coating reflective areas or excessively fine sensor noise; the preset length threshold is recommended to be set to 30 to 50 pixels or more to ensure that the detected strands have a certain degree of extension rather than isolated bright spots. The selection of these parameters is directly related to the endoscope's imaging resolution and working distance, and should be calibrated according to the equipment specifications during actual deployment.

[0053] The core reciprocity verification stage then begins. Along the center line of the selected linear highlight region, a series of center points are selected with a fixed step size (e.g., every 2 pixels). At each center point, sampling points are obtained by offsetting to both sides by a preset distance (usually half the line width or a fixed 3-5 pixels) along the normal direction. For each pair of sampling points, the gradient direction angle is calculated. It is important to note that the "reciprocal angle" here refers to the angle between two gradient vectors. If the gradient is defined as the direction of the fastest increase in brightness, then both gradients should point towards the center, and the angle should be close to 0 degrees; if the absolute direction line of the gradient is considered (regardless of orientation), then the two should be nearly parallel. In a preferred embodiment of this application, for ease of calculation and understanding, the gradient vectors on both sides can be uniformly adjusted to point towards the center line before calculating the angle, or the original gradient vectors can be used directly to calculate the angle and the supplementary angle can be taken, so that "complete reciprocity" corresponds to the extreme values ​​of 180 degrees or 0 degrees. Regardless of the mathematical definition used, the key is to measure the degree of consistency of the gradient directions on both sides. Using the mean of the opposing angle sequence as a criterion can effectively smooth out angle jitter caused by local noise. The setting of the preset opposing threshold needs to take into account both recall and precision. For example, when a perfect opposing angle is defined as 180 degrees, the threshold can be set to 150 to 170 degrees. Only when the mean exceeds this threshold is the linear region confirmed to have the gradient convergence characteristics unique to saliva strands, thus including it in the interference mask.

[0054] It should be understood that the saliva string detection described in this embodiment and the saliva bubble detection described in Embodiment 3 are logically independent. In actual system implementation, the two can be executed in parallel to improve processing speed, or they can be executed serially to reuse intermediate calculation results (such as texture entropy maps or gradient maps), or even one of them can be selectively enabled according to the needs of the clinical scenario. This modular design gives the technical solution flexible adaptability to different hardware platforms and application scenarios. Through the above-mentioned detection mechanism based on the binding of geometry and physical causes, this application can accurately peel out linear saliva artifacts in complex oral cavity backgrounds, effectively avoiding misjudging blood vessels, nerve canals, or normal mucosal textures as interference or lesions, and providing accurate spatial guidance for subsequent differentiated gradient attenuation processing.

[0055] Example 5

[0056] In this embodiment, the gradient processing mechanism for different types of interference regions in step S500 is further refined. Specifically, based on the type of each interference region in the interference mask, the gradient magnitude of the edges of the interference regions in the reflection suppression image is differentially attenuated to obtain the interference suppression image. This step is the core bridge connecting traditional computer vision preprocessing and deep learning segmentation models in this application, and its design aims to solve the limitations of a single mask processing method in complex oral environments. In the prior art, artifacts are usually removed by directly multiplying the interference mask as a weight map with the original image. Although this "one-size-fits-all" spatial processing method can eliminate interference, it often erases the texture of real lesions or normal mucosal folds located at the edges of interference, causing the segmentation network to lose key boundary clues. In contrast, the differential gradient attenuation strategy proposed in this embodiment operates at the gradient domain, which is more representative of the image structure features. Different suppression constraints are applied according to the physical morphological characteristics of the interference target, thereby preserving the edge gradient information of potential lesions to the greatest extent while removing artifact gradients.

[0057] For the saliva bubble region in the interference mask, the processing logic follows the principle of isotropic suppression. Specifically, the direction vector from each pixel at the bubble edge to the bubble center is calculated. The gradient components of the direction vectors of each pixel within a preset width range of the bubble edge in the reflection suppression image are multiplied by a first attenuation coefficient to obtain the corrected gradient for the bubble region. The first attenuation coefficient increases with the distance from the pixel to the bubble edge. Since saliva bubbles exhibit an almost perfect spherical lens effect optically, the highlights or dark spots they produce are geometrically radially symmetrical and lack effective biological tissue texture inside. Therefore, the gradient information within the bubble region should be fully suppressed to eliminate its misleading effect on the segmentation network. However, to avoid abrupt artificial traces (i.e., the so-called "hard boundary" effect) at the bubble boundary during suppression, this embodiment introduces a first attenuation coefficient that dynamically changes with distance. For example, this coefficient can be designed as a linearly or Gaussian-increasing function from the bubble center to the edge. When a pixel is located at the center of the bubble, the attenuation coefficient approaches 0, meaning the gradient at that location is completely zeroed. As the pixel moves closer to the bubble's edge, the attenuation coefficient gradually increases to 1, causing the gradient at that location to gradually recover to its original value. This smooth transition mechanism ensures that the processed interference-suppressed image does not exhibit obvious brightness breaks or texture discontinuities around the bubble, maintaining the overall naturalness of the image. The preset width range is typically set to 10% to 30% of the bubble radius to ensure sufficient coverage of the transition zone without affecting excessively distant normal tissue areas.

[0058] For the saliva string region in the interference mask, the processing logic switches to an anisotropic suppression mode. Specifically, the tangent direction of the string's center line is calculated, and the gradient component of each pixel within a preset width range of the string region in the reflection-suppressed image along the tangent direction is multiplied by a second attenuation coefficient, while the gradient component along the tangent direction remains unchanged, resulting in a corrected gradient for the string region. The physical basis of this design is that although saliva strings are interference, they often adhere to mucosal folds, interdental spaces, or blood vessel surfaces, and their direction often coincides with or is parallel to the actual anatomical structure. If the gradient of the string region is suppressed omnidirectionally like that of bubbles, it is very likely to erase the linear structural features of the underlying real tissue, causing irreversible information loss. By decomposing the gradient into two orthogonal components, one perpendicular to the tangent direction and the other parallel to the tangent direction, this scheme achieves refined selective filtering. The gradient perpendicular to the tangent direction mainly corresponds to the highlight edge of the filament itself (i.e., the abrupt change in brightness from high to low). This part is an artifact feature that needs to be suppressed, so it is weakened by multiplying it by a small second attenuation coefficient (e.g., 0.1 to 0.3). The gradient parallel to the tangent direction corresponds to the tissue texture or vascular structure extending along the direction of the filament. This part contains important semantic information and is therefore preserved intact. This "edge-trimming and core-preserving" strategy reduces the attraction of the filament as a highlight artifact to segmentation attention, while preserving the continuity clues of possible lesions or anatomical structures at this location, significantly improving the subsequent network's ability to resolve overlapping areas.

[0059] After completing the targeted gradient corrections described above, the system replaces the original gradients of the corresponding regions in the reflection suppression image with the corrected gradients for the bubble region and the drawn-out region, thus reconstructing the interference-suppressed image. The specific reconstruction method can employ gradient domain reconstruction algorithms, such as Poisson Image Editing, or solving the Poisson equation through Fourier transform. Compared to direct weighted fusion in the pixel domain, gradient domain reconstruction ensures that the generated image satisfies the target gradient field constraints while maintaining smooth consistency of illumination and color globally, effectively avoiding the stitching effect caused by local modifications. It should be understood that although this embodiment preferably uses gradient domain reconstruction to obtain the best visual effect, in embedded devices with limited computing power or application scenarios with extremely high real-time requirements, a simplified pixel domain alternative can also be used. That is, only gradient-based weighted averaging or interpolation filling is performed on the pixel values ​​within the interference region. As long as it can achieve the core technical effect of "suppressing artifact gradient response and preserving the true structural gradient," it should be considered an equivalent implementation within the scope of protection of this application. Through the above differential processing, the final output interference-suppressed image not only visually eliminates reflection and saliva interference, but more importantly, it provides the segmentation network with a "clean" and "structurally complete" data input at the feature level, fundamentally improving the accuracy and robustness of intelligent recognition of oral lesions.

[0060] Example 6

[0061] In this embodiment, the specific architecture and data processing flow of the lesion segmentation network in step S600 are further refined. Specifically, the lesion segmentation network includes a feature extraction backbone network, an interference location encoding module, and a segmentation head. This architecture design breaks through the limitation of traditional medical image segmentation models that rely solely on a single RGB image input, and constructs a dual-channel collaborative perception mechanism. The feature extraction backbone network can employ classic convolutional neural network structures such as ResNet, VGG, or U-Net encoders to extract multi-scale feature maps containing texture, shape, and semantic information from the interference-suppressed image. These multi-scale feature maps typically include shallow high-resolution detail features and deep low-resolution semantic features, which can comprehensively characterize the visual attributes of the oral mucosa and potential lesions. Meanwhile, the interference location encoding module, as the core innovative component of this application, is specifically responsible for processing the interference mask generated in the preceding steps, transforming its spatial prior information into a feature representation that the network can understand, thereby compensating for the insufficient ability of pure data-driven models to perceive artifact locations in complex interference environments.

[0062] The process of inputting the interference-suppressed image and the interference mask into a pre-trained lesion segmentation network to obtain oral lesion recognition results specifically includes: inputting the interference-suppressed image into the feature extraction backbone network to extract multi-scale feature maps; downsampling the interference mask to a spatial size matching the multi-scale feature maps and then inputting it into the interference location encoding module to generate interference location encoded features; fusing the interference location encoded features with the multi-scale feature maps element-wise to obtain a fused feature map; and inputting the fused feature map into the segmentation head for upsampling and classification to obtain oral lesion recognition results. In this process, the downsampling operation of the interference mask is crucial; its spatial resolution must be strictly aligned with the specific level feature map output by the feature extraction backbone network to ensure a one-to-one correspondence of pixel positions during subsequent element-wise addition. Compared to the traditional feature concatenation method, this embodiment adopts an element-wise addition fusion strategy. Its advantage is that it does not increase the number of feature channels, thereby avoiding the expansion of model parameters and the increase in computational complexity. At the same time, the addition operation realizes the direct modulation of the original semantic features by the interference location information, so that the network can adaptively adjust the response intensity to the interference region without changing the original feature distribution baseline.

[0063] Regarding the internal implementation mechanism of the interference location encoding module, the process of generating interference location encoding features includes: performing a distance transformation on the downsampled interference mask to obtain the distance values ​​of each pixel to the boundary of the nearest interference region, generating a distance transformation map; mapping the distance transformation map to a feature tensor with the same number of channels as the multi-scale feature map through a convolutional layer; applying a negative bias to the channel values ​​corresponding to the inside of the interference region in the feature tensor, and applying a positive bias to the channel values ​​corresponding to the outside of the interference region, to obtain the interference location encoding features. This step is crucial for transforming the binary geometric mask into high-dimensional semantic features. First, the distance transformation converts the discrete mask, which originally only has two states (0 and 1), into a continuous numerical field reflecting spatial proximity relationships. In the distance transformation map, the pixel value at the center of the interference region is the smallest (or 0), and the pixel value gradually increases as it extends towards the edge and outward. This continuous distribution provides the network with richer gradient information than a simple binary mask, helping to alleviate the feature abrupt change problem caused by mask edge jaggedness or positioning errors. Subsequently, the single-channel distance transformation map is mapped to a tensor with the same number of channels as the backbone network feature map through one or more convolutional layers (e.g., 1×1 convolution or 3×3 convolution). This step achieves dimensional alignment from the geometric space to the semantic feature space.

[0064] The most crucial element is the introduction of the positive and negative bias mechanism, which is essentially a learnable spatial attention guidance strategy. Specifically, applying a negative bias to the channel values ​​within the corresponding interference region in the feature tensor is equivalent to actively suppressing the feature response of that region during the network's forward propagation phase, explicitly telling the network, "This region is high-confidence interference; do not misclassify it as a lesion." Conversely, applying a positive bias to the channel values ​​outside the corresponding interference region enhances the background or potential lesion features. Especially near the edges of the interference region, the positive bias strengthens the network's focus on the real tissue structure, preventing the loss of adjacent real lesion edge information due to excessive suppression of interference. This differentiated bias processing makes the interference location encoding feature not merely a static location marker, but a dynamic control signal for adjusting the network's attention. During training, the network can automatically learn the optimal bias amplitude and convolution weights through backpropagation, thereby achieving optimal feature modulation of the interference region under complex scenarios with varying lighting and saliva volumes. It should be understood that although this embodiment describes a specific encoding method based on distance transformation and positive and negative bias, in other embodiments, a soft mask based on Gaussian blur, a position embedding based on coordinate encoding, or other equivalent technical means that can incorporate spatial priors into depth features may also be used. As long as they can achieve the core technical effect of "explicitly perceiving the location of interference and guiding network feature extraction", they should be regarded as reasonable variations within the scope of protection of this application.

[0065] Example 7

[0066] In this embodiment, the acquisition and filtering strategy for multiple frames of oral mucosa images in step S100 is further refined. Specifically, acquiring multiple frames of oral mucosa images continuously acquired by a handheld acquisition device within a preset acquisition time includes: controlling the handheld acquisition device to continuously acquire images at a preset frame rate within the preset acquisition time to obtain an initial image sequence; calculating the global displacement between adjacent frames in the initial image sequence; filtering adjacent frame pairs whose global displacement is within a preset displacement range, retaining the corresponding frames, and obtaining multiple frames of oral mucosa images; wherein, the upper limit of the preset displacement range ensures that the field-of-view overlap rate between adjacent frames is greater than a preset overlap rate threshold.

[0067] This strategy acts as the data quality gatekeeper for the entire intelligent recognition system. In the actual clinical application of handheld oral endoscopes, even with the assistance of nurses, doctors' operating techniques inevitably involve jitter, uneven movement speed, or even short pauses. The directly acquired raw video stream often contains a large number of invalid or low-quality frames. If all frames are used for subsequent processing without screening, it will not only cause a huge waste of computing resources, but may also lead to the failure of multi-frame fusion algorithms due to the introduction of frames with severe motion blur or completely non-overlapping fields of view, resulting in serious artifacts. Therefore, this embodiment introduces a quantization screening mechanism based on global displacement to ensure the validity and consistency of the input data from the source.

[0068] Specifically, the combination of preset frame rate and preset acquisition duration needs to balance sampling density and coverage. For example, the preset frame rate can be set to 30fps to 60fps to ensure that sufficiently dense temporal information can be captured for reflection repair at the doctor's normal scanning speed; the preset acquisition duration is usually set to 1 second to 3 seconds, which is sufficient to cover the complete scanning process of a single lesion area, while avoiding patient discomfort or the accumulation of too many irrelevant background frames due to excessive time. After obtaining the initial image sequence, the system needs to calculate the global displacement between adjacent frames. Here, "global displacement" refers to the transformation parameter reflecting the overall motion trend of the camera, rather than the motion vector of individual pixels or local areas in the image. The preferred calculation method is a feature point matching-based method (such as ORB, SIFT feature extraction combined with RANSAC homography matrix estimation) or a dense optical flow method (such as Farneback optical flow). The emphasis on "global" is because there are non-rigid local movements inside the oral cavity, such as saliva flow and tongue micro-movements, and these local changes should not be misjudged as effective camera displacement. By solving the global transformation matrix and extracting its translation components or average displacement amplitude, the true spatial span of a handheld device between two frames can be accurately characterized.

[0069] The setting of the preset displacement range is the core defensive design of this embodiment, which includes dual constraint logic of lower and upper limits. The lower limit of the preset displacement range is mainly used to filter static or near-static frames. During the scanning process, the doctor may pause briefly or move very slowly in certain positions, resulting in almost identical frames between adjacent frames. Such redundant frames do not provide additional information gain for multi-frame texture filling, but instead increase the time consumption of subsequent texture entropy calculation and fusion. For example, the lower limit can be set to 2 to 5 pixels (corresponding to 0.5% to 1% of the image's shorter side size), and frames below this threshold will be considered redundant and discarded. The upper limit of the preset displacement range is used to ensure that there is sufficient field-of-view overlap between adjacent frames, which is a physical prerequisite for successful multi-frame registration and fusion. If the displacement between two frames is too large, resulting in a small common field-of-view area, feature matching based on the overlapping area will become extremely unreliable, or even fail completely; at the same time, excessive displacement is often accompanied by motion blur caused by rapid movement, which degrades the information quality of the image itself. In this application, the upper limit of the preset displacement range is explicitly constrained to ensure that the field-of-view overlap between adjacent frames is greater than a preset overlap threshold. For example, the preset overlap rate threshold can be set to 60% to 80%, preferably 70%. This means that only frames with at least 70% overlap in their image area will be retained for subsequent processing. This value is chosen based on a balance point derived from extensive clinical data: too low an overlap rate will lead to a sharp increase in registration error, while too high a requirement will result in excessive rejection of valid frames, reducing scanning efficiency.

[0070] In practical engineering implementation, if the displacement of an adjacent frame pair exceeds the upper limit of the preset displacement range, the frame pair is determined not to meet the effective fusion conditions. The system's processing strategy can be varied: one approach is to directly discard the frame with the excessive displacement, retaining only the previous frame as a baseline for continued searching; another approach is to provide real-time feedback (such as indicator light color changes or sound prompts) on the user interface or device, guiding the doctor to adjust the scanning speed or rescan the area; yet another approach is to mark the frame as a "low-confidence frame," reducing its weight in subsequent fusion steps rather than completely removing it. This flexible anomaly handling mechanism significantly enhances the system's robustness under non-ideal operating conditions. It should be understood that the aforementioned preset frame rate, acquisition duration, displacement threshold, and overlap rate threshold are illustrative examples. In actual deployment, adaptive calibration should be performed based on the field of view, resolution, frame rate capability of the specific imaging equipment, and the operational specifications of the target clinical scenario. This does not depart from the scope of protection of this application.

[0071] Example 8

[0072] In this embodiment, the boundary post-processing correction mechanism after obtaining the oral lesion identification result in step S600 is further refined. Specifically, after obtaining the oral lesion identification result, the method further includes: extracting the boundary contour of the lesion region in the oral lesion identification result; spatially superimposing the boundary contour with the interference mask, detecting boundary segments on the boundary contour whose distance from the edge of the interference mask is less than a preset distance threshold, and marking them as suspicious pseudo-boundary segments; performing curvature continuity detection on the suspicious pseudo-boundary segments, and replacing the suspicious pseudo-boundary segments whose curvature change rate exceeds a preset change rate threshold with a smooth curve fitted based on adjacent normal boundary segments to obtain the corrected lesion boundary.

[0073] This post-processing step constitutes the final link in the "algorithm + geometry" dual verification defense line of this application. Although the interference suppression and position encoding networks in the previous embodiments have significantly improved the segmentation accuracy, the binary mask output by the deep learning model still inevitably produces jagged edges when classifying at the pixel level, and local protrusions or depressions caused by feature confusion are very likely to appear near the residual interference area. If such rough boundaries are directly used for clinical measurement or diagnosis, the reliability of the results will be reduced. However, traditional image processing methods such as Gaussian smoothing or morphological opening and closing operations, although they can eliminate jagged edges, often come at the cost of sacrificing the sharp turning features or small morphological details of the real lesions, resulting in a reduction in lesion area or shape distortion. The adaptive correction strategy based on curvature continuity proposed in this embodiment aims to solve this contradiction, that is, to perform targeted repair only in local areas with abnormal geometric features, while keeping the original segmentation result unchanged in areas with reasonable morphology.

[0074] Specifically, the logic for identifying suspicious pseudo-boundary segments is based on the spatial correlation assumption. Although the interference mask has been used for gradient decay and network encoding in previous steps, its role as a spatial indicator of artifact sources remains effective. Spatially superimposing the segmented boundary contours with the interference mask essentially searches for overlapping regions where "segmentation results are unstable" and "potential interference exists." The preset distance threshold is typically set to 3 to 8 pixels, covering the diffusion radius of typical segmentation errors. When a segment on the boundary contour enters the neighborhood of the interference mask edge, it indicates that the boundary segment is highly likely to be a mis-segmentation caused by residual artifacts or a low-confidence region due to poor signal quality, and is therefore marked as a suspicious pseudo-boundary segment to be corrected. For boundary segments far from the interference region, the system defaults to high-confidence true anatomical boundaries and does not process them, thus preserving the true features learned by the model to the greatest extent.

[0075] For the marked suspicious pseudo-boundary segments, this application uses curvature continuity as the criterion for geometric normalization. Curvature continuity detection of the suspicious pseudo-boundary segments includes: calculating the curvature values ​​of each sampling point on the suspicious pseudo-boundary segment to obtain a curvature sequence; calculating the absolute difference between the curvature values ​​of adjacent sampling points in the curvature sequence to obtain a curvature change sequence; marking positions in the curvature change sequence that exceed a preset rate of change threshold as curvature abrupt change points; dividing the suspicious pseudo-boundary segment into multiple sub-segments using the curvature abrupt change points as boundaries; performing circular arc fitting on each sub-segment; and replacing the corresponding sub-segment based on the fitted circular arc to obtain the corrected lesion boundary.

[0076] In this process, curvature is the most direct micro-component characterizing the geometric morphology of the boundary. While the boundaries of real oral mucosal lesions (such as ulcers, erosions, and leukoplakia) are irregular, they generally follow the continuous growth pattern of biological tissue on a macroscopic level, exhibiting a smooth transition in curvature. Conversely, boundary anomalies caused by noise, artifacts, or segmentation errors are often accompanied by drastic jumps in curvature. By calculating the absolute difference between the curvature values ​​of adjacent sampling points, this visual "abruptness" can be transformed into a quantifiable numerical indicator. The preset rate of change threshold needs to be set in conjunction with image resolution and lesion scale; for example, it can be set to 0.1 to 0.3 (normalized curvature units). Points exceeding this threshold are considered geometrically discontinuous abrupt changes.

[0077] Using curvature abrupt change points as boundaries for segmentation and arc fitting is key to achieving "shape-preserving smoothness" in this embodiment. Compared to global polynomial fitting of the entire boundary, segmented arc fitting offers significant advantages in locality and stability. First, as a basic geometric shape, the arc naturally fits the circular or elliptical morphological priors of most oral lesions, effectively suppressing non-physiological sharp angles or broken lines. Second, since the fitting is performed only within the segment between two abrupt change points and utilizes the tangent constraints at the segment endpoints, the corrected curve can smoothly connect with the unmodified normal boundaries at both ends (G1 continuity), avoiding the generation of repair traces. More importantly, this processing method does not affect those true boundary segments that, although close to the interference area, have continuous curvature and reasonable morphology, thus avoiding the loss of lesion information caused by excessive smoothing.

[0078] It should be understood that although circular arc fitting is preferred as a smoothing method in this embodiment, other conformal interpolation methods, such as cubic spline interpolation or Bézier curve fitting, can be selected according to the characteristics of the lesion type in other embodiments. As long as they can satisfy the core technical concept of "local geometric constraint correction at curvature abrupt change", they should be considered as equivalent alternatives within the scope of protection of this application. In addition, the preset distance threshold and the preset rate of change threshold are not fixed. In practical applications, they can be designed as adaptive parameters that are dynamically adjusted according to the estimated lesion area or image signal-to-noise ratio to further improve the generalization ability of the algorithm in different clinical scenarios. Through the above post-processing correction, the final output lesion boundary is not only visually smoother and more natural, conforming to the doctor's reading habits, but also more accurate and repeatable in geometric measurement, significantly improving the clinical practical value of the intelligent recognition results.

[0079] Example 9

[0080] In this embodiment, a real-time screening application scenario using a handheld oral endoscope will be used as an example to comprehensively demonstrate the complete operational effect of the technical solutions described in the foregoing embodiments in a real clinical environment. This application scenario aims to verify the collaborative working ability of each functional module under dynamic, uncontrolled oral examination conditions, as well as the engineering feasibility of meeting the needs for real-time clinical feedback.

[0081] Specifically, in a typical oral mucosal lesion screening process, the doctor, with the assistance of a nurse, inserts a handheld endoscope probe into the patient's mouth to continuously scan target areas such as the buccal mucosa, ventral surface of the tongue, and gingiva. During this process, the device continuously acquires a video stream at a preset frame rate (e.g., 30fps to 60fps). Due to the unavoidable hand-held operation, there are jitters, uneven movement speeds, and even short pauses, resulting in a large number of redundant or low-quality frames in the original video stream. The system background executes the global displacement filtering strategy described in Example 7 in real time, automatically removing static redundant frames and invalid frames with severe motion blur or insufficient field of view overlap, retaining only valid frame sequences that meet the preset displacement range for subsequent processing. This pre-screening mechanism not only reduces the computational load of subsequent algorithms but, more importantly, ensures the quality of the temporal data required for multi-frame fusion from the source. This allows the system to acquire a sufficient number of reliably registered image frames even with slight hand tremors, laying the foundation for accurate subsequent repair.

[0082] For the selected valid frame sequences, the system performs reflection restoration and saliva interference suppression processing in parallel or pipelined manner. First, according to the methods described in Examples 2 and 3, the specular reflection area in each frame is accurately located using a joint determination mechanism of texture entropy fluctuation and brightness between adjacent frames, and the frame with the clearest texture is selected from the temporal information for pixel-level filling; in the extreme case where multiple frames are covered by reflection, a spatial neighborhood interpolation fallback strategy is automatically triggered to ensure the integrity of the restored image. Subsequently, according to the detection logic described in Examples 3 and 4, saliva bubbles and saliva strands are identified on the reflection suppression image, generating an accurate interference mask. Next, according to the differentiated gradient attenuation strategy described in Example 5, the edge gradient is specifically corrected according to the type of interference: an omnidirectional smooth transition is implemented for bubble areas, while for strand areas, the tissue structure information along the tangential direction is preserved while suppressing the vertical gradient. This series of preprocessing steps is completed in milliseconds, effectively eliminating the high-gloss white spots and saliva artifacts commonly found in the moist oral environment, while preserving the true texture and microvascular structure of the mucosal surface to the greatest extent, providing high-quality input data for the segmentation network.

[0083] After image enhancement, the system inputs the interference-suppressed image and the interference mask into the pre-trained lesion segmentation network. Following the architecture described in Example 6, the network explicitly perceives the spatial distribution of residual interference through the interference location encoding module, and outputs preliminary lesion identification results using a dual-channel feature fusion mechanism. To further improve the clinical reliability of the results, the system then performs boundary post-processing correction as described in Example 8: the segmentation boundary is superimposed with the interference mask to locate suspicious pseudo-boundary segments, and aliasing or abrupt changes caused by residual noise are eliminated through curvature continuity detection and piecewise circular arc fitting, resulting in a final lesion boundary with a smooth and natural geometric shape. The entire processing chain from image acquisition to result output typically has a single-frame end-to-end latency of 50ms to 100ms on mainstream embedded computing platforms, fully meeting the visual feedback needs of doctors during real-time scanning and avoiding operational discomfort caused by image lag or delay.

[0084] It should be understood that the technical solution of this application exhibits good robustness under various clinical conditions. For example, in the oral cavity of patients with abundant salivation, although the interference from air bubbles and stringy particles is significantly increased, the system can still accurately distinguish between interference and lesions, maintaining a stable recognition accuracy rate, thanks to the physical cause-based specific detection mechanism and differentiated gradient processing strategy. In areas with poor lighting conditions or overexposure, the multi-frame texture filling and adaptive threshold segmentation mechanism can effectively compensate for information loss and prevent missed or false detections. Furthermore, although this embodiment uses a handheld oral endoscope as a typical application carrier, the overall technical concept of this application is also applicable to other types of medical endoscopic imaging devices or skin imaging systems. As long as they face similar specular reflection and liquid interference problems, the solution provided by this application can be used to improve intelligent recognition performance. This cross-scenario applicability further demonstrates the universal value and defensive protection scope of the technical solution of this application.

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

Claims

1. A deep learning-based intelligent oral lesion recognition system, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform: Acquire multiple frames of oral mucosa images continuously acquired by a handheld acquisition device within a preset acquisition time; Calculate the texture entropy value of each local window in each frame of the oral mucosa image to obtain the texture entropy map corresponding to each frame; based on the difference between the texture entropy maps of adjacent frames and the brightness map of the corresponding frame, mark the specular reflection area in each frame; For each target pixel position in the specular reflection region of each frame, the frame with the largest texture entropy value at the target pixel position is selected from the multi-frame oral mucosa images as the filling source frame. The pixel value at the corresponding position in the filling source frame is used to replace the pixel value at the target pixel position in the current frame to obtain the reflection suppression image corresponding to each frame. On the reflection suppression image, saliva bubble regions are detected based on the radial symmetry of the edge gradient of the candidate circular region and the texture entropy value inside the region; saliva string regions are detected based on the symmetry of the gradient directions on both sides of the slender bright region; the saliva bubble regions and the saliva string regions are merged to generate an interference mask; Based on the type of each interference region in the interference mask, the gradient magnitude of the edge of the interference region in the reflection suppression image is differentially attenuated to obtain the interference suppression image; The interference suppression image and the interference mask are input together into a pre-trained lesion segmentation network to obtain oral lesion recognition results.

2. The intelligent oral lesion recognition system based on deep learning according to claim 1, characterized in that, The step of marking specular reflection regions in each frame based on the difference between the texture entropy maps of adjacent frames and the brightness map of the corresponding frame includes: calculating the absolute value of the pixel-wise difference between the texture entropy maps of two adjacent frames to obtain a texture entropy fluctuation map; marking regions in the texture entropy fluctuation map where the pixel value is greater than a preset fluctuation threshold as texture unstable regions; and in the texture unstable regions, filtering pixel positions in the brightness map of the current frame where the brightness value is greater than a preset brightness threshold, and marking the connected regions where the filtered pixel positions are located as the specular reflection regions.

3. The intelligent oral lesion recognition system based on deep learning according to claim 2, characterized in that, The calculation of the texture entropy value of each local window in each frame of the oral mucosa image includes: Each local window is obtained by sliding on the oral mucosa image with a preset window size and a preset step size; Statistically analyze the grayscale histogram of pixel grayscale values ​​within each local window, and calculate the probability of occurrence of each grayscale level based on the grayscale histogram; The information entropy of each local window is calculated based on the occurrence probability of each gray level to obtain the texture entropy value; the texture entropy value of each local window is assigned to the corresponding window center pixel position to generate the texture entropy map.

4. The intelligent oral lesion recognition system based on deep learning according to claim 1, characterized in that, After selecting the frame with the largest texture entropy value at the target pixel position from the multi-frame oral mucosa images as the filling source frame, the method further includes: Determine whether the texture entropy value at the target pixel position in the source frame being filled is greater than a preset lower limit of texture entropy; If it is greater than the preset lower limit of texture entropy, then the step of replacing the pixel value of the target pixel position in the current frame with the pixel value of the corresponding position in the source frame is executed; If the value is not greater than the preset lower limit of texture entropy, then effective neighboring pixels within a preset radius are searched in the pixel positions that have been filled in the current frame, with the target pixel position as the center. Bilinear interpolation is performed based on the pixel values ​​of the effective neighboring pixels to obtain interpolated pixel values, and the pixel values ​​of the target pixel position in the current frame are replaced by the interpolated pixel values.

5. The intelligent oral lesion recognition system based on deep learning according to claim 1, characterized in that, The method for detecting saliva bubble regions based on the radial symmetry of the edge gradient of candidate circular regions and the texture entropy value inside the region includes: Adaptive threshold segmentation is performed on the reflection suppression image to extract each closed contour as a candidate contour; Candidate circular regions are obtained by filtering out candidate contours whose roundness is greater than a preset roundness threshold and whose area is within a preset area range. Calculate the texture entropy value of the pixels inside each candidate circular region to obtain the texture entropy inside the region; calculate the angle deviation between the gradient direction of each sampling point on the edge of each candidate circular region and the direction pointing from the sampling point to the center of the region, and use the standard deviation of the angle deviation of each sampling point as the radial symmetry of the edge gradient; Candidate circular regions whose internal texture entropy is less than a preset internal entropy threshold and whose edge gradient radial symmetry is less than a preset symmetry threshold are identified as the saliva bubble regions.

6. The intelligent oral lesion recognition system based on deep learning according to claim 5, characterized in that, The method for detecting saliva stringiness based on the gradient directions on both sides of the elongated, bright region includes: The reflection suppression image is subjected to directional gradient filtering to extract linear bright regions with a width less than a preset width threshold and a length greater than a preset length threshold. Along the center line of each of the linear highlighted regions, samples are taken at preset distances on both sides of the center line to obtain the left sampling point sequence and the right sampling point sequence; Calculate the angle between the gradient direction of each sampling point in the left sampling point sequence and the gradient direction of the corresponding sampling point in the right sampling point sequence to obtain the opposing angle sequence; Calculate the mean of the opposing angle sequence, and identify the linear highlighted areas with a mean greater than a preset opposing threshold as the saliva stringing areas.

7. The intelligent oral lesion recognition system based on deep learning according to claim 1, characterized in that, The step of differentially attenuating the gradient magnitude of the edges of the interference regions in the reflection suppression image according to the type of each interference region in the interference mask includes: For the saliva bubble region in the interference mask, the direction vector from each pixel at the bubble edge to the bubble center is calculated. The gradient component of each pixel along the direction vector within a preset width range of the bubble edge in the reflection suppression image is multiplied by a first attenuation coefficient to obtain the bubble region correction gradient. The first attenuation coefficient increases as the distance from the pixel to the bubble edge increases. For the saliva stringing region in the interference mask, calculate the tangent direction of the stringing center line, multiply the gradient component of each pixel in the stringing region within a preset width range in the reflection suppression image along the tangent direction by a second attenuation coefficient, while keeping the gradient component along the tangent direction unchanged, to obtain the stringing region correction gradient. The original gradient of the corresponding region in the reflection suppression image is replaced by the corrected gradient of the bubble region and the corrected gradient of the wire-drawing region to reconstruct the interference suppression image.

8. The intelligent oral lesion recognition system based on deep learning according to claim 1, characterized in that, The lesion segmentation network includes a feature extraction backbone network, an interference location encoding module, and a segmentation head; The step of inputting the interference suppression image and the interference mask into a pre-trained lesion segmentation network to obtain oral lesion recognition results includes: The interference-suppressed image is input into the feature extraction backbone network to extract multi-scale feature maps. After downsampling the interference mask to a spatial size that matches the multi-scale feature map, it is input into the interference location encoding module to generate interference location encoding features; The interference location encoding features are fused with the multi-scale feature map element by element to obtain a fused feature map; the fused feature map is then input into the segmentation head for upsampling and classification to obtain the oral lesion identification result.

9. The intelligent oral lesion recognition system based on deep learning according to claim 8, characterized in that, The process by which the interference location coding module generates interference location coding features includes: A distance transformation is performed on the downsampled interference mask to obtain the distance value from each pixel to the boundary of the nearest interference region, and a distance transformation map is generated. The distance transformation map is mapped to a feature tensor with the same number of channels as the multi-scale feature map through a convolutional layer; a negative bias is applied to the channel values ​​inside the corresponding interference region in the feature tensor, and a positive bias is applied to the channel values ​​outside the corresponding interference region to obtain the interference location encoding feature.

10. The intelligent oral lesion recognition system based on deep learning according to claim 1, characterized in that, The acquisition of multiple frames of oral mucosa images continuously acquired by the handheld acquisition device within a preset acquisition time period includes: The handheld acquisition device is controlled to continuously acquire images at a preset frame rate within the preset acquisition time to obtain an initial image sequence; the global displacement between adjacent frames in the initial image sequence is calculated. Filter adjacent frame pairs whose global displacement is within a preset displacement range, retain the corresponding frames, and obtain the multi-frame oral mucosa image; wherein, the upper limit of the preset displacement range ensures that the field of view overlap rate between adjacent frames is greater than a preset overlap rate threshold.