This repository contains code and documentation for a novel clinician-in-the-loop, prompt-based Explainable Artificial Intelligence (XAI) tool developed for the interpretation of electrocardiogram (ECG) signals. The tool integrates multiple Deep Learning (DL) models with different XAI techniques to offer both accuracy and transparency in diagnosing cardiac abnormalities.
- Deep Learning Models: Trained on a comprehensive ECG dataset, our DL models achieve high precision in detecting cardiac abnormalities.
- Explainable AI Techniques: Integrated Gradients, Layer-wise Relevance Propagation (LRP), and DeepLift are employed to generate heatmaps, enhancing interpretability by highlighting decision-making regions within ECG signals.
- Clinician-in-the-Loop Approach: Our tool involves chatbots in the diagnostic process, providing prompt-based explanations for model decisions, and ensuring human expertise is utilized effectively.
- Chatbot Integration: A pre-trained language model and an innovative image retrieval feature power a chatbot, offering an intelligent conversational agent for medical inquiries related to cardiac health.
- Clone the repository:
git clone https://github.com/TejoVK/ECG_XAi.git
- Install dependencies:
pip install -r requirements.txt
-
Navigate to the
ge_final
directory. -
Run the main script:
python finalcode.py
- You can use the sample data in the
test
dir to input ECG data for analysis. - View the generated heatmaps and diagnostic results.
- Engage with the chatbot for additional inquiries.
Our project is deployed on Streamlit and can be accessed via the following link:
Our project has been published in IEEE. The paper can be accessed on IEEE Xplore via the following link:
Alternatively, an openly available version of the paper can be found on ResearchGate: