Skip to content

haodong2000/chess_vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Position & Type Recognition System (SRTP)

  • Developed a system that recognizes chess positions & types based on real-time captured images
  • Used 1) Hough Circle algorithm for recognizing chess locations, and 2) a deep CNN model with Red-Black enhancement for recognizing chess types
  • Achieved an identification accuracy of over 99.5%
  • Demos for the entire SRTP, which included 3 studies, with the chess_simulator, and alphacc_zero.

Usage & Environment

  • Usage:
    • init_mkdir.py to create repo needed
    • camera.py for capturing images which are saved to ./test_image_process/systemCamTest
    • circle_crop.py for croping chesses which are saved to ./test_image_process/image_circle_test
    • Next step requires HUMAN to move cropped chesses to corresponding folder under ./data_pre_360
    • generate_data.py to generate training data in ./data_360
    • trainModel.py to train deep CNN models which are saved to ./model_save
    • circle_multi.py to test the model using images in ./webcam
    • server_one.py to run the chess vision TCP server for communication with Qt digital twin platform
  • Environment:
    • python 3.6
    • tensorflow 2.4
    • keras 2.4
    • opencv
    • pillow
  • Whole Structure

Screenshot 2022-05-27 180653

  • DataGenerator

1

  • RedBlackReinforcement

1

  • RealChessboardImage

2

  • HoughCircleProcess

2

  • ChessLocationResult & ChessboardMatrixResult

4