Run the jupyter notebook from this repo or Run the trained model by downloading it from this link
- Initial steps
Running the first cell will download all the data required.
Run cell 2 to import all the required libraries.
Run cell 3 to load the data as numpy arrays.
Run cell 4 to mount to your google drive.
Run cell 5 to print some images from the training set.
Finally run cell 6 to load the training images and cells under “Preparing the data” to prep the dataset.
- Implementing the model
Run the cell under “Defining the model” to define our implementation of the VGG16 architecture.
- Training
Run all the cells under “Training” to train the model and save it to your drive.
- Testing
Run the cells under “Making inferences on test set” to test the model.
This will save the test results to a csv file on your drive. Download it to see the results!
- Download it
!gdown --id 1Ns4Y8ibEQFHZkEBtZrLvbSMzWNWG3TRx
- Load it in you notebook using
from model import MNISTClassifier
model = pt.load(path_to_the_downloaded_model)
- Load the testing images using
!wget -O test_x.npy https://www.dropbox.com/s/qfbaw6a18cthkg4/test_x.npy?dl=0
test_images = np.load("test_x.npy")
- Make inferences by calling the
inference
method as follows:
from utils import inference
inference(model, array_of_128x128_images, path_to_save_predictions.csv)
Note that the model can only operate on 128 X 128 grayscale images.
- Downlad the csv files with the results!