Instructions to use PBatch23888/chessq-chesscam with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use PBatch23888/chessq-chesscam with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
ChessQ ChessCam
ChessQ Lite fine-tuned on footage from ChessCam games and exported to LiteRT for the browser. It is the board-recognition model used by the ChessCam web app.
Built with ChessQueries (paper).
Files
chessq-chesscam-fp16.tflite: ViT-S ChessQueries model, FP16 weights (64.3 MB). It runs with LiteRT.js on WebGPU or on the CPU (WebAssembly).chessq-chesscam-fp32.safetensors: the same model as PyTorch weights in FP32 (126 MB), in the ChessQueries checkpoint format.
Quick start (PyTorch)
With Python 3.12:
python -m pip install "git+https://github.com/JSeytre/chessqueries.git@f5aaaf38212cc7839b03ccf383455053905b3f7e"
chessqueries-predict photo.jpg --checkpoint chessq-chesscam-fp32.safetensors
Input and output
- Input: uint8
(1, 644, 644, 4), RGBA pixels (for example, canvasImageData.dataas is). The image is resized to 644 × 644 without keeping its aspect ratio. Normalisation happens inside the model. - Outputs (their order is up to the runtime, so tell them apart by shape):
- float32
(1, 64, 13): softmax probabilities for each square, with squares in FEN order (a8, b8, …, h1). The classes are. P N B R Q K p n b r q k, where.is an empty square. - float32
(1, 64, 2): where each square's query attends in the input image, as(x, y)in [0, 1], squares in the same order. It is the attention-weighted centre of the image patches in the last decoder layer's cross-attention, so it is pulled towards the board centre: use it for directions (for example, which way rank 8 lies), not exact square positions.
- float32
Training
The model starts from the released ChessQ Lite V4 weights and was trained for 4 epochs on the ChessReD and ChessCog training splits plus a ChessCam dataset of 15,590 frames from recorded games. The ChessCam labels were made by converting the app's piece boxes and board grids to FENs.
Comparison with ChessQ Lite
Test-set results for this model and ChessQ Lite, both run in PyTorch with FP32 arithmetic at 644 × 644.
| Test set | Boards | Metric | ChessQ Lite | ChessQ ChessCam |
|---|---|---|---|---|
| ChessCam | 2,275 | Exact board | 14.4% | 38.8% |
| At most 1 square wrong | 33.1% | 72.3% | ||
| Squares correct | 94.86% | 98.25% | ||
| ChessReD | 2,129 | Exact board | 98.6% | 98.6% |
| At most 1 square wrong | 99.8% | 99.9% | ||
| Squares correct | 99.97% | 99.98% | ||
| ChessCog | 342 | Exact board | 97.4% | 97.4% |
| At most 1 square wrong | 100.0% | 100.0% | ||
| Squares correct | 99.96% | 99.96% |
The ChessCam test videos are not in the training set. The test set only keeps frames where
ChessQ Lite agrees with the labels on at least 48 of 64 squares, which favours ChessQ Lite and
may not represent every kind of ChessCam footage. The .tflite file uses FP16 weights, so
its results may differ slightly.
License
These weights are a modified version of ChessQ Lite and are licensed under the PolyForm Noncommercial License 1.0.0. They may be used, modified and redistributed for permitted noncommercial purposes; commercial use requires separate permission from the ChessQueries authors. Third-party components keep their upstream terms; see the notices.
Required Notice: Copyright (c) 2026 Joël Seytre.
- Downloads last month
- 157
Model tree for PBatch23888/chessq-chesscam
Base model
joelseytre/chessq-lite