https://github.com/denvercoder1/chess-piece-classifier
Demonstration of Tensorflow Lite for classifying images of chess pieces
https://github.com/denvercoder1/chess-piece-classifier
chess tensorflow tflite
Last synced: about 2 months ago
JSON representation
Demonstration of Tensorflow Lite for classifying images of chess pieces
- Host: GitHub
- URL: https://github.com/denvercoder1/chess-piece-classifier
- Owner: DenverCoder1
- License: mit
- Created: 2021-08-29T18:34:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-30T10:52:23.000Z (over 3 years ago)
- Last Synced: 2025-01-16T00:40:27.907Z (3 months ago)
- Topics: chess, tensorflow, tflite
- Language: JavaScript
- Homepage: https://denvercoder1.github.io/chess-piece-classifier/
- Size: 76.8 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chess Piece Classifier
This is a simple demonstration of the capabilities of a Tensorflow Lite image classification model.
It was created for a presentation in an Introduction to AI course in August 2021.
[](https://denvercoder1.github.io/chess-piece-classifier/)
## What is this?
This is a basic web interface that uses a Tensorflow Lite image classifier to classify chess pieces.
View the demo here: https://denvercoder1.github.io/chess-piece-classifier/
## Where is the data from?
The images found in [chess.tgz](data/chess.tgz) were created by taking 1-minute videos of each of the six types of pieces and splitting them into frames using VLC. The videos were filmed at 30 frames per second and 1 frame for every 50 frames was extracted from each video.
## How is the model made?
I used the [Tensorflow Image Classification Model Maker](https://www.tensorflow.org/lite/tutorials/model_maker_image_classification) to simplify the creation of the model.

The model was trained remotely using Google Colab and a copy of the Python notebook can be found [here](https://colab.research.google.com/drive/1AIsa43KHs2cywEfi3Xj5hJtrPI_Z7aiN?usp=sharing).
## What about the website?
The website uses methods from [Tensorflow.js](https://js.tensorflow.org/api/latest/) to load the model, pre-process the images, and generate predictions.
## Disclaimer
This is just a simple demonstration and it was trained only on a small dataset consiting of only photos of one chess set.
To avoid overfitting, it is recommended to try with a larger dataset and perform augmentation to generate more varied data.