How muhffikkri/ecg-wave-preprocess works
This repository is a web-based three-lead ECG clinical workbench and hardware-DSP analyzer. A browser requests records and processing from the FastAPI application; data access loads ECGs, the DSP layer filters and resamples them, and the workbench returns visualizable signals and Holter metrics. Users can also save or download filtered frames and inspect ProSim distortion. The AI model registry and inference modules provide model selection and Keras/TFLite predictions. README capabilities are included where the tree supports them; some wiring is inferred only from documented routes and module roles because source excerpts are partial.
Main entry points: main.py FastAPI routes · script.js Dashboard · logic_layer.py Live pipeline · model_registry.py Model registry
Components 17
Web Workbench
- Dashboard
src/presentation/script.js - FastAPI routes
src/app/main.py - Runtime settings
src/app/config.py
ECG Data
- Record discovery
src/data/data_layer.py - Signal loading
src/data/data_layer.py - ECG datasets
dataset - Label lookup
src/logic/manifest_manager.py
Signal Processing
- DSP preprocessing
src/logic/preprocessing.py - Live pipeline
src/logic/logic_layer.py - Holter metrics
src/logic/logic_layer.py - Frame export
src/logic/logic_layer.py
AI Inference
- Model registry
src/app/model_registry.py - Model cache
src/logic/ai_model_manager.py - Prediction engine
src/logic/inference_manager.py
Hardware Analysis
- ProSim analysis
src/logic/dsp_simulation_workbench.py
Other components
- Workbench user
- ADS1293 captures
Connections 19
- Workbench user → Dashboard: uses
- Dashboard → FastAPI routes: requests
- FastAPI routes → Record discovery: lists records
- Record discovery → ECG datasets: scans
- FastAPI routes → Signal loading: loads signals
- Signal loading → ECG datasets: reads records
- FastAPI routes → Live pipeline: processes signal
- Live pipeline → DSP preprocessing: cleans signal
- Live pipeline → Holter metrics: computes metrics
- FastAPI routes → Frame export: saves frames
- Dashboard → FastAPI routes: requests export
- Model registry → Runtime settings: uses settings
- Model cache → Model registry: loads model config
- Prediction engine → Model registry: gets model settings
- Prediction engine → Model cache: gets cached models
- FastAPI routes → ProSim analysis: analyzes captures
- ProSim analysis → ADS1293 captures: reads captures
- FastAPI routes → Label lookup: looks up labels
- FastAPI routes → Runtime settings: reads defaults