Skip to content

Chess pieces detection involves using computer vision techniques to identify and locate individual chess pieces on a chessboard.Able to identify chess pieces on a board or in a video using yolov5.

Notifications You must be signed in to change notification settings

Tanwar-12/CHESS-PIECES-DETECTION-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

𝑪𝑯𝑬𝑺𝑺 𝑷𝑰𝑬𝑪𝑬𝑺 𝑫𝑬𝑻𝑬𝑪𝑻𝑰𝑶𝑵 𝒀𝑶𝑳𝑶𝑽5

TF (2)

𝑶𝒗𝒆𝒓𝒗𝒊𝒆𝒘 : The goal of this project is able to identify chess pieces on a board or in a video using yolov5.

image image

📁 𝑫𝒂𝒕𝒂𝒔𝒆𝒕 𝑼𝒔𝒆𝒅 : https://universe.roboflow.com/projects-ehrjz/chess-detection-i0woo

The dataset consists of 13 classes:

  • 'bishop'
  • 'black-bishop'
  • 'black-king'
  • 'black-knight'
  • 'black-pawn'
  • 'black-queen'
  • 'black-rook'
  • 'white-bishop'
  • 'white-king'
  • 'white-knight'
  • 'white-pawn'
  • 'white-queen'
  • 'white-rook

𝑫𝒂𝒕𝒂 𝑷𝒓𝒆𝒑𝒂𝒓𝒂𝒕𝒊𝒐𝒏:

  • Create a bounding boxes with the help of label-img And makesense.ai website according to YoloV5.
  • Prepare folder structure that can be accept by YoloV5.

    𝑺𝒕𝒆𝒑𝒔 𝒕𝒐 𝒖𝒔𝒆 𝒀𝒐𝒍𝒐𝒗5:

  • Cloning the YoloV5 file from official repository.
  • Changing the directory of yolov5
  • Installing the dependencies
  • Download all versions pre-trained weights.

𝑺𝒕𝒆𝒑𝒔 𝑩𝒆𝒇𝒐𝒓𝒆 𝑻𝒓𝒂𝒊𝒏𝒊𝒏𝒈 𝑪𝒖𝒔𝒕𝒐𝒎 𝑫𝒂𝒕𝒂𝒔𝒆𝒕:

  • Go to yolov5/data/.
  • Open data.yaml
  • Edit the following inside it:
  1. Training and Validation file path
  2. Number of classes and Class names.

𝑻𝒓𝒂𝒊𝒏𝒊𝒏𝒈 𝒀𝑶𝑳𝑶𝑽5 𝑴𝒐𝒅𝒆𝒍:

  • Set images size 640 with batch of 8.
  • Total 606 images for training and 58 images for validation present in 13 classes.
  • Train model around 600 epochs .Stopping training early as no improvement observed in last 100 epochs. Best results observed at epoch 201, best model saved as best.pt.
  • Visualise the training metrics with the help of tensorboard.

    𝑻𝒆𝒔𝒕𝒊𝒏𝒈 𝑰𝒎𝒂𝒈𝒆𝒔 𝑼𝒔𝒊𝒏𝒈 𝑻𝒆𝒔𝒕 𝑫𝒂𝒕𝒂:

    image

image

𝑻𝒆𝒔𝒕𝒊𝒏𝒈 𝑽𝒊𝒅𝒆𝒐 𝑫𝒆𝒎𝒐:

chess.1.vd.mp4

About

Chess pieces detection involves using computer vision techniques to identify and locate individual chess pieces on a chessboard.Able to identify chess pieces on a board or in a video using yolov5.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published