Coronary artery stenosis detection remains a challenging task due to the complex vascular structure, poor quality of imaging pictures, poor vessel contouring caused by breathing artifacts and stenotic lesions that often appear in a small region of the image. In order to improve the accuracy and efficiency of detection, a new deep-learning technique based on a coronary artery stenosis detection framework (DCA-YOLOv8) is proposed in this paper. The framework consists of a histogram equalization and canny edge detection preprocessing (HEC) enhancement module, a double coordinate attention (DCA) feature extraction module and an output module that combines a newly designed loss function, named adaptive inner-CIoU (AICI). This new framework is called DCA-YOLOv8. The experimental results show that the DCA-YOLOv8 framework performs better than existing object detection algorithms in coronary artery stenosis detection, with precision, recall, F1-score and mean average precision (mAP) at 96.62%, 95.06%, 95.83% and 97.6%, respectively. In addition, the framework performs better in the classification task, with accuracy at 93.2%, precision at 92.94%, recall at 93.5% and F1-score at 93.22%. Despite the limitations of data volume and labeled data, the proposed framework is valuable in applications for assisting the cardiac team in making decisions by using coronary angiography results.