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 <mailto: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.