Zing Forum

Reading

Intelligent Garbage Classification System Based on Deep Learning: A Comparative Study of CNN and MLP

This article introduces a computer vision project from the Fundamentals of Artificial Intelligence course at the University of Gdansk, comparing the performance of Convolutional Neural Networks (CNN) and Multi-Layer Perceptrons (MLP) in garbage classification tasks, and exploring the application of deep learning in the environmental protection field.

垃圾分类计算机视觉CNN卷积神经网络MLP深度学习环保AI图像分类回收自动化PyTorch
Published 2026-05-27 17:41Recent activity 2026-05-27 17:51Estimated read 8 min
Intelligent Garbage Classification System Based on Deep Learning: A Comparative Study of CNN and MLP
1

Section 01

Introduction: Garbage Classification AI Project at the University of Gdansk (CNN vs MLP)

This article introduces an open-source project from the Fundamentals of Artificial Intelligence course at the University of Gdansk in Poland, comparing the performance of Convolutional Neural Networks (CNN) and Multi-Layer Perceptrons (MLP) in garbage classification tasks, and exploring the application of deep learning in the environmental protection field. The project was published on GitHub by kwerulik with the original title Computer-Vision-Waste-Classification, aiming to provide technical support for automated recycling processes.

2

Section 02

Project Background and Significance

With the increasing global awareness of environmental protection, garbage classification has become a key link in urban sustainable development. However, manual classification is inefficient and error-prone, creating an urgent need for automation. As an AI course assignment, the core goal of this project is to build and evaluate garbage image classification models. Although it is an academic project, its design and implementation have reference value for industrial applications.

3

Section 03

Technical Solution Comparison: CNN vs MLP

Convolutional Neural Network (CNN)

CNN automatically extracts spatial features through convolutional layers, reduces dimensionality via pooling layers, and performs classification using fully connected layers. Its advantages include automatic feature extraction, parameter sharing, translation invariance, and hierarchical representation, enabling it to learn visual features of garbage (such as plastic texture and paper grain).

Multi-Layer Perceptron (MLP)

MLP flattens images into one-dimensional vectors for input, ignoring spatial structure. However, it is simple to implement and fast to train, serving as a baseline model to help understand the performance improvement of CNN and having educational value.

4

Section 04

Project Structure and Implementation Details

The project repository includes:

  • ML_Projekt_CNN.ipynb (CNN implementation notebook)
  • ML_Projekt_MLP.ipynb (MLP implementation notebook)
  • results_CNN/ and results_MLP/ (training results and evaluation metrics)
  • Klasyfikacja odpadów.pdf (Polish project report)
  • ML_FInal.mov (demonstration video)

The structure follows good experimental management practices with separate code, data, and results, facilitating reproducibility and analysis.

5

Section 05

Technical Challenges in Garbage Classification

  • Inter-class similarity: For example, transparent plastic bottles and glass bottles, white paper and plastic are difficult to distinguish;
  • Intra-class diversity: Garbage of the same category (e.g., paper) varies in shape and texture;
  • Lighting and angle: Changes in lighting and shooting angles in real scenarios affect features;
  • Occlusion and stacking: Stacked garbage with occlusions increases recognition difficulty.
6

Section 06

Academic Value and Educational Significance

As a course project, its value lies in:

  • Integration of theory and practice: Intuitively understanding that convolutional layers are suitable for image tasks and fully connected layers lose spatial information;
  • Experimental design ability: Cultivating scientific thinking in controlling variables, setting controls, and quantitative evaluation;
  • Complete project workflow: Experiencing the full lifecycle from data preparation, model building, training and debugging to result analysis;
  • Result visualization: Displaying code, results, and explanations through notebooks, which conforms to the standard working method of data science.
7

Section 07

Potential Improvement Directions

The project can be expanded in the following directions:

  • Data augmentation: Rotation, flipping, scaling, etc., to expand dataset diversity;
  • Transfer learning: Fine-tuning using ImageNet pre-trained models (e.g., ResNet);
  • Model integration: Combining multiple models' predictions to improve accuracy;
  • Real-time inference optimization: Converting to TensorRT/ONNX format for deployment on edge devices;
  • Deployment solutions: Developing web/app applications or integrating into smart trash bin hardware.
8

Section 08

Summary and Social Value of Environmental AI

This open-source project is not large in scale, but it embodies the typical paradigm of deep learning education projects (clear problem definition, comparative experiments, complete documentation), making it a good reference case for computer vision beginners.

Social value of deploying environmental AI systems:

  • Improve recycling efficiency and reduce manual intervention;
  • Reduce classification errors and cross-contamination;
  • Educate the public on correct classification;
  • Accumulate data to analyze garbage composition trends;
  • Save labor costs in the long run.

We look forward to such projects moving from academic prototypes to practical applications, contributing to sustainable development.