Skip to content

Deep learning–based ECG biometric identification using Keras/TensorFlow with a Flask API and a React dashboard.

Notifications You must be signed in to change notification settings

ahmed-hamda/Person-Detection_ECG_ID__PFE

Repository files navigation

Person Detection — ECG ID (PFE)

Deep Learning · Keras/TensorFlow · Flask API · React Dashboard

This repository contains:

  • a Flask backend that runs classification using a Keras/TensorFlow model
  • a React frontend dashboard located in dashboardpfe/

Screenshots

Dashboard

Dashboard

Upload ECG Signal (CSV)

Enter signal

Prediction Result

Prediction result


Project Structure


PFE_SITE/
│
├── app.py
├── model.py
├── requirements.txt
├── trained_model_weights.weights.h5
├── uploaded_file.csv
│
├── dashboardpfe/          # React frontend
│   ├── package.json
│   ├── package-lock.json
│   └── ...
│
└── Demo/                  # README screenshots
├── dashboard.png
├── enter signal.png
└── prediction result.png


Prerequisites

  • Python 3.8+
  • Node.js + npm
  • Windows: PowerShell recommended

Backend Setup (Flask) — PowerShell

Go to the root folder of the project:

cd "C:\Users\USER\Desktop\pfe_site"

Create and activate a virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

If activation is blocked:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\.venv\Scripts\Activate.ps1

Install dependencies:

pip install --upgrade pip
pip install -r .\requirements.txt

Note: If you want CPU-only TensorFlow, install tensorflow-cpu instead of tensorflow.


Run Backend

Make sure trained_model_weights.weights.h5 is in the project root, then:

cd "C:\Users\USER\Desktop\pfe_site"
.\.venv\Scripts\Activate.ps1
python .\app.py

Backend default URL:

  • http://127.0.0.1:5000

Frontend Setup (React)

Open a second PowerShell terminal:

cd "C:\Users\USER\Desktop\pfe_site\dashboardpfe"
npm install
npm start

Frontend default URL:

  • http://localhost:3000

The frontend uses the proxy configured to reach:

  • http://localhost:5000

Backend API

POST /upload

Uploads a CSV file via multipart/form-data (field name: file). The backend saves it as uploaded_file.csv, runs prediction, then returns:

{ "result": <int>, "confidence": <float> }

PowerShell curl example:

curl -X POST -F "file=@C:\path\to\your_file.csv" http://localhost:5000/upload

About

Deep learning–based ECG biometric identification using Keras/TensorFlow with a Flask API and a React dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published