Endoscopic image polyp detection method and device, electronic equipment and storage medium
By employing a detection head enhanced with multi-scale contextual information, semantic guidance fusion, and edge awareness, the problems of information overwhelmed by tiny lesions and false positives in colonoscopy polyp detection have been solved, thus improving the accuracy and localization precision of polyp detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-05
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies for detecting polyps in colonoscopy suffer from several problems: the spatial information of tiny lesions is easily submerged by pooling operations; the blurred edges and irregular characteristics lead to positioning drift; and the complex environment causes false positives, resulting in low detection accuracy.
A detection head based on multi-scale contextual information enhancement, semantically guided gating feature fusion, and edge perception enhancement using dilated convolutions with different dilation rates is employed. By combining the detection head with a hybrid dilated perception module (HDCM), semantically guided fusion, and edge perception enhancement, and incorporating a shape-constrained composite loss function, the detection accuracy is improved.
It effectively improves the detection accuracy of flat polyps, reduces the false positive rate, and significantly improves the fit of the detection frame to polyps with blurred edges and irregular shapes.
Smart Images

Figure CN121788807A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing, specifically to a method, apparatus, electronic device, and storage medium for detecting polyps in endoscopic images. Background Technology
[0002] In colonoscopy for polyp detection, flat or small polyps often pose a significant risk of missed detection due to their indistinct features. With the development of computer image processing technology, computer-aided detection techniques based on deep learning have received widespread attention and research in polyp detection.
[0003] Current polyp detection techniques are primarily based on deep learning-based object detection frameworks, with typical examples including Faster R-CNN, RetinaNet, and early versions of YOLO, which employ anchor-box mechanisms. These methods are based on multi-scale feature pyramids, generating several candidate anchor boxes for each spatial location, and then using classification and regression heads to filter and refine the anchor boxes. Alternatively, there are anchor-free paradigms based on pixel-to-boundary distance regression, such as FCOS and CornerNet. Their core idea is to directly regress the distance to the target boundary or corner position at each location in the feature map.
[0004] However, some existing detection methods have several shortcomings. First, in colonoscopy polyp detection, because the lesions of flat polyps are usually not obvious, the spatial information of small lesions in existing methods is easily submerged by pooling operations, leading to missed detections of flat polyps. Second, due to the blurred edges and irregular shapes of flat polyps, existing methods lack sensitivity to boundary localization during detection, resulting in localization drift. Third, the complex intestinal environment (such as reflections, air bubbles, and fecal residue) can cause false positives. Therefore, existing technologies suffer from low accuracy in polyp detection due to the following technical problems: the spatial information of small lesions is easily submerged by pooling operations; blurred edges and irregular shapes lead to localization drift; and the complex environment can cause false positives. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and storage medium for detecting polyps in endoscopic images. It can solve the technical problems existing in the prior art where, when detecting flat polyps, the spatial information of small lesions is easily submerged by pooling operations, the blurred edges and irregular characteristics cause positioning drift, and the detection is affected by complex environments, resulting in false positives and false detections, leading to low accuracy in polyp detection.
[0006] In a first aspect, embodiments of this application provide a method for detecting polyps in endoscopic images, including: The endoscope image to be detected is input into the polyp detection model, and multi-level features are extracted from the endoscope image to be detected, including the highest level features and the middle level features. Multi-scale contextual information enhancement based on dilated convolutions with several branches of different dilation rates is applied to the highest-level features to obtain context-enhanced features. Semantically guided fusion features are obtained by performing semantically guided gating on intermediate layer features and context-enhanced features; The endoscopic polyp detection results are obtained by performing edge-aware enhancement-based detection head prediction on semantically guided fusion features.
[0007] In conjunction with the first aspect, in one implementation, multi-scale contextual information enhancement is performed on the highest-level features based on dilated convolutions with branches of several different dilation rates to obtain context-enhanced features, including: The original detail features are obtained by performing a 1×1 convolution on the highest-level features; Several multi-scale context features are obtained by performing branch dilated convolutions with different dilation rates on the highest-level features; The original detailed features and several multi-scale contextual features are concatenated along the channel dimension to obtain context-enhanced features.
[0008] In conjunction with the first aspect, in one implementation, the branched dilated convolution includes three branches, and the multi-scale context features obtained by each branch include adjacent edge context features, morphological texture context features, and background context suppression features.
[0009] In conjunction with the first aspect, in one implementation, semantically guided fusion features are obtained by performing semantically guided gating-based feature fusion on intermediate layer features and context-enhanced features, including: In the intermediate layer features and context enhancement features, the current feature corresponding to each level is taken as the shallow layer feature, and the corresponding feature of the previous level is taken as the deep layer feature. At each level, semantically guided gating is used to fuse shallow and deep features to obtain the semantically guided fused features of the current level.
[0010] In conjunction with the first aspect, in one implementation, semantically guided gating-based feature fusion is performed on shallow and deep features at each level to obtain semantically guided fusion features for the current level, including: The gated mask is obtained by sequentially performing bilinear interpolation upsampling and mask generation on the deep features; The gated mask and shallow features are multiplied element-wise to obtain the gated cleaning shallow features; The semantically guided fusion features of the current level are obtained by residual fusion of the shallow and deep features of the gated cleaning.
[0011] In conjunction with the first aspect, in one implementation, the endoscopic image polyp detection result is obtained by performing edge-aware enhancement-based detection head prediction output on the semantically guided fusion features, including: Edge features are obtained by performing 3×3 convolution and ReLU activation on semantically guided fusion features; Edge enhancement features are obtained by concatenating edge features and semantically guided fusion features in the channels; The edge enhancement features are predicted and output to obtain the polyp detection results in the endoscopic image.
[0012] In conjunction with the first aspect, in one implementation, the prediction loss is calculated based on the shape constraint composite loss function during the training process of the polyp detection model; The shape constraint composite loss function includes a basic IoU term, a center point distance penalty term, and a shape consistency constraint term.
[0013] Secondly, embodiments of this application provide an endoscopic image polyp detection device, comprising: The feature extraction module is used to input the endoscope image to be detected into the polyp detection model and perform step-by-step feature extraction on the endoscope image to be detected to obtain multi-level features, including the highest level features and intermediate level features; The context enhancement module is used to enhance the highest-level features with multi-scale contextual information based on dilated convolutions with branches of several different dilation rates, resulting in context-enhanced features. The semantically guided fusion module is used to perform semantically guided fusion of intermediate layer features and context-enhanced features based on semantically guided gating to obtain semantically guided fused features. The edge enhancement detection head module is used to perform edge-aware enhancement-based detection head prediction on semantically guided fusion features to obtain polyp detection results in endoscopic images.
[0014] Thirdly, embodiments of this application provide an endoscopic image polyp detection device, which includes a processor, a memory, and an endoscopic image polyp detection program stored in the memory and executable by the processor. When the endoscopic image polyp detection program is executed by the processor, it implements the steps of the endoscopic image polyp detection method as described above.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing an endoscopic image polyp detection program, wherein when the endoscopic image polyp detection program is executed by a processor, it implements the steps of the endoscopic image polyp detection method as described above.
[0016] The beneficial effects of the technical solutions provided in this application include: This application enhances the model's ability to perceive minute lesions by enhancing multi-scale contextual information through dilated convolutions with branches of varying dilation rates, thus fully preserving the geometric contours and texture details of tiny polyps. It also reduces false positives by using semantically guided gating for feature fusion, suppressing noise responses in background or reflective areas. Furthermore, an edge-aware enhanced detection head decouples and enhances the edge features of lesions when outputting detection boxes, significantly improving the fit of the bounding boxes to flat polyps with blurred edges and irregular shapes. Compared to existing technologies, this application effectively improves the accuracy of detecting flat polyps. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart of an embodiment of the endoscopic image polyp detection method of this application; Figure 2 This is a diagram showing the overall structure of the model in an embodiment of this application; Figure 3 This is a schematic diagram illustrating the multi-scale hybrid dilated convolutional context enhancement process according to an embodiment of this application. Figure 4 This is a model structure diagram of the hybrid void sensing module according to an embodiment of this application; Figure 5 This is a schematic diagram of the semantically guided gating feature fusion process in an embodiment of this application; Figure 6 A detailed flowchart of step S502 in the embodiments of this application; Figure 7 This is a model structure diagram of semantic guidance gating feature fusion in an embodiment of this application; Figure 8 This is a schematic diagram of the output prediction of the detection head based on edge perception enhancement according to an embodiment of this application; Figure 9 This is a schematic diagram of the edge sensing enhancement detection head according to an embodiment of this application; Figure 10 This is a schematic diagram of the functional modules of an embodiment of the endoscopic image polyp detection device of this application; Figure 11 This is a schematic diagram of the hardware structure of the endoscopic image polyp detection device involved in the embodiments of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0020] In a first aspect, embodiments of this application provide a method for detecting polyps in endoscopic images.
[0021] In one embodiment, reference is made to Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the endoscopic polyp detection method of this application. Figure 1 As shown, methods for detecting polyps in endoscopic images include: S101. Input the endoscope image to be detected into the polyp detection model, and perform step-by-step feature extraction on the endoscope image to be detected to obtain multi-level features, including the highest layer features and the middle layer features. S102. Perform multi-scale contextual information enhancement on the highest layer features based on dilated convolutions with branches of different dilation rates to obtain context-enhanced features. S103. Perform semantically guided gating-based feature fusion on intermediate layer features and context-enhanced features to obtain semantically guided fusion features; S104. Perform edge-aware enhancement-based detection head prediction on semantically guided fusion features to obtain polyp detection results in endoscopic images.
[0022] Specifically, in the polyp detection example, Figure 2 This is a diagram illustrating the overall structure of the model in an embodiment of this application, combined with... Figure 2 The system employs an integrated architecture of backbone network feature extraction, neck feature fusion, and anchorless regression head. The backbone network feature extraction follows a feature pyramid structure, extracting features at three levels: C3, C4, and C5.
[0023] For the highest-level feature C5, the embodiment incorporates a Hybrid Hollow Perception Module (HDCM) in series at the neck region. This module extracts features from C5 through several branch dilated convolutions with different dilation rates, extracting adjacent edge context features, morphological texture context features, and background context suppression features at different scales. Simultaneously, for the highest-level feature C5, the embodiment performs a 1×1 convolution to obtain the original detail features, preserving original spatial detail information and preventing the blurring of tiny polyps in subsequent dilated convolutions. The embodiment concatenates the context features at each scale with the original detail feature channel dimensions, resulting in the output P5 of the HDCM, which replaces C5 in the next module.
[0024] Before feeding the features into the detection head, the embodiment also introduces a semantically guided gating feature fusion mechanism. In this mechanism, the strong semantic features output from the deep network are used as "prior knowledge," and a gating mask is obtained through bilinear interpolation upsampling and mask generation. The gating mask is then applied to the shallow feature map through multiplication to automatically suppress noise responses, resulting in gated cleaned shallow features. Finally, the gated cleaned shallow features and the residuals of the deep features are fused to obtain the semantically guided fused features of the current level, which replace the original features in the next module. Through this semantically guided gating mechanism, the embodiment effectively reduces false detections caused by background and reflection interference, thus lowering the false positive rate.
[0025] Finally, in the detection head module, to address the issue of insufficient sensitivity to boundary localization leading to localization drift, the embodiment introduces explicit geometric constraints at the end of the detection head. First, the embodiment employs an edge decoupling strategy, adding an independent edge prediction branch in addition to the classification and regression branches. This branch focuses on extracting high-frequency gradient information from the feature map to predict the binarized boundary heatmap of the polyp and normal mucosa. Then, the predicted edge feature map is explicitly embedded into the regression branch as enhancement information, providing the network with a clear physical boundary reference when predicting the "distance from the center point to the four sides," thereby significantly improving the fitting accuracy of bounding boxes for highly irregularly shaped polyps.
[0026] In this embodiment, multi-scale contextual information enhancement based on dilated convolutions with different dilation rates is used to fully preserve the geometric contours and texture details of micropolyps, improving the model's ability to perceive micro lesions. Semantically guided gating-based feature fusion is used to suppress noise responses in background or reflective areas, reducing false positive rates. An edge-aware enhanced detection head decouples and enhances the edge features of lesions when outputting detection boxes, significantly improving the fit of the detection boxes to the bounding boxes of flat polyps with blurred edges and irregular shapes. Compared to existing technologies, this application effectively improves the accuracy of flat polyp detection.
[0027] Furthermore, in one embodiment, Figure 3 This is a schematic diagram of the multi-scale hybrid dilated convolutional context enhancement process according to an embodiment of this application, as shown below. Figure 3 As shown, multi-scale contextual information enhancement is performed on the highest-level features based on dilated convolutions with branches of different dilation rates, resulting in context-enhanced features, including: S301. Perform a 1×1 convolution on the highest layer features to obtain the original detail features; S302. Perform branch-dilated convolutions with different dilation rates on the highest-level features to obtain several multi-scale context features; S303, the original detailed features and several multi-scale contextual features are spliced together in the channel dimension to obtain context-enhanced features.
[0028] Furthermore, in one embodiment, the branched dilated convolution includes three branches, and the multi-scale context features obtained by each branch include adjacent edge context features, morphological texture context features, and background context suppression features.
[0029] Specifically, Figure 4 This is a model structure diagram of the hybrid void sensing module according to an embodiment of this application. Combined with... Figure 4 In the polyp detection model, the backbone network extracts features at three levels (C3, C4, and C5) through multi-level pyramid feature extraction. For the highest-level feature C5, the embodiment designs a Hybrid Hole Perception Module (HDCM) to replace the traditional pooling layer. HDCM includes input splitting and multi-scale feature aggregation mechanisms. First, a parallel multi-branch feature extraction step is performed, simultaneously feeding the input feature C5 into four parallel processing branches to capture contextual information at different scales.
[0030] Branch 1, serving as a detail-preserving and dimensionality-reduction flow, processes C5 using a 1×1 convolution. This branch primarily compresses channels and preserves the original spatial details in the feature map, preventing the geometric contours of tiny polyps from becoming blurred in subsequent dilated convolutions. Its output is denoted as... .
[0031] Branches two through four, acting as a wide-area sensing flow, each employ three parallel 3×3 dilated convolutional layers. The dilation rates for these three branches are set to... , and . The branch is equivalent to a standard convolution, used to capture the polyp body and its immediate edge information, and the output is denoted as... ; Branches are used to expand the receptive field, capturing a moderate range of polyp morphology and texture; the output is denoted as... ; The branch is used to maximize the receptive field without reducing resolution, capturing a large range of intestinal wall background and vascular orientation as contextual inhibition information. The output is denoted as... .
[0032] Finally, the outputs of the above four branches are combined in the feature fusion step. Concatenation is performed at the channel level:
[0033] Then, the spliced features Enter one The convolutional layers perform cross-channel information fusion and dimensionality adjustment, outputting the final enhanced feature P5. This structure, through parallel multi-scale sampling, fully preserves high-frequency details for small target localization and semantic context for interference resistance.
[0034] In this embodiment, to address the issue of spatial information about tiny lesions in deep feature maps being easily "submerged" by pooling operations, the traditional cascaded pooling pyramid structure is abandoned in favor of a hybrid dilated receptive module. This module captures both local details and global context simultaneously through a multi-branch architecture while maintaining the spatial resolution of the feature map. First, there is a polyp detail preservation branch that uses 1×1 convolutions for direct mapping without any downsampling, fully preserving the geometric contours and texture details of tiny polyps and preventing small targets from disappearing in the deep network. Second, there is a wide-area receptive branch that introduces multiple parallel dilated convolutional groups. Each branch uses different dilation rates (e.g., d=1, 3, 5), exponentially expanding the receptive field. Unlike standard convolutions, dilated convolutions, without increasing the number of parameters, can cross the polyp itself, capturing the direction of folds and vascular textures of the surrounding intestinal wall as auxiliary discriminative information. Finally, the multi-path features are concatenated and adaptively fused to output enhanced features that combine high-resolution details with wide-field semantics.
[0035] Furthermore, in one embodiment, Figure 5 This is a schematic diagram of the semantically guided gating feature fusion process in an embodiment of this application, as shown below. Figure 5 As shown, semantically guided fusion features are obtained by performing semantically guided gating-based feature fusion on intermediate layer features and context-enhanced features, including: S501. Among the intermediate layer features and context enhancement features, the current feature corresponding to each level is taken as the shallow layer feature, and the corresponding feature of the previous level is taken as the deep layer feature. S502. At each level, perform semantically guided gating-based feature fusion on shallow and deep features to obtain the semantically guided fusion features of the current level.
[0036] Furthermore, in one embodiment, Figure 6 A detailed flowchart of step S502 in this embodiment of the application is shown below. Figure 6 As shown, semantically guided fusion features are obtained by performing semantically guided gating-based feature fusion on shallow and deep features at each level, including: S601. Perform bilinear interpolation upsampling and mask generation sequentially on the deep features to obtain the gated mask; S602. Multiply the gated mask and the shallow features element by element to obtain the gated cleaning shallow features; S603. Perform residual fusion of the shallow and deep features of the gated cleaning to obtain the semantically guided fusion features of the current level.
[0037] Specifically, in the semantically guided gating feature fusion, the embodiment adopts a top-down, hierarchical fusion path. The input includes feature layers C3 and C4 extracted by the backbone network, and the top-level feature P5 enhanced by the HDCM module. When describing the specific single-level fusion operation, we define the features passed down from the previous level as deep features. The lateral features output by the current layer backbone network are defined as shallow features. . Figure 7 This is a model structure diagram of semantic guidance gating feature fusion in an embodiment of this application, combined with Figure 7 The feature fusion process of semantically guided gating can be summarized as follows: First, perform semantic alignment, Upsampling via bilinear interpolation makes its spatial size consistent with... Consistent, denoted as Next, a mask is generated, which will... Input a 1×1 convolutional layer, followed by a sigmoid activation function, to generate a semantic gate mask with values in the range (0,1), denoted as M:
[0038] in, This represents the Sigmoid activation function. The convolution operation compresses the number of channels to 1. The output mask M has a value range of (0, 1) for each pixel (x, y) in space. In this mask, regions close to 1 represent "high-probability polyp regions" confirmed by high-level semantics, while regions close to 0 represent "background or noise." The model then performs gated cleaning, combining the mask M with shallow features. Perform element-wise multiplication, that is operate:
[0039] In this step, The originally present reflective bright areas are forcibly suppressed because the corresponding M values are extremely small, thus removing false positive noise. This step utilizes deep knowledge to forcibly suppress bright reflective noise unrelated to polyps in shallow features.
[0040] Finally, residual fusion is performed, adding the cleaned shallow features to the upsampled deep features to obtain the module's output. :
[0041] In this embodiment, a "semantic top-down cleaning" gating mechanism is proposed to address the problem of shallow noise being erroneously amplified in traditional feature fusion. First, this mechanism utilizes the strong semantic features output from deep networks as "prior knowledge" to generate a spatial attention mask. Second, this mask is applied to the shallow feature map through multiplication, which is equivalent to a semantically conditional soft gating. In high-confidence regions of polyps, the gating is open, allowing shallow textures to pass through. In background or reflective regions, the gating is closed (weights approach 0), automatically suppressing noise responses. Finally, this "multiplicative denoising + additive fusion" strategy effectively solves the problem of "mixed" feature aliasing in traditional FPN structures, leading to false positives.
[0042] Furthermore, in one embodiment, Figure 8 This is a schematic diagram illustrating the output prediction of the detection head based on edge perception enhancement according to an embodiment of this application. Figure 8 As shown, the endoscopic image polyp detection results are obtained by performing edge-aware enhancement-based detection head prediction on semantically guided fusion features, including: S801. Perform 3×3 convolution and ReLU activation on the semantically guided fusion features to obtain edge features; S802. Edge enhancement features are obtained by concatenating edge features and semantically guided fusion features in the channels; S803. Predict and output the edge enhancement features to obtain the polyp detection results in the endoscopic image.
[0043] Specifically, Figure 9 This is a schematic diagram of the edge-aware enhanced detection head according to an embodiment of this application, combined with... Figure 9 Unlike the direct regression method commonly used in existing technologies, this invention designs a three-branch structure. First, there is a classification branch, which predicts class scores through 3×3 and 1×1 convolutions. Second, there is an edge enhancement branch, where the input features are processed through a separate 3×3 convolutional layer with ReLU activation to extract the boundary gradient feature map of the target, denoted as the edge feature. This branch forces the network to explicitly learn "where the polyp ends and where the intestinal wall begins". Finally, there's a regression branch that compares the original features F with the edge features. The data is concatenated along the channel dimension to form boundary enhancement features, and then the distances to the four sides of the bounding box are predicted based on these features. The overall steps are expressed as follows:
[0044] in, This represents the predicted output of the detection head.
[0045] In this embodiment, explicit geometric constraints are introduced at the detection endpoint. First, edge decoupling is performed. A separate edge prediction branch is added in addition to the classification and regression branches. This branch focuses on extracting high-frequency gradient information from the feature map to predict the binarized boundary heatmap of the polyp and normal mucosa. Then, feature interaction is performed. The predicted edge feature map is explicitly embedded into the regression branch. Through this logic of finding edges first and then defining the bounding box, the model has a clear physical boundary reference when processing irregularly shaped polyps such as lobed or carpet-like polyps. The bounding box does not cut off the polyp body, improving the model's recognition accuracy for flat polyps.
[0046] Furthermore, in one embodiment, the prediction loss is calculated based on the shape constraint composite loss function during the training process of the polyp detection model; The shape constraint composite loss function includes a basic IoU term, a center point distance penalty term, and a shape consistency constraint term.
[0047] Specifically, during model training, the implementation example uses a composite loss function that includes geometric alignment and aspect ratio consistency terms to dynamically balance positioning accuracy and shape regression stability during training.
[0048] In this embodiment, the polyp detection model is implemented on a workstation platform, which includes: an NVIDIA GTX 1080Ti GPU, an Intel Xeon E5-2683 CPU, an Ubuntu 18.04 LTS operating system, Python 3.9.12, PyTorch 1.13.1, CUDA 11.6, and cuDNN 8.4. The system receives high-definition colonoscopy video streams (processed frame by frame) via a video capture card, outputs real-time detection bounding boxes and confidence scores for polyp targets, and overlays them onto the original video in OSD format. The end-to-end inference latency is approximately 28ms / frame, corresponding to a real-time performance of 35.8 FPS.
[0049] The model's training data consists of a fusion of self-built clinical colonoscopy videos and the publicly available SUN dataset, totaling 103,469 frames, all with polyp bounding box annotations. The data is divided into training, validation, and test sets in an 8:1:1 ratio. Input frames are fed into the network after color normalization and scale normalization. Preferably, the input images are scaled proportionally and filled with mailboxes to a uniform inference size S (e.g., S = 640 pixels) to maintain the target geometric proportions. Simultaneously, data augmentation is performed using random horizontal flipping, affine transformation, brightness / contrast perturbation, and mild motion blur to improve the model's robustness to specular reflections and motion blur. During the inference phase, only scale normalization and standardization are retained to avoid introducing randomness.
[0050] To enhance stability at different scales and aspect ratios, this embodiment employs the following loss function. Let the predicted bounding box... truth boxes Define the minimum bounding rectangle of the two frames and its width and height as follows: and The diagonal distance of the outer frame is First, calculate the basic IoU term. Distance from center point penalty :
[0051]
[0052] in, Represents Euclidean distance. and These are the center points of the prediction box and the truth box, respectively.
[0053] Then define the shape consistency constraint. :
[0054] The outer frame size is used here. and Normalization, compared to directly using the predicted bounding box size as the denominator, effectively avoids the numerical instability caused by excessively small predicted bounding boxes in the early stages of training. The final total localization loss... Defined as:
[0055] in This is the balancing coefficient. The loss function integrates overlap, center distance, and aspect ratio consistency to improve the stability and convergence of localization on small targets and targets with unusual appearances. In this embodiment, a composite loss function including geometric alignment and aspect ratio consistency terms is used to dynamically balance the positioning accuracy and shape regression stability during training, thereby further improving the model's detection performance for flat polyps.
[0056] Furthermore, to adapt to portable workstations or embedded platforms, lightweight replacements can be made to the backbone and neck in other embodiments. The backbone can be replaced with lightweight versions of MobileNetV3, ShuffleNetV2, or CSPDarknet. While ensuring cross-scale interaction, the number of layers in the semantically guided gating feature fusion SG-FPN is reduced from 2-3 layers to 1-2 layers, and the channel width is scaled by a factor of 0.5-0.75. The dilated convolution parallel branch in the Hybrid Hollow Perception Module (HDCM) is reduced from 3 layers to 2 layers, or one pooling layer is replaced with a separable dilated convolution to save resources. The detection head retains its anchorless regression form. This configuration can further improve inference speed without significantly sacrificing mAP, meeting more stringent power consumption and latency constraints.
[0057] All the above embodiments share the core idea of this invention: High-density circular coherence mapping (HDCM) efficiently encodes a wide receptive field context at a high level; SG-FPN adaptively fuses cross-layer features using a semantic gating mechanism; and anchor-free boundary distance regression combined with SISC loss achieves scale- and shape-robust localization learning. Extensive experimental verification shows that the invention achieves 98.8% mAP@0.5, 82.5% mAP@0.5:0.95, and 98.3% mIoU on a single GTX 1080 Ti platform, achieving a real-time inference speed of 35.8 frames per second. In comparison with Faster R-CNN, RetinaNet, YOLO series, and various DETR-like methods, this invention achieves superior recall and precision while maintaining real-time performance, particularly demonstrating significant advantages in the detection of small-scale and low-contrast polyps.
[0058] Secondly, embodiments of this application also provide an endoscopic image polyp detection device.
[0059] In one embodiment, reference is made to Figure 10 , Figure 10 This is a schematic diagram of the functional modules of an embodiment of the endoscopic image polyp detection device of this application. Figure 10 As shown, the endoscopic image polyp detection device includes: The feature extraction module 1001 is used to input the endoscope image to be detected into the polyp detection model and perform step-by-step feature extraction on the endoscope image to be detected to obtain multi-level features, including the highest layer features and intermediate layer features. The context enhancement module 1002 is used to enhance the highest-level features with multi-scale context information based on dilated convolutions with several branches of different dilation rates, thereby obtaining context-enhanced features. The semantically guided fusion module 1003 is used to perform semantically guided fusion of intermediate layer features and context-enhanced features based on semantically guided gating to obtain semantically guided fused features. The edge enhancement detection head module 1004 is used to perform edge-aware enhancement-based detection head prediction output on semantically guided fusion features to obtain polyp detection results in endoscopic images.
[0060] The functions of each module in the aforementioned endoscopic image polyp detection device correspond to the steps in the aforementioned endoscopic image polyp detection method embodiment, and their functions and implementation processes will not be described in detail here.
[0061] Thirdly, embodiments of this application provide an endoscopic image polyp detection device, which can be a personal computer (PC), laptop computer, server, or other device with data processing capabilities.
[0062] Reference Figure 11 , Figure 11 This is a schematic diagram of the hardware structure of the endoscopic image polyp detection device involved in the embodiments of this application. In the embodiments of this application, the endoscopic image polyp detection device may include a processor, a memory, a communication interface, and a communication bus.
[0063] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0064] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal components of the endoscopic polyp detection device, as well as interfaces used for interconnecting the endoscopic polyp detection device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0065] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0066] The processor can be a general-purpose processor, which can call the endoscopic image polyp detection program stored in the memory and execute the endoscopic image polyp detection method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the endoscopic image polyp detection program is called can be referred to in the various embodiments of the endoscopic image polyp detection method of this application, and will not be repeated here.
[0067] Those skilled in the art will understand that Figure 11 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0068] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0069] This application provides a computer-readable storage medium storing an endoscopic image polyp detection program, wherein when executed by a processor, the endoscopic image polyp detection program implements the steps of the endoscopic image polyp detection method described above.
[0070] The method implemented when the endoscopic image polyp detection procedure is executed can be referred to in the various embodiments of the endoscopic image polyp detection method of this application, and will not be repeated here.
[0071] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0072] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0073] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0074] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0075] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0076] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods of the various embodiments of this application.
[0077] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for detecting polyps in endoscopic images, characterized in that, include: The endoscope image to be detected is input into the polyp detection model, and the endoscope image to be detected is subjected to step-by-step feature extraction to obtain multi-level features, including the highest level features and the middle level features. The highest-level features are enhanced with multi-scale contextual information based on dilated convolutions with branches of several different dilation rates to obtain context-enhanced features. The semantically guided fusion feature is obtained by performing semantically guided gating feature fusion on the intermediate layer features and the context enhancement features; The endoscopic image polyp detection result is obtained by performing edge-aware enhanced detection head prediction on the semantically guided fusion features.
2. The method for detecting polyps in endoscopic images according to claim 1, characterized in that, The process of enhancing the highest-level features with multi-scale contextual information based on dilated convolutions with branches of different dilation rates to obtain context-enhanced features includes: Perform a 1×1 convolution on the highest-level features to obtain the original detail features; Several multi-scale context features are obtained by performing branch-dilated convolutions with different dilation rates on the highest-level features; The original detail features and several multi-scale context features are concatenated along the channel dimension to obtain context-enhanced features.
3. The method for detecting polyps in endoscopic images according to claim 2, characterized in that, The branched dilated convolution includes three branches, and the multi-scale context features obtained by each branch include adjacent edge context features, morphological texture context features, and background context suppression features.
4. The method for detecting polyps in endoscopic images according to claim 1, characterized in that, The semantically guided fusion feature is obtained by performing semantically guided gating-based feature fusion on the intermediate layer features and the context-enhanced features, including: In the intermediate layer features and the context enhancement features, the current feature corresponding to each level is taken as the shallow feature, and the corresponding feature of the previous level is taken as the deep feature. At each level, semantically guided gating is used to perform feature fusion on the shallow features and the deep features to obtain the semantically guided fusion features of the current level.
5. The method for detecting polyps in endoscopic images according to claim 4, characterized in that, The step of performing semantically guided gating-based feature fusion on the shallow features and deep features at each level to obtain the semantically guided fusion features of the current level includes: The deep features are sequentially subjected to bilinear interpolation upsampling and mask generation to obtain a gated mask; The gated mask and the shallow features are multiplied element by element to obtain the gated cleaning shallow features; The semantically guided fusion feature of the current level is obtained by residual fusion of the shallow features and deep features of the gated cleaning.
6. The method for detecting polyps in endoscopic images according to claim 1, characterized in that, The step of performing edge-aware enhanced detection head prediction on the semantically guided fusion features to obtain the endoscopic image polyp detection result includes: Edge features are obtained by performing 3×3 convolution and ReLU activation on the semantically guided fusion features; The edge features and the semantically guided fusion features are concatenated in the channel to obtain the edge enhancement features; The edge enhancement features are predicted and output to obtain the polyp detection results in the endoscopic image.
7. The method for detecting polyps in endoscopic images according to claim 1, characterized in that, During the training process of the polyp detection model, the prediction loss is calculated based on the shape constraint composite loss function; The shape constraint composite loss function includes a basic IoU term, a center point distance penalty term, and a shape consistency constraint term.
8. An endoscopic imaging polyp detection device, characterized in that, include: The feature extraction module is used to input the endoscope image to be detected into the polyp detection model and perform step-by-step feature extraction on the endoscope image to be detected to obtain multi-level features, including the highest level features and the middle level features. The context enhancement module is used to enhance the highest-level features with multi-scale context information based on dilated convolutions with branches of several different dilation rates, to obtain context-enhanced features. The semantically guided fusion module is used to perform semantically guided fusion feature fusion on the intermediate layer features and the context-enhanced features to obtain semantically guided fusion features. The edge enhancement detection head module is used to perform edge-aware enhancement-based detection head prediction on the semantically guided fusion features to obtain the polyp detection results in the endoscopic image.
9. An endoscopic imaging polyp detection device, characterized in that, The endoscopic image polyp detection device includes a processor, a memory, and an endoscopic image polyp detection program stored in the memory and executable by the processor, wherein when the endoscopic image polyp detection program is executed by the processor, it implements the steps of the endoscopic image polyp detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an endoscopic image polyp detection program, wherein when the endoscopic image polyp detection program is executed by a processor, it implements the steps of the endoscopic image polyp detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Airport runway foreign matter detection method based on YOLO11 optimization network
CN120997793A