Skip to content

ale93111/raspberry-chess

Repository files navigation

raspberry-chess

Chess & Computer Vision for Raspberry Pi

Alt Text

Introduction

This is my first project for Raspberry Pi and since I am also interested in chess I wanted to make a system able to track a chess game and show the evaluation and best moves in real time.

My equipment:

  • Raspberry Pi 4 model B 8GB RAM
  • Raspberry Pi Camera Module 3
  • Mini portable chess set
  • Red/Green acrylic paint

I decided to paint my chess pieces red/green to enhance their visibility and ease of detection by the computer vision system against the background.

Computer Vision & Machine Learning

The chessboard is detected with the function cv2.findChessboardCornersSB(), then I compute the perspective transform with cv2.findHomography()

Chess pieces are detected with a YOLOv5n model with runs at 0.6 FPS on the Raspberry Pi. The model is trained on this publicly available dataset: Raspberry Turk Chess Dataset

Model weights are provided.

About

Chess & Computer Vision for Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages