Introduction: Smart Dishware Detection System
This project presents an AI-based system for detecting when a plate or glass needs to be replaced. It uses a camera and YOLO object detection to classify items into categories such as Dirty Plate, Empty Glass, or Finished Plate.
I created this system to help automate hygiene control in settings like restaurants, kitchens, or self-service areas — where quick turnaround of clean dishware is essential. Upon detecting specific classes, the system plays a quiet audio alert, notifying staff that a replacement is needed.
Supplies
Hardware
- Raspberry Pi 5 (kit) - 129,95 €
- MicroSD card (16 GB+) - 3,49€
- Raspberry Pi power supply - (in kit)
- USB Camera - 11,99 €
- Raspberry Pi-compatible LCD display (e.g., 3.5" GPIO touch screen) - (in kit)
- Jumper wires and breadboard - (in kit)
- Wooden/plastic enclosure with slots - (laser-cut or handmade)
Software
- Raspberry Pi OS (64-bit)
- Python 3.10+
- OpenCV
- Ultralytics (for YOLOv8)
- Numpy
- gpiozero
- Your YOLO model (best.pt)
- Python script
Step 1: Dataset Collection
I took and found photos of various plates and glasses in 6 categories:
- Full plate
- Finished plate
- Dirty plate
- Empty plate
- Full glass
- Empty glass
Photos were taken under consistent lighting and labeled manually.
Images were used to train a YOLOv8 model for real-time object classification.
Step 2: Model Training
Used YOLOv8 via Ultralytics framework.
Annotation tools - Roboflow.
Training pipeline:
- Image preprocessing
- Model training (ultralytics/yolo)
- Exported weights as best.pt
Step 3: Installation
- Clone the repository: git clone https://github.com/howest-mct/2024-2025-projectone-ctai-SaltanovskyiArtem cd 2024-2025-projectone-ctai-SaltanovskyiArtem
- Create and activate a virtual environment (recommended): python3 -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install the required Python packages: pip install -r requirements.txt
- For Raspberry Pi LCD support: pip install RPi.GPIO smbus2
- Download the trained model weights Place your YOLOv8 .pt model file (e.g. best.pt) in the appropriate folder: AI/model/best.pt (If the file is too large for GitHub, download it manually from the provided link and place it in this directory.)
- (Optional) Other hardware setup. Connect your Raspberry Pi, LCD, and other sensors according to your project documentation.
Step 4: Results
Confusion Matrix. Results of training.
Step 5: What Happens?
- The camera captures the plate or glass.
- The YOLOv8 model detects class.
- A bounding box (green, orange or red) is displayed.
- Results optionally saved in "detections.json"
Step 6: Possible Errors
- Camera not detected -сheck with lsusb, reboot Pi
- LСDs not lighting -сheck GPIO pin numbers and wiring
- Bounding box not showing - сheck if YOLO model loads correctly
- No display on LCD - Ensure drivers are installed and display is connected properly
Step 7: Additional Value
This system helps maintain cleanliness in food service environments by providing timely feedback about dishware condition. It minimizes manual checks, saves time, and supports automation in hygiene control — making it ideal for restaurants, cafeterias, or smart kitchen appliances.

