AF-DETR: Transformer-Based Object Detection for Precise Atrial Fibrillation Beat Localization in ECG
Atrial fibrillation (AF) detection in electrocardiograms (ECG) remains challenging, particularly at the heartbeat level. Traditional deep learning methods typically classify ECG segments as a whole, limiting their ability to detect AF at the granularity of individual heartbeats. This paper presents AF-DETR, a novel transformer-based object detection model for precise AF heartbeat localization and classification. AF-DETR incorporates a CNN backbone and a transformer encoder-decoder architecture, where 2D bounding boxes are used to represent heartbeat positions. Through iterative refinement of these bounding boxes, the model improves both localization and classification accuracy. To further enhance performance, we introduce contrastive denoising training, which accelerates convergence and prevents redundant heartbeat predictions. We evaluate AF-DETR on five publicly available ECG datasets (CPSC2021, AFDB, LTAFDB, MITDB, NSRDB), achieving state-of-the-art performance with F1-scores of 96.77%, 96.20%, 90.55%, and 99.87% for heartbeat-level classification, and segment-level accuracies of 98.27%, 97.55%, 97.30%, and 99.99%, respectively. These results demonstrate the effectiveness of AF-DETR in accurately detecting AF heartbeats and its strong generalization capability across diverse ECG datasets.
Authors
- Xianxiang Chen (ORCID: https://orcid.org/0000-0002-3986-1540)
- Lidong Du (ORCID: https://orcid.org/0000-0002-7581-8152)
- Peng Wang (ORCID: https://orcid.org/0000-0002-0912-2624)
- Junxian Song (ORCID: https://orcid.org/0000-0002-2982-5538)
- Zhenfeng Li (ORCID: https://orcid.org/0009-0009-9390-5864)
- Zhen Fang (ORCID: https://orcid.org/0000-0002-9336-0421)
- Pang Wu
Institutions
- Chinese Academy of Sciences (CN)
- Chinese Academy of Medical Sciences & Peking Union Medical College (CN)
- Peking University (CN)
- Peking University People's Hospital (CN)
- Aerospace Information Research Institute (CN)
- University of Chinese Academy of Sciences (CN)
Publication Details
- Journal
- Bioengineering
- Published
- 2025-10-14
- DOI
- https://doi.org/10.3390/bioengineering12101104
- Primary Topic
- ECG Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00