Home

Chess CV
Lightweight CNNs for chess board analysis

Chess CV is a machine learning project that trains lightweight CNNs (156k parameters each) from scratch to classify different aspects of chess board squares. The project includes three specialized models trained on synthetically generated data from 55 board styles combined with piece sets and overlays from chess.com and lichess:

  • Pieces Model (13 classes): Classifies chess pieces and empty squares for board state recognition and FEN generation
  • Arrows Model (49 classes): Classifies arrow annotation components for detecting and reconstructing chess analysis overlays
  • Snap Model (2 classes): Classifies piece centering quality for automated board analysis and positioning validation

Each model uses the same efficient CNN architecture but is optimized for its specific classification task, achieving robust recognition across various visual styles.

  • Setup


    Installation guide covering dependencies and environment setup.

    Setup

  • Model Usage


    Use pre-trained models from Hugging Face Hub or the chess-cv library in your projects.

    Model Usage

  • Train and Evaluate


    Learn how to generate data, train models, and evaluate performance.

    Train and Evaluate

  • Documentation for LLM


    Documentation in llms.txt format. Just paste the following link into the LLM chat.

    llms-full.txt