基于卷积神经网络的棋子定位和识别方法 下载: 1331次
Methods for Location and Recognition of Chess Pieces Based on Convolutional Neural Network
图 & 表
图 1. 整体算法流程图
Fig. 1. Flow chart of whole algorithm
下载图片 查看原文
图 2. 棋子定位算法流程图
Fig. 2. Flow chart of algorithm for location of chess pieces
下载图片 查看原文
图 3. 棋盘预处理。(a)透视变换图;(b) ROI图
Fig. 3. Chessboard pretreatment. (a) Perspective transformation picture; (b) ROI picture
下载图片 查看原文
图 4. 线性混合图
Fig. 4. Linear mixture picture
下载图片 查看原文
图 5. 棋子定位图
Fig. 5. Location picture of chess pieces
下载图片 查看原文
图 6. 识别算法流程图
Fig. 6. Flow chart of recognition algorithm
下载图片 查看原文
图 7. 网络结构
Fig. 7. Network structure
下载图片 查看原文
图 8. 棋子数据集示例
Fig. 8. Examples of chess data
下载图片 查看原文
图 9. 所提方法的训练和验证结果。(a)训练和验证准确率;(b)训练和验证损失值
Fig. 9. Training and verification results of proposed method. (a) Training accuracy and validation accuracy; (b) training loss and verification loss
下载图片 查看原文
图 10. 基于CNN的棋子识别结果。(a)部分实验结果一;(b)部分实验结果二
Fig. 10. Recognition results of chess pieces based on CNN. (a) Partial experimental results 1; (b) partial experimental results 2
下载图片 查看原文
图 11. 实验结果对比
Fig. 11. Comparison of experimental results
下载图片 查看原文
表 1网络结构配置信息和数据(Conv1~Conv4 layout data)
Table1. Configuration information and data of network structure (Conv1-Conv4 layout data)
Conv | Conv1 | Conv2 | Conv3 | Conv4 |
---|
Data_Size | 100×100×3 | 48×48×32 | 24×24×64 | 24×24×128 | Conv: Num_Filter | 32 | 64 | 128 | 128 | Conv: padding | 0 | 2 | 1 | 1 | Conv: Filter_Size | 5×5×3 | 5×5×32 | 3×3×64 | 24×24×128 | Conv: stride | 1 | 1 | 1 | 1 | Data_Size after convolution | 96×96×32 | 48×48×64 | 24×24×128 | 24×24×128 | Activation | ReLU | ReLU | ReLU | ReLU | Data_Size after activation | 96×96×32 | 48×48×64 | 24×24×128 | 24×24×128 | Pooling: Kernel_Size | 2×2 | 2×2 | | 2×2 | Pooling: stride | 2 | 2 | | 2 | Data_Size after pooling | 48×48×32 | 24×24×64 | 24×24×128 | 12×12×128 | LRN(Data_Size) | 48×48×32 | 24×24×64 | 24×24×128 | 12×12×128 |
|
查看原文
表 2网络结构配置信息和数据(FC1~FC3 layout data)
Table2. Configuration information and data of network structure(FC1-FC3 layout data)
FC | FC1 | FC2 | FC3 |
---|
Data | 12×12×128 | 1024 | 512 | Data after FC | 1024 | 1024 | 14 | Activation | ReLU | ReLU | | Data after activation | 1024 | 1024 | | Dropout Kept_prob | 0.5 | 0.5 | | Data after dropout fitting | 1024 | 512 | |
|
查看原文
表 3棋子定位实验
Table3. Location experiment of chess pieces
Piece | Time ofsegmentation /s | Coordinate of image | Calculated coordinate | Actual coordinate | Error /mm |
---|
Col /pixel | Row /pixel | | X /mm | Y /mm | X' /mm | Y' /mm |
---|
Red_Car | 0.173 | 1292.88 | 972.66 | -56.816 | -101.251 | -56.7 | -100.2 | 1.09 | Red_House | 0.177 | 1286.983 | 921.603 | -57.532 | -32.759 | -57.5 | -61.6 | 1.15 | Red_Ele | 0.191 | 1279.039 | 869.282 | -57.568 | -21.625 | -57.4 | -21.5 | 0.2 | Red_Knight | 0.207 | 1273.411 | 824.562 | -57.65 | 15.628 | -57.5 | 15.6 | 0.15 | Marshal | 0.182 | 1266.772 | 777.076 | -57.107 | 56.284 | -57.1 | 56.4 | 0.12 | Red_Gun | 0.186 | 1189.585 | 919.273 | 20.505 | -62.279 | 20.5 | -61.7 | 0.58 | Red_Pawn | 0.18 | 1128.461 | 776.132 | 61.964 | 55.667 | 61.7 | 55.8 | 0.29 | Green_Pawn | 0.185 | 986.305 | 614.135 | 185.19 | 210.372 | 186.2 | 210.8 | 1.1 | Green_Gun | 0.182 | 943.496 | 979.248 | 219.448 | -64.996 | 219.6 | -65 | 0.15 | General | 0.179 | 854.364 | 771.18 | 299.646 | 57.123 | 299.5 | 57.5 | 0.4 | Green_Knight | 0.184 | 850.955 | 814.87 | 300.597 | 19.501 | 300.1 | 19.2 | 0.36 | Green_Ele | 0.183 | 849.73 | 863.732 | 298.672 | -21.476 | 299.1 | -21.6 | 0.45 | Green_House | 0.183 | 845.265 | 918.192 | 298.95 | -65.306 | 298.8 | -65.9 | 0.61 | Green_Car | 0.186 | 843.988 | 956.32 | 298.05 | -101.029 | 297.6 | -101.3 | 0.53 | Total piece | 0.208 | - | - | - | - | - | - | 0.51 |
|
查看原文
表 4实验结果对比
Table4. Comparison of experimental results
Experimental data | Proposed method | Ref. [3] | Ref. [14] |
---|
Location time /s | 0.212 | 0.484 | - | Location error /mm | 0.51 | - | 0.87 |
|
查看原文
韩燮, 赵融, 孙福盛. 基于卷积神经网络的棋子定位和识别方法[J]. 激光与光电子学进展, 2019, 56(8): 081007. Xie Han, Rong Zhao, Fusheng Sun. Methods for Location and Recognition of Chess Pieces Based on Convolutional Neural Network[J]. Laser & Optoelectronics Progress, 2019, 56(8): 081007.