{"id":21001233,"url":"https://github.com/andrew2077/102flowers-eda-classification","last_synced_at":"2026-04-27T14:32:11.090Z","repository":{"id":191579991,"uuid":"684951076","full_name":"Andrew2077/102Flowers-EDA-Classification","owner":"Andrew2077","description":"FellowshipAi project","archived":false,"fork":false,"pushed_at":"2023-09-07T12:47:07.000Z","size":48924,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-31T00:33:18.764Z","etag":null,"topics":["explanatory-data-analysis","flowers102","gradcam-visualization","python","pytorch","tensorboard","xai"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Andrew2077.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":"2023-08-30T07:31:45.000Z","updated_at":"2023-09-06T11:35:57.000Z","dependencies_parsed_at":"2023-08-30T14:16:53.404Z","dependency_job_id":"4a4afb33-0cb7-4145-818a-53f830f6822d","html_url":"https://github.com/Andrew2077/102Flowers-EDA-Classification","commit_stats":null,"previous_names":["andrew2077/102flowers-eda-classification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Andrew2077/102Flowers-EDA-Classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andrew2077%2F102Flowers-EDA-Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andrew2077%2F102Flowers-EDA-Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andrew2077%2F102Flowers-EDA-Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andrew2077%2F102Flowers-EDA-Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andrew2077","download_url":"https://codeload.github.com/Andrew2077/102Flowers-EDA-Classification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andrew2077%2F102Flowers-EDA-Classification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32341447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["explanatory-data-analysis","flowers102","gradcam-visualization","python","pytorch","tensorboard","xai"],"created_at":"2024-11-19T08:14:19.264Z","updated_at":"2026-04-27T14:32:11.073Z","avatar_url":"https://github.com/Andrew2077.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flowers102-Resnet50\n\nFellowshipAi project \n\nmight takes some time to load, due to many plots and gifs, please be patient\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1M_odF1YhijOgr3FnrRSEtlDMCC7QRgQi?usp=sharing)\n\nThe Notebook has everything from downloading dataset to fine tuning the model and inference.\n\n## Preprocessing\n- [download.py](engine/data_download.py)\n- [data_processing.py](engine/data_processing.py)\n### Dataset\n- [Flowers102](https://www.robots.ox.ac.uk/~vgg/data/flowers/102/index.html)\n\n### Augmentation\n- RandomResizedCrop\n- RandomHorizontalFlip\n- RandomVerticalFlip\n- randomRotation\n- CenterCrop\n\n## Trnasformations\n  - resize = 224\n  - ToTensor\n  - Normalize\n    - mean = [0.485, 0.456, 0.406]\n    - std = [0.229, 0.224, 0.225]\n\n## Model \n- [model.py](engine/model.py)\n### Architecture\n- Resnet50 - backbone\n- MlpHead - head\n  - 3 layers\n    - 2048 -\u003e 512 -\u003e 102 hidden units\n    - ReLU activation\n    - Dropout 0.5\n    - BatchNorm\n    - \n### Train \n  - CrossEntropyLoss\n  - Adam optimizer\n    - 0.01 learning rate\n  - 30 epochs\n\n\n### Fine-Tuning\n  - CrossEntropyLoss\n  - Radam optimizer\n    - 3e-4 learning rate\n  - Cyclical Learning Rates\n    - min_lr = 5e-8\n    - max_lr = 3e-3\n    - mode = 'triangular'\n  - 120 epochs\n\n## Results \n\n### 1. EDA \n#### Classest Distribution\n- Class imbalance is present in the dataset\n\n![class distribution](misc/class_dist.png)\n\n#### Sample Images\n\n![sample images](misc/default_sample.gif)\n\n### Training History\n\n##### Highest Accuracy\n- Test-Set\n  \n| Experiment | Accuracy | Loss |\n| :---: | :---: | :---: |\n| Resnet50 - 30 Epochs | 85.0838% | 0.549521 |\n| Resnet50 - 120 Epochs | 89.2956% | 0.386665 |\n\n- Validation-Set\n\n| Experiment | Accuracy | Loss |\n| :---: | :---: | :---: |\n| Resnet50 - 30 Epochs | 87.2511% | 0.451927 |\n| Resnet50 - 120 Epochs | 91.0849% | 0.312610 |\n\n- Train-Set\n\n| Experiment | Accuracy | Loss |\n| :---: | :---: | :---: |\n| Resnet50 - 30 Epochs | 88.8839% | 0.389938 |\n| Resnet50 - 120 Epochs | 96.7953% | 0.105484 |\n\n### Graphs\n##### LOSS \n- 30 epochs\n![30 Epochs Loss](misc/TF_loss.png)\n- 120 epochs (fine tuning)\n![120 Epochs Loss](misc/Fine_tune_loss.png)\n\n##### ACCURACY\n- 30 epochs\n![30 Epochs Accuracy](misc/TF_acc.png)\n- 120 epochs (fine tuning)\n![120 Epochs Accuracy](misc/Fine_tune_acc.png)\n\n\n### GradCam\n#### Train Sample \n- grad camp for 1 image \u0026 top 4 classes\n\n![gradcam](misc/sample_train.png)\n\n- CAM for all classes\n\n![gradcam](misc/all_feat_train.gif)\n\n\n#### Val Sample \n- idx 75\n- grad camp for 1 image \u0026 top 4 classes\n\n![gradcam](misc/sample_val.png)\n\n- CAM for all classes\n\n![gradcam](misc/all_feat_val.gif)\n\n\n#### Test Sample \n- idx 75\n- grad camp for 1 image \u0026 top 4 classes\n\n![gradcam](misc/sample_test.png)\n\n- CAM for all classes\n\n![gradcam](misc/all_feat_test.gif)\n\n\n## [Workflow](workflow.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrew2077%2F102flowers-eda-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrew2077%2F102flowers-eda-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrew2077%2F102flowers-eda-classification/lists"}