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
- Clone the repository
git clone https://github.com/iArunava/Malaria-Detection-using-Keras.git
- cd to the directory
cd Malaria-Detection-using-Keras/
- Get some images to infer upon
chmod u+x ./datasets/download.sh
./datasets/download.sh
- Find an image of your choice and infer!!
python3 train_model.py -i ./path/to/image
- Can even infer on a set of images in
datasets/cimages_test/
python3 train_model.py -otb True
- To see all the options
python3 train_model.py --help
7.Enjoy!!
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
- Download
node
,now
,now-cli
sudo apt install npm
sudo npm install -g now
-
Get a direct download link to your model
-
Set that link equal to
model_file_url
- which you can find here on app/server.py/L20 -
Run
now
-
The site should be deployed now!!
-
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
- Keeping the deployment alive (as it goes to sleep after some time of inactivity)
now scale custom-site-name.now.sh sfo 1
- Share the link with everyone and Enjoy!!
- PyImageSearch - Deep Learning and Medical Image Analysis with Keras
- Pre-trained convolutional neural networks as feature extractors toward improved parasite detection in thin blood smear images.
- NIH - Malaria Dataset
- Carlos Atico Azira’s excellent write up
- Zeit Production from fast.ai
The code in this repository is distributed under the MIT License.
Feel free to fork and try it on your own!