AymanNabih / Reine-Chess-Scoresheet-Scanner

Reine - Handwritten Forms Processing (Chess Scoresheet Scanner)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reine

by Rithwik Sudharsan and Alex Fung

This product scans chess scoresheets, but as per suggestions can be modified to work on other forms for processing. Open-sourced under the MIT license.

Website here: https://www.reinechess.com/

Chess.com article here, describing roughly how this works: https://www.chess.com/blog/ReineChess/scannable-scoresheets-free

Show HackerNews post here: https://news.ycombinator.com/item?id=19162876

We thank Marek Śmigielski's post here for the alignment algorithm and a general perspective on how we could solve this problem, another developer who attempted the same idea. Lots of Kaggle kernels, other Medium articles, and StackOverflow posts obviously helped too.

alt text

How it works:

  1. Take picture alt text
  2. Align scoresheet alt text
  3. Cut up scoresheet into boxes alt text
  4. Preprocess boxes to look like EMNIST data
  5. Run boxes through CNN to get predictions
  6. Postprocess results by checking every combination of top 2 most likely characters for each box, looking for valid games. This way, as long as the correct characters are all in the top 2 predictions for each box, the game should be found.
  7. Download .pgn file (or .txt if complete game wasn't found, then edit and change to .pgn) alt text
  8. Open in your engine of choice and analyze! alt text

About

Reine - Handwritten Forms Processing (Chess Scoresheet Scanner)

License:MIT License


Languages

Language:Python 73.8%Language:HTML 26.2%