摘要
为实现围棋对弈过程中的高精度实时记谱,提出了一种基于结合三维注意力机制与轻量化卷积的实时检测算法Light-YOLOv8。在YOLOv8模型的基础上,使用PWConv+PConv替换主干网络中跨阶段局部网络的3*3卷积,大幅减少模型计算量与参数规模;加入CARAFE上采样算子与SimAM三维注意力机制,提高对围棋目标的检测能力;使用Wise-IOU损失函数提高模型定位能力与收敛速度,提高了对棋子粘连、棋子重叠与光照不均匀情况下的检测能力。在自定义围棋数据集上进行对比训练表明,改进后的算法实现了检测精度的提升与推理速度的提高。针对移动端设备部署需求对模型进行优化与压缩,并在不同安卓设备部署,图像分辨率为640*480的情况下,结合图像预处理与后处理操作,拍照检测平均时间为89 ms,平均模型推理帧率为37.6 fps。进行50轮记谱实验,平均记谱准确率高于97%,平均胜负判别准确率到达100%,能够实现稳定的围棋记谱功能。
A real-time detection algorithm Light-YOLOv8 based on a combination of three-dimensional attention mechanism and lightweight convolution is proposed to achieve high-precision real-time chessboard recording during Go games.On the basis of YOLOv8,PWConv+PConv is used to replace the 3*3 convolution of the cross stage local network in the backbone network,which greatly reduce the computational complexity of the model.Adding CARAFE upsampling operaor and SimAM three-dimensional attention mechanism to improve the detection ability of small Go targets.The use of the Wise-IOU loss function improves the model’s localization ability and convergence speed,and improves its detection ability in cases of chess piece adhesion,chess piece overlap,and uneven lighting.Optimize and compress the model for mobile deployment and deploy it on different Android devices,with an image resolution of 640*480.The average single detection time combined with image preprocessing and post-processing operations is 89ms,and the average detection frame rate is 37.6 fps.Conduct 50 rounds of score recording experiments,with an average score recording accuracy of over 97% and an average winner/loser discrimination accuracy of 100%,which can achieve stable go chess score recording function.
作者
张雷
武文喆
白雪媛
ZHANG Lei;WU Wenzhe;BAI Xueyuan(Department of Electronic Information Engineering,Shenyang Aerospace University,Shenyang 110136,China;Department of Science,Shenyang Aerospace University,Shenyang 110136,China)
出处
《计算机科学》
CSCD
北大核心
2024年第S02期337-343,共7页
Computer Science
关键词
目标检测
棋局识别
实时记谱
YOLOv8
轻量化网络
移动设备
Object detection
Chess game recognition
Real time notation
YOLOv8
Lightweight network
Mobile devices