{"id":15968880,"url":"https://github.com/busraoguzoglu/image-classification-using-aws-sagemaker","last_synced_at":"2026-04-24T16:33:58.497Z","repository":{"id":256142862,"uuid":"852740784","full_name":"busraoguzoglu/Image-Classification-Using-AWS-Sagemaker","owner":"busraoguzoglu","description":"Project for Udacity AWS Machine Learning Engineer Nanodegree","archived":false,"fork":false,"pushed_at":"2024-09-11T07:30:38.000Z","size":5016,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T00:19:13.790Z","etag":null,"topics":["aws","image-classification","image-processing","sagemaker"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/busraoguzoglu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T10:43:54.000Z","updated_at":"2024-09-24T02:07:39.000Z","dependencies_parsed_at":"2024-10-30T04:02:30.571Z","dependency_job_id":null,"html_url":"https://github.com/busraoguzoglu/Image-Classification-Using-AWS-Sagemaker","commit_stats":null,"previous_names":["busraoguzoglu/image-classification-using-aws-sagemaker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FImage-Classification-Using-AWS-Sagemaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FImage-Classification-Using-AWS-Sagemaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FImage-Classification-Using-AWS-Sagemaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FImage-Classification-Using-AWS-Sagemaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busraoguzoglu","download_url":"https://codeload.github.com/busraoguzoglu/Image-Classification-Using-AWS-Sagemaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247192473,"owners_count":20899104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","image-classification","image-processing","sagemaker"],"created_at":"2024-10-07T19:04:22.048Z","updated_at":"2026-04-24T16:33:58.455Z","avatar_url":"https://github.com/busraoguzoglu.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dog Breed Classification using PyTorch and AWS SageMaker\n\nThis project focuses on developing a deep learning model to classify dog breeds using PyTorch, leveraging AWS SageMaker for training, hyperparameter tuning, and deployment. The model is based on the ResNet18 architecture, a popular convolutional neural network designed for image classification tasks.\n\n## Data\nThe dataset used for this project consists of images of 133 different dog breeds. The dataset is organized into three directories: train, valid, and test. Each subdirectory contains images categorized by breed. The data is stored in an AWS S3 bucket and is loaded directly into SageMaker for training.\n\n\n## Model Training\nThe model is based on the ResNet18 architecture, which is fine-tuned on our dataset using transfer learning. The training process is managed by *train_model_profiling.py*, which includes steps for data preprocessing, model training, and evaluation.\n\n\n## Hyperparameter Tuning\nHyperparameter optimization is performed using SageMaker's HyperparameterTuner. The script *hpo.py* defines the search space and objective metrics for tuning. SageMaker automatically manages the tuning job, allowing for efficient exploration of hyperparameter combinations to improve model performance.\n\n**Hyperparameters Tuned:**\n  \n- Learning rate\n- Batch size\n\n## Debugging and Profiling\nTo ensure optimal model performance and detect potential issues during training, debugging and profiling were integrated into the project using AWS SageMaker Debugger. The DebuggerHookConfig and ProfilerConfig settings help monitor the training process by capturing data on the model's gradients, loss, and resource utilization.\n\n**Debugging:** The model's gradients and loss values are tracked to detect problems like vanishing gradients, overfitting, and poor weight initialization. SageMaker Debugger's built-in rules are applied to automatically detect and flag such issues.\n\n**Profiling:** Profiling is used to monitor system resource utilization, such as CPU and memory usage, throughout the training process. This helps identify bottlenecks and optimize resource allocation to improve training efficiency.\n\n## Deployment and Inference\n\nDue to the nature of PyTorch models, a custom inference script (inference.py) was required to handle the model loading and prediction logic. This script manages how input data (images in this case) is processed and passed through the model for predictions.\n\nThe model is deployed on an instance on AWS that serves the endpoint, allowing us to send images of dogs and receive predictions about their breed. A custom predictor class is used to handle image data and ensure it is properly serialized and deserialized for the prediction requests. This setup ensures efficient deployment and accurate predictions for the dog breed classification task.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusraoguzoglu%2Fimage-classification-using-aws-sagemaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusraoguzoglu%2Fimage-classification-using-aws-sagemaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusraoguzoglu%2Fimage-classification-using-aws-sagemaker/lists"}