{"id":23084740,"url":"https://github.com/bin-detective/bindetective-ml","last_synced_at":"2026-04-12T07:33:32.046Z","repository":{"id":264035647,"uuid":"892160888","full_name":"Bin-Detective/bindetective-ml","owner":"Bin-Detective","description":"This repository provides the machine learning models for the Bin Detective app, designed to classify waste into 10 categories. It includes model details, training documentation, and dataset information to support waste classification tasks.","archived":false,"fork":false,"pushed_at":"2024-12-12T16:31:40.000Z","size":17170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main-efficientnetv2s","last_synced_at":"2025-06-05T07:36:39.786Z","etag":null,"topics":["cnn","efficientnet","keras","resnet","tensorflow"],"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/Bin-Detective.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}},"created_at":"2024-11-21T16:01:48.000Z","updated_at":"2024-12-12T16:31:44.000Z","dependencies_parsed_at":"2025-05-29T06:42:38.660Z","dependency_job_id":null,"html_url":"https://github.com/Bin-Detective/bindetective-ml","commit_stats":null,"previous_names":["bin-detective/bindetective-ml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bin-Detective/bindetective-ml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bin-Detective%2Fbindetective-ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bin-Detective%2Fbindetective-ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bin-Detective%2Fbindetective-ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bin-Detective%2Fbindetective-ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bin-Detective","download_url":"https://codeload.github.com/Bin-Detective/bindetective-ml/tar.gz/refs/heads/main-efficientnetv2s","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bin-Detective%2Fbindetective-ml/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267600240,"owners_count":24113740,"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-07-28T02:00:09.689Z","response_time":68,"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":["cnn","efficientnet","keras","resnet","tensorflow"],"created_at":"2024-12-16T16:43:30.740Z","updated_at":"2025-10-11T16:08:52.710Z","avatar_url":"https://github.com/Bin-Detective.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# `Robin` BinDetective Waste Classification Model\n\n\nRobin is a model developed for waste classification, categorizing items into 10 distinct classes. The model has been fine-tuned using different architectures to find the best and optimal performance. Below, you’ll find links to specific branches for each model variant.\n\n---\n\n## **Available Models**\nEach model branch contains `model information`, `documentation`, `training and validation details`.\n\n| **Variant**         | **Branch**                                       | **Model**                                                                                 |\n|-------------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------------|\n| **EfficientNetV2S**| [main-efficientnetv2s](https://github.com/Bin-Detective/bindetective-ml/tree/main-efficientnetv2s) | [Kaggle](https://www.kaggle.com/models/bahiskaraananda/robin-efficientnetv2s)   |\n| **EfficientNetB0** | [efficientnetb0](https://github.com/Bin-Detective/bindetective-ml/tree/efficientnetb0)             | |\n| **ResNet50**       | [mango-resnet50](https://github.com/Bin-Detective/bindetective-ml/tree/mango-resnet50)             | [Kaggle](https://www.kaggle.com/models/bahiskaraananda/robin-resnet50)                 |\n\n\n## Classes\n1. buah_sayuran (Fruits/Vegetables): `Fruit/vegetable waste, peels, seeds`\n2. daun (Leaves): `Leaves, flowers, grass, garden waste`\n3. elektronik (Electronics): `Phones, pcb, cables, batteries, etc`\n4. kaca (Glass): `Glass bottles, broken glass`\n5. kertas (Paper): `Newspapers, cardboard, paper waste`\n6. logam (Metal): `Cans, forks, spoons`\n7. makanan (Food): `Food remnants, expired foods`\n8. medis (Medical): `Medical waste, masks, gloves, etc`\n9. plastik (Plastic): `Bottles, straw, plastic bags, etc`\n10. tekstil (Textile): `Clothes, fabric`\n\n## Datasets\n```bash\nrobin-base/\n├── train/\n│   ├── buah_sayuran/\n│   ├── daun/\n│   ├── elektronik/\n│   └── ...\n├── val/\n│   ├── buah_sayuran/\n│   ├── daun/\n│   ├── elektronik/\n│   └── ...\n└── test/\n    ├── buah_sayuran/\n    ├── daun/\n    ├── elektronik/\n    └── ...\n```\nThe dataset is balanced with a 1:1 ratio for each class and split into `70/20/10` for training, validation, and testing, consisting of 30,000 images in total.\n- Training: `20990 images`\n- Validation: `6000 images`\n- Test: `3010 images`\n- \u003ca href='https://www.kaggle.com/datasets/bahiskaraananda/robin-base' target='_blank'\u003erobin-datasets\u003c/a\u003e\n- \u003ca href='https://github.com/Bin-Detective/bindetective-ml/blob/main/robin-lite-dataset-preparation.ipynb/' target='_blank'\u003epreprocessing-documentation\u003c/a\u003e\n\n## Model Details\n- Base model: `EfficientNetV2S (pretrained on ImageNet)`\n- Frozen Layers: `Initial layers up to block 143 (block4f_bn)`\n- Custom layers: `Global Average Pooling, Dropout (0.5), Dense (10 classes, softmax)`\n- Input size: `224,224,3`\n- Optimizer: `Adam`\n- Loss: `Categorical Crossentropy`\n```bash\nTotal params: 20344170 (77.61 MB)\nTrainable params: 18468850 (70.45 MB)\nNon-trainable params: 1875320 (7.15 MB)\n```\n- \u003ca href='https://www.kaggle.com/models/bahiskaraananda/robin-efficientnetv2s' target='_blank'\u003erobin-efficientnetv2s-model\u003c/a\u003e\n- \u003ca href='https://github.com/Bin-Detective/bindetective-ml/blob/main-efficientnetv2s/notebook/robin-efficientnetv2s-finetuned.ipynb' target='_blank'\u003erobin-efficientnetv2s-training-documentation\u003c/a\u003e\n\n## Performance\nThe current `robin_efficientnetv2s` test accuracy and performance metrics for each class are as follows:\n```bash\n              precision    recall  f1-score   support\nbuah_sayuran       0.95      0.91      0.93       301\n        daun       0.98      0.98      0.98       301\n  elektronik       0.99      0.98      0.99       301\n        kaca       0.94      0.97      0.95       301\n      kertas       0.96      0.96      0.96       301\n       logam       0.94      0.97      0.95       301\n     makanan       0.91      0.95      0.93       301\n       medis       0.97      0.97      0.97       301\n     plastik       0.95      0.89      0.92       301\n     tekstil       0.99      0.99      0.99       301\n\n    accuracy                           0.96      3010\n   macro avg       0.96      0.96      0.96      3010\nweighted avg       0.96      0.96      0.96      3010\n```\nConfusion matrix:\n\n![image](https://github.com/user-attachments/assets/fabef82f-e42a-43af-9a0e-7c9dd1a41bb8)\n\n## Requirements\n- TensorFlow `2.15`\n- Python `3.x`\n- Keras\n- NumPy\n\n## Workflow\nHere’s a simple explanation of the workflow for the Robin model:\n```plaintext\n+-------------------+        +-----------------------------+        +-----------------------------+\n| Collect Dataset   | -----\u003e | Preprocess Dataset          | -----\u003e | Model Development           |\n| (30000+ images)   |        | - Resize images to 224x224  |        | - Select base architecture  |\n+-------------------+        | - Normalize pixel values    |        | - Load pretrained weights   |\n                             | - Balance each dataset      |        | - Freeze initial layers     |\n                             |   class (1:1)               |        | - Add custom layers         |\n                             | - Split into Train/Val/Test |        | - Compile with optimizer    |\n                             |   (70/20/10 ratio)          |        |   and loss function         |\n                             +-----------------------------+        +-----------------------------+\n                                                                                    |\n                                                                                    v\n                             +-----------------------------+        +------------------------------+\n                             | Model Evaluation            | \u003c----- | Model Training               |\n                             | - Test on 10% dataset       |        | - Train on 70% dataset       |\n                             | - Generate performance      |        | - Validate on 20% dataset    |\n                             |   metrics                   |        | - Fine-tune                  |\n                             +-----------------------------+        | - Save best-performing model |\n                                             |                      +------------------------------+\n                                             v\n                             +--------------------------------+\n                             | Troubleshoot                   |\n                             | - Adjust hyperparameters       |\n                             | - Fine-tune and analyze        |\n                             |   performance for improvements |\n                             +--------------------------------+\n                                             |\n                                             v\n                             +----------------------------------+\n                             | Deploy the Model                 |\n                             | - Save the model in TensorFlow   |\n                             |   SavedModel format              |\n                             | - Deploy the model using FastAPI |\n                             |   for waste classification       |\n                             +----------------------------------+\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbin-detective%2Fbindetective-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbin-detective%2Fbindetective-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbin-detective%2Fbindetective-ml/lists"}