Today, we have advanced tools for determining the best chess move. These tools can be used on supercomputers and smartphones, making them accessible to everyone. All we need is the current arrangement of pieces on the chessboard. In electronic games, this position is obtained automatically, while in physical games, it must be entered manually, which can be time-consuming, especially with multiple chessboards. Therefore, in this thesis, we developed a program that can recognize chess pieces from an image and determine on which square of the chessboard each piece is located. To solve both problems, we employed an object detection approach using the YOLO algorithm and library. We linked the detection of chess pieces with the coordinates of all the vertices of the chessboard, which we obtained by detecting the four outer corners of the board. We tested the program’s performance and analyzed errors when using a single model for all detections, compared to using separate models for detecting pieces and corners. We found that better results are achieved when the model for detecting pieces and the four outer corners of the board are split into two separate models. This separation led to a 3 % improvement in piece detection and an 11 % improvement in corner detection. We also measured the time complexity when using one or two models for detection. We found that the individual model times do not differ significantly. Therefore, the total detection time doubles when using two models, as both models must be executed.
|