# Efficient Classification of ECG Images Using a Lightweight CNN with Attention Module and IoT
## 2 Literature Review  
Digital image processing and machine learning have a significant role in healthcare. Recently, research has been concentrated on cardiac disease detection through deep learning, yielding promising results [19; 20; 21; 22; 23]. CNN is the latest method used for the classification and detection of heart signals with different variations [24; 25]. Similarly, [PERSON] et al. [26] recommended a wearable ECG detection system. The model was evaluated through ECG data acquired from a wearable patient monitoring (WPM) device and the MIT-BIH arrhythmia database. Although the authors present good classification performance, the WMP devices face accuracy, precision, and reliability issues [27]. [PERSON] et al. [28] proposed the classification of an ECG arrhythmia using two-dimensional (2D) CNN. In this technique, the five different types of heartbeats were first converted into time-frequency spectrograms before 2D CNN was used to classify the data. The authors presented various approaches in [29], where the main focus was the application of a deep learning model with GRU (gated recurrent unit) and then the use of an ELM (extreme learning machine) for the identification of the ECG signal. [PERSON] et al. [30] used PQRST and 2D convolutional features for the recognition of a single heartbeat, a method called the random oversampling algorithm was used to balance the data, and finally, a random forest classifier was applied. [PERSON] et al. [31] used 1D ECG signals and transformed them into a 2D image. A faster R-CNN (faster regions with a CNN) algorithm was used for the experiment and accomplished an accuracy of 99.21%. [PERSON] et al. [32] used a multiscaled fusion of deep CNN using a single lead short ECG and achieved an accuracy of 96.99%. [PERSON] et al. [33] suggested an e-health monitoring system of CVD by combining heartbeats into a two-dimensional feature vector and then applied CNN for efficient detection. In a research work by [PERSON] et al. [34], deep learning techniques were proposed for the detection of cardiac disorders in ECG signals. The signals were transformed into images and then supplied into three different deep learning models: AlexNet, Inception-v3, and VGG-16. Transfer learning was applied to train all these models in the task of detecting CVD. The extracted features were combined, and the best ones were selected through a heuristic entropy method.  
As most researchers used timeseries data of ECG with signal leads, which are not suitable for power line interface and muscle contraction, among other things. The most appropriate method for screening cardiac disorders usually advised by cardiologists is the use of 12-lead ECG images. The major motivation and contribution of this paper is the development of an effective automated CVD system using 12-lead ECG images for hospitals as well as for remote patients. In this work, we applied a lightweight CNN with attention module, while the results are evaluated using an accuracy, recall, precision, and confusion matrix.  
The above review is summarized in Table 1.  
The subsequent sections of this manuscript are organized as follows: Section 3 delineates the proposed methodology encompassing the IoT-based framework and the automated classification of ECG images. This approach involves the use of REL and DSR routing for data transformation, as well as the application of the lightweight CNN for classification. In Section 4, the results and discussion are given, and finally, the conclusions and future research directions are outlined in Section 5.