Seanneskie
All projects
1/1
AI Coin Detector Screenshot (1/1)

AI Coin Detector

March 2024 - May 2025Kimberly Baylon, Jeric Aminola, Bridget Jose, Azlan Tomindug

A browser-based Philippine Peso coin detector and counter built with Django and Google Teachable Machine for an Introduction to AI course.

AIDjangoOpenCVGoogle Teachable MachineSchool ProjectPythonTensorFlow

Philippine Peso Coin Detector and Counter is a browser-based tool that uses a Google Teachable Machine vision model to detect and count modern Philippine coins from a live webcam feed. It recognizes ₱1, ₱5, ₱10, ₱20, and 25-centavos, then computes the running total. The project demonstrates how accessible no-code/low-code ML can solve real problems in currency handling, education, and accessibility.

As AI becomes more embedded in daily life, practical applications like coin recognition showcase how computer vision can assist users in routine tasks. This project leverages Google Teachable Machine to build an image classifier that distinguishes Philippine peso denominations and their obverse/ reverse faces. The focus is on quick identification and accurate summation, improving coin counting speed and supporting visually impaired users who may find the new coin series visually similar. The result is a deployable, web-first prototype that narrows the gap between complex ML and everyday users.

The system addresses key needs in efficiency (fast tallying of mixed coins),accuracy (reducing human error), and accessibility (assisting users who struggle to distinguish denominations). Beyond personal use, it maps well toself-service kiosks and vending machines, where reliable coin detection helps prevent fraud and ensures correct crediting. Using camera sensors for inference maintains speed while minimizing hardware cost and setup complexity.

The dataset consists of close-up images of legal tender coins captured by the team, including both front (obverse) and back (reverse) faces. Close-ups preserve fine features (text, ridges, bi-metallic rings) that are crucial for class separation. To improve model robustness, images were taken under varied angles and lighting; however, consistent backgrounds were preferred to reduce noise and focus the model on coin features rather than context.

  • Classes: 25¢, ₱1, ₱5, ₱10, ₱20 — each split into front and back.
  • Composition: Team-captured photos ensuring clear visibility of inscriptions, patterns, and color/bi-metallic cues.
  • Orientation: Mixed rotations and tilts to simulate real-world placement on flat surfaces and in-hand.
  • Background: Kept simple/clean to help the model discriminate coin features.

The target was ~100 samples per class where feasible. Training and testing sets were strictly separated: test images used different angles/lighting and were not seen during training. After evaluation, selected test samples were merged into training to incrementally improve the model (“train-validate-add” loop). Ongoing testing spanned several months, constrained by data scarcity for some denominations (e.g., ₱20, ₱10, 25¢).

The model was built with Teachable Machine using the platform's default image classification pipeline to prioritize stability and avoid over-tuning. Ten classes represent front/back faces for each denomination (see below). Default hyperparameters were chosen to reduce complexity risk and keep the training process reproducible for non-ML specialists.

  • Classes (10): ₱1 (Front/Back), ₱5 (Front/Back), ₱10 (Front/Back), ₱20 (Front/Back), 25¢ (Front/Back).
  • Epochs: 80
  • Batch Size: 16
  • Learning Rate: 0.00102
  • Runtime: Client-side inference in the browser via webcam feed, aggregating predictions to coin counts and total value.
  • 25 CENTS – Front / Back → value 0.25
  • 1 PESO – Front / Back → value 1
  • 5 PESO – Front / Back → value 5
  • 10 PESO – Front / Back → value 10
  • 20 PESO – Front / Back → value 20
  • Epochs: 80
  • Batch Size: 16
  • Learning Rate: 0.00102
  • Tuning Strategy: Use defaults to reduce overfitting risk and keep the model reproducible for classroom/extension use.

The team began with ~50 images per class and scaled upward as time allowed. Data scarcity for ₱20, ₱10, and 25¢ limited balance across classes, while bright lighting sometimes caused silver-tone misclassification—frequently pushing predictions toward ₱1 with high confidence. Contributing factors included lighting glare, similar reflectance across coins, and class imbalance.

Mitigations: capture closer shots, enforce consistent lighting, use plain backgrounds, collect more minority-class samples, and fold validated test images back into training. These steps improved differentiation, especially between silver denominations.

Test plans documented sample-by-sample outcomes, with a pass defined as a prediction confidence ≥ 60–70% (configurable threshold). Results were tracked against earlier model iterations to verify improvements. While no external benchmark was adopted, the previous model served as an internal baseline.

The model can be embedded in browser-based counters, kiosks, or vendor dashboards where coins are presented to a camera for verification and tallying. In banks/financial orgs, it can accelerate coin deposits; in vending machines, it can validate coins, reduce fraud, and ensure correct crediting. For public offices and NGOs, it can streamline coin handling during events and drives.

  • Retail & Consumer Services: Faster checkout/change handling, lower error rates, smoother end-of-day reconciliation.
  • Banking & Financial Institutions: Reliable coin deposits, customer self-service counters, improved back-office processing.
  • Charitable Organizations: Automated counting and categorization of coin donations to focus staff time on mission work.

Reliability & Accuracy: Model errors can impact user trust and finances. Careful dataset curation, calibration, and lighting control reduce misreads. Systems should include confidence thresholds and human-in-the-loop checks for edge cases and out-of-distribution samples (e.g., commemorative coins).

Security & Misuse: Datasets and models must be protected from tampering that could cause acceptance of counterfeit items. Simple UI safeguards (e.g., “hold steady” prompts, glare warnings) help manage user-side risk.

Job Displacement: Automating manual coin counting may shift some roles; organizations should plan for upskilling/reskilling and redeploy staff to higher-value tasks (reporting, analysis, customer care).