IVOCT vascular stent detection method based on polar coordinate perception and multi-frame context learning
By employing a polar coordinate-aware multi-frame context learning method, combined with polar coordinate position encoding and cross-frame consistency loss optimization, the problem of missed detection of weak signals and small target stents in IVOCT vascular stent detection was solved, achieving higher detection accuracy and stability.
Patent Information
- Application Number
- CN202611488260.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-11-17
AI Technical Summary
Existing IVOCT vascular stent detection technologies have limited generalization ability in complex backgrounds. Most methods do not make full use of the continuous frame context and do not explicitly introduce polar coordinate structure priors, which makes it easy to miss weak signals and small target stents.
A polar coordinate-aware multi-frame context learning method is adopted. By constructing a polar coordinate position code and stitching grayscale images to form a four-channel input, multi-frame feature extraction is performed by combining three-dimensional convolution and Transformer models. Cross-frame consistency loss is introduced for optimization to enhance the model's ability to recognize polar coordinate positions and inter-frame correlations.
It improves the stability of identifying weak signals and small target stents, reduces missed detections and inter-frame prediction jumps, and enhances the accuracy and stability of IVOCT vascular stent detection.
Smart Images

Figure CN123118769A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of medical image processing, computer-aided diagnosis and deep learning technology. Specifically, it relates to a method, system and storage medium for automatic detection of vascular stents in intravascular optical coherence tomography (IVOCT) images. In particular, it relates to an automatic IVOCT vascular stent detection technology that combines polar coordinate position prior, multi-frame target frame prediction, missed detection guidance optimization and cross-frame consistency constraints. Background Technology
[0002] Optical coherence tomography (IVOCT) offers high spatial resolution, displaying the vessel lumen, vessel wall, and stent structure, making it a crucial tool for assessing stent apposition, expansion, and tissue coverage. However, a single IVOCT retraction involves numerous consecutive images and many small stent struts, making manual frame-by-frame analysis time-consuming and subjective. Therefore, automated, stable, and highly recall-based stent detection methods are needed. Lau et al. pointed out that automated segmentation is essential for providing quantitative stent data within the intraoperative timeframe. [1] Furthermore, accurate stent detection is fundamental for stent apposition assessment, tissue coverage analysis, and 3D reconstruction. Qin et al. proposed a 3D distance color coding method, mapping the stent-lumen distance to a 3D color visualization result for PCI stent apposition assessment, further illustrating the importance of stent detection for subsequent 3D quantitative analysis. [2] .
[0003] Metal stents typically appear as highly reflective bright spots with posterior shadows in IVOCT images. Traditional methods often rely on artificial features such as A-line intensity, gradient, shadows, or wavelet response for detection, but these are sensitive to image quality, artifacts, tissue coverage, and equipment differences, and are prone to false negatives or missed detections in weak signal and complex backgrounds. Lau et al. also pointed out that such methods relying on specific appearance features have limited robustness. [1] .
[0004] In recent years, deep learning methods have been increasingly used in IVOCT stent detection. Lau et al. used U-Net and an improved structure combining MobileNetV2 and DenseNet121 to achieve automatic segmentation of metallic stents and bioresorbable stents, verifying the feasibility of deep learning in IVOCT stent analysis. [1] Han et al. proposed a multi-attention convolutional model to enhance the feature extraction capability of small, densely packed scaffold supports and achieve higher detection performance. [3] Other studies have shown that attention mechanisms, multi-scale feature fusion, and wavelet feature preservation can help improve IVOCT stent segmentation results. [4] .
[0005] Although existing deep learning methods have achieved good results, most still rely on single-frame images and do not fully utilize the inter-frame continuity in IVOCT pullback sequences. Since stents have a three-dimensional continuous structure, the context of adjacent frames helps in the discrimination of weak signals or uncertain stents. Wu et al. fused adjacent frame information through pseudo-three-dimensional input to verify the effectiveness of multi-frame context, but have not yet further introduced cross-frame prediction consistency constraints. [5] Qin et al. also pointed out that relying solely on a single two-dimensional image or a limited number of continuous slices can easily overlook the overall distribution of scaffolds in the depth direction, and scaffolds with low brightness or similarity to surrounding tissues are still difficult to identify. [2] .
[0006] Secondly, IVOCT images exhibit distinct polar coordinate imaging characteristics, where the radial and angular positions of the stent have clear physical meaning. In polar coordinate images, the stent and its shadow present a more regular structure along the A-line, which is more conducive to model recognition. [5] However, most existing methods only take grayscale images as input and do not explicitly introduce polar coordinate priors such as radial position and angular periodicity. This makes the model rely entirely on the data to learn spatial relationships, which may still be unstable in the detection of small targets, weak signals and boundary regions.
[0007] Furthermore, while convolutional networks such as U-Net are widely used in medical image segmentation, their limited local receptive fields make it difficult to fully model long-range dependencies. 3D TransUNet introduces the Transformer into a 3D medical image segmentation framework, combining the local detail extraction capabilities of CNNs with the global context modeling capabilities of Transformers within the U-Net structure, providing an effective approach for segmenting complex medical structures. [6] However, for small, dense, and weak-signal targets such as IVOCT metal stents, general-purpose 3D medical segmentation networks still need to be specifically designed in conjunction with the polar coordinate imaging characteristics and multi-frame continuity of IVOCT.
[0008] In summary, existing IVOCT stent detection technologies still suffer from the following problems: First, traditional methods rely on manual features, resulting in limited generalization ability in complex backgrounds; second, most deep learning methods focus on single-frame detection and fail to fully utilize the context of consecutive frames; third, existing models rarely explicitly incorporate IVOCT polar coordinate structure priors; and fourth, weak-signal and small-target stents are still prone to missed detection. Therefore, it is necessary to propose an automatic IVOCT vascular stent detection method that combines explicit polar coordinate position priors, multi-frame target frame prediction, missed detection-guided optimization, and cross-frame consistency constraints to address the issues of missed detection, prediction jumps, and insufficient stability in the detection of weak-signal stents, small-target stents, and consecutive frames.
[0009] References: [1] Lau Y S, Tan L K, Chan C K, et al. Automated segmentation ofmetal stent and bioresorbable vascular scaffold in intravascular opticalcoherence tomography images using deep learning architectures[J]. Physics inMedicine&Biology, 2021, 66(24): 245026. [2] Qin X, Huang H, Lin S, et al. 3D distance-color-coded assessmentof PCI stent apposition via deep-learning-based three-dimensional multi-object segmentation[J]. IEEE Transactions on Medical Imaging, 2025, 44(11):4717-4731. [3] Han T T, Xia W, Tao K Y, et al. Automatic stent struts detectionin optical coherence tomography based on a multiple attention convolutionalmodel[J]. Physics in Medicine&Biology, 2024, 69(1): 015008. [4] Lin M, Lan Q, Huang C, et al. Wavelet-based U-shape network forbioabsorbable vascular stents segmentation in IVOCT images[J]. Frontiers inPhysiology, 2024, 15: 1454835. [5] Wu P, Gutiérrez-Chico JL, Tauzin H, et al. Automatic stentreconstruction in optical coherence tomography based on a deep convolutional model[J]. Biomedical Optics Express, 2020, 11(6): 3374-3394. [6] Chen J, Mei J, Li X, et al. TransUNet: Rethinking the U-Netarchitecture design for medical image segmentation through the lens of transformers[J]. Medical Image Analysis, 2024, 97: 103280. Summary of the Invention
[0010] The purpose of this invention is to provide an IVOCT vascular stent detection method based on polar coordinate perception and multi-frame context learning. The technical solution is as follows: An IVOCT vascular stent detection method based on polar coordinate-aware multi-frame context learning includes the following steps: S1, acquire and preprocess the data to obtain IVOCT grayscale image sequence and vascular stent label sequence; S2, construct a single-frame input for polar coordinate sensing, and concatenate the IVOCT grayscale image of each frame with the polar coordinate position code to form a four-channel image containing grayscale channel, radial position channel, angle sine channel and angle cosine channel; S3 combines the four-channel images of consecutive D frames along the frame direction to form a multi-frame multi-channel input tensor. S4, construct a multi-frame context stent detection network, input the multi-frame multi-channel input tensor into the multi-frame context stent detection network, perform multi-frame context feature extraction and prediction, output a continuous D-frame vascular stent prediction probability map, and obtain the target frame vascular stent prediction probability map. S5, Design the target frame master supervision loss: During the training phase, the target frame in the IVOCT grayscale image sequence is used as the master supervision frame, and the master supervision loss between the target frame prediction result and the corresponding vascular stent label is calculated. S6, Design cross-frame consistency loss: During the training phase, morphological dilation is performed on the vascular stent labels of adjacent frames to obtain stent-related regions in adjacent frames; local consistency constraint regions are determined based on the intersection of stent-related regions in adjacent frames, and inter-frame structural similarity weights are determined based on the degree of overlap of stent-related regions in adjacent frames; based on the local consistency constraint regions and inter-frame structural similarity weights, a weighted cross-frame consistency loss is calculated on the prediction probability maps of adjacent frames to constrain the consistency of stent prediction results in consecutive frames; S7. Joint training yields the detection model. The multi-frame context stent detection network is trained based on the master supervision loss and cross-frame consistency loss to obtain the IVOCT vascular stent detection model. S8, perform inference on the sequence to be detected to obtain the vascular stent detection results.
[0011] Furthermore, the method of S1 is as follows: S11, Obtain the IVOCT retraction sequence and the vascular stent tags corresponding one-to-one with the image frames in the IVOCT retraction sequence; S12, For image frames that are confirmed to contain no vascular stent regions, set the corresponding vascular stent label to an all-zero binary image to obtain the IVOCT grayscale image sequence and the vascular stent label sequence. S13, training samples are constructed using consecutive D-frame IVOCT images and corresponding vascular stent labels; S14, preprocess the training samples to obtain IVOCT grayscale image sequences and vascular stent label sequences; Further, step S14 specifically involves preprocessing the training samples, including grayscale conversion, Gaussian filtering, size normalization, grayscale normalization, label binarization, and coordinate representation unification processing, to obtain IVOCT grayscale image sequences and vascular stent label sequences with consistent spatial dimensions and coordinate representations.
[0012] Furthermore, the method for S2 is as follows: S21, construct polar coordinate position coding based on the IVOCT grayscale image, wherein the polar coordinate position coding includes at least radial position coding, sine angle coding, and cosine angle coding; S22, each frame of IVOCT grayscale image is concatenated with polar coordinate position code to form a four-channel image containing grayscale channel, radial position channel, angle sine channel and angle cosine channel.
[0013] Furthermore, in S21, for an IVOCT grayscale image of size H×W, the radial position coding and angular position coding are respectively:
[0014]
[0015] In the formula, i represents the image row direction index, corresponding to the angular direction; j represents the image column direction index, corresponding to the radial depth direction; the polar coordinate position encoding is represented as: .
[0016] Furthermore, in S4, the multi-frame context stent detection network sequentially includes a 3D convolutional encoder, a Transformer context modeling module, a feature decoder, and a stent prediction layer. The 3D convolutional encoder performs multi-scale feature extraction on the multi-frame multi-channel input tensor through 3D convolution and downsampling to obtain encoded features at different scales. The Transformer context modeling module converts the deepest encoded features into a feature sequence, establishes the correlation between frame orientation and spatial position through self-attention operation, and restores the operation result to spatial features. The feature decoder performs upsampling on the spatial features step by step and obtains decoded features by skipping connections to the same scale as those in the 3D convolutional encoder. The stent prediction layer maps the decoded features to the category prediction values of background category and vascular stent category, obtains a continuous D-frame vascular stent prediction probability map after probability normalization, and then obtains the target frame vascular stent prediction probability map. Furthermore, in S6, the locally consistent constraint region is represented as: ; The inter-frame structural similarity weights are represented as follows: ; in, and These represent the bracket-related regions after morphological dilation of the bracket label in frame i and frame i+1, respectively. Indicates the number of pixels within the region. To prevent constants with a denominator of zero.
[0017] Furthermore, in the inference phase, the same preprocessing method, polar coordinate position encoding method, and multi-frame input construction method as in the training phase are used to process the IVOCT pullback sequence to be detected. The obtained multi-frame multi-channel input tensor is input into the IVOCT vascular stent detection model, and the target frame vascular stent prediction probability map is output to obtain the vascular stent detection result.
[0018] Compared with the prior art, the beneficial effects of the present invention are: 1. Polar coordinate structure-sensing input The input is a preprocessed single-frame IVOCT grayscale image. The processing involves constructing radial position codes based on the image's row and column indices. r , Angle sine encoding sin θ And angle cosine encoding cos θ The input is then concatenated with the grayscale channels to output a single frame with four channels. Unlike scaffold detection methods that rely solely on grayscale texture features, this innovation allows the network to directly obtain the spatial position information of the scaffold in the radial depth and angular directions; specifically, it employs sin... θ and cos θ Using a common angle representation avoids the problem of physical adjacency but numerical discontinuity at 0° and 360° when directly using angle values, thereby enhancing the model's stability in recognizing polar coordinate circumferential boundary regions, weak signals, and small target supports.
[0019] II: Multi-frame context joint modeling and consistency optimization Based on the aforementioned single-frame four-channel input, consecutive D frames are stacked along the frame direction into a multi-frame multi-channel input tensor. This tensor is then sequentially passed through a 3D convolutional encoder, a Transformer context modeling module, a feature decoder, and a stent prediction layer to obtain a consecutive D-frame vascular stent prediction probability map and a target frame prediction probability map. The target frame prediction probability map is used to calculate the main supervision loss, while the consecutive D-frame prediction probability map is used to calculate the cross-frame consistency loss based on inter-frame structural similarity. The two types of losses are jointly used to update the network parameters. Unlike single-frame detection or simply stitching adjacent frames together using ordinary channels, this innovation establishes inter-frame correlations during the feature extraction stage and constrains the prediction stability of adjacent frames during the training stage. When the target frame signal is weak, artifacts are strong, or the boundaries are unclear, adjacent frames can provide structural references for the target frame, thereby reducing missed detections and inter-frame prediction jumps. To complement this multi-frame training process, the main supervision loss can employ the Tversky loss with a higher false negative weight to enhance the penalty for missed stents. This forms a complete execution chain: "polar coordinate input construction—multi-frame joint modeling—target frame discrimination—cross-frame consistency optimization—sliding window output." Attached Figure Description
[0020] Figure 1 A flowchart of an IVOCT stent detection method based on polar coordinate perception and multi-frame context learning. Figure 2 Schematic diagram for constructing polar coordinate position encoding Figure 3 A schematic diagram of the multi-frame input and target frame prediction structure. Figure 4 Schematic diagram of cross-frame consistency constraints Figure 5 This is a visualization of the results of vascular stent testing, where green represents true positive areas, red represents false positive areas, and yellow represents false negative areas. Detailed Implementation
[0021] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The specific embodiments described are only for explanation and illustration of the present invention and are not intended to limit the present invention.
[0022] The overall execution logic of this invention is as follows: IVOCT pullback sequences and labels are acquired, and image preprocessing is completed; polar coordinate position encoding is constructed for each frame and concatenated with a grayscale image to obtain a single-frame four-channel input; the four-channel inputs of consecutive D frames are stacked into a multi-frame multi-channel input tensor; a consecutive D-frame prediction probability map and a target frame prediction probability map are obtained through a multi-frame context stent detection network; the master supervision loss is calculated using target frame annotations, and the cross-frame consistency loss is calculated using adjacent frame predictions and labels; the network parameters are jointly updated to obtain the detection model; finally, the pullback sequence to be detected is processed using the same input construction method. For a pullback sequence to be detected containing N frames and N≥D, the starting frame of the input window is sequentially taken from frame 1 to frame (N-D+1), and only the vascular stent detection results within the effective interval formed by frames t to (N-D+t) are output.
[0023] From the execution phase perspective, the training phase sequentially completes data and label preparation, polar coordinate sensing input construction, multi-frame input organization, network forward computation, main supervision loss and cross-frame consistency loss calculation, and network parameter updates. The inference phase employs the same preprocessing, polar coordinate encoding, and multi-frame input construction methods, calling the trained model to output target frame detection results and moving the input window frame by frame along the IVOCT pullback direction. During inference, no frame padding is performed at the beginning or end of the sequence; only the detection results corresponding to the target frames that form a complete D-frame input window are output. When D=8 and t=5, the effective interval is from the 5th frame to the (N-3)th frame of the original pullback sequence.
[0024] Step 1: IVOCT dataset construction, image sequence acquisition and preprocessing This embodiment uses 14 IVOCT pullback sequences to construct a dataset, containing a total of 3385 IVOCT images with pixel-level vascular stent labels. The dataset is fixedly divided into IVOCT pullback sequences, with the training set containing 10 IVOCT pullback sequences and 2030 images, the validation set containing 3 IVOCT pullback sequences and 1139 images, and the test set containing 1 IVOCT pullback sequence and 216 images. The training, validation, and test sets do not contain the same IVOCT pullback sequences.
[0025] For each IVOCT image frame, it is first converted to grayscale; Gaussian filtering is used to suppress aliasing before image resizing, and then region interpolation is used to adjust the grayscale image to 256×512 pixels; the corresponding vascular stent label is adjusted to the same size using nearest neighbor interpolation to keep the label value unchanged; the grayscale value is normalized to [-1, 1]. If the coordinate representation of the input image and the label is inconsistent, a conversion between polar coordinates and Cartesian coordinates is performed; for image frames that are confirmed to contain no vascular stent regions, the corresponding vascular stent label is set to a binary image with all zeros.
[0026] A continuous frame training sample is constructed using a sliding window along the IVOCT retraction direction. Each training sample contains D=8 grayscale images and corresponding vascular stent labels, and the 5th frame in the input window is used as the target frame.
[0027] Data augmentation was performed only on the training set. Augmentation methods included cyclic translation of angles and directions, vertical flipping, Gaussian noise, and Gamma correction, combined into four augmentation strategies. Grayscale images and vascular stent labels within the same training sample used the same spatial transformation parameters; Gaussian noise and Gamma correction were applied only to grayscale images. The original training samples and the four augmented samples together constituted approximately five times the size of the training dataset. No data augmentation was performed on the validation and test sets.
[0028] After the above processing, a continuous D-frame training sample includes a grayscale image sequence and a vascular stent label sequence, wherein the grayscale image sequence is: (1) The tag sequence is: (2) Where D represents the number of consecutive frames, and H and W represent the image height and width, respectively.
[0029] Step 2: Construction of Polar Coordinate Structure-Aware Input like Figure 2 As shown, since IVOCT images are typically unfolded in polar coordinates, where the image row direction corresponds to the angular direction and the image column direction corresponds to the radial depth direction, this embodiment constructs polar coordinate position encoding to enhance the network's ability to perceive the spatial position of the stent. For a polar coordinate image of size H×W, a radial position matrix r and an angular matrix θ are constructed. The relevant mathematical expressions are as follows: (3) (4) The polar coordinate position encoding is represented as: (5) Where i represents the image row direction index, corresponding to the angular direction; j represents the image column direction index, corresponding to the radial depth direction. By employing... and Representing angle information avoids direct use The problem of numerical discontinuity arises at the boundary between 0 and 2π.
[0030] For each frame of the image, the original image channels are compared with r, , The three positional encoding channels are concatenated to obtain a single frame with four channels of input: (6) Repeat the above operation for consecutive D frames and stack them along the frame direction to obtain a multi-frame, multi-channel input tensor: (7) Step 3: Multi-frame context joint modeling and forward computation like Figure 3 As shown, a multi-frame context scaffold detection network is fed with four-channel input tensors from D consecutive frames. This network comprises a 3D convolutional encoder, a Transformer context modeling module, a feature decoder, and a scaffold prediction layer. The 3D convolutional encoder, the Transformer context modeling module, the feature decoder, and the scaffold prediction layer transmit feature data in a sequential order.
[0031] The three-dimensional convolutional encoder receives multi-frame, multi-channel input tensors of shape D×4×H×W, performs joint operations in the frame direction, angular direction, and radial depth direction through three-dimensional convolution, and obtains encoding features at different spatial scales through stepwise downsampling; the shallow encoding features retain the bright spots, shadows, edges, and position information of the vascular stent, and the deepest encoding features serve as the input of the Transformer context modeling module.
[0032] The Transformer context modeling module first converts the deepest encoded features into a feature sequence, then obtains the correlation features between different frame positions and different spatial positions through self-attention operation, then restores the correlation features into spatial feature form, and outputs the restored spatial features to the feature decoder.
[0033] The feature decoder upsamples the spatial features step by step; during each upsampling process, the upsampled features are fused with the encoded features of the same scale in the three-dimensional convolutional encoder through skip connections to obtain decoded features containing deep context information as well as shallow edge and position information.
[0034] The stent prediction layer uses convolutional mapping to convert the decoded features into C category prediction values, and performs probability normalization on the category prediction values to obtain a continuous D-frame category prediction probability with shape C×D×H×W. For a binary classification vascular stent detection task, C=2, and the background category and the vascular stent category each correspond to a probability channel. The continuous D-frame vascular stent prediction probability map is obtained from the probability channel of the vascular stent category.
[0035] In a preferred network implementation corresponding to the above process, the conceptual input shape of a single sample is D×4×H×W; in the deep learning framework, it is rearranged into 4×D×H×W in a channel-first manner, and after adding the batch dimension, it becomes B×4×D×H×W. The 3D convolutional encoder includes three levels of encoding units. Each level sequentially performs two 3D convolutions with a kernel size of 3×3×3 and padding of 1, followed by ReLU activation. The number of output channels for each level is 64, 128, and 256, respectively. After each level of encoding unit, a 3D max pooling operation with a kernel size and stride of 1×2×2 is performed, with downsampling by a factor of 2 only in the angular and radial depth directions, while keeping the frame number D unchanged.
[0036] The deepest 256-channel features are unfolded into a feature sequence according to frame and spatial location, and input into a Transformer encoder with an embedding dimension of 256, 4 attention heads, 3 encoding layers, and a dropout rate of 0.1. Each encoding layer includes multi-head self-attention, layer normalization, and a feedforward network with a hidden dimension of 2048. After self-attention calculation, the feature sequence is restored to three-dimensional spatial features. The feature decoder consists of three levels of decoding units. Each level uses a 3D transposed convolution with a kernel size and stride of 1×2×2 for upsampling, followed by skip connections with the encoded features of the corresponding scale, and then performs two 3D convolutions with a kernel size of 3×3×3 and padding of 1, and ReLU activation. The number of output channels for each level is 128, 64, and 64, respectively. Finally, a 1×1×1 3D convolution is used to map to two class channels, and softmax is applied to obtain the probability maps of background class and vascular stent class.
[0037] Let the index of the target frame in the input window of this consecutive D frames be t, then: (8) in, This indicates rounding down. When D=8, t=5, meaning the 5th frame in an 8-frame input window is taken as the target frame. For a continuous D-frame input, the network can output a scaffold prediction probability map corresponding to the D consecutive frames during the training phase: (9) Where C represents the number of categories. For a binary classification vascular stent detection task, C is 2, corresponding to the background category and the vascular stent category, respectively; the probability channels of the vascular stent category are obtained, and the vascular stent prediction probability map of the target frame is obtained from the vascular stent prediction probability map of D consecutive frames according to the target frame position index t.
[0038] Step 4: Supervised Training of Target Frames like Figure 3 As shown in the figure, the "center frame" has the same meaning as the target frame described in this specification, and will be referred to as the target frame hereinafter. The target frame vascular stent prediction probability map from the output of consecutive D frames is taken as the prediction result of the final detection frame. During the training phase, the target frame vascular stent prediction probability map is used to calculate the master supervision loss, and the consecutive D frame vascular stent prediction probability maps are used for subsequent cross-frame consistency constraint calculations. During the inference phase, the target frame vascular stent prediction probability map is thresholded to obtain the target frame vascular stent detection result. During inference, no frame padding is performed at the beginning or end of the sequence; detection is only performed at positions that can form a complete D-frame input window.
[0039] The main supervisor's loss is: (10) The loss can be Dice loss, Focal loss, or Tversky loss. In one embodiment, the master supervision loss is represented as a weighted combination of multiple loss terms: (11) in, This represents the k-th loss term. This represents the corresponding loss weight. Preferably, to enhance the model's ability to penalize missed stent regions, a combined loss including Tversky loss can be used. Tversky loss can be expressed as: (12) In this context, TP indicates a true positive, FP indicates a false positive, and FN indicates a false negative. and For weight parameters, To prevent constants with a denominator of zero, preferably, a setting is provided. > This enhances the penalty for false negative regions, making the model pay more attention to undetected stent regions during training, thereby improving the detection capability of weak signal stents and small target stents.
[0040] In a preferred embodiment, the main supervision loss is composed of Dice loss, Focal loss, and Tversky loss; the foreground class weight in the Focal loss is set to 0.75, the background class weight is set to 0.25, and the hard sample adjustment parameter is set to 2; the weights of the false positive and false negative terms in the Tversky loss are set to 0.25 and 0.75, respectively, and the smoothing constant is set to 10. -8 .
[0041] Step 5: Cross-frame consistency optimization like Figure 4 As shown, to enhance the stability of prediction results for consecutive frames, this embodiment introduces cross-frame consistency constraints on the prediction probability map of consecutive D frames during the training phase. Unlike directly constraining all adjacent frames to have completely consistent prediction results, this embodiment adopts an adaptive weighted consistency constraint based on inter-frame structural similarity, so that the consistency constraint mainly acts on the structurally related support regions in adjacent frames.
[0042] First, for the i-th frame bracket label Morphological dilation was performed to obtain the relevant areas of the expanded scaffold: (13) in, This indicates a morphological dilation operation. The morphological dilation operation can be performed in Cartesian coordinates or in polar coordinates using a structuring element that considers angular directional wrapping and differences in radial and angular physical scales.
[0043] In a preferred embodiment, a 256×512 polar coordinate binary vascular stent label is first inversely transformed into a 512×512 Cartesian coordinate label using the nearest neighbor method, then morphological dilation is performed using an elliptical structural element with a size of 10×10 pixels, and finally transformed back into a 256×512 polar coordinate label using the nearest neighbor method; the same coordinate transformation and dilation parameters are used for adjacent frames to construct a local consistency constraint region and inter-frame structural similarity weights.
[0044] For two adjacent frames i and i+1, the local consistency constraint region is defined as: (14) The inter-frame structural similarity weight is defined as follows: (15) in, This represents the number of pixels within the region, and is a constant used to prevent the denominator from being zero. Used to define the region of cross-frame consistency constraints. Used to adjust the consistency constraint strength between two adjacent frames.
[0045] When the overlap of the support regions in adjacent frames is high, it indicates that the two frames have strong structural continuity. In this case, the consistency constraint between the prediction probability maps should be increased. When the position of the support in adjacent frames changes significantly or the structural differences are obvious, the strength of the consistency constraint should be reduced to avoid excessive smoothing and incorrect constraints.
[0046] Cross-frame consistency loss is defined as: (16) Here, ⊙ represents element-wise multiplication. Describing the Frobenius norm, and Let represent the bracket prediction probability maps for the i-th frame and the (i+1)-th frame, respectively.
[0047] During the loss calculation process, if the intersection of the dilation labels of two adjacent frames is empty, the adjacent frame pair is skipped; if the intersection is not empty, the squared difference of the adjacent predicted probability maps is calculated in the intersection area, normalized by the number of pixels in the intersection area, weighted by the inter-frame structural similarity weight, and the average value is taken for all valid adjacent frame pairs in an input window.
[0048] The final loss function is expressed as: (17) In the formula, μ represents the consistency loss weight, used to balance the accuracy of target frame detection and the stability of continuous frame prediction. In a preferred embodiment, μ is set to 1. The IVOCT vascular stent detection model is obtained by jointly training the master supervision loss and the cross-frame consistency loss.
[0049] In a preferred embodiment, the conceptual input size of the network is 8×4×256×512, and it is stored internally within the deep learning framework in a channel-first manner as 4×8×256×512; the training batch size is set to 2, and the maximum number of training epochs is set to 100; the Adam optimizer is used to update the network parameters, and the initial learning rate is set to 5×10⁻⁶. -5 If the Dice coefficient on the validation set does not increase for 50 consecutive rounds, the learning rate is reduced to 0.5 times the original learning rate, and the minimum learning rate is set to 10. -7 And save the network parameters when the Dice coefficient of the validation set is the highest.
[0050] Step Six: Generation and Evaluation of Detection Results in the Reasoning Phase After training, the consecutive D-frame IVOCT images to be detected are input into the trained stent detection network to obtain the stent prediction probability map corresponding to the target frame or consecutive D frames. (Target frame prediction probability map) Thresholding processing yields the binary vascular stent detection results for the target frame: (18) in, τ Indicates the threshold. t This represents the binary vascular stent detection result of the target frame. Under the binary classification Softmax output, τ A value of 0.5 is preferred, which is equivalent to selecting the category with the larger predicted value between the background category and the vascular stent category. Further, if the pullback sequence to be detected contains N frames and N≥D, the starting frames of the sliding window are sequentially from frame 1 to frame (N-D+1), corresponding to the output of vascular stent detection results from frame t to frame (N-D+t); no copying, mirroring, or other frame supplementation processing is performed on the first and last frames. When D=8 and t=5, the effective output range is from frame 5 to frame (N-3), outputting a total of N-7 frames of detection results.
[0051] During the evaluation process, the prediction and annotation results can be converted to a Cartesian coordinate system, and the regions of true positives, false positives, false negatives, and true negatives can be calculated using distance tolerance or morphological dilation strategies to obtain indices such as Precision, Recall, F1-score, Dice, and IoU. This evaluation step is used for experimental performance evaluation and does not limit the specific application of the detection method of this invention.
[0052] To verify the interaction between polar coordinate position encoding, multi-frame context, and cross-frame consistency constraints, ablation experiments were conducted under the same data partitioning and evaluation criteria. The Dice coefficient of the TransUNet baseline was 80.20%; it was 80.05% when only consecutive multi-frame inputs were introduced; it improved to 84.75% after adding polar coordinate position encoding to the multi-frame inputs; and the complete model with further cross-frame consistency constraints reached 89.74%. The results show that simply adding multi-frame inputs did not directly improve the metrics, but rather that polar coordinate position encoding and cross-frame consistency constraints work synergistically with multi-frame joint modeling.
[0053] Further weighting of consistency loss μ Comparison: μ When the values are 0, 1, and 5, the Dice coefficients are 80.05%, 89.74%, and 88.40%, respectively. Therefore, this embodiment will... μ The preferred value is 1, in order to achieve a better balance between the accuracy of target frame detection and the stability of continuous frame prediction.
[0054] In a validation experiment, a complete model that simultaneously incorporates polar coordinate position encoding, multi-frame context information, and cross-frame consistency constraints was used for testing. The pixel-level precision was 94.98%, recall was 85.04%, Dice coefficient was 89.74%, and IoU was 81.38%. These results demonstrate that the method in this embodiment can reduce the area of missed stents while maintaining high detection accuracy, thereby improving the detection effect of IVOCT vascular stents.
[0055] like Figure 5 As shown, the predicted vascular stent results can be further visualized and compared with the actual labels. This figure illustrates the results of stent region detection using eight consecutive IVOCT images as network input and the fifth frame as the target frame, where the fifth frame is located... Figure 5 The first column of the second row in the image shows the true positive areas where the predicted results match the actual labels, the red areas where the predicted results are not labeled by the actual labels, and the yellow areas where the actual labels exist but the predicted results fail to detect the false negative areas. This visualization allows for a direct observation of the model's detection performance on weak-signal stents, small-target stents, and continuous-frame stent structures, providing foundational data for subsequent stent adhesion analysis, coverage analysis, and 3D reconstruction.
[0056] The above evaluation indicators and experimental results are only used to illustrate the detection effect of the embodiments of the present invention, and are not intended to limit the scope of protection of the present invention.
Claims
1. A method for detecting IVOCT vascular stents based on polar coordinate perception and multi-frame context learning, comprising the following steps: S1, acquire and preprocess the data to obtain IVOCT grayscale image sequence and vascular stent label sequence; S2, construct a single-frame input for polar coordinate sensing, and concatenate the IVOCT grayscale image of each frame with the polar coordinate position code to form a four-channel image containing grayscale channel, radial position channel, angle sine channel and angle cosine channel; S3 combines the four-channel images of consecutive D frames along the frame direction to form a multi-frame multi-channel input tensor. S4, construct a multi-frame context stent detection network, input the multi-frame multi-channel input tensor into the multi-frame context stent detection network, perform multi-frame context feature extraction and prediction, output a continuous D-frame vascular stent prediction probability map, and obtain the target frame vascular stent prediction probability map. S5, Design the target frame master supervision loss: During the training phase, the target frame in the IVOCT grayscale image sequence is used as the master supervision frame, and the master supervision loss between the target frame prediction result and the corresponding vascular stent label is calculated. S6, Design cross-frame consistency loss: During the training phase, morphological dilation is performed on the vascular stent labels of adjacent frames to obtain stent-related regions in adjacent frames; local consistency constraint regions are determined based on the intersection of stent-related regions in adjacent frames, and inter-frame structural similarity weights are determined based on the degree of overlap of stent-related regions in adjacent frames; based on the local consistency constraint regions and inter-frame structural similarity weights, a weighted cross-frame consistency loss is calculated on the prediction probability maps of adjacent frames to constrain the consistency of stent prediction results in consecutive frames; S7. Joint training yields the detection model. The multi-frame context stent detection network is trained based on the master supervision loss and cross-frame consistency loss to obtain the IVOCT vascular stent detection model. S8, perform inference on the sequence to be detected to obtain the vascular stent detection results.
2. The VOCT vascular stent detection method according to claim 1, characterized in that, The method for S1 is as follows: S11, Obtain the IVOCT retraction sequence and the vascular stent tags corresponding one-to-one with the image frames in the IVOCT retraction sequence; S12, For image frames that are confirmed to contain no vascular stent regions, set the corresponding vascular stent label to an all-zero binary image to obtain the IVOCT grayscale image sequence and the vascular stent label sequence. S13, training samples are constructed using consecutive D-frame IVOCT images and corresponding vascular stent labels; S14, preprocess the training samples to obtain IVOCT grayscale image sequences and vascular stent label sequences.
3. The VOCT vascular stent detection method according to claim 2, characterized in that, Step S14 specifically involves preprocessing the training samples, including grayscale conversion, Gaussian filtering, size normalization, grayscale normalization, label binarization, and coordinate representation unification processing, to obtain IVOCT grayscale image sequences and vascular stent label sequences with consistent spatial dimensions and coordinate representations.
4. The VOCT vascular stent detection method according to claim 1, characterized in that, The method for S2 is as follows: S21, construct polar coordinate position coding based on the IVOCT grayscale image, wherein the polar coordinate position coding includes at least radial position coding, sine angle coding, and cosine angle coding; S22, each frame of IVOCT grayscale image is concatenated with polar coordinate position code to form a four-channel image containing grayscale channel, radial position channel, angle sine channel and angle cosine channel.
5. The VOCT vascular stent detection method according to claim 4, characterized in that, In S21, for an IVOCT grayscale image of size H×W, the radial position coding and angular position coding are as follows: In the formula, i represents the image row direction index, corresponding to the angular direction; j represents the image column direction index, corresponding to the radial depth direction; the polar coordinate position encoding is represented as: 。 6. The VOCT vascular stent detection method according to claim 1, characterized in that, In S4, the multi-frame context scaffold detection network sequentially includes a 3D convolutional encoder, a Transformer context modeling module, a feature decoder, and a scaffold prediction layer. The 3D convolutional encoder extracts multi-scale features from the multi-frame multi-channel input tensor through 3D convolution and downsampling to obtain encoded features at different scales. The Transformer context modeling module converts the deepest encoded features into a feature sequence, establishes the correlation between frame orientation and spatial position through self-attention operation, and restores the operation result to spatial features. The feature decoder upsamples the spatial features step by step and fuses them with encoded features of the same scale in the 3D convolutional encoder through skip connections to obtain decoded features. The stent prediction layer maps the decoded features to the category prediction values of the background category and the vascular stent category, and obtains the vascular stent prediction probability map of continuous D frames after probability normalization, thereby obtaining the vascular stent prediction probability map of the target frame.
7. The VOCT vascular stent detection method according to claim 1, characterized in that, In S6, the locally consistent constraint region is represented as: ; The inter-frame structural similarity weights are represented as follows: ; in, and These represent the bracket-related regions after morphological dilation of the bracket label in frame i and frame i+1, respectively. Indicates the number of pixels within the region. To prevent constants with a denominator of zero.
8. The VOCT vascular stent detection method according to claim 1, characterized in that, The method of S8 is as follows: In the inference stage, the same preprocessing method, polar coordinate position encoding method and multi-frame input construction method as in the training stage are used to process the IVOCT pullback sequence to be detected. The obtained multi-frame multi-channel input tensor is input into the IVOCT vascular stent detection model, and the target frame vascular stent prediction probability map is output to obtain the vascular stent detection result.
