100 likes | 274 Views
Chessmen Position Recognition Using Artificial Neural Networks. Jun Hou Dec. 8, 2003. Hidden pieces. Scenario. Augmented Reality chess game – detect the position of all black chess pieces. Problem – moving camera, hidden pieces Constraints: 1-2 piece moves each time;
E N D
Chessmen Position Recognition Using Artificial Neural Networks Jun Hou Dec. 8, 2003.
Hidden pieces Scenario • Augmented Reality chess game – detect the position of all black chess pieces • Problem – moving camera, hidden pieces • Constraints: 1-2 piece moves each time; • Initial position known • Problem reduced to: whether there is a piece on a given square Fig 1. Illustration of hidden pieces • Task – Generate synthesized images, train ANN, test recognition rate
Feature Selection • Normalized chessboard squares • In 2D: find region of interest – the chessboard, calculate 3D positions. • In 3D: divide each chessboard square into m*m smaller squares (64*m*m) • Map 3D square positions onto 2D • Use average of each square as input • Camera angles and chessboard square positions • To compensate for the black ratio difference • Prior probability of each square occupied by a chess piece
m*m Image data m*m input Square position 2 input Camera parameters 6 input Prior probability of the square 1 input Neural Network Design • ANN applied: • Tradition GD; • Gradient Descent with variable learning rate; • Gradient Descent with momentum Fig 2. Neural Network Design
Experimental Results – Data generation and preprocessing • Use Blender Version 2.30 to model the pieces and use Python scripts to generate the synthesized images • Change the chessboard state – play one random move each time, and observe the chessboard from different viewpoints • Image properties – clean, high contrast, little noise, no distortion, no lighting variation. • Generate 1500 images with 640*480 resolution • Data filtering • Use threshold to select the squares that have at least a portion of black, exclude completely blank squares for training
Experimental Results – Data generation and preprocessing (cont.) (a) (b) Fig.3 (a) Original synthesized 640 * 480 3D image and (b) converted 64*64 2D image. Only none white squares are used for training. Trying to restore the 3D image to 2D image. The 2D chessboard looks as if rotated 45.
Experimental Results – Train ANN Fig.4 Training using GD with variable learning rate Fig.5 Training using GD with momentum Recognition rate: 72%, GD with variable learning rate 1.05 No significant recognition rate difference between the GD, GD-VLR, GD-M GD-VLR and GD-M are faster than GD
Experimental Results The more training samples, the more similar are the training and test sets As the number of training samples increases, the training set accuracy and test set accuracy merge Fig.6 Training set accuracy and test set accuracy. GD with variable learning rate
Conclusion and Future Work • Conclusion • Variations of Feed Forward ANNs are used to recognize the positions of chess pieces. • Future work • Adjusting ANN parameters • Size of square divisions, effect of randomizing the training data, learning rate, momentum, etc. • Use Confidence measure • Use constraints to help recognition • Look at successive frames to find out the piece moved; use frames of different viewpoints for one chessboard state, etc.