Case study · Computer vision

Waste Classification with EfficientNet-B0

Sorting waste into recyclable, organic, and other categories from images.

Problem

Recycling still depends heavily on manual sorting. The goal here was to classify waste into recyclable, organic, and other categories from images, so that automated separation systems can reduce landfill waste and support more sustainable handling.

Approach

The classifier uses transfer learning on EfficientNet-B0 pre-trained on ImageNet. The convolutional base is frozen and a small classification head is trained on the waste categories, with standard preprocessing and augmentation applied to the images.

Data & inputs

  • Images resized to 224×224 pixels
  • Three categories: recyclable, organic, and other
  • A 70 / 15 / 15 split for training, validation, and testing

Methods & models

# Load EfficientNetB0 model
base_model = EfficientNetB0(include_top=False, input_shape=(224, 224, 3), weights='imagenet')

# Freeze the base
for layer in base_model.layers:
    layer.trainable = False

# Add custom classification head
model = tf.keras.Sequential([
    base_model,
    tf.keras.layers.GlobalAveragePooling2D(),
    tf.keras.layers.Dense(128, activation='relu'),
    tf.keras.layers.Dropout(0.3),
    tf.keras.layers.Dense(3, activation='softmax')
])

# Compile and train
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
model.fit(train_data, epochs=10, validation_data=val_data)

Results

The model reached ~94% accuracy on the held-out test set, with precision, recall, and F1-scores above 90% in each category.

Why it matters

A lightweight, reasonably accurate classifier is a practical building block for automated waste sorting — the kind of tool that can make recycling faster and reduce how much recyclable material ends up in landfill.

Tools & technologies

Python TensorFlow EfficientNet-B0 OpenCV NumPy Pandas

Figures

Selected visualizations

Excerpts from the analysis. Full notebook and high-resolution charts are in the repository.

Class distribution

Balance across the three waste categories.

Class distribution across waste categories

Image dimensions

Original size distribution before resizing to 224×224.

Image dimension distribution

Dataset split

70 / 15 / 15 train, validation, and test sets.

Dataset split visualization

Training progress

Training and validation metrics across epochs.

Training history graphs

Classification report

Precision, recall, and F1 per category.

Classification metrics

Confusion matrix

Prediction accuracy across classes.

Confusion matrix

Sample predictions

Example classifications with confidence.

Prediction examples

Code & links

  • GitHub repository — full Jupyter notebook, training logs, and high-resolution visualizations.