lichess.org
Donate

Record Live Games & Upload them to Lichess with ChessCam

The app just crashes on my phone, not once have I been able to record anything. I have a fairly midrange Samsung. Even in chrome it doesn't work.
Due to the fact that the camera is mirrored, the program confuses the a and h verticals in places, if I put the labels myself, it does not find the shapes. Can you tell me how to fix it?
I've written answers to a few of the questions people have asked so far at www.chesscam.net/faq. Let me know if there's anything else you would like clarification on.
Are there any specific requirements for video (quality, size) for this application?
Cool! Can you explain a bit how you set up tensorflow?

I scrolled through the code for a while, but I can't find how you did the training and stores the weights. You seem to import and call TF directly?
This is the perfect invention. Now you don't need a scoresheet and then try to make a pgn to analyse s game when playing friends and family!!
@s2numbuq35i said in #36:
> Cool! Can you explain a bit how you set up tensorflow?
>
> I scrolled through the code for a while, but I can't find how you did the training and stores the weights. You seem to import and call TF directly?

I use the Ultralytics library to train YOLOv8 models for piece and corner detection. It's 2 lines of code to load and train a model so super simple to use.

I then export the weights using the 'tfjs' format. This creates a folder with a JSON file describing the model architecture, and binary files describing the weights. The weights are sharded so that each file is ~4 MB, which helps with caching the model in the browser.

The models are fairly hefty, so I use the webgl backend for inference. There are some tricks to speed up the model loading + warmup. See github.com/Pbatch/CameraChessWeb/blob/main/src/utils/loadModels.tsx for the full details.

DM me if you'd like more info.
I'm an absolute fan of your computer vision work.

I had been looking for such a tool for years, without success (hard to set, expensive, and works poorly...)

You have solved all these problems and offered a ridiculously amazing alternative to the DGT board. Congratulations and thank you.

I'm planning on using it in my next tournament for the club for board number 1.

I had in mind that on top of recording the games to be analyzed later, it could be cool to show of a projector in the resting area of the live game of Board Number One. I realized the only thing that's needed for that to happen is to read the PGN output and input it on any computer chessboard.

I could try to work around it by parsing the page/tags that contain the PGN but I was wondering if you had any plan on adding such a feature (say you could switch the camera view from real board to digital board for example)

This topic is now closed.