# ☕ Coffee Brewing Level Prediction Based on Spectroscopy Data Using Deep Learning

This repository contains the complete pipeline for a thesis project that predicts **coffee brewing levels** using **spectroscopy data** and **deep learning models**, later deployed on a **Raspberry Pi** with a real-time interface using **OLED display** and a **physical button**.

---

## 📚 Description

The goal of this project is to classify brewed coffee into categories such as **Underdeveloped**, **Ideal**, or **Bitter**, based on spectral data obtained using the **AS7265x spectroscopy sensor**. A deep learning model is trained using Python and TensorFlow, then converted into **TensorFlow Lite** and deployed on a physical prototype for real-time prediction.

---

## 🧪 Data Collection

- **Sensor**: [AS7265x Triad Spectral Sensor](https://www.adafruit.com/product/3779)
- **Platform**: Raspberry Pi
- **Categories**: Coffee brewing levels
- **Format**: Raw 18-channel spectral data saved in `.csv` format

---

## 🧠 Modeling

### Main Libraries for Modeling:
- `pandas`: data manipulation and preprocessing  
- `seaborn`: data visualization and EDA  
- `tensorflow`: deep learning model training and conversion to `.tflite`  
- `numpy`: numerical operations  

---

## 📟 Prototype Deployment

A physical prototype is built using:

- **Raspberry Pi**
- **AS7265x Spectroscopy Sensor**
- **SSD1306 OLED Display**
- **Push Button**
- **TensorFlow Lite Interpreter**