I’ll be live tweeting what we build for the next ~48 hours. Smash that subscribe button and buckle in!
The iPhone will stay on the tripod running a ML model to determine the game state & relay the info to the cloud (we hope to let it be handheld in a future version).
A server will pass state to @stockfishchess.
And an iPad will display the UI.
Hoping possibly to use the built-in rectangle detection to isolate the board and crop out the rest of the photo.
developer.apple.com/documentation/…
Joseph is going to keep working on collecting and labeling chess board data and then training the ML model.
I'm working on spinning up a server and interfacing with the StockFish chess engine.
Going to see if using stockfish.js is viable instead of communicating with the mainline engine over stdin/out. github.com/nmrugg/stockfi…
Wonder how long before he gives up and farms it out to Mechanical Turk.
Stockfish.js is working great (once I read the UCI protocol's spec). After I wire it up to Firebase the server part will be done! wbec-ridderkerk.nl/html/UCIProtoc…
Moving on to consuming these updates with a web UI. Going to look and see if there are any prebuilt tools for visualizing a chess board (via FEN notation) in HTML.
I'm collecting more data... @josephofiowa is looking into Mechanical Turk.
Our working theory is that because the model’s input size is so small (417x417) and the frame is so zoomed out that after resizing the pieces are too small to differentiate.
I’m leaving my laptop to train on the cropped images overnight but after 10 minutes of training it’s already beating our best uncropped model!
I’m letting this one train for quite a bit longer to see where it lands.
Got another 50% improvement. It's definitely not perfect but it'll do! The new model looking at an image it hasn't seen before:
This is a game changer. It will make labeling additional training data so much less time consuming!
Next we have to correlate these bounding boxes with their position on the board. Then we can pass the bord state to the chess engine and UI that I built yesterday!
Hopefully @josephofiowa comes to the rescue with his custom model soon!
Fixed a major issue where things wouldn't work unless the board was directly centered in the frame though!
Now you can even move the camera around and it will keep tracking and processing:
Once I get the formula right for the 1-8 axis it’ll be working end to end! Then just need to plug in the more accurate ML model.
Luckily @josephofiowa is tight with @GA so we're camping out at their SF campus for a bit. Thanks @jakeschwartz!
It's not perfect but I'm pretty proud of what we were able to do in such a short amount of time at the #DisruptSF hackathon! devpost.com/software/chess…
If you’re interested in the future of enhancing board games with computer vision sign up for the beta of our new app, BoardBoss, launching soon on iOS!
boardboss.com