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'