{"id":31642274,"url":"https://github.com/sherwanali0/waste-classification-transfer-learning","last_synced_at":"2026-04-21T10:03:36.470Z","repository":{"id":312419676,"uuid":"1047446113","full_name":"SherwanAli0/waste-classification-transfer-learning","owner":"SherwanAli0","description":"Automated waste classification using VGG16 transfer learning - IBM AI Engineering Certificate Final Project","archived":false,"fork":false,"pushed_at":"2025-08-30T12:55:26.000Z","size":968,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-30T14:35:50.029Z","etag":null,"topics":["keras","machine-learning","tenserflow"],"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/SherwanAli0.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T12:44:04.000Z","updated_at":"2025-08-30T12:58:25.000Z","dependencies_parsed_at":"2025-08-30T14:35:51.509Z","dependency_job_id":"44211303-bdaa-489c-82e8-e470d1e74d7c","html_url":"https://github.com/SherwanAli0/waste-classification-transfer-learning","commit_stats":null,"previous_names":["sherwanali0/waste-classification-transfer-learning"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/SherwanAli0/waste-classification-transfer-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherwanAli0%2Fwaste-classification-transfer-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherwanAli0%2Fwaste-classification-transfer-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherwanAli0%2Fwaste-classification-transfer-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherwanAli0%2Fwaste-classification-transfer-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SherwanAli0","download_url":"https://codeload.github.com/SherwanAli0/waste-classification-transfer-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SherwanAli0%2Fwaste-classification-transfer-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717449,"owners_count":26033542,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"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":["keras","machine-learning","tenserflow"],"created_at":"2025-10-07T03:57:48.540Z","updated_at":"2025-10-07T03:57:58.448Z","avatar_url":"https://github.com/SherwanAli0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waste Classification Using Transfer Learning\n\n**Final Project for IBM AI Engineering Professional Certificate**\n**Module 3: Building Deep Learning Models with TensorFlow**\n\nThis project implements an automated waste classification system using transfer learning with VGG16 to distinguish between recyclable and organic waste products.\n\n## Project Overview\n\nEcoClean currently lacks an efficient and scalable method to automate the waste sorting process. This project leverages machine learning and computer vision to automate the classification of waste products, improving efficiency and reducing contamination rates.\n\n### Aim\nDevelop an automated waste classification model that can accurately differentiate between recyclable and organic waste based on images using transfer learning techniques.\n\n## Course Information\n\n- **Program**: IBM AI Engineering Professional Certificate\n- **Module**: Module 3 - Building Deep Learning Models with TensorFlow\n- **Platform**: Coursera\n- **Project Type**: Final Project with 10 Required Tasks\n\n## Dataset\n\n- **Source**: Waste Classification Dataset\n- **Categories**: 2 classes (Organic = 0, Recyclable = 1)\n- **Structure**:\n  ```\n  o-vs-r-split/\n  ├── train/\n  │   ├── O/ (Organic waste images)\n  │   └── R/ (Recyclable waste images)\n  └── test/\n      ├── O/ (Organic test images)\n      └── R/ (Recyclable test images)\n  ```\n\n## Technical Approach\n\n### Transfer Learning Strategy\n1. **Base Model**: VGG16 pre-trained on ImageNet\n2. **Feature Extraction**: Frozen VGG16 layers + custom classifier\n3. **Fine-Tuning**: Unfreezing deeper layers for improved performance\n\n### Model Architecture\n- **Input**: 150x150x3 RGB images\n- **Base**: VGG16 (frozen/partially unfrozen)\n- **Classifier**: \n  - Flatten layer\n  - Dense(512) + ReLU + Dropout(0.3)\n  - Dense(512) + ReLU + Dropout(0.3)\n  - Dense(1) + Sigmoid (binary classification)\n\n## Implementation Tasks\n\nThe project is structured around 10 specific tasks required by the course:\n\n1. **Task 1**: Print TensorFlow version\n2. **Task 2**: Create test data generator\n3. **Task 3**: Print training generator length\n4. **Task 4**: Display model summary\n5. **Task 5**: Compile the model\n6. **Task 6**: Plot accuracy curves (extract features model)\n7. **Task 7**: Plot loss curves (fine-tuned model)\n8. **Task 8**: Plot accuracy curves (fine-tuned model)\n9. **Task 9**: Visualize predictions (extract features model)\n10. **Task 10**: Visualize predictions (fine-tuned model)\n\n## Key Features\n\n### Data Processing\n- **Image Augmentation**: Width/height shifts, horizontal flipping\n- **Normalization**: Pixel values scaled to [0,1]\n- **Batch Processing**: Batch size of 32\n\n### Training Configuration\n- **Epochs**: 10\n- **Validation Split**: 20%\n- **Optimizer**: RMSprop (learning rate: 1e-4)\n- **Loss Function**: Binary crossentropy\n\n### Callbacks\n- **Early Stopping**: Patience=4, monitoring validation loss\n- **Model Checkpoint**: Save best model based on validation loss\n- **Learning Rate Scheduler**: Exponential decay\n\n## Results\n\nThe project trains two models:\n\n1. **Extract Features Model**: Frozen VGG16 as feature extractor\n2. **Fine-Tuned Model**: Partially unfrozen VGG16 for better performance\n\nBoth models are evaluated on test data with classification reports and visual predictions.\n\n## Installation and Usage\n\n### Requirements\n```bash\npip install -r requirements.txt\n```\n\n### Running the Project\n```bash\npython waste_classification.py\n```\n\nThe script will:\n1. Download and extract the dataset automatically\n2. Train both models (extract features + fine-tuned)\n3. Generate loss/accuracy curves\n4. Evaluate models on test data\n5. Display sample predictions\n\n## File Structure\n\n```\n├── waste_classification.py    # Main implementation\n├── requirements.txt          # Python dependencies\n├── README.md                # This file\n└── saved_models/            # Trained model files (generated)\n    ├── O_R_tlearn_vgg16.keras\n    └── O_R_tlearn_fine_tune_vgg16.keras\n```\n\n## Learning Objectives Achieved\n\n✅ Applied transfer learning using VGG16 model for image classification  \n✅ Prepared and preprocessed image data for machine learning tasks  \n✅ Fine-tuned a pre-trained model to improve classification accuracy  \n✅ Evaluated model performance using appropriate metrics  \n✅ Visualized model predictions on test data  \n\n## Real-World Applications\n\nThis model can be applied to:\n- Municipal waste sorting facilities**\n- Industrial waste management**\n- Smart waste bins with automated sorting**\n- Environmental monitoring systems**\n\n## Course Completion\n\nThis project was completed as part of the IBM AI Engineering Professional Certificate program offered through Coursera. All 10 required tasks were implemented and tested according to the course specifications.\n\n## Author\n\nDeveloped as part of the IBM AI Engineering Professional Certificate coursework - Module 3: Building Deep Learning Models with TensorFlow.\n\n## License\n\nThis project is for educational purposes as part of the IBM AI Engineering Professional Certificate coursework.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherwanali0%2Fwaste-classification-transfer-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsherwanali0%2Fwaste-classification-transfer-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherwanali0%2Fwaste-classification-transfer-learning/lists"}