AI Mahjong Scorer

The bridge between physical tiles and digital accuracy using Computer Vision.


Precision Scoring & Vision

Mahjong is a game of immense strategic depth, but manual scoring—especially with complex Hong Kong rules—can be prone to errors and fatigue. This project integrates OpenCV image recognition with a robust Django-based scoring engine to automate the entire process.

🤖 AI Computer Vision Pipeline

Using custom-trained asset matching and refined PSNR algorithms, the Scorer can detect a full 14-tile winning hand from a single snapshot. It segments the tiles, identifies suits and values, and reconstructs the hand in a digital workspace for instant fan calculation.

Key Architectural Features:

  • Subdomain Segregation: Fully operational at mahjong.prodivinia.com.
  • Standard Rules: Comprehensive Rules & Scoring Guide integrated.
  • Automated HK Ruleset: Instant calculation of Fan points, including Dealer/Non-Dealer payment distributions.
  • Historical Audit Trail: Full hand snapshots stored in JSON format for review during and after the session.
  • Premium Glassmorphic UI: A high-contrast, modern dashboard designed for use in any lighting condition.