TRASHPRED: Waste Classification Model

Model Overview

TRASHPRED is a convolutional neural network (CNN) model designed to classify images of waste into categories such as plastic, metal, paper, glass, and organic materials. The model aims to assist in automated waste segregation systems by accurately identifying waste types from images.

Training Details

  • Framework: TensorFlow with Keras API
  • Architecture: Custom CNN with multiple convolutional and pooling layers
  • Dataset: Trained on a curated dataset of labeled waste images
  • Input Size: 224x224 RGB images
  • Optimization: Adam optimizer with categorical cross-entropy loss
  • Epochs: 25
  • Batch Size: 32

Performance Metrics

  • Training Accuracy: 95%
  • Validation Accuracy: 92%
  • Loss: Monitored using validation loss to prevent overfitting

Usage

To use the TRASHPRED model for inference:

import tensorflow as tf
from tensorflow.keras.preprocessing import image
import numpy as np

# Load the model
model = tf.keras.models.load_model('path_to_trashpred_model.h5')

# Load and preprocess the image
img = image.load_img('path_to_image.jpg', target_size=(224, 224))
img_array = image.img_to_array(img)
img_array = np.expand_dims(img_array, axis=0) / 255.0

# Predict
predictions = model.predict(img_array)
predicted_class = np.argmax(predictions, axis=1)

print(f"Predicted class: {predicted_class}")
Repository Structure

TRASHPRED/
β”œβ”€β”€ model/
β”‚   └── trashpred_model.h5
β”œβ”€β”€ datasets/
β”‚   β”œβ”€β”€ train/
β”‚   └── validation/
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ train.py
β”‚   └── evaluate.py
β”œβ”€β”€ README.md
πŸ“„ License
This project is licensed under the MIT License.

Author
Name: Sriram Rampelli

For more projects and information, visit Sriram Rampelli's GitHub Profile.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support