Based on Transfer Learning of VGG16 architecture. The work uses Kaggle Pneumonia dataset https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia/home for training and validation. It uses Flask webapp by mtobeiyf to deploy the Keras Model https://github.com/mtobeiyf/keras-flask-deploy-webapp.
- Clone this repo
- Install requirements
- Run the script
- Check http://localhost:5000
- Done! ๐
๐Screenshot:
$ git clone https://github.com/palanithanarajk/pneumonia-diagnosis.git
$ pip install -r requirements.txt
Make sure you have the following installed:
- tensorflow
- keras
- flask
- pillow
- h5py
- gevent
Python 2.7 or 3.5+ are supported and tested.
$ python app.py
Open http://localhost:5000 and have fun. ๐
Modify files in templates
and static
directory.
index.html
for the UI and main.js
for all the behaviors
To deploy it for public use, you need to have a public linux server.
Run the script and hide it in background with tmux
or screen
.
$ python app.py
You can also use gunicorn instead of gevent
$ gunicorn -b 127.0.0.1:5000 app:app
More deployment options, check here
To redirect the traffic to your local app.
Configure your Nginx .conf
file.
server {
listen 80;
client_max_body_size 20M;
location / {
proxy_pass http://127.0.0.1:5000;
}
}
Try this live AI Demo https://dl-cad-pneumonia.herokuapp.com/
Check Siraj's "How to Deploy a Keras Model to Production" video. The corresponding repo.