This project focuses on building and fine-tuning a Convolutional Neural Network (CNN) to classify waste into three categories: Food Waste, Mixed Recycling, and Trash. The ultimate goal is to improve waste sorting systems and promote sustainability by leveraging machine learning. The repository includes the base model, experiments with data augmentation, fine-tuning techniques, and a prototype design for an intelligent trash disposal station.
DS340-CNN-Project/
│
├── waste-images/ # Directory for training, validation, and test data
│ ├── train/ # Training dataset
│ ├── val/ # Validation dataset
│ └── test/ # Testing dataset
│
│
├── notebooks/ # Jupyter notebooks
│ └── GAN.ipynb # Exploratory Data Analysis
│ └── Experiments.ipynb # Model building and fine-tuning
│ └── synthetic_data.ipynb
├── model_predictions.html # Interactive HTML report of predictions
└── README.md # Project description and instructions
Ensure you have the following installed on your system:
- Python 3.7 or later
- TensorFlow 2.x
- Jupyter Notebook (optional, for running
.ipynb
files) - Required Python libraries (install using
requirements.txt
)
-
Clone the Repository
git clone https://github.com/Louie-Belile/DS340-CNN-Project.git cd DS340-CNN-Project
-
Prepare the Data Ensure the dataset is structured as follows:
data/ ├── train/ │ ├── food_waste/ │ ├── mixed_recycling/ │ └── trash/ ├── val/ │ ├── food_waste/ │ ├── mixed_recycling/ │ └── trash/ └── test/ ├── food_waste/ ├── mixed_recycling/ └── trash/
-
Run the Base Model Use the
main.py
script to train and evaluate the base model:python main.py
-
Explore Fine-Tuning Experiments Open the
model_fine_tuning.ipynb
notebook in Jupyter Notebook to explore experiments on hyperparameter tuning, data augmentation, and architecture adjustments:jupyter notebook notebooks/model_fine_tuning.ipynb
-
Evaluate the Model Evaluate the trained models on the test set using the provided scripts or the interactive
model_predictions.html
file. -
View Results Visualizations and metrics such as confusion matrices, training history, and predictions can be found in the
results/
folder.
- Base Model: A CNN trained with three convolutional layers and dropout regularization.
- Data Augmentation: Techniques like rotation, zoom, and brightness adjustment to improve generalization.
- Fine-Tuning: Experiments with dropout rates, learning rates, and model architecture adjustments.
- Interactive Results: View predictions and their confidence levels in the
model_predictions.html
file. - Prototype Design: Intelligent trash disposal system prototype included.
- The model achieves promising classification results, particularly in the underrepresented category of food waste, demonstrating the importance of addressing data imbalance.
- Fine-tuning experiments highlight potential avenues for improving performance in future iterations.
- Compressed Data can be found at this link -> https://drive.google.com/file/d/1mAlNb0658I-SeSv-pe9998w7bVPKi68u/view?usp=sharing