lichess.org
Donate

Open-source tool for converting chessboard images into FEN

In case anyone finds this useful:
github.com/linrock/chessboard-recognizer

I've been using it to automatically convert PDFs of chess puzzles into FEN strings, since manually using a board editor to set up positions takes way too much time. It converted all of John Nunn's chess puzzle book at about 97% accuracy. If anyone has puzzle book suggestions, I'll consider converting those too.

You could do other stuff with it too, like create a Reddit bot to post the FEN of a board in the comments, though I've seen a few of those bots already.

It uses a neural network and comes with a pre-trained model that I've been constantly improving.

As always, let me know if you have any thoughts or suggestions.
Does it automatically find the puzzles within the pdf and convert them all to puzzles, or do you need to carve out the actual images of the boards and feed those into the program?
Right now you need to manually carve out the images of the boards and feed them into the program. I hope to add better board detection in later so that this part of the process is less tedious
Can I take a picture on my phone of a page in a puzzle book and import it or is the detection too sensitive?
@President_DonaldDuck yeah i was planning to at least make it available in a web browser, so people can use it without having to do any manual setup

@dRr0x0rZZ phone pictures should be fine since the pre-trained model has been partly trained on low-quality book images. training the model on phone pictures will yield better accuracy with future phone pictures too

This topic has been archived and can no longer be replied to.