Skip to content

Latest commit

 

History

History
162 lines (119 loc) · 5.4 KB

README.md

File metadata and controls

162 lines (119 loc) · 5.4 KB

Logo

ScanChess

A computer vision web app to track over the board chess moves!
View Demo Video

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

Chess is a game of studying. To improve, one must always record their games for analysis. However, for casual chess players, recording chess moves on pen and paper may seem tedious and distracting. Alternatively, DGT boards used in top-level tournaments are expensive and impractical for casual chess matches. ScanChess allows users to track over-the-board chess moves with nothing more than a simple webcam and tripod.

With ScanChess, you can:

  • See a digital replica of your game on the app
  • Get the moves of your game in pgn notation
  • Get the current FEN of your position

ScanChess is a great way to record your games for later analysis and improve as a chess player!

Built With

Getting Started

Instructions will be posted shortly

Prerequisites

Backend

Frontend

Hardware

  • Webcam
  • Tripod (or any other way to mount the webcam)

Installation

git clone https://github.com/brian386/ScanChess.git

Start the app

In the directory named "frontend", run:
npm start
In the directory named "Backend", run:
python api.py

Usage

Web App

See full demo video here :

Note: Due to a lack of training images, the ScanChess app works only on chess sets similar to the one shown in the demo video: black and white chess pieces with green and white chess board.

  1. Set up your webcam to capture an overhead view of the chess board.
  2. Make sure the chess board is empty, and press "Calibrate".
  3. Set up the chess pieces and press "Calibrate" again to complete the calibration.
  4. Play a chess move. Press "Confirm Move" once the chess move has been made. The digital chess board should update accordingly.
  5. Continue playing the game until checkmate or stalemate. Remember to press "Confirm Move" after every move.
  6. Watch the game unfold on the digital chess board, copy the pgn notation for your records, or plug the FEN position into an engine to analyze the game!

Chess Image Classification

The file named ChessImageClassification holds the notebook I used for gathering a training dataset and training the convolutional neural network. The model classifies whether an image is a white piece, a black piece, or an empty square. The dataset I used to train my model is not included in this file because the it is too large. Feel free to download the code yourself to train a model on your own dataset.

Contact

Email: [email protected]

Project Link: https://github.com/brian386/ScanChess