Skip to content

abhimanyuskv/ECG_Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECG Simulation – Real-Time Synthetic ECG Simulation (Python + React)

This project is a complete real-time ECG waveform simulation, consisting of:

Python/Flask backend
– Generates synthetic MATLAB-accurate ECG
– Streams real-time ECG at 100 Hz over WebSockets
– Uses Fourier harmonic reconstruction
– Provides live signal + peak detection

React + Vite + Three.js frontend
– Plots ECG in real-time with a 3D line renderer in a 5 second window
– Extracts heart rate, QRS amplitude, T amplitude
– Computes realistic blood pressure heuristics
– Displays HR + BP in a polished UI overlay

🔗 Original MATLAB + Blender Project (Reference)

This project is based on the following work:

Original Repository:
https://github.com/sanju214/heartTwin

The MATLAB + Blender implementation in that project served as the foundation for the ECG waveform logic and visualization concepts used here, which were re-implemented in Python and React for a real-time web-based system.


Setup Instructions

1. Download / Clone the Repository

git clone https://github.com/abhimanyuskv/ECG_Simulation.git
cd ECG_Simulation

2. Backend Setup (Python + Flask-SocketIO)

Navigate to the backend folder

cd backend

Install required dependencies

pip install -r requirements.txt

Start the backend server

python server.py

3. Frontend Setup (React + Vite + Three.js)

Open a new terminal and navigate to the frontend folder

cd frontend

Install Node.js dependencies

npm install

Start the frontend development server

npm run dev

The frontend will be available at:

http://localhost:5173/

About

Real-Time Synthetic ECG Simulation (Python + React)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published