/Mahjong-Detection

This project aims to train a real-time Mahjong object detection model to detect tile

Primary LanguageC

Real-time Mahjong Object Detection Model

Just for backup. May have some file miss. This project is just for fun. Not any official project in company or school.
Train Dataset and final trained weights are not provided in this repo.
Android project and its app are lost. The android project is referred to Tensorflow Lite Offcial object detection project. Just for testing the performance on mobile device.

Background

In Chinese New Year, people love playing Mahjong(麻雀) with their friends or relations. In Hong Kong Mahjong, players need to get at least 3 points to meet the win requirement. Some Points Calculator applications in Google Play exist and depend on manual input players’ tiles to calculate the points.

It is amazing to imagine a fast and convenient way – the user can take a photo and get the points number directly. This project aims to train a real-time Mahjong object detection model to solve the manual tile input problem.

Detail that may be helpful

In this project, Yolov3, Yolo-tiny v4 model is trained using Darknet.

------------- Content
Train Dataset 183 photos
Test Dataset 13 photos
Trained Model size(Yolov3) 274MB
Trained Model size(Yolo-tiny v4) 35MB

Result

Yolov3 vs Yolo-tinyv4 Yolov3 model size is too large(274MB). I can't believe a normal point calculator application has more than 200MB in size. Also, the mobile device will be very lag when running this model. But We can't deny that the accuracy is quite good. Yolo-tinyv4 has a lesser size. And Having good performance in mobile devices. But its accuracy is not high. It always has miss detection.

In colab

In real-time Android device

File

cudnn-10.0-linux-x64-v7.5.0.56.tgz
https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.5.0.56/prod/10.0_20190219/cudnn-10.0-linux-x64-v7.5.0.56.tgz

Reference

Export from chrome bookmarks

Custom Object Detection Using Tensorflow in Google Colab | by Matus Tanonwong | Medium
Step by Step: Build Your Custom Real-Time Object Detector | by Alaa Sinjab | Towards Data Science
Google colab 阻止自动掉线_chadqiu的博客-CSDN博客
GitHub - chihimng/COMP4901J_Project: Mahjong Tile Image Classification with Denoising CAE and CNN
Workspaces/ch01.pdf at master · jerryxgh/Workspaces
Step by Step: Build Your Custom Real-Time Object Detector | by Alaa Sinjab | Towards Data Science
How to train a Sylvanian Families detector using YOLOv3 and Darknet on Google Colab | by Galaxian Cube | Medium
yolo模型移植到android手机端_搬砖笔记-CSDN博客
natanielruiz/android-yolo: Real-time object detection on Android using the YOLO network with TensorFlow
建立自己的YOLO辨識模型 – 以柑橘辨識為例 – CH.Tseng
convert pascal voc dataset to yolo format
Weight Model size reduction / optimization · Issue #363 · pjreddie/darknet
覺得YOLO-Tiny不夠快嗎?試試YOLO-Fastest – CH.Tseng
Darknet yolo 在 android studio上的移植和实现 - 知乎