This project demonstrates an image classifier built using PyTorch and converted into a command line application. It is part of the AWS AI/ML Scholarship at Udacity. The instructions and markdowns provided in the accompanying Jupyter Notebook are credited to @udacity/active-public-content.
This project involves building an image classifier using a deep learning model with PyTorch. The steps include:
- Data Loading and Preprocessing: Load and preprocess the dataset for training and validation.
- Model Building and Training: Develop a neural network to classify images into various categories.
- Model Evaluation: Assess the model's performance on the test dataset.
- Saving and Loading Checkpoints: Save the trained model as a checkpoint and implement functionality to load it.
- Command Line Application: Convert the model into a command line application to classify new images.
- Training the Model:
Open the Image Classifier Project.ipynb
notebook in Google Colab. Ensure you have the GPU runtime enabled for faster training. Follow the instructions in the notebook to load data, build, train, and save the model.
- Predicting Image Class:
After training the model in the notebook, use the provided cells to test the model on new images.
There are two notebooks in the command-line-app/test
directory showing how to utilize remote GPUs in platforms like Google Colab.
-
Zip the command-line-app:
Before running the scripts in Google Colab, zip the
command-line-app
directory. This makes it easier to upload and use the application in the Colab enviroment.zip -r command-line-app.zip command-line-app/
-
Upload and Use with remote GPUs:
- Upload the zipped
command-line-app.zip
to your remote enviroment. - Upload one of the test notebooks from the test directory.
- Upload the zipped
-
Run the application:
- Use the test notebook to unzip the files and set up the environment.
- Follow the notebook instructions to run the command-line application on the remote GPU.
The course material Udacity was a great start, I challenged myself to make a model over 80%.
Pytorch, No Tears was helpful in understanding the ins and outs of training a new network.