Detection of Mahjong tiles from videos using computer vision

Loading...
Thumbnail Image

URL

Journal Title

Journal ISSN

Volume Title

Perustieteiden korkeakoulu | Master's thesis

Date

2019-06-17

Department

Major/Subject

Computer Science

Mcode

SCI3042

Degree programme

Master’s Programme in Computer, Communication and Information Sciences

Language

en

Pages

49

Series

Abstract

Mahjong is a popular 4-player game originating from China. The result of a single game of Mahjong involves considerable amount of chance, similarly to that of a few hands of Poker. Hence, long term data analysis is often required to evaluate one's decisions. There are internet Mahjong platforms that provide replays of past games, but no solution providing digital replays for games played in person exists. In this thesis, we approached this problem by the means of object detection. Recently in object detection, convolutional neural network (CNN) based methods have been popular. To train these methods, large amounts of labeled training data is required. For this, we implemented synthetic data generator that produces synthetic images containing Mahjong tiles. We used synthetic images to train single-shot multibox detector (SSD), our object detector of choice. The SSD network that was trained solely on synthetic training data performed remarkably on synthetic validation data, but did not reach desirable accuracy on real video data. However, by introducing scarce amount of real images as part of the training data, we achieved reasonable accuracy on Mahjong tile detection from real video data. Fine tuning the synthetic data generation to better correspond to real data, as well as implementing error correction to further post process object proposals are potential future improvements.

Mahjong on suosittu kiinalainen neljän pelaajan peli. Yksittäisen mahjong-pelin lopputulema riippuu paljon sattumasta, samaan tapaan kuin esimerkiksi muutaman pokerikäden lopputulema. Tämän vuoksi siirtojen hyvyyttä arvioidessa on usein tarvetta analysoida pelejä pitkän aikavälin yli. Monet internetin digitaaliset mahjong alustat tarjoavat pelaajalle aiempien pelien tallenteet, mutta tällaista ratkaisua ei ole fyysisesti pelatuille peleille. Tässä työssä lähestymme tätä ongelmaa kohteentunnistuksen avulla. Viime aikoina konvoluutioneuroverkkoihin pohjautuvat menetelmät ovat olleet suosittuja kohteentunnistuksessa. Näiden menetelmien opettamiseen tarvitaan suuria määriä ennalta merkittyä opetusdataa. Tästä syystä kehitimme ohjelman, joka tuottaa mahjong-tiiliä sisältäviä synteettisiä kuvia. Käytämme näitä synteettisiä kuvia opettamaan Single-shot multibox detector (SSD) -kohteentunnistusmenetelmää. Kokonaan synteettisellä datalla opetettu SSD neuroverkko tuotti erittäin tarkkoja tuloksia synteettisellä testidatalla, mutta ei saavuttanut toivottua tarkkuutta oikeille videoille. Kuitenkin lisäämällä opetusdataan hieman aitoja kuvia synteettisten kuvien ohelle, menetelmä saavutti kohtuullisen tarkkuuden mahjong-tiilien tunnistuksessa. Tulevaisuudessa tarkkuutta voidaan pyrkiä parantamaan hienosäätämällä synteettisen datan generointia vastaamaan paremmin aitoja kuvia sekä parantamalla virheenkorjausmenetelmiä.

Description

Supervisor

Kannala, Juho

Thesis advisor

Ylioinas, Juha

Keywords

computer vision, object detection, convolutional neural networks, ssd

Other note

Citation