Skip to content

Malaria Detection using Deep Learning from Images made available publicly from NIH

License

Notifications You must be signed in to change notification settings

iArunava/Malaria-Detection-using-Keras

Repository files navigation

Malaria-Detection-using-Keras

This project uses Keras to detect Malaria from Images. The model used is a ResNet50 which is trained from scratch. The images in this dataset is divided into to categories

  • Parasitized
  • Uninfected

How to use

  1. Clone the repository
git clone https://github.com/iArunava/Malaria-Detection-using-Keras.git
  1. cd to the directory
cd Malaria-Detection-using-Keras/
  1. Get some images to infer upon
chmod u+x ./datasets/download.sh
./datasets/download.sh
  1. Find an image of your choice and infer!!
python3 train_model.py -i ./path/to/image
  1. Can even infer on a set of images in datasets/cimages_test/
python3 train_model.py -otb True
  1. To see all the options
python3 train_model.py --help

7.Enjoy!!

Production

The model is deployed to production and you can use the model to test on your own images!!
The model is deployed using Zeit. Quite an amazing platform!
The live link to the deployed model can be found here: https://malaria-classifier.now.sh

The code that is used to deploy the model is open sourced and can be found here

A look into the deployed model on web

malaria model - deployed classifier

How to deploy your own models using this?

  1. Download node, now, now-cli
sudo apt install npm
sudo npm install -g now
  1. Get a direct download link to your model

  2. Set that link equal to model_file_url - which you can find here on app/server.py/L20

  3. Run

now
  1. The site should be deployed now!!

  2. Use a custom name for your site

export NAME='custom-site-name'
now alias $NAME

your site is now also accessible at custom-site-name.now.sh

  1. Keeping the deployment alive (as it goes to sleep after some time of inactivity)
now scale custom-site-name.now.sh sfo 1
  1. Share the link with everyone and Enjoy!!

A few examples to visualize

dl_medical_imaging_malaria_dataset

References

  1. PyImageSearch - Deep Learning and Medical Image Analysis with Keras
  2. Pre-trained convolutional neural networks as feature extractors toward improved parasite detection in thin blood smear images.
  3. NIH - Malaria Dataset
  4. Carlos Atico Azira’s excellent write up
  5. Zeit Production from fast.ai

LICENSE

The code in this repository is distributed under the MIT License.
Feel free to fork and try it on your own!