Skip to content

PredictiX is a comprehensive multi-disease prediction system built using the MERN stack and integrated with machine learning models. It accurately predicts lung cancer, breast cancer, diabetes, and heart disease, providing a seamless user experience for health diagnostics.

License

Notifications You must be signed in to change notification settings

hallowshaw/PredictiX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PredictiX - Multi-Disease Prediction System

PredictiX is a comprehensive multi-disease prediction platform designed to predict heart disease, diabetes, breast cancer, and lung cancer. Built using the MERN stack and integrated with machine learning models, PredictiX offers an intuitive interface for users to input data and receive accurate health predictions, enhancing the diagnostic experience.

Table of Contents

Features

  • User Authentication: Secure sign-up and login functionality with protected routes using Context API.
  • Predictive Models:
    • Heart disease prediction using Logistic Regression.
    • Diabetes prediction using Support Vector Machine (SVM).
    • Breast cancer prediction using Convolutional Neural Network (CNN).
    • Lung cancer prediction using the InceptionResNet model.
  • Image Upload for Cancer Predictions: Users can upload medical images for breast and lung cancer detection.
  • Prescription Upload: Automatic form filling for heart disease and diabetes predictors using regex to scan user-uploaded prescriptions.
  • Custom PDF Reports: Generate a downloadable PDF report of prediction results.
  • Real-time Notifications: Integrated React Toasts for user-friendly notifications.
  • Single Server Deployment: Node.js Child Process is used to run all models, eliminating the need for a separate Flask server.

Tech Stack

  • Frontend: React JS (with Vite), Context API, React Toasts, Figma for design.
  • Backend: Node.js, Express.js, Node.js Child Process for running machine learning models.
  • Database: MongoDB (for user data and predictions).
  • Machine Learning Models: Logistic Regression, SVM, CNN, InceptionResNet.
  • Other Libraries:
    • pdf-lib for generating custom PDF reports.
    • multer for file uploads (images and prescriptions).
    • concurrently for running client and server simultaneously.

Machine Learning Models

  • Heart Disease Prediction:

    • Algorithm: Logistic Regression.
    • Input Features:
      • Age, Sex, Chest Pain Type, Resting Blood Pressure, Serum Cholesterol, Fasting Blood Sugar, ECG Results, Max Heart Rate, Exercise Induced Angina, ST Depression, Peak ST Slope, Number of Vessels, Thalassemia.
  • Diabetes Prediction:

    • Algorithm: Support Vector Machine (SVM).
    • Input Features:
      • Pregnancies, Glucose, Blood Pressure, Skin Thickness, Insulin, BMI, Diabetes Pedigree Function, Age.
  • Breast Cancer Prediction:

    • Algorithm: Convolutional Neural Network (CNN).
    • Input: Breast tissue image.
  • Lung Cancer Prediction:

    • Algorithm: InceptionResNet.
    • Input: Lung X-ray or CT scan image.

Usage

  1. Sign up or Log in to access the predictors.
  2. Navigate to the respective disease predictor (Heart, Diabetes, Breast, Lung).
  3. For heart disease and diabetes: Fill in the form manually or upload a prescription, and the system will auto-populate the fields using regex.
  4. For breast and lung cancer: Upload an image (X-ray or CT scan).
  5. Submit the form and view the prediction result.
  6. Download the custom PDF report for future reference.

Frontend Design

The frontend design has been created using Figma. It outlines the structure and user flow of the application, ensuring a seamless user experience.

File Structure

PredictiX/
├── Backend/                # Backend code
│   ├── src/                # Source code
│   │   ├── controllers/    # Controller files
│   │   ├── DataScrapingScripts/ # Scripts for data scraping
│   │   ├── db/             # Database configuration
│   │   ├── middlewares/     # Middleware functions
│   │   ├── models/         # Database models
│   │   ├── routes/         # API route definitions
│   │   ├── utils/          # Utility functions
│   │   ├── app.js          # Main application file
│   │   ├── constants.js     # Constant values
│   │   └── index.js        # Entry point for the application
│   └── uploads/            # Uploaded files (prescriptions, etc.)
├── Frontend/               # Frontend code
│   ├── public/             # Public assets
│   │   └── PredictiXLogo.png # Logo file
│   └── src/                # Source code
│       ├── assets/         # Static assets
│       ├── components/     # React components
│       ├── context/        # Context API files
│       ├── pages/          # Page components
│       ├── ReportTemplate/  # Template for reports
│       ├── utils/          # Utility functions
│       ├── App.css         # Main CSS file
│       ├── App.jsx         # Main React component
│       └── main.jsx        # Entry point for the frontend
├── Medical Reports/        # Generated medical reports
├── ML/                     # Machine learning models and scripts
├── Screenshots/            # Application screenshots
├── LICENSE                 # License file
└── README.md               # README file

Screenshots

Homepage

Homepage

Sign Up Page

Sign Up

Predictors Page

Predictors

About Page

About

Future Enhancements

  • OCR Integration: Plan to replace regex with Optical Character Recognition (OCR) for extracting prescription data more efficiently.
  • Mobile Application: Expand PredictiX into a cross-platform mobile app using React Native.
  • Additional Predictors: Add more disease predictors to extend the functionality.
  • Enhanced Image Processing: Use more advanced techniques for image analysis, improving accuracy for cancer detection.
  • Integration with Wearables: Sync health data from wearables for real-time predictions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

PredictiX is a comprehensive multi-disease prediction system built using the MERN stack and integrated with machine learning models. It accurately predicts lung cancer, breast cancer, diabetes, and heart disease, providing a seamless user experience for health diagnostics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •