{"id":27155481,"url":"https://github.com/muhammad-fiaz/swms","last_synced_at":"2026-05-06T02:39:08.596Z","repository":{"id":286616343,"uuid":"961964550","full_name":"muhammad-fiaz/SWMS","owner":"muhammad-fiaz","description":"An intelligent system to detect, classify, and analyze waste using AI-powered object detection and material composition prediction. This project combines YOLOS object detection with a custom-trained classifier to identify and categorize waste as degradable or non-degradable.","archived":false,"fork":false,"pushed_at":"2025-09-19T17:57:10.000Z","size":917,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-16T05:18:47.491Z","etag":null,"topics":["ewaste-management-system","machine-learning","open-source","pyqt","pyqt6","python","python-app","python3","pytorch","smart-waste-management-system","swms","tensorflow","waste-management-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muhammad-fiaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-07T12:52:13.000Z","updated_at":"2025-10-14T13:42:51.000Z","dependencies_parsed_at":"2025-04-07T14:23:05.191Z","dependency_job_id":"378a8b8a-517b-4aec-b792-3697463f9400","html_url":"https://github.com/muhammad-fiaz/SWMS","commit_stats":null,"previous_names":["muhammad-fiaz/swms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muhammad-fiaz/SWMS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2FSWMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2FSWMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2FSWMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2FSWMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhammad-fiaz","download_url":"https://codeload.github.com/muhammad-fiaz/SWMS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2FSWMS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282305939,"owners_count":26647741,"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-11-02T02:00:06.609Z","response_time":64,"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":["ewaste-management-system","machine-learning","open-source","pyqt","pyqt6","python","python-app","python3","pytorch","smart-waste-management-system","swms","tensorflow","waste-management-system"],"created_at":"2025-04-08T19:40:59.478Z","updated_at":"2025-11-02T15:02:06.612Z","avatar_url":"https://github.com/muhammad-fiaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/4a7266a0-105d-4555-8b6c-1462c03608de\" alt=\"preview\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e♻️ Smart Waste Management System (SWMS)\u003c/h1\u003e\n\n\nAn intelligent system to detect, classify, and analyze waste using AI-powered object detection and material composition prediction. This project combines YOLOS object detection with a custom-trained classifier to identify and categorize waste as degradable or non-degradable.\n\n---\n\n## 🚀 Features\n\n- 🧠 Object detection using YOLOS (Vision Transformer)\n- 📊 Predicts plastic, metal, and glass composition\n- 🔍 Classifies waste as **Degradable** or **Non-Degradable**\n- 📤 Simple drag-and-drop **GUI** using PyQt6\n- 📁 CLI support for training, single-image analysis, and GUI mode\n- 🧪 Easily extensible dataset-based training\n- ✅ MIT Licensed \u0026 open source\n\n---\n\n## 📦 Installation\n\n\u003e Requires Python 3.12+\n\n```bash\npip install -r requirements.txt\n```\n\nOr using [`pyproject.toml`](pyproject.toml):\n\n```bash\npip install .\n```\n\n---\n\n## 🛠️ Usage\n\n### 🔧 Train the model\n\nPlace your CSV files in `Datasets/` (e.g. `Datasets/data1.csv`), then:\n\n```bash\npython detect.py --train\n```\n\n### 🖼️ Analyze an image via GUI\n\n```bash\npython detect.py --gui\n```\n\n### 🖼️ Analyze an image via command-line\n\n```bash\npython detect.py --image path/to/image.jpg\n```\n\n---\n\n## 📁 Dataset Format for Training\n\nCSV files should be like:\n\n```csv\nlabel,plastic,metal,glass\nphone,42,38,20\nbottle,100,0,0\n```\n\n- `label`: The item name (must match YOLOS labels; you can list them by running `python detection_items.py`)\n- `plastic`, `metal`, `glass`: Composition percentages (should sum to ~100).\n\n---\n\n## 🧠 Model\n\n- **Object Detection**: `hustvl/yolos-base` (transformers)\n- **Composition Predictor**: PyTorch feed-forward model trained from CSV data\n- **File Format**: `.safetensors`\n\n---\n\n## 📸 Project Structure\n\n```text\nassets/\n    └── logo.png    # Logo image\ndatasets/           # Dataset folder\n    └── data1.csv   # dataset example 1\n    └── data2.csv   # dataset example 2\n.gitignore          # Git ignore file\ndetect.py           # main detection script\nLICENSE             # License file\npyproject.toml      # Project metadata\nREADME.md           # Project documentation\nuv.lock             # Dependency lock file\nrequirements.txt    # Python dependencies\nlabel2idx.json      # Encoded label mappings (used by the model)\nmodel.safetensors   # Trained model weights\n```\n\n## 📊 Output Report Example\n\n```\nDetected Items 1 in image.jpg:\n- cell phone\n\nEstimated Recyclable Components:\nPlastic: 42%\nMetal: 38%\nGlass: 20%\n\n♻️ Waste Classification:\n✅ Degradable Waste: 0% \n❗ Non-Degradable Waste: 100%\n----------------------------------------\n```\n\n---\n\n## 🪪 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## 🤝 Contributing\n\nPull requests are welcome! For major changes, please open an issue first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammad-fiaz%2Fswms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammad-fiaz%2Fswms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammad-fiaz%2Fswms/lists"}