Skip to content

A Django webapp that uses machine learning models trained with scikit-learn to classify images of brain MRI scans and skin abnormalities as benign vs malignant

Notifications You must be signed in to change notification settings

am831/django-image-classifier

Repository files navigation

Django Medical Image Classifier

A Django webapp that uses machine learning models to classify images of brain MRI scans and skin abnormalities as benign vs malignant. The user can upload images which are stored in an AWS S3 bucket. homepage

Image Classification with Scikit Learn

Two different machine learning models were trained using datasets downloaded from Kaggle. One model can determine if a brain MRI image contains a tumor or not, the other can determine if a skin abnormality is melanoma or not. Models were trained with Scikit-Learn using the support vector machine (SVM) algorithm.

  • Brain tumor classification dataset can be downloaded here
  • Melanoma classification dataset can be downloaded here

Machine Learning Model Performance

BrainMRI ML model:

  • Training score: 0.9812717770034843
  • Testing score: 0.9355400696864111
  • Accuracy score: 0.8401015228426396

Melanoma ML model:

  • Training score: 0.9068193649141072
  • Testing score: 0.8870380010411244
  • Accuracy score: 0.897

Installation

  • Download the docker image alisha831maddy/med_image_classify (4.38 GB)
  • Run the image with the command "docker run -p 8000:8000 alisha831maddy/med_image_classify"
  • The server will start at http://0.0.0.0:8000, but you need to navigate to http://localhost:8000
  • Download images to work with the ML models, see previous section for links to image datasets

Usage

At the homepage shown above, click on the ML model you want to use. You'll be directed to a page where you can upload images for classification. braintumor melanoma Navigate to View Gallery to see previously uploaded images that are stored in an AWS S3 bucket. githubdemo

Built With

  • Web Development:
    Django | HTML | CSS

  • Python 3.11 / Machine Learning
    Scikit-Learn | Scikit-image | Numpy

  • Database
    AWS S3

  • Deployment:
    Docker

About

A Django webapp that uses machine learning models trained with scikit-learn to classify images of brain MRI scans and skin abnormalities as benign vs malignant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published