waste.md
ASCII text
title: Waste detection source-url: https://roundabout-host.com/roundabout/waste-detection topics: ["ai", "machine learning", "computer vision", "environment", "waste", "data", "yolo", "keras", "python", "agpl", "cc-by-sa", "cc-by-nc", "waste detection", "creative commons", "crowdsourcing"] ---
An YOLO model specifically trained to detect waste in images. We collected a custom dataset of waste, classified and annotated it, and trained the model using YOLOv8 on Keras. The model is able to detect the position and class of waste in images. It can separate the following classes of waste:
Plastic
Metal
Paper
Glass
Organic
Wood
Textile
Medical
Electronic
Other
There are actually over 90 classes, but they are grouped into these ones because there is only a small amount (in the 1-2 digits) of samples for each class. The model is able to detect multiple classes in the same image, or acknowledge that there is no waste in the image.
YOLO is used pretrained on the COCO dataset, and then fine-tuned on our dataset. This is until there are enough samples for each class to train the model from scratch.
Contributions are welcome. If you have a dataset of waste, please share it with us. We will annotate it (if it's not already) and train the model on it.
You don't need technical knowledge to contribute. If you can take photos with a phone and make a ZIP of them, you can contribute. If you can draw rectangles around objects with the mouse, you can contribute. If you can drop photos into folders corresponding to their class, you can contribute.
Of course, if you do have technical knowledge, you can help with the model training, testing, and optimisation. You can also improve the training code and better process the dataset.
Licence
Unless otherwise stated, the software (source code) in this repository is licenced under the GNU Affero General Public License,
with an additional permission in section 7 - basically an LAGPL.
A copy of the licence is located in the file LICENCE-GNU-AGPL.md
in this directory.
This program is free software, you can redistribute it and/or modify it under the terms of GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of or FITNESS FOR A PARTICULAR PURPOSE. See the General Public License for more details.
You should have received a copy of the the GNU Affero General Public License, along with this program. If not, see https://www.gnu.org/licenses/.
Additional permission under the GNU Affero GPL version 3 section 7:
If you modify this program, or any covered work, by linking or combining it with other code, such other code is not for that reason alone subject to any of the requirements of the GNU Affero GPL version 3.
Unless otherwise stated, the annotations in this repository are dual-licensed under either of these licences:
Creative Commons Attribution Share-Alike 4.0. To view a copy of this license, read the
LICENCE-CC-BY-SA.md
file, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.Creative Commons Attribution Non-Commercial 4.0. To view a copy of this license, read the
LICENCE-CC-BY-NC.md
file, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
You do not have to comply with the terms of both licences. Choose one and comply only with it.
The images in the repository are licensed depending on their source:
If the file name has the
original
prefix (or no prefix at all), the images are licenced under the same terms as the annotations (see above).If the file name has the
trash-detection
prefix, it comes from https://universe.roboflow.com/nora-slimani/trash-detection-otdmj and is licensed under Creative Commons Attribution 4.0.If the file name has the
ffml
prefix, it comes from https://www.kaggle.com/datasets/cristeaioan/ffml-dataset and is licensed under Creative Commons Attribution Share-Alike 4.0.If the file name has the
dwc
prefix, it comes from https://www.kaggle.com/datasets/arkadiyhacks/drinking-waste-classification and is public domain.If the file name has the
hitl
prefix, it comes from https://www.kaggle.com/datasets/humansintheloop/recycling-dataset and is public domain.
I hope I didn't infringe on any licences or miss any sources. If you think there is a problem, please send me an email at root@roundabout-host.com and I'll remove the infringing files.
The VIA application shipped in this repository (located at the /via
path) is licensed under the BSD licence.
Copyright (c) 2016-2021, Abhishek Dutta, Visual Geometry Group, Oxford University and VIA Contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1--- 2title: Waste detection 3source-url: https://roundabout-host.com/roundabout/waste-detection 4topics: ["ai", "machine learning", "computer vision", "environment", "waste", "data", "yolo", "keras", 5"python", "agpl", "cc-by-sa", "cc-by-nc", "waste detection", "creative commons", "crowdsourcing"] 6--- 7 8An YOLO model specifically trained to detect waste in images. We collected a custom dataset of waste, 9classified and annotated it, and trained the model using YOLOv8 on Keras. The model is able to detect 10the position and class of waste in images. It can separate the following classes of waste: 11 12* Plastic 13* Metal 14* Paper 15* Glass 16* Organic 17* Wood 18* Textile 19* Medical 20* Electronic 21* Other 22 23There are actually over 90 classes, but they are grouped into these ones because there is only 24a small amount (in the 1-2 digits) of samples for each class. The model is able to detect multiple 25classes in the same image, or acknowledge that there is no waste in the image. 26 27YOLO is used pretrained on the COCO dataset, and then fine-tuned on our dataset. This is until 28there are enough samples for each class to train the model from scratch. 29 30Contributions are welcome. If you have a dataset of waste, please share it with us. We will 31annotate it (if it's not already) and train the model on it. 32 33You don't need technical knowledge to contribute. If you can take photos with a phone and make 34a ZIP of them, you can contribute. If you can draw rectangles around objects with the mouse, 35you can contribute. If you can drop photos into folders corresponding to their class, you can 36contribute. 37 38Of course, if you do have technical knowledge, you can help with the model training, testing, and 39optimisation. You can also improve the training code and better process the dataset. 40 41Licence 42------- 43 44Unless otherwise stated, the software (source code) in this repository is licenced under the GNU Affero General Public License, 45with an additional permission in section 7 - basically an LAGPL. 46A copy of the licence is located in the file `LICENCE-GNU-AGPL.md` in this directory. 47 48> This program is free software, you can redistribute it and/or modify 49it under the terms of GNU Affero General Public License 50as published by the Free Software Foundation, either version 3 51of the License, or (at your option) any later version. 52> 53> This program is distributed in the hope that it will be useful, 54but WITHOUT ANY WARRANTY; without even the implied warranty of 55or FITNESS FOR A PARTICULAR PURPOSE. See the 56General Public License for more details. 57> 58> You should have received a copy of the the GNU Affero 59General Public License, along with this program. If not, see 60<https://www.gnu.org/licenses/>. 61> 62> ##### Additional permission under the GNU Affero GPL version 3 section 7: 63> If you modify this program, or any covered work, by linking or 64combining it with other code, such other code is not for that reason 65alone subject to any of the requirements of the GNU Affero GPL 66version 3. 67 68Unless otherwise stated, the annotations in this repository are dual-licensed under either of these licences: 69 70* [Creative Commons Attribution Share-Alike 4.0](https://creativecommons.org/licenses/by-sa/4.0/). 71To view a copy of this license, read the `LICENCE-CC-BY-SA.md` file, visit http://creativecommons.org/licenses/by-sa/4.0/ 72or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 73* [Creative Commons Attribution Non-Commercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/). 74To view a copy of this license, read the `LICENCE-CC-BY-NC.md` file, visit http://creativecommons.org/licenses/by-nc/4.0/ 75or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 76 77You do not have to comply with the terms of both licences. Choose one and comply only with it. 78 79The images in the repository are licensed depending on their source: 80 81* If the file name has the `original` prefix (or no prefix at all), the images are licenced under the same terms as the annotations (see above). 82* If the file name has the `trash-detection` prefix, it comes from https://universe.roboflow.com/nora-slimani/trash-detection-otdmj and is licensed under [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/). 83* If the file name has the `ffml` prefix, it comes from https://www.kaggle.com/datasets/cristeaioan/ffml-dataset and is licensed under [Creative Commons Attribution Share-Alike 4.0](https://creativecommons.org/licenses/by-sa/4.0/). 84* If the file name has the `dwc` prefix, it comes from https://www.kaggle.com/datasets/arkadiyhacks/drinking-waste-classification and is public domain. 85* If the file name has the `hitl` prefix, it comes from https://www.kaggle.com/datasets/humansintheloop/recycling-dataset and is public domain. 86 87I hope I didn't infringe on any licences or miss any sources. If you think there is a problem, 88please send me an email at <mailto:root@roundabout-host.com> and I'll remove the infringing files. 89 90The VIA application shipped in this repository (located at the `/via` path) is licensed under the BSD licence. 91> Copyright (c) 2016-2021, Abhishek Dutta, Visual Geometry Group, Oxford University and VIA Contributors. 92> All rights reserved. 93> Redistribution and use in source and binary forms, with or without 94modification, are permitted provided that the following conditions are met: 95> 96> Redistributions of source code must retain the above copyright notice, this 97list of conditions and the following disclaimer. 98> 99> Redistributions in binary form must reproduce the above copyright notice, 100this list of conditions and the following disclaimer in the documentation 101and/or other materials provided with the distribution. 102> 103> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 104AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 105IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 106ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 107LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 108CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 109SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 110INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 111CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 112ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 113POSSIBILITY OF SUCH DAMAGE. 114