{"id":24708452,"url":"https://github.com/tanishq-ctrl/waste-classification","last_synced_at":"2025-03-22T06:14:37.662Z","repository":{"id":272892906,"uuid":"918081810","full_name":"tanishq-ctrl/waste-classification","owner":"tanishq-ctrl","description":"A deep learning-based web application that classifies different types of waste materials using computer vision. The system helps in proper waste segregation by identifying whether an item belongs to categories like cardboard, glass, metal, paper, plastic, or trash.","archived":false,"fork":false,"pushed_at":"2025-01-17T09:57:11.000Z","size":6690,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T06:34:50.287Z","etag":null,"topics":["computer-vision","deep-learning","environmental","flask","image-classification","keras","mobilenetv2","sustainability","tensorflow","transfer-learning","waste-management","waste-management-system","web-application"],"latest_commit_sha":null,"homepage":"https://github.com/tanishq-ctrl/waste-classification","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/tanishq-ctrl.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":"2025-01-17T08:05:56.000Z","updated_at":"2025-01-23T16:50:40.000Z","dependencies_parsed_at":"2025-01-17T09:40:56.331Z","dependency_job_id":null,"html_url":"https://github.com/tanishq-ctrl/waste-classification","commit_stats":null,"previous_names":["tanishq-ctrl/waste-classification"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanishq-ctrl%2Fwaste-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanishq-ctrl%2Fwaste-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanishq-ctrl%2Fwaste-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanishq-ctrl%2Fwaste-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanishq-ctrl","download_url":"https://codeload.github.com/tanishq-ctrl/waste-classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913324,"owners_count":20530817,"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":["computer-vision","deep-learning","environmental","flask","image-classification","keras","mobilenetv2","sustainability","tensorflow","transfer-learning","waste-management","waste-management-system","web-application"],"created_at":"2025-01-27T06:32:05.028Z","updated_at":"2025-03-22T06:14:37.637Z","avatar_url":"https://github.com/tanishq-ctrl.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗑️ Waste Management Classification System\n\n[![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)](https://www.python.org)\n[![TensorFlow](https://img.shields.io/badge/TensorFlow-2.10+-orange.svg)](https://tensorflow.org/)\n[![Flask](https://img.shields.io/badge/Flask-2.0+-green.svg)](https://flask.palletsprojects.com/)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Accuracy-98%25-success\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Status-Active-success\"/\u003e\n\u003c/div\u003e\n\n---\n\nA deep learning-based web application that classifies different types of waste materials using computer vision. The system helps in proper waste segregation by identifying whether an item belongs to categories like cardboard, glass, metal, paper, plastic, or trash.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/tanishq-ctrl/waste-classification/blob/main/static/WASTE-ezgif.com-video-to-gif-converter.gif\" alt=\"Waste Management demo\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e🎯 Categories\u003c/h3\u003e\n  \u003ccode\u003eCardboard\u003c/code\u003e • \u003ccode\u003eGlass\u003c/code\u003e • \u003ccode\u003eMetal\u003c/code\u003e • \u003ccode\u003ePaper\u003c/code\u003e • \u003ccode\u003ePlastic\u003c/code\u003e • \u003ccode\u003eTrash\u003c/code\u003e\n\u003c/div\u003e\n\n## ✨ Features\n\n- 🚀 Real-time waste classification using deep learning\n- 🌐 Web-based user interface for easy interaction\n- 📸 Support for common image formats (PNG, JPG, JPEG)\n- ⚡ Instant classification results with visual feedback\n\n## 🛠️ Technology Stack\n\n- **Backend**: \n  - ![Python](https://img.shields.io/badge/Python-3776AB?style=flat\u0026logo=python\u0026logoColor=white) \n  - ![Flask](https://img.shields.io/badge/Flask-000000?style=flat\u0026logo=flask\u0026logoColor=white)\n- **Deep Learning**: \n  - ![TensorFlow](https://img.shields.io/badge/TensorFlow-FF6F00?style=flat\u0026logo=tensorflow\u0026logoColor=white)\n  - ![Keras](https://img.shields.io/badge/Keras-D00000?style=flat\u0026logo=keras\u0026logoColor=white)\n- **Frontend**: \n  - ![HTML5](https://img.shields.io/badge/HTML5-E34F26?style=flat\u0026logo=html5\u0026logoColor=white)\n  - ![CSS3](https://img.shields.io/badge/CSS3-1572B6?style=flat\u0026logo=css3\u0026logoColor=white)\n\n## 🧠 Model Architecture\n\nThe waste classification model is built using transfer learning with MobileNetV2 as the base model:\n\n1. 🏗️ **Base Model**: Pre-trained MobileNetV2 on ImageNet\n2. 🔄 **Fine-tuning**: Last 50 layers unfrozen for training\n3. ➕ **Additional Layers**:\n   ```\n   ├── Global Average Pooling\n   ├── Dense Layer (128 units, ReLU)\n   ├── Dropout (0.6)\n   └── Output Layer (6 units, Softmax)\n   ```\n\n## 📊 Model Training\n\n- 🖼️ **Input Image Size**: 128x128 pixels\n- 📦 **Batch Size**: 32\n- 🎯 **Training Strategy**:\n  ```\n  ├── Data augmentation (rotation, shift, shear, zoom, flip)\n  ├── Learning rate scheduling with exponential decay\n  ├── L2 regularization\n  └── Class weight balancing\n  ```\n- 📈 **Training Results**:\n  - Training Accuracy: ![98%](https://img.shields.io/badge/98%25-success)\n  - Validation Accuracy: ![75%](https://img.shields.io/badge/75%25-yellow)\n\n## 📁 Project Structure\n\n```\nwaste_management/\n├── 🌐 app.py                 # Flask application\n├── 🛠️ utils.py              # Utility functions\n├── 📓 WASTE_MANAGEMENT.ipynb # Model training notebook\n├── 📂 static/\n│   ├── 🎨 css/\n│   │   └── style.css        # Custom styling\n│   └── 📤 uploads/          # Image upload directory\n└── 📂 templates/\n    ├── 🏠 index.html        # Home page\n    └── 📊 result.html       # Results page\n```\n\n### 📸 Dataset Overview\n\n- **Total Images**: ![2527 Images](https://img.shields.io/badge/2527-Images-informational)\n- **Image Format**: ![JPG](https://img.shields.io/badge/Format-JPG-yellow)\n- **Resolution**: ![128x128](https://img.shields.io/badge/128×128-pixels-success)\n\n### 🗂️ Category Distribution\n\n```\ndataset-resized/\n├── 📦 cardboard/  │  403 images  │  ████████░░░░░░░░░░  │  15.7%\n├── 🔍 glass/      │  501 images  │  ██████████░░░░░░░░  │  19.5%\n├── ⚙️ metal/      │  410 images  │  ████████░░░░░░░░░░  │  15.9%\n├── 📄 paper/      │  594 images  │  ████████████░░░░░░  │  23.1%\n├── 🏷️ plastic/    │  482 images  │  █████████░░░░░░░░░  │  18.7%\n└── 🗑️ trash/      │  182 images  │  ███░░░░░░░░░░░░░░░  │   7.1%\n```\n\n### 💾 Getting the Dataset\n🔄 **From Kaggle**:\n   - Visit [TrashNet Dataset](https://www.kaggle.com/datasets/feyzazkefe/trashnet/data)\n   - Click 'Download' button\n   - Extract the downloaded archive\n\n## 🚀 Setup and Installation\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd waste_management\n```\n\n2. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n3. Run the application:\n```bash\npython app.py\n```\n\n4. Open your browser and navigate to `http://localhost:5000`\n\n## 📱 Usage\n\n1. 🌐 Access the web interface through your browser\n2. 📤 Upload an image of the waste item you want to classify\n3. ✨ Click submit to get the classification result\n4. 📊 View the predicted category and confidence score\n\n## 🔬 Model Training Process\n\nThe model was trained using transfer learning on MobileNetV2:\n\n1. 📥 **Data Preparation**:\n   ```\n   ├── Dataset split: 80% training, 20% validation\n   ├── Image resizing to 128x128 pixels\n   └── Data augmentation for better generalization\n   ```\n\n2. ⚙️ **Training Configuration**:\n   ```\n   ├── Optimizer: Adam with learning rate scheduling\n   ├── Loss function: Categorical Cross-entropy\n   ├── Metrics: Accuracy\n   └── Epochs: 50\n   ```\n\n3. 🎯 **Performance Optimization**:\n   ```\n   ├── Dropout for reducing overfitting\n   ├── L2 regularization\n   └── Class weight balancing\n   ```\n   \n### 🏷️ Topics\n### 🏷️ Topics\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- AI/ML Topics --\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Computer_Vision-FF6B6B?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Deep_Learning-4834D4?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Image_Classification-6C5CE7?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Transfer_Learning-A8E6CF?style=flat-square\"/\u003e\n  \n  \u003c!-- Frameworks \u0026 Technologies --\u003e\n  \u003cimg src=\"https://img.shields.io/badge/MobileNetV2-FFA62B?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TensorFlow-FF6F00?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Keras-D00000?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Flask-000000?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Web_Application-2D98DA?style=flat-square\"/\u003e\n  \n  \u003c!-- Domain Specific --\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Waste_Management-45B649?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Environmental-3BB273?style=flat-square\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Sustainability-00A896?style=flat-square\"/\u003e\n\u003c/div\u003e\n\n## 🤝 Contributing\n\nFeel free to submit issues, fork the repository, and create pull requests for any improvements.\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  Made with ❤️ for a cleaner 🌍\n\u003c/div\u003e \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanishq-ctrl%2Fwaste-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanishq-ctrl%2Fwaste-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanishq-ctrl%2Fwaste-classification/lists"}