Skip to content

Pneumonia detection from Chest-X-Ray images using Transfer Learning PyTorch, Flask, Docker, AWS.

Notifications You must be signed in to change notification settings

pheonix-18/Pneumonia-ChestXRay-Pytorch

Repository files navigation

Chest X-Ray Pneumonia Detection in PyTorch

This repository solves the problem of Pneumonia Chest Xray detection using PyTorch

plot

Inference on Single Image on Local Machine

Run server2.py on Local Terminal
On another terminal run

curl -X POST http://127.0.0.1:5000/ -H 'Content-Type: application/json' -d '{"file":"/Users/sarath_computer_vision/Documents/pneumonia/test_nor.jpeg"}'


Dataset Available at https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia
dataset.py contains Dataset class in pytorch to load data
transforms.py contains Transforms for train and val/test images
train.py contains the model and trains for specified epochs
main.py Loads the argparser and starts the training by calling train.py
test.py Return the confusion matrix and accuracy on a test set
requirements.txt contains libraries in the python environment where experiments ran
tensorboard.txt contains links for experimental results of 4 Models

Train the model for specified epochs

python3 main.py --batchSize=32 --lr=0.01 --endEpoch=30 --lrRateAnnealing=0.7 --experimentName='ResNetTruePretrain70Anneal' --pretrained


Test the model on a dataset

python3 test.py --model_path='./best_models/rs10_model_2_32_79.17_0.8125_0.64_0.0001_.pth' --test_data_path='./Data/test' --cmatrix_name='ResScratch10.png'

plot

Report of the Paper is also available in the directory

Please feel free to raise issues and star the repo if useful

About

Pneumonia detection from Chest-X-Ray images using Transfer Learning PyTorch, Flask, Docker, AWS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published