Smart Dishware Detection System

by ArtemSaltanovskyi in Circuits > Raspberry Pi

29 Views, 0 Favorites, 0 Comments

Smart Dishware Detection System

photo_2025-06-15 19.40.45.jpeg
photo_2025-06-15 19.40.44.jpeg
photo_2025-06-15 19.40.47.jpeg
photo_2025-06-15 19.40.49.jpeg

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

photo_2025-06-17 14.29.07.jpeg
photo_2025-06-17 14.29.09.jpeg

Hardware

  1. Raspberry Pi 5 (kit) - 129,95 €
  2. MicroSD card (16 GB+) - 3,49
  3. Raspberry Pi power supply - (in kit)
  4. USB Camera - 11,99 €
  5. Raspberry Pi-compatible LCD display (e.g., 3.5" GPIO touch screen) - (in kit)
  6. Jumper wires and breadboard - (in kit)
  7. Wooden/plastic enclosure with slots - (laser-cut or handmade)


Software

  1. Raspberry Pi OS (64-bit)
  2. Python 3.10+
  3. OpenCV
  4. Ultralytics (for YOLOv8)
  5. Numpy
  6. gpiozero
  7. Your YOLO model (best.pt)
  8. Python script

Dataset Collection

photo_2025-06-12 09.29.57.jpeg
photo_2025-06-12 09.30.17.jpeg
photo_2025-06-12 09.32.10.jpeg
photo_2025-06-12 09.42.58.jpeg

I took and found photos of various plates and glasses in 6 categories:

  1. Full plate
  2. Finished plate
  3. Dirty plate
  4. Empty plate
  5. Full glass
  6. Empty glass

Photos were taken under consistent lighting and labeled manually.

Images were used to train a YOLOv8 model for real-time object classification.

Model Training

Screenshot 2025-06-17 at 14.43.20.png

Used YOLOv8 via Ultralytics framework.

Annotation tools - Roboflow.

Training pipeline:

  1. Image preprocessing
  2. Model training (ultralytics/yolo)
  3. Exported weights as best.pt

Installation

Screenshot 2025-06-17 at 16.31.23.png
  1. Clone the repository: git clone https://github.com/howest-mct/2024-2025-projectone-ctai-SaltanovskyiArtem cd 2024-2025-projectone-ctai-SaltanovskyiArtem
  2. Create and activate a virtual environment (recommended): python3 -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
  3. Install the required Python packages: pip install -r requirements.txt
  4. For Raspberry Pi LCD support: pip install RPi.GPIO smbus2
  5. 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.)
  6. (Optional) Other hardware setup. Connect your Raspberry Pi, LCD, and other sensors according to your project documentation.


Results

Screenshot 2025-06-17 at 16.33.10.png

Confusion Matrix. Results of training.

What Happens?

photo_2025-06-17 12.51.55.jpeg
  1. The camera captures the plate or glass.
  2. The YOLOv8 model detects class.
  3. A bounding box (green, orange or red) is displayed.
  4. Results optionally saved in "detections.json"

Possible Errors

Screenshot 2025-06-17 at 16.46.56.png
  1. Camera not detected - сheck with lsusb, reboot Pi
  2. LСDs not lighting - сheck GPIO pin numbers and wiring
  3. Bounding box not showing - сheck if YOLO model loads correctly
  4. No display on LCD - Ensure drivers are installed and display is connected properly

Additional Value

photo_2025-06-12 09.29.40.jpeg
photo_2025-06-12 09.30.05.jpeg
photo_2025-06-12 09.31.57.jpeg
photo_2025-06-12 09.33.55 (1).jpeg
photo_2025-06-12 09.34.44.jpeg
photo_2025-06-12 09.35.13.jpeg

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.