Enteroscope auxiliary diagnosis method and system based on artificial intelligence
By combining timestamp alignment and adaptive gamma dynamic enhancement with target detection models and lesion morphology and texture analysis, the problems of uneven illumination and inaccurate texture estimation in colonoscopy-assisted diagnosis are solved, achieving higher diagnostic accuracy and lesion risk assessment.
Patent Information
- Application Number
- CN202511867581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-14
AI Technical Summary
Existing colonoscopy-assisted diagnostic methods suffer from uneven illumination, color shift, noise interference, and weakening of details in intestinal wall folds. Traditional enhancement methods cannot balance brightness compensation and detail preservation, resulting in insufficient diagnostic accuracy and stability. Furthermore, the lack of combined morphological and textural analysis affects the accuracy of lesion assessment.
By employing timestamp-aligned standardized correction and adaptive gamma dynamic enhancement mechanisms, combined with target detection models and lesion morphology and texture analysis, and through multi-scale feature aggregation and temporal consistency constraints, lesion candidate regions are generated, and a comprehensive lesion shape index is constructed for risk assessment.
It improves the stability and diagnostic accuracy of colonoscopy images, enabling more precise description of the morphological complexity and risk level of lesions, reducing misdiagnosis and missed diagnosis, and is particularly suitable for the diagnosis of complex lesions.
Smart Images

Figure CN121860936A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology, and more specifically, to an artificial intelligence-based method and system for colonoscopy-assisted diagnosis. Background Technology
[0002] Existing colonoscopy-assisted diagnostic methods and systems mainly suffer from the following problems: Colonoscopy, as an important means of diagnosing digestive tract diseases, can obtain images of the inside of the intestines for lesion detection and analysis. However, existing colonoscopy-assisted diagnostic methods and systems still have several technical problems that limit the accuracy and stability of diagnosis.
[0003] Colonoscopy images often suffer from uneven illumination, color shifts, noise interference, and weakened details of intestinal wall folds. Traditional image enhancement methods with fixed parameters, such as fixed gamma enhancement or simple brightness adjustment, struggle to simultaneously compensate for brightness and preserve detail, often resulting in overexposure, excessive contrast, or loss of detail. Furthermore, fixed enhancement parameters cannot adapt to changes in brightness and texture between consecutive frames, leading to significant fluctuations in enhancement intensity within the video sequence. This results in image flickering, impacting the stability and accuracy of subsequent lesion detection or artificial intelligence models.
[0004] Current colonoscopy diagnostic methods largely rely on the physician's visual experience or analysis of the basic geometric shape of lesions, failing to fully utilize the texture information or complex morphological features of the lesion area. Existing technologies typically analyze the morphological and textural features of lesions separately, lacking a joint analysis mechanism, resulting in insufficient quantitative description of the lesion area. In cases with irregular boundaries or complex surface textures, this separate analysis method is particularly difficult to accurately reflect the structural characteristics of the lesion.
[0005] Furthermore, existing risk assessment methods typically rely on single or localized features, such as morphological or textural characteristics, neglecting the interaction between the two. Combined information on morphology and texture is crucial for determining the malignancy or potential risk of lesions. Due to the lack of systematic analysis of morphological-textural correlations, current techniques fall short of achieving ideal diagnostic accuracy in some complex cases.
[0006] In view of this, the present invention proposes an artificial intelligence-based colonoscopy-assisted diagnostic method to solve the above problems. Summary of the Invention
[0007] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: an artificial intelligence-based colonoscopy-assisted diagnostic method, comprising: S1. Acquire colonoscopy image data during colonoscopy and simultaneously extract corresponding auxiliary acquisition information from the colonoscopy image data; cache the colonoscopy image data and auxiliary acquisition information frame by frame and keep the timestamps aligned; S2. Perform standardized correction and adaptive enhancement processing on the timestamp-aligned colonoscopy image data; and introduce an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds to obtain enhanced images; S3. Use the target detection model to locate lesions and filter categories in the enhanced image. Combine with the auxiliary acquisition information, perform multi-scale feature aggregation and temporal consistency constraints to generate lesion candidate regions. S4. Perform morphological, textural, and boundary structure analysis on the candidate lesion regions to extract lesion morphological features; and calculate the comprehensive lesion shape index to describe the coupling relationship between the roundness properties formed by the lesion area and perimeter and the texture gradient features of the lesion surface. S5. Based on the morphological characteristics and comprehensive index of lesion shape, combined with the category characteristics of lesion candidate regions, construct diagnostic logic for lesion classification, risk assessment and clinical treatment suggestions; based on the diagnostic logic, execute rule reasoning to classify the risk level of the lesion and output corresponding clinical treatment suggestions.
[0008] Preferably, the method for acquiring colonoscopy image data during a colonoscopy includes: An image sensor for acquiring images inside the intestine is installed inside the intestine, and the imaging parameters related to the image sensor are initialized, including optical parameters, focal length, light intensity, and electronic zoom. During the colonoscopy, the sensor moves along the intestine, continuously capturing images inside the intestine, and transmitting the acquired colonoscopy image data through a medical-grade data transmission interface.
[0009] Preferably, the method for caching colonoscopy image data and auxiliary acquisition information frame by frame and maintaining timestamp alignment includes: The auxiliary acquisition information is extracted synchronously from each frame of colonoscopy image data. The auxiliary acquisition information includes the position information of the colonoscope in the intestine, the illumination parameters of the image, and the manipulation posture information. The colonoscopy image data is bound with the corresponding auxiliary acquisition information to form a complete data package, which is then stored in the cache queue of memory or storage medium in the order of acquisition. A timestamp is set for each frame of colonoscopy image data, and the time difference is compensated by interpolation to ensure that each frame of colonoscopy image data corresponds to the auxiliary acquisition information in time.
[0010] Preferably, the method for obtaining the enhanced image includes: Normalization correction and adaptive enhancement processing are performed on the time-stamp aligned colonoscopy image data. Normalization correction includes image grayscale normalization, color channel correction and noise suppression. After correction, texture adaptive gamma dynamic enhancement is performed on each colonoscopy image through an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds and detailed textures. Texture-adaptive gamma dynamic enhancement involves calculating the brightness statistics for each colonoscopy image frame, extracting the local texture entropy, and performing linear normalization to obtain the normalized local texture entropy. Based on the brightness statistics and the normalized local texture entropy, a brightness-texture adaptive function is constructed to adaptively determine the gamma enhancement coefficient for each colonoscopy image frame. An exponentially weighted smoothing method is used to smooth the gamma enhancement coefficients of each colonoscopy image frame, so that the enhancement coefficients transition smoothly between consecutive frames; and the smoothed gamma enhancement coefficients are applied to the pixels of each colonoscopy image frame to realize gamma transformation, thereby obtaining an enhanced image.
[0011] Preferably, the method for generating candidate lesion regions includes: The enhanced image is localized and its category is screened using a target detection model. Combined with auxiliary acquisition information, multi-scale feature aggregation and temporal consistency constraints are performed to generate candidate lesion regions. The target detection model includes: taking the enhanced image and auxiliary acquisition information as training sample inputs, and dividing the training samples into training set, validation set and test set. A target detection model based on YOLOv8 was constructed, which includes an input layer, a backbone feature extraction network, a multi-scale feature aggregation network, and a detection head. During training, the cross-entropy loss function with a category prediction branch was used as the lesion category recognition loss to measure the difference between the predicted category probability and the true category probability. The IoU-based loss function was used as the localization loss to measure the degree of overlap between the predicted bounding box and the true bounding box. The model parameters are updated through backpropagation and gradient descent to minimize the loss function; Adam is selected as the optimizer during training; the model hyperparameters are evaluated and tuned on the validation set, and the generalization ability of the model is verified on the test set. The current enhanced image and corresponding auxiliary acquisition information are input into the trained target detection model to obtain the lesion category confidence and lesion bounding box position. Based on the temporal consistency constraint, the detection results of consecutive frames are smoothed to generate lesion candidate regions.
[0012] Preferably, the method for extracting lesion morphological features includes: Morphological processing, including erosion, dilation, opening, and closing operations, is performed on the binarized mask of the lesion candidate region to eliminate isolated noise and smooth the boundaries of the lesion candidate region; morphological features of the lesion candidate region are calculated and extracted based on the processed lesion candidate region mask. A gray-level co-occurrence matrix is constructed from the image content within the candidate lesion region. Multidimensional texture features are extracted by combining local binary mode and multi-scale Gabor filter response. Morphological features and multidimensional texture features are combined to form lesion morphological features.
[0013] Preferably, the method for calculating the comprehensive index of lesion shape includes: The area and perimeter of the lesion morphology features are extracted, the roundness index is calculated, and the average gradient of the surface texture of the lesion candidate region is calculated. By combining the roundness index and the average gradient of the surface texture of the lesion candidate region, a comprehensive lesion shape index is constructed to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the gradient features of the lesion surface texture.
[0014] Preferably, the method for constructing the diagnostic logic for lesion classification, risk assessment, and clinical treatment recommendations includes: Typical combination rules for morphology and shape are pre-defined for each lesion type. The typical combination rules include the preset typical morphological features and preset comprehensive lesion shape index for each lesion type. The typical combination rules are used as the reference standard for the category features of lesion candidate regions. When processing lesions, the morphological features of the lesion candidate region are compared with the preset typical morphological features to obtain the morphological feature matching score of the lesion candidate region; the lesion shape comprehensive index is compared with the preset lesion shape comprehensive index to obtain the shape comprehensive index matching score. The cosine similarity between the category features of the lesion candidate region and the preset category features is calculated to obtain the category feature matching score; the morphological feature matching score, shape comprehensive index matching score and category feature matching score of the lesion candidate region are weighted and fused to obtain the comprehensive matching score; When the comprehensive matching score is greater than or equal to the preset comprehensive matching score threshold, it is determined to be a typical lesion; when the comprehensive matching score is less than the preset comprehensive matching score threshold, it is determined to be an atypical lesion, thus forming a diagnostic logic for lesion classification, risk assessment and clinical treatment recommendations.
[0015] Preferably, the method for classifying the risk level of lesions and outputting corresponding clinical treatment recommendations includes: The lesion classification result and the comprehensive matching score are used as inputs to enter the rule reasoning module. The rule reasoning module makes judgments based on the pre-set risk grading rule base. The risk grading rule base includes different rule conditions. Each rule condition corresponds to the range of lesion classification results and the threshold of the comprehensive matching score. The rule matching is performed to associate the corresponding risk level and clinical treatment suggestions. The rule matching adopts a threshold range matching method, which compares the input lesion classification results and comprehensive matching scores with the rule conditions to determine the rule conditions that meet the requirements, and selects the corresponding risk level according to the preset rule priority. The risk level is mapped to the preset clinical treatment measures to generate clinical treatment recommendations for each lesion. When different lesion areas exist in the same examination, rule reasoning is performed on each lesion area to obtain its own risk level and clinical treatment recommendations. The results are then integrated to generate a risk level assessment report and output the corresponding clinical treatment recommendations.
[0016] An artificial intelligence-based colonoscopy-assisted diagnostic system includes: The time synchronization acquisition module is used to acquire colonoscopy image data during colonoscopy and synchronously extract corresponding auxiliary acquisition information from the colonoscopy image data; it caches the colonoscopy image data and auxiliary acquisition information frame by frame and keeps the timestamps aligned. The image enhancement processing module is used to perform standardized correction and adaptive enhancement processing on the time-stamp aligned colonoscopy image data; and introduces an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds to obtain enhanced images. The associated lesion localization module uses a target detection model to locate and classify lesions in enhanced images. Combined with auxiliary acquisition information, it performs multi-scale feature aggregation and temporal consistency constraints to generate lesion candidate regions. The lesion feature analysis module is used to perform morphological, texture and boundary structure analysis on lesion candidate regions, extract lesion morphological features, and calculate the comprehensive lesion shape index to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the texture gradient features of the lesion surface. The intelligent diagnostic reasoning module constructs diagnostic logic for lesion classification, risk assessment, and clinical treatment suggestions based on lesion morphological characteristics and comprehensive lesion shape index, combined with the category characteristics of lesion candidate regions. Based on the diagnostic logic, it executes rule-based reasoning to classify lesions into risk levels and outputs corresponding clinical treatment suggestions.
[0017] Compared with the prior art, the present invention has the following beneficial effects: This invention effectively eliminates illumination differences and color shifts between different frames by introducing a standardized correction process based on timestamp alignment, thereby improving the stability of input data. It proposes an adaptive gamma dynamic enhancement mechanism based on luminance statistics and local texture entropy. By constructing a luminance-texture adaptive function, the gamma enhancement coefficient of each colonoscopy image can be automatically adjusted according to real-time luminance and local texture intensity. This allows for luminance compensation in low-brightness areas and suppression of over-enhancement in texture-rich areas, enabling clearer presentation of intestinal folds, mucosal texture, and early lesion edges.
[0018] By normalizing the local texture entropy, this invention can more accurately reflect the differences in intestinal wall folds and local structures, avoiding enhancement distortion caused by inaccurate texture estimation in traditional methods. The use of a clip condition constraint function to limit the gamma coefficients within a set range effectively avoids artifacts and noise amplification caused by over-enhancement. By calculating the gamma enhancement coefficients through exponential weighted smoothing, the enhancement parameters transition smoothly between consecutive frames, solving the problem of video flickering and brightness jumps in existing technologies, and improving the stability of colonoscopy video processing.
[0019] By introducing a comprehensive lesion shape index, the morphological characteristics (such as area, perimeter, and roundness) and texture characteristics (such as surface gradient and roughness) of lesions can be comprehensively considered. This allows for a more accurate description of the morphological complexity of lesions and effective differentiation of lesions at different risk levels, enabling more comprehensive and precise lesion assessment. By establishing a comprehensive lesion shape index that combines the two key features of roundness and texture gradient, a more reliable lesion risk marker is obtained. This index is particularly suitable for malignant or highly suspected malignant lesions (such as irregular tumors or complex polyps). It can describe the geometry of the lesion through roundness and reflect the roughness or irregularity of the lesion surface through texture gradient, thus providing more structural diagnostic evidence. This helps improve the accuracy of colonoscopy-assisted diagnosis and reduce the possibility of misdiagnosis and missed diagnosis. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a colonoscopy-assisted diagnostic method based on artificial intelligence according to the present invention; Figure 2 This is a schematic diagram of the structure of an artificial intelligence-based colonoscopy-assisted diagnostic system according to the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example
[0022] Please see Figure 1 As shown, this embodiment provides an artificial intelligence-based colonoscopy-assisted diagnostic method, which specifically includes the following steps: S1. Acquire colonoscopy image data during colonoscopy and simultaneously extract corresponding auxiliary acquisition information from the colonoscopy image data; cache the colonoscopy image data and auxiliary acquisition information frame by frame and keep the timestamps aligned; S2. Perform standardized correction and adaptive enhancement processing on the timestamp-aligned colonoscopy image data; and introduce an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds to obtain enhanced images; S3. Use the target detection model to locate lesions and filter categories in the enhanced image. Combine with the auxiliary acquisition information, perform multi-scale feature aggregation and temporal consistency constraints to generate lesion candidate regions. S4. Perform morphological, textural, and boundary structure analysis on the candidate lesion regions to extract lesion morphological features; and calculate the comprehensive lesion shape index to describe the coupling relationship between the roundness properties formed by the lesion area and perimeter and the texture gradient features of the lesion surface. S5. Based on the morphological characteristics and comprehensive index of lesion shape, combined with the category characteristics of lesion candidate regions, construct diagnostic logic for lesion classification, risk assessment and clinical treatment suggestions; based on the diagnostic logic, execute rule reasoning to classify the risk level of the lesion and output corresponding clinical treatment suggestions.
[0023] Methods for acquiring colonoscopy image data during colonoscopy include: An image sensor (CMOS or CCD) for intestinal image acquisition is installed inside the intestine, and the imaging parameters related to the image sensor are initialized, including optical parameters, focal length, light intensity, and electronic zoom, to ensure the stability of the image acquisition channel. During the colonoscopy, the sensor moves along the intestine, continuously capturing images inside the intestine, and the colonoscopy image data is acquired by transmitting them through a medical-grade data transmission interface (such as DICOM or SDI).
[0024] Methods for caching colonoscopy image data and auxiliary acquisition information frame by frame while maintaining timestamp alignment include: The auxiliary acquisition information is extracted synchronously from each frame of colonoscopy image data. The auxiliary acquisition information includes the position information of the colonoscope in the intestine, the illumination parameters of the image, and the manipulation posture information. The image's lighting parameters include brightness, contrast, and color temperature; the manipulation posture information includes the endoscope's rotation angle, tilt angle, push speed, and insertion depth. The colonoscopy image data is bound with the corresponding auxiliary acquisition information to form a complete data package, which is then stored in the cache queue of memory or storage medium in the order of acquisition. A timestamp is set for each frame of colonoscopy image data, and the time difference is compensated by interpolation to ensure that each frame of colonoscopy image data corresponds to the auxiliary acquisition information in time.
[0025] Methods for obtaining enhanced images include: Normalization correction and adaptive enhancement processing are performed on the timestamp-aligned colonoscopy image data. Normalization correction includes image grayscale normalization, color channel correction and noise suppression to eliminate the influence of uneven illumination and color cast on the image. After correction, texture adaptive gamma dynamic enhancement is performed on each colonoscopy image through an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds and detailed textures. Texture-adaptive gamma dynamic enhancement includes calculating a luminance statistic for each frame of colonoscopy image. The luminance statistic is: ;in, Indicates the first Brightness statistics of a colonoscopy image; Indicates the first Frame colonoscopy image at pixel location Brightness value; This represents the total number of pixels in the colonoscopy image; Indicates the index of the frame; The x-coordinate representing the position of a pixel; The vertical coordinate representing the position of a pixel; The local texture entropy is extracted and linearly normalized to obtain the normalized local texture entropy. Based on the brightness statistics and the normalized local texture entropy, a brightness texture adaptive function is constructed to adaptively determine the gamma enhancement coefficient of each colonoscopy image. The brightness texture adaptive function is: ;in, Indicates the first Adaptive gamma values for colonoscopy images; This represents the brightness compensation coefficient, which controls the intensity of brightness enhancement. This represents the texture enhancement factor, which controls the intensity of detail enhancement. This represents the normalized local texture entropy; This represents a constant used to prevent the gamma value from becoming too low. Indicates the lower limit of the gamma value; Indicates the upper limit of the gamma value; This represents a conditional function that constrains a value between its minimum and maximum values. An exponentially weighted smoothing method is used to smooth the gamma enhancement coefficients of each colonoscopy image frame, so that the enhancement coefficients transition smoothly between consecutive frames; and the smoothed gamma enhancement coefficients are applied to the pixels of each colonoscopy image frame to realize gamma transformation, thereby obtaining an enhanced image.
[0026] The following technical problems in the existing technology have been solved: In the existing technology, colonoscopy images often have problems such as uneven illumination, color shift, noise interference and weakening of details of intestinal wall folds; the traditional fixed parameter gamma enhancement method cannot take into account both brightness compensation and detail protection, and the enhancement results are prone to overexposure, excessive contrast and loss of details, and the inter-frame enhancement intensity fluctuates greatly, causing video image flickering and affecting the stability and accuracy of subsequent lesion detection models.
[0027] Compared with existing technologies, the advantages are as follows: By introducing standardized correction processing with timestamp alignment, the illumination differences and color shifts between different frames can be effectively eliminated, improving the stability of input data; an adaptive gamma dynamic enhancement mechanism based on brightness statistics and local texture entropy is proposed. By constructing a brightness-texture adaptive function, the gamma enhancement coefficient of each colonoscopy image can be automatically adjusted according to the real-time brightness and local texture intensity, thereby compensating for brightness in low-brightness areas and suppressing over-enhancement in texture-rich areas, so that intestinal folds, mucosal texture and early lesion edges can be presented more clearly.
[0028] By normalizing the local texture entropy, this invention can more accurately reflect the differences in intestinal wall folds and local structures, avoiding enhancement distortion caused by inaccurate texture estimation in traditional methods. The use of a clip condition constraint function to limit the gamma coefficients within a set range effectively avoids artifacts and noise amplification caused by over-enhancement. By calculating the gamma enhancement coefficients through exponential weighted smoothing, the enhancement parameters transition smoothly between consecutive frames, solving the problem of video flickering and brightness jumps in existing technologies, and improving the stability of colonoscopy video processing.
[0029] Methods for generating lesion candidate regions include: The enhanced image is localized and its category is screened using a target detection model. Combined with auxiliary acquisition information, multi-scale feature aggregation and temporal consistency constraints are performed to generate candidate lesion regions. The target detection model includes: taking the enhanced image and auxiliary acquisition information as training sample inputs, and dividing the training samples into training set, validation set and test set. A target detection model based on YOLOv8 is constructed. The target detection model includes an input layer, a backbone feature extraction network, a multi-scale feature aggregation network, and a detection head. It should be noted that the input layer is used to receive the enhanced image and corresponding auxiliary information; the backbone feature extraction network is used to extract the basic texture features and spatial structure features in the image; the multi-scale feature aggregation network is used to fuse texture features and auxiliary information at different scales, so that the model can maintain consistent performance between small lesion detection and large lesion detection; the detection head adopts a classification and regression joint prediction structure, which simultaneously outputs the lesion category probability and lesion bounding box position parameters for each candidate region.
[0030] During training, the cross-entropy loss function with a category prediction branch is used as the lesion category identification loss to measure the difference between the predicted category probability and the true category probability; the IoU-based loss function is used as the localization loss to measure the degree of overlap between the predicted bounding box and the true bounding box. The model parameters are updated through backpropagation and gradient descent to minimize the loss function; Adam is selected as the optimizer during training; the model hyperparameters are evaluated and tuned on the validation set, and the generalization ability of the model is verified on the test set. The current enhanced image and corresponding auxiliary acquisition information are input into the trained target detection model to obtain the lesion category confidence and lesion bounding box position. Based on the temporal consistency constraint, the detection results of consecutive frames are smoothed to generate lesion candidate regions.
[0031] Methods for extracting lesion morphological features include: Morphological processing, including erosion, dilation, opening, and closing operations, is performed on the binarized mask of the lesion candidate region to eliminate isolated noise and smooth the boundaries of the lesion candidate region. Based on the processed lesion candidate region mask, morphological features of the lesion candidate region are calculated and extracted. Morphological features include area, perimeter, roundness, aspect ratio, Hu invariant moments, area of the circumscribed rectangle, and skeleton length. It should be noted that the morphological feature extraction process for the lesion candidate region includes: based on the binary mask of the lesion candidate region after erosion, dilation, opening, and closing operations, the connected regions with a pixel value of 1 in the mask are used as the main body of the lesion region; the number of pixels in the connected regions is counted to obtain the area of the lesion candidate region; the contour length of the boundary pixels along the boundary of the lesion region is calculated to obtain the perimeter of the lesion region; a roundness index is constructed based on the ratio of area to perimeter to describe the degree to which the shape of the lesion region is close to a circle; the major axis length and minor axis length of the lesion region are obtained based on the minimum bounding rectangle of the lesion region, and their ratio is calculated to obtain the aspect ratio; further, the seventh-order Hu invariant moments are calculated based on the binary mask of the lesion region to characterize the geometric shape features of the lesion region that remain unchanged under rotation, scaling, and translation; the area of the minimum bounding rectangle of the lesion region is used as the area of the bounding rectangle; the skeleton of the binary mask of the lesion region is extracted through a thinning algorithm, and the number of skeleton pixels is counted to obtain the skeleton length.
[0032] A gray-level co-occurrence matrix is constructed for the image content within the candidate lesion region. Multidimensional texture features are extracted by combining local binary mode and multi-scale Gabor filter response. The multidimensional texture features include energy, entropy, contrast, local structural change features, and multi-scale Gabor filter response features obtained based on the gray-level co-occurrence matrix. The morphological features and multidimensional texture features are combined to form lesion morphological features.
[0033] It should be noted that the multidimensional texture feature extraction process for the lesion candidate region includes: constructing a gray-level co-occurrence matrix in the gray-level image of the lesion candidate region with a fixed step size and direction, and statistically analyzing the joint occurrence probability between different gray-level value pairs; calculating energy, entropy, and contrast based on the gray-level co-occurrence matrix to describe the uniformity of gray-level distribution, information complexity, and texture roughness of the region; performing a local binary mode transform on the image within the lesion candidate region, comparing each pixel with its neighboring gray-level values and encoding them to generate a texture pattern map, and then statistically analyzing the texture pattern to obtain local structural change features; applying a Gabor filter bank to the lesion candidate region image at multiple scales and directions to extract the filter response intensity at different spatial frequencies and directions, and characterizing the directional texture of the lesion region with statistical measures such as mean and variance; finally, combining the statistical measures of the gray-level co-occurrence matrix, the local binary mode features, and the multi-scale Gabor filter response features to construct multidimensional texture features, which are used to describe the texture details and surface structure changes of the lesion region.
[0034] Methods for calculating the lesion shape composite index include: The area and perimeter of the lesion morphology features are extracted, the roundness index is calculated, and the average gradient of the surface texture of the lesion candidate region is calculated. By combining the roundness index and the average gradient of the surface texture of the lesion candidate region, a comprehensive lesion shape index is constructed to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the gradient features of the lesion surface texture.
[0035] The comprehensive index of lesion shape is: ;in, Indicates the comprehensive index of lesion shape; Indicates the area of the candidate lesion region; Indicates the perimeter of the candidate lesion region; The roundness index describes the shape of a lesion area. A circular object will have a roundness value close to 1, while other shapes (such as irregular shapes or shapes with complex edges) will have a smaller roundness value. A higher roundness value indicates that the lesion area is closer to a circle, while a lower value indicates that the lesion area is more irregular in shape. The average gradient representing the surface texture of the lesion candidate region; This represents the sum of the gradient magnitudes of all pixels within the lesion candidate region; Represents each pixel within the candidate lesion region. Image gradient; This indicates the number of all pixels within the lesion candidate region; The weighting coefficient for roundness is used to adjust the influence of the roundness index on the overall lesion shape index. The weighting coefficients of the texture gradient are used to adjust the influence of the texture gradient on the overall index. Indicates the index of a pixel; This invention addresses the following technical problems of existing technologies: Traditional colonoscopy diagnostic methods rely heavily on visual experience and basic geometric morphology analysis (such as area and perimeter), failing to adequately consider the texture information and morphological complexity of the lesion area. This results in insufficient quantitative description of the lesion area, especially in cases with irregular boundaries or complex surface textures. Existing technologies typically analyze the morphological features (such as roundness) and texture features (such as edge contrast) of lesions separately, lacking a mechanism to combine them for joint analysis. The correlation between morphology and texture is crucial for determining the malignancy or potential risk of a lesion. In existing technologies, lesion risk assessment largely relies on simple morphological features or local texture features, neglecting the interaction effect between morphology and texture. This leads to suboptimal diagnostic accuracy in some cases (such as malignant tumors or complex polyps).
[0036] The advantages over existing technologies include: by introducing a comprehensive lesion shape index, the morphological characteristics (such as area, perimeter, and roundness) and texture characteristics (such as surface gradient and roughness) of lesions can be comprehensively considered; this more accurately describes the morphological complexity of lesions and effectively distinguishes lesions of different risk levels, enabling more comprehensive and precise lesion assessment. By establishing a comprehensive lesion shape index that combines the two key features of roundness and texture gradient, a more reliable lesion risk marker is obtained; it is particularly suitable for malignant or highly suspected malignant lesions (such as irregular tumors or complex polyps), as it can describe the geometry of the lesion through roundness and reflect the roughness or irregularity of the lesion surface through texture gradient, thus providing more structural diagnostic evidence; it helps improve the accuracy of colonoscopy-assisted diagnosis and reduces the possibility of misdiagnosis and missed diagnosis.
[0037] Methods for constructing diagnostic logic for lesion classification, risk assessment, and clinical management recommendations include: Typical combination rules for morphology and shape are pre-defined for each lesion type. The typical combination rules include the preset typical morphological features and preset comprehensive lesion shape index for each lesion type. The typical combination rules are used as the reference standard for the category features of lesion candidate regions. It should be noted that for each type of lesion, such as polypoid, ulcerative, and depressed lesions, a set of predefined quantifiable typical morphological characteristics indicators are used, including edge morphology (smooth / irregular), surface texture (roughness, wrinkles), structural distribution (concave / convex, raised), and geometric morphology (length-to-width ratio, roundness, convexity / concavity).
[0038] When processing lesions, the morphological features of the lesion candidate region are compared with the preset typical morphological features to obtain the morphological feature matching score of the lesion candidate region; the lesion shape comprehensive index is compared with the preset lesion shape comprehensive index to obtain the shape comprehensive index matching score. The cosine similarity between the category features of the lesion candidate region and the preset category features is calculated to obtain the category feature matching score; the morphological feature matching score, shape comprehensive index matching score and category feature matching score of the lesion candidate region are weighted and fused to obtain the comprehensive matching score; When the comprehensive matching score is greater than or equal to the preset comprehensive matching score threshold, it is determined to be a typical lesion; when the comprehensive matching score is less than the preset comprehensive matching score threshold, it is determined to be an atypical lesion, thus forming a diagnostic logic for lesion classification, risk assessment and clinical treatment recommendations.
[0039] Methods for classifying lesions into risk levels and providing corresponding clinical treatment recommendations include: The lesion classification result and the comprehensive matching score are used as inputs to enter the rule reasoning module. The rule reasoning module makes judgments based on the pre-set risk grading rule base. The risk grading rule base includes different rule conditions. Each rule condition corresponds to the range of lesion classification results and the threshold of the comprehensive matching score. The rule matching is performed to associate the corresponding risk level and clinical treatment suggestions. The rule matching adopts a threshold range matching method, which compares the input lesion classification results and comprehensive matching scores with the rule conditions to determine the rule conditions that meet the requirements, and selects the corresponding risk level according to the preset rule priority. The risk level is matched with the preset clinical treatment measures to generate clinical treatment recommendations for each lesion. For example, low-risk lesions are matched with follow-up observation, medium-risk lesions are matched with biopsy or further examination, and high-risk lesions are matched with interventional treatment. When different lesion areas are found in the same examination, rule reasoning is performed separately for each lesion area. This means that each lesion area is used as an input to independently match the risk grading rule base and calculate the risk level. The risk level and clinical treatment suggestions are obtained for each lesion area, and then integrated to generate a risk level assessment report and output the corresponding clinical treatment suggestions.
[0040] The preset comprehensive matching score threshold is set by staff based on historical data analysis results. This historical analysis process includes the system collecting multiple comprehensive matching scores and calculating their average value as a reference to obtain the preset comprehensive matching score threshold, which can be adjusted by staff during system operation according to the actual situation.
[0041] In this embodiment, by introducing a standardized correction process with timestamp alignment, the differences in illumination and color shifts between different frames can be effectively eliminated, thereby improving the stability of input data. An adaptive gamma dynamic enhancement mechanism based on luminance statistics and local texture entropy is proposed. By constructing a luminance-texture adaptive function, the gamma enhancement coefficient of each colonoscopy image can be automatically adjusted according to the real-time luminance and local texture intensity. This allows for luminance compensation in low-brightness areas and suppression of over-enhancement in texture-rich areas, enabling clearer presentation of intestinal folds, mucosal texture, and early lesion edges.
[0042] By normalizing the local texture entropy, this invention can more accurately reflect the differences in intestinal wall folds and local structures, avoiding enhancement distortion caused by inaccurate texture estimation in traditional methods. The use of a clip condition constraint function to limit the gamma coefficients within a set range effectively avoids artifacts and noise amplification caused by over-enhancement. By calculating the gamma enhancement coefficients through exponential weighted smoothing, the enhancement parameters transition smoothly between consecutive frames, solving the problem of video flickering and brightness jumps in existing technologies, and improving the stability of colonoscopy video processing.
[0043] By introducing a comprehensive lesion shape index, the morphological characteristics (such as area, perimeter, and roundness) and texture characteristics (such as surface gradient and roughness) of lesions can be comprehensively considered. This allows for a more accurate description of the morphological complexity of lesions and effective differentiation of lesions at different risk levels, enabling more comprehensive and precise lesion assessment. By establishing a comprehensive lesion shape index that combines the two key features of roundness and texture gradient, a more reliable lesion risk marker is obtained. This index is particularly suitable for malignant or highly suspected malignant lesions (such as irregular tumors or complex polyps). It can describe the geometry of the lesion through roundness and reflect the roughness or irregularity of the lesion surface through texture gradient, thus providing more structural diagnostic evidence. This helps improve the accuracy of colonoscopy-assisted diagnosis and reduce the possibility of misdiagnosis and missed diagnosis. Example
[0044] Please see Figure 2 As shown, parts not described in detail in this embodiment are described in Embodiment 1. An artificial intelligence-based colonoscopy-assisted diagnostic system is provided, comprising: The time synchronization acquisition module is used to acquire colonoscopy image data during colonoscopy and synchronously extract corresponding auxiliary acquisition information from the colonoscopy image data; it caches the colonoscopy image data and auxiliary acquisition information frame by frame and keeps the timestamps aligned. The image enhancement processing module is used to perform standardized correction and adaptive enhancement processing on the time-stamp aligned colonoscopy image data; and introduces an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds to obtain enhanced images. The associated lesion localization module uses a target detection model to locate and classify lesions in enhanced images. Combined with auxiliary acquisition information, it performs multi-scale feature aggregation and temporal consistency constraints to generate lesion candidate regions. The lesion feature analysis module is used to perform morphological, texture and boundary structure analysis on lesion candidate regions, extract lesion morphological features, and calculate the comprehensive lesion shape index to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the texture gradient features of the lesion surface. The intelligent diagnostic reasoning module constructs diagnostic logic for lesion classification, risk assessment, and clinical treatment suggestions based on lesion morphological characteristics and comprehensive lesion shape index, combined with the category characteristics of lesion candidate regions. Based on the diagnostic logic, it executes rule-based reasoning to classify lesions into risk levels and outputs corresponding clinical treatment suggestions.
[0045] Since the electronic device described in this embodiment is the one used in implementing the artificial intelligence-based colonoscopy-assisted diagnostic method and system described in this application, those skilled in the art can understand the specific implementation methods and various variations of the electronic device in this embodiment based on the artificial intelligence-based colonoscopy-assisted diagnostic method and system described in this application. Therefore, how the electronic device implements the method in this application will not be described in detail here. Any electronic device used by those skilled in the art in implementing the artificial intelligence-based colonoscopy-assisted diagnostic method and system described in this application falls within the scope of protection of this application.
[0046] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0047] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. An artificial intelligence-based colonoscopy-assisted diagnostic method, characterized in that, include: S1. Acquire colonoscopy image data during colonoscopy and simultaneously extract corresponding auxiliary acquisition information from the colonoscopy image data; The colonoscopy image data and auxiliary acquisition information are cached frame by frame and timestamps are kept aligned. S2. Perform normalization correction and adaptive enhancement processing on the timestamp-aligned colonoscopy image data; An adaptive gamma dynamic enhancement mechanism was introduced to preserve intestinal folds and obtain enhanced images; S3. Use the target detection model to locate lesions and filter categories in the enhanced image. Combine with the auxiliary acquisition information, perform multi-scale feature aggregation and temporal consistency constraints to generate lesion candidate regions. S4. Perform morphological, textural, and boundary structure analysis on candidate lesion regions to extract lesion morphological features; It also calculates the lesion shape comprehensive index to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the texture gradient characteristics of the lesion surface; S5. Based on the morphological characteristics and comprehensive index of lesion shape, combined with the category characteristics of lesion candidate regions, construct diagnostic logic for lesion classification, risk assessment and clinical treatment suggestions; based on the diagnostic logic, execute rule reasoning to classify the risk level of the lesion and output corresponding clinical treatment suggestions.
2. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 1, characterized in that, The method for acquiring colonoscopy image data during colonoscopy includes: An image sensor for acquiring images inside the intestine is installed inside the intestine, and the imaging parameters related to the image sensor are initialized, including optical parameters, focal length, light intensity, and electronic zoom. During the colonoscopy, the sensor moves along the intestine, continuously capturing images inside the intestine, and transmitting the acquired colonoscopy image data through a medical-grade data transmission interface.
3. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 2, characterized in that, The method for caching colonoscopy image data and auxiliary acquisition information frame by frame and maintaining timestamp alignment includes: The auxiliary acquisition information is extracted synchronously from each frame of colonoscopy image data. The auxiliary acquisition information includes the position information of the colonoscope in the intestine, the illumination parameters of the image, and the manipulation posture information. The colonoscopy image data is bound with the corresponding auxiliary acquisition information to form a complete data package, which is then stored in the cache queue of memory or storage medium in the order of acquisition. A timestamp is set for each frame of colonoscopy image data, and the time difference is compensated by interpolation to ensure that each frame of colonoscopy image data corresponds to the auxiliary acquisition information in time.
4. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 3, characterized in that, The method for obtaining the enhanced image includes: Normalization correction and adaptive enhancement processing are performed on the colonoscopy image data after time stamp alignment. Normalization correction includes image grayscale normalization, color channel correction and noise suppression. After correction, texture adaptive gamma dynamic enhancement is performed on each colonoscopy image through an adaptive gamma dynamic enhancement mechanism to preserve intestinal folds and detailed textures. Texture-adaptive gamma dynamic enhancement involves calculating the brightness statistics for each colonoscopy image frame, extracting the local texture entropy, and performing linear normalization to obtain the normalized local texture entropy. Based on the brightness statistics and the normalized local texture entropy, a brightness-texture adaptive function is constructed to adaptively determine the gamma enhancement coefficient for each colonoscopy image frame. An exponentially weighted smoothing method is used to smooth the gamma enhancement coefficients of each colonoscopy image frame, so that the enhancement coefficients transition smoothly between consecutive frames; and the smoothed gamma enhancement coefficients are applied to the pixels of each colonoscopy image frame to realize gamma transformation, thereby obtaining an enhanced image.
5. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 4, characterized in that, The method for generating candidate lesion regions includes: The enhanced image is used to locate lesions and filter categories using a target detection model. Combined with auxiliary acquisition information, multi-scale feature aggregation and temporal consistency constraints are performed to generate candidate lesion regions. The target detection model includes: taking the enhanced image and auxiliary acquisition information as training sample inputs, and dividing the training samples into training set, validation set and test set. A target detection model based on YOLOv8 was constructed, which includes an input layer, a backbone feature extraction network, a multi-scale feature aggregation network, and a detection head. During training, the cross-entropy loss function with a category prediction branch was used as the lesion category recognition loss to measure the difference between the predicted category probability and the true category probability. The IoU-based loss function was used as the localization loss to measure the degree of overlap between the predicted bounding box and the true bounding box. The model parameters are updated through backpropagation and gradient descent to minimize the loss function; Adam is selected as the optimizer during training; the model hyperparameters are evaluated and tuned on the validation set, and the generalization ability of the model is verified on the test set. The current enhanced image and corresponding auxiliary acquisition information are input into the trained target detection model to obtain the lesion category confidence and lesion bounding box position. Based on the temporal consistency constraint, the detection results of consecutive frames are smoothed to generate lesion candidate regions.
6. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 5, characterized in that, The method for extracting lesion morphological features includes: Morphological processing, including erosion, dilation, opening, and closing operations, is performed on the binarized mask of the lesion candidate region to eliminate isolated noise and smooth the boundaries of the lesion candidate region; morphological features of the lesion candidate region are calculated and extracted based on the processed lesion candidate region mask. A gray-level co-occurrence matrix is constructed from the image content within the candidate lesion region. Multidimensional texture features are extracted by combining local binary mode and multi-scale Gabor filter response. Morphological features and multidimensional texture features are combined to form lesion morphological features.
7. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 6, characterized in that, The method for calculating the comprehensive index of lesion shape includes: The area and perimeter of the lesion morphology features are extracted, the roundness index is calculated, and the average gradient of the surface texture of the lesion candidate region is calculated. By combining the roundness index and the average gradient of the surface texture of the lesion candidate region, a comprehensive lesion shape index is constructed to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the gradient features of the lesion surface texture.
8. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 7, characterized in that, The method for constructing diagnostic logic for lesion classification, risk assessment, and clinical management recommendations includes: Typical combination rules for morphology and shape are pre-defined for each lesion type. The typical combination rules include the preset typical morphological features and preset comprehensive lesion shape index for each lesion type. The typical combination rules are used as the reference standard for the category features of lesion candidate regions. When processing lesions, the morphological features of the lesion candidate region are compared with the preset typical morphological features to obtain the morphological feature matching score of the lesion candidate region; the lesion shape comprehensive index is compared with the preset lesion shape comprehensive index to obtain the shape comprehensive index matching score. The cosine similarity between the category features of the lesion candidate region and the preset category features is calculated to obtain the category feature matching score; the morphological feature matching score, shape comprehensive index matching score and category feature matching score of the lesion candidate region are weighted and fused to obtain the comprehensive matching score; When the comprehensive matching score is greater than or equal to the preset comprehensive matching score threshold, it is determined to be a typical lesion; when the comprehensive matching score is less than the preset comprehensive matching score threshold, it is determined to be an atypical lesion, thus forming a diagnostic logic for lesion classification, risk assessment and clinical treatment recommendations.
9. The method for colonoscopy-assisted diagnosis based on artificial intelligence according to claim 8, characterized in that, The methods for classifying lesions by risk level and providing corresponding clinical treatment recommendations include: The lesion classification result and the comprehensive matching score are used as inputs to enter the rule reasoning module. The rule reasoning module makes judgments based on the pre-set risk grading rule base. The risk grading rule base includes different rule conditions. Each rule condition corresponds to the range of lesion classification results and the threshold of the comprehensive matching score. The rule matching is performed to associate the corresponding risk level and clinical treatment suggestions. The rule matching adopts a threshold range matching method, which compares the input lesion classification results and comprehensive matching scores with the rule conditions to determine the rule conditions that meet the requirements, and selects the corresponding risk level according to the preset rule priority. The risk level is mapped to the preset clinical treatment measures to generate clinical treatment recommendations for each lesion. When different lesion areas exist in the same examination, rule reasoning is performed on each lesion area to obtain its own risk level and clinical treatment recommendations. These are then integrated to generate a risk level assessment report and output the corresponding clinical treatment recommendations.
10. An artificial intelligence-based colonoscopy-assisted diagnostic system, used to implement the artificial intelligence-based colonoscopy-assisted diagnostic method according to any one of claims 1 to 9, characterized in that, include: The time synchronization acquisition module is used to acquire colonoscopy image data during colonoscopy and synchronously extract corresponding auxiliary acquisition information from the colonoscopy image data; The colonoscopy image data and auxiliary acquisition information are cached frame by frame and timestamps are kept aligned. The image enhancement processing module is used to perform normalization correction and adaptive enhancement processing on the timestamp-aligned colonoscopy image data; An adaptive gamma dynamic enhancement mechanism was introduced to preserve intestinal folds and obtain enhanced images; The associated lesion localization module uses a target detection model to locate and classify lesions in enhanced images. Combined with auxiliary acquisition information, it performs multi-scale feature aggregation and temporal consistency constraints to generate lesion candidate regions. The lesion feature analysis module is used to perform morphological, texture and boundary structure analysis on lesion candidate regions, extract lesion morphological features, and calculate the comprehensive lesion shape index to describe the coupling relationship between the roundness property formed by the lesion area and perimeter and the texture gradient features of the lesion surface. The intelligent diagnostic reasoning module constructs diagnostic logic for lesion classification, risk assessment, and clinical treatment suggestions based on lesion morphological characteristics and comprehensive lesion shape index, combined with the category characteristics of lesion candidate regions. Based on the diagnostic logic, it executes rule-based reasoning to classify lesions into risk levels and outputs corresponding clinical treatment suggestions.
Citation Information
Cited By
Intelligent detection method and device for enteroscopy video based on double-system cascade decision
CN122176612A