{"id":15157771,"url":"https://github.com/manuelz/dlpt-food-classification","last_synced_at":"2026-01-21T10:36:40.145Z","repository":{"id":253473086,"uuid":"843589040","full_name":"ManuelZ/DLPT-food-classification","owner":"ManuelZ","description":" Project #2 for the OpenCV University course \"Deep Learning with PyTorch\". ","archived":false,"fork":false,"pushed_at":"2024-08-21T03:46:36.000Z","size":1770,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T17:18:01.994Z","etag":null,"topics":["classification","deep-learning","python","pytorch"],"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/ManuelZ.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-08-16T21:18:43.000Z","updated_at":"2024-08-21T03:49:07.000Z","dependencies_parsed_at":"2024-08-21T03:50:05.277Z","dependency_job_id":null,"html_url":"https://github.com/ManuelZ/DLPT-food-classification","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"22c8790a689f2d06e93d0680869925d80bd59ecb"},"previous_names":["manuelz/dlpt-food-classification"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManuelZ%2FDLPT-food-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManuelZ%2FDLPT-food-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManuelZ%2FDLPT-food-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManuelZ%2FDLPT-food-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManuelZ","download_url":"https://codeload.github.com/ManuelZ/DLPT-food-classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675630,"owners_count":20977376,"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":["classification","deep-learning","python","pytorch"],"created_at":"2024-09-26T20:03:05.147Z","updated_at":"2026-01-21T10:36:40.099Z","avatar_url":"https://github.com/ManuelZ.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Classification: 13 Kenyan food types\n\nThis is the second project of the Opencv University course [\"Deep Learning with PyTorch\"](https://opencv.org/university/deep-learning-with-pytorch/).\nIt focuses on classifying images of 13 different Kenyan food classes.\n\n\n## Introduction\n\nClassification in computer vision is a task where the objective is to determine the class that the image belongs to. \nThis project focuses on classifying images from 13 classes.\n\n\n## Data\n\nThe dataset, containing 8174 images of various sizes, was split into 6536 training images and 1638 validation images.\nThese images are categorized into the following classes: \n\n    Bhaji, Chapati, Githeri, Kachumbari, Kukuchoma, Mandazi, Masalachips, Matoke, Mukimo, Nyamachoma, Pilau, Sukumawiki, Ugali\n\n## The method used\n\nFine-tuning of a ResNet-50 backbone with a linear classifier using PyTorch Lightning to gain experience with high-level \ndeep learning training.\n\n- Various augmentations techniques were used to try to improve generalization:\n  - Color jitter\n  - Conversion to gray\n  - Horizontal and vertical flips\n  - Random shifting and rotation\n  - Elastic transformations\n  - Grid distortion\n\n- The loss function used was Cross-Entropy.\n\n- An SGD optimizer with weight decay.\n\n- A learning rate scheduler that implements the 1-cycle policy. It adjusts the learning rate from an initial rate to a \nmaximum, then decreases it to a much lower minimum.\n\n\n## Discussion\n\nTraining this model for ~200 epochs resulted in an accuracy of 75.2% on the test set.\n\n\nSee the [notebook](project-2-deep-learning-with-pytorch-2024.ipynb).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuelz%2Fdlpt-food-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanuelz%2Fdlpt-food-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuelz%2Fdlpt-food-classification/lists"}