
Show HN: Ebook.chessvision.ai – AI that makes chess eBooks interactive - pkacprzak
https://ebook.chessvision.ai/
======
pkacprzak
Ask me anything if you have any questions about deployment or tech stack - I'd
love to help as I had to make several decisions that I saw people constantly
asking about how to deploy ML model for prediction and choices I made might
help.

The app is eBook Reader for chess ebooks specifically. It makes any PDF chess
ebook interactive in that sense that once a book is analyzed by the app, you
can double-click on any chess diagram in the book and it will show up the
analysis board where you can make your moves, turn the engine on/off, see top
5 computer lines which most often contains lines in the book. Every book is
only analyzed once, the next time you open it, you can interact with it
immediately. Also, the app searches for chess games containing positions on
the diagrams so you can explore them.

I used a custom-made computer vision algorithm to first find the diagrams in
PDF document and then use a convolutional neural network to classify
individual squares in a diagram into corresponding classes (the type of chess
piece, color, empty square). I’m using PyTorch for the machine learning part,
both training and prediction, mainly because of its API I really like and the
ease to write custom data transforms. All files are analyzed by a separated
background service using task queues which is crucial to make the rest of the
app lightweight. For the deployment, I used Google App Engine. I’ve seen many
suggesting SageMaker for that purpose, but I personally find it less intuitive
to use than GAE. However, I might be biased because of my experience with GAE.

