GithubHelp home page GithubHelp logo

shawonbarman / diabetic-retinopathy-predictor-system Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.48 MB

Diabetic Retinopathy Predictor System, a Django-based web app, uses machine learning to assess diabetic retinopathy risk. Input your health data and get results within seconds: 'Diabetes affected eyes/had retinopathy: Yes/No.

License: MIT License

Jupyter Notebook 98.91% Python 0.41% CSS 0.03% HTML 0.64%
bootstrap css django html machine-learning prediction predictor python

diabetic-retinopathy-predictor-system's Introduction

Diabetic-Retinopathy-Predictor-System

Diabetic Retinopathy Predictor System is Django-based web application designed to assist users in predicting the likelihood of developing diabetes-related complications, specifically the presence of diabetic retinopathy (damage to the eyes due to diabetes). The project utilizes machine learning techniques to make predictions based on user-provided health and lifestyle information. Here's an overview of the project:

  1. Data Source:
    • The project collects diabetes-related data from the CDC NHANES website. This data serves as the basis for training the machine learning model.
  2. Project Structure:
    • The project is organized into three main folders and two files:
      • 'dataset_and_machine_learning_files': Contains the dataset ('data.csv') and machine learning code ('Diabetes_affected_eyes_had_retinopathy.ipynb').
      • 'healthFitness' (Main App): Contains the Django application's settings, URLs, and other configurations.
      • 'myApp' (Another App): Contains models, views, URLs, and other components for handling user interactions and predictions.
      • 'db.sqlite3': The SQLite database used by the Django application.
      • 'manage.py': Django management script.
  3. Machine Learning Model:
    • The heart of the system is a machine learning model for diabetes prediction. The model is trained using the provided dataset and is loaded into the Django application using joblib.
  4. User Interface:
    • The web interface is designed using HTML templates extended from a base template ('base.html') that includes Bootstrap for styling.
    • The main user interface ('index.html') offers a form where users can input various health and lifestyle-related parameters.
  5. Prediction Process:
    • Users provide information such as alcohol consumption, smoking habits, BMI, sleep patterns, and more via the form.
    • When the user submits the form, the data is sent to the Django backend for processing.
    • The input data is converted into a feature vector and passed to the machine learning model.
    • The model makes predictions about whether the user is likely to have diabetic retinopathy based on the provided information.
    • The prediction result is displayed on the web page.
  6. Result Presentation:
    • The prediction result is presented as a message indicating whether the user is predicted to be at risk for diabetic retinopathy.
  7. Project Workflow:
    • The user accesses the application's home page, where they find a form for inputting health-related data.
    • After submitting the form, the user receives an instant prediction regarding diabetic retinopathy risk.
  8. Technology Stack:
    • Django: A Python web framework for building web applications.
    • Joblib: Used to load the pre-trained machine learning model.
    • HTML/CSS: For creating the user interface.
    • Bootstrap: For styling the web pages.
  9. Use Case:
    • This project can be valuable for individuals interested in assessing their risk of developing diabetic retinopathy based on their health and lifestyle choices. It can serve as an early warning system, encouraging users to adopt healthier habits and consult healthcare professionals if necessary.

The Diabetic Retinopathy Predictor System with Django offers a user-friendly platform for individuals to gain insights into their diabetes-related health risks and make informed decisions about their well-being. It showcases the integration of machine learning into a web application for predictive healthcare analysis.

Here are step-by-step instructions on how to run this Django-based Diabetic Retinopathy Predictor System in a user-friendly way:

  1. Download the Project from GitHub and Unzip: Look for a "Code" button on this GitHub page. Click on it and select "Download ZIP" to download the project as a ZIP archive. And then locate the downloaded ZIP file on your computer (usually in your "Downloads" folder). After that right-click the ZIP file and select "Extract" or "Extract All" (the exact option may vary depending on your operating system). Then choose a destination folder where you want to extract the project files.
  2. Navigate to Project Directory: Open the command prompt or terminal in this project root directory directly. Or open the command prompt or terminal on your computer and then use the 'cd' command to navigate to the root directory of this Django project. For example:
    • cd path/to/this/project
  3. Create a Virtual Environment: Create a virtual environment to isolate this project dependencies. This helps manage package versions.
    • python -m venv myenv
  4. Activate the Virtual Environment: Activate the virtual environment you just created. This ensures that the project uses the isolated environment.
    • myenv\Scripts\activate (Windows)
    • source myenv/bin/activate (macOS/Linux)
  5. Upgrade Pip: Upgrade the 'pip' tool to the latest version to ensure you have the most recent package manager.
    • python.exe -m pip install --upgrade pip
  6. Install Django and Required Packages: Install Django and the necessary Python packages for this project.
    • pip install django
    • pip install numpy
    • pip install pandas
    • pip install joblib
    • pip install scikit-learn==1.2.2
  7. Database Setup: Run the following commands to set up the database for this Django project:
    • python manage.py makemigrations
    • python manage.py migrate
  8. Run the Development Server: Start the Django development server to run this project locally:
    • python manage.py runserver
  9. Access This Project: After launching the server, simply open your web browser and navigate to 'http://localhost:8000/'. This will take you to the home page of our Diabetes Risk Predictor.
  10. Interact with the Prediction System: On the home page, you can enter your health and lifestyle information, and upon clicking the "Predict" button, you'll receive an instant assessment of your risk for diabetic retinopathy based on the provided data.

diabetic-retinopathy-predictor-system's People

Contributors

shawonbarman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.