This repository contains a Jupyter Notebook that demonstrates how to build, train, and deploy an object detection model using AWS SageMaker. The model is trained to identify and locate dogs and cats in images.
The notebook is structured as follows:
-
Downloading the Data: This section deals with downloading the necessary dataset. The dataset used is from Oxford-IIIT Pet Dataset, which contains images of cats and dogs along with the annotations in XML format.
-
Extracting Annotations from XML Format: Here, the XML annotations are parsed and converted into a more accessible format.
-
Visualize Data: A function is provided to visualize the data along with the annotations to ensure that the data is correctly formatted.
-
SageMaker Setup: This section is for setting up SageMaker, defining the roles and permissions, and identifying the training image.
-
Preparing Data for SageMaker: The data is organized into the necessary format for training with SageMaker.
-
Uploading Data to S3: The formatted data is uploaded to an S3 bucket for use in training.
-
SageMaker Estimator: A SageMaker estimator is created with the necessary configurations for training.
-
Hyperparameters: The hyperparameters for the training job are defined.
-
Data Channels: The data channels for training and validation data are defined.
-
Model Training: (This section is left blank in the notebook)
-
Deploy Model: (This section is left blank in the notebook)
-
Predictions: A demonstration of how to make predictions with the trained model.
-
Cleanup: Instructions for deleting the endpoint to stop incurring costs.
- AWS Account
- SageMaker Instance
- IAM Role with necessary permissions (SageMaker execution role)
- S3 Bucket
- Clone this repository to your local machine or SageMaker instance.
- Open the Jupyter Notebook.
- Follow along with the cells in the notebook to train and deploy your object detection model.
The dataset used is the Oxford-IIIT Pet Dataset.
If you have any improvements or issues to report, feel free to open an issue or make a pull request.