CDKD-w+: A Keyframe Recognition Method for Coronary Digital Subtraction Angiography Video Sequence Based on w+ Space Encoding

Yong Zhu, Haoyu Li, Shuai Xiao, Wei Yu, H.m. Shang, Lin Wang, Yang Liu, Wang Yin, Jiachen YangSensors 2025 · DOI

TL;DR

This paper introduces CDKD-w+, a novel deep learning method for accurately identifying critical "heartbeat keyframes" in coronary Digital Subtraction Angiography (DSA) video sequences. By encoding DSA images into the rich w+ latent space of StyleGAN2, the method effectively captures subtle cardiac motion, enabling more precise 3D reconstruction of coronary arteries and improving diagnostic accuracy.

What Problem Does This Paper Address?

Coronary Digital Subtraction Angiography (DSA) is a vital imaging technique for visualizing coronary arteries and guiding interventions. While 2D DSA images provide valuable information, reconstructing accurate 3D models of these complex, dynamic structures is challenging. A major hurdle is the continuous beating of the heart, which causes significant variations (vasodilation and vasoconstriction) in the coronary arteries between consecutive DSA frames. These variations introduce errors in 3D modeling, making it difficult to accurately represent the true anatomy. Existing methods often struggle to account for this cardiac motion, leading to inaccurate or incomplete 3D reconstructions. This paper aims to solve this by precisely identifying key frames that capture the extreme states of the cardiac cycle (systole and diastole), which are crucial for robust 3D modeling.

Methods

The core of the CDKD-w+ method lies in its innovative use of a pre-trained pSp encoder, originally developed for image-to-image translation within the StyleGAN2 framework. This encoder maps coronary DSA images into the high-dimensional "w+ space," which is known to capture rich semantic information about the image content.

  1. w+ Space Encoding: The pSp encoder takes a coronary DSA image as input and generates a latent code in the w+ space. This latent code is hypothesized to contain detailed information about the coronary artery's state, including its subtle changes due to the heartbeat, while also being robust to background noise.
  2. Inter-frame Feature Analysis: The method then extracts these w+ space features for all frames in a DSA sequence. The cosine similarity between the feature vectors of consecutive frames is calculated. The intuition here is that frames representing similar cardiac states will have similar feature vectors, resulting in high cosine similarity. Conversely, frames at the extremes of the cardiac cycle (maximum dilation and maximum constriction) will exhibit the most significant differences, leading to lower cosine similarity.
  3. Heartbeat Keyframe Localization: A confusion matrix is constructed from these cosine similarities. The algorithm then searches for local minima within this matrix. These local minima indicate pairs of frames with the largest difference in feature representation, strongly suggesting they correspond to the critical vasodilation and vasoconstriction moments.
  4. Non-Maximum Suppression: To avoid selecting adjacent frames that might represent very similar states, a non-maximum suppression technique is applied. This ensures that selected keyframes are sufficiently distinct and representative of the cardiac cycle.

Datasets

The authors created a new dataset for this research.

  • Coronary DSA Heartbeat Keyframe Recognition Dataset: This dataset was constructed from a publicly available coronary DSA stenosis detection dataset collected by Danilov et al. [35]. It comprises 50 sets of coronary DSA image sequences, totaling 959 images, each representing at least one complete heartbeat cycle. The images are grayscale and uniformly resized to 512x512. Crucially, each image was annotated with a label: '1' for heartbeat keyframes (representing extreme contraction or relaxation) and '0' for non-heartbeat keyframes. The dataset includes sequences from various machine positions commonly used in coronary DSA angiography.

Key Insights and Ideas

  • w+ Space as a Rich Representation for Cardiac Motion: The paper demonstrates that the w+ latent space, typically used for face manipulation, is highly effective at capturing subtle, dynamic changes in medical imaging like coronary arteries. This suggests its broader applicability beyond its original domain.
  • Focusing on Arterial Features, Not Background: The pSp encoder's ability to encode images into the w+ space appears to prioritize the coronary artery's features while suppressing background interference. This is critical for accurate motion analysis in DSA, where the vessel is the primary subject of interest.
  • Cosine Similarity of Latent Features as a Proxy for Cardiac State: The core idea of using cosine similarity between w+ space features to infer cardiac state differences is a novel and effective approach for heartbeat keyframe localization.
  • Heartbeat Keyframes are Crucial for 3D Reconstruction: The paper strongly implies that accurately identifying these keyframes is a prerequisite for building reliable 3D models of coronary arteries, directly addressing a significant limitation in current 3D reconstruction techniques.

Key Results

  • High Accuracy: The proposed CDKD-w+ method achieved an accuracy of 97% in identifying heartbeat keyframes on their self-constructed dataset.
  • Superior Performance: Compared to traditional image difference metrics like L1 loss, PSNR, and SSIM, CDKD-w+ significantly outperformed them in accuracy, precision, and recall. For instance, accuracy for L1, SSIM, and PSNR was around 0.63-0.65, while ResNet achieved 0.67, all substantially lower than CDKD-w+'s 0.97.
  • Effective Feature Extraction: The method demonstrated that the pSp encoder is suitable for X-ray sensor images and can effectively locate the coronary artery itself, rather than just the background.
  • Qualitative Improvement: Visualizations (confusion matrices and frame comparisons) show that CDKD-w+ successfully identifies frames corresponding to the cardiac cycle, while comparative methods struggle to accurately pinpoint these critical moments.

Limitations and Future Work

  • Limited Scope of Difference Calculation: The authors acknowledge that their current method is primarily suited for calculating the size of differences between paired samples. It is difficult to directly pinpoint specific vasoconstriction and vasodilation frames without additional steps.
  • Future Work - Image Segmentation: To address the limitation of directly locating specific frames, the authors suggest incorporating image segmentation techniques. This could allow for independent localization of vasoconstriction and vasodilation frames.
  • Future Work - 3D Encoder: The authors envision using a three-dimensional encoder to process sensor images in high-dimensional space, potentially enabling image difference detection without the need for explicit labeling in the future. This would further enhance the automation and applicability of their approach.

Summary updated

Abstract

Currently, various deep learning methods can assist in medical diagnosis. Coronary Digital Subtraction Angiography (DSA) is a medical imaging technology used in cardiac interventional procedures. By employing X-ray sensors to visualize the coronary arteries, it generates two-dimensional images from any angle. However, due to the complexity of the coronary structures, the 2D images may sometimes lack sufficient information, necessitating the construction of a 3D model. Camera-level 3D modeling can be realized based on deep learning. Nevertheless, the beating of the heart results in varying degrees of arterial vasoconstriction and vasodilation, leading to substantial discrepancies between DSA sequences, which introduce errors in 3D modeling of the coronary arteries, resulting in the inability of the 3D model to reflect the coronary arteries. We propose a coronary DSA video sequence keyframe recognition method, CDKD-w+, based on w+ space encoding. The method utilizes a pSp encoder to encode the coronary DSA images, converting them into latent codes in the w+ space. Differential analysis of inter-frame latent codes is employed for heartbeat keyframe localization, aiding in coronary 3D modeling. Experimental results on a self-constructed coronary DSA heartbeat keyframe recognition dataset demonstrate an accuracy of 97%, outperforming traditional metrics such as L1, SSIM, and PSNR.
BibTeX
@inproceedings{zhu2025cdkd,
  author = {Yong Zhu and Haoyu Li and Shuai Xiao and Wei Yu and H.M. Shang and Lin Wang and Yang Liu and Wang Yin and Jiachen Yang},
  title = {{CDKD-w+: A Keyframe Recognition Method for Coronary Digital Subtraction Angiography Video Sequence Based on w+ Space Encoding}},
  booktitle = {Sensors},
  year = {2025},
  doi = {10.3390/s25030710},
}

Loading related content...

Figure