计算机科学 ›› 2024, Vol. 51 ›› Issue (11A): 230900037-7.doi: 10.11896/jsjkx.230900037

• 图像处理&多媒体技术 • 上一篇    下一篇

基于Light-YOLOv8的围棋棋谱识别

张雷1, 武文喆1, 白雪媛2   

  1. 1 沈阳航空航天大学电子信息工程学院 沈阳 110136
    2 沈阳航空航天大学理学院 沈阳 110136
  • 出版日期:2024-11-16 发布日期:2024-11-13
  • 通讯作者: 武文喆(724009949@qq.com)
  • 作者简介:(rd_zhangl@126.com)

Go Chessboard Recognition Based on Light-YOLOv8

ZHANG Lei1, WU Wenzhe1, BAI Xueyuan2   

  1. 1 Department of Electronic Information Engineering,Shenyang Aerospace University,Shenyang 110136,China
    2 Department of Science,Shenyang Aerospace University,Shenyang 110136,China
  • Online:2024-11-16 Published:2024-11-13
  • About author:ZHANG Lei,born in 1972,Ph.D,asso-ciate professor.His main research in-terests include image processing and image compression.
    WU Wenzhe,born in 1998,postgra-duate.His main research interests include image processing and pattern re-cognition.

摘要: 为实现围棋对弈过程中的高精度实时记谱,提出了一种基于结合三维注意力机制与轻量化卷积的实时检测算法Light-YOLOv8。在YOLOv8模型的基础上,使用PWConv+PConv替换主干网络中跨阶段局部网络的3*3卷积,大幅减少模型计算量与参数规模;加入CARAFE上采样算子与SimAM三维注意力机制,提高对围棋目标的检测能力;使用Wise-IOU损失函数提高模型定位能力与收敛速度,提高了对棋子粘连、棋子重叠与光照不均匀情况下的检测能力。在自定义围棋数据集上进行对比训练表明,改进后的算法实现了检测精度的提升与推理速度的提高。针对移动端设备部署需求对模型进行优化与压缩,并在不同安卓设备部署,图像分辨率为640*480的情况下,结合图像预处理与后处理操作,拍照检测平均时间为89 ms,平均模型推理帧率为37.6 fps。进行50轮记谱实验,平均记谱准确率高于97%,平均胜负判别准确率到达100%,能够实现稳定的围棋记谱功能。

关键词: 目标检测, 棋局识别, 实时记谱, YOLOv8, 轻量化网络, 移动设备

Abstract: 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.

Key words: Object detection, Chess game recognition, Real time notation, YOLOv8, Lightweight network, Mobile devices

中图分类号: 

  • TP391
[1]LIANG C Y,DING Y,YUAN J,et al.Research on Image Re-cognition Algorithms for Go Tournaments [J].Modern Compu-ter(Professional Edition),2016(24):39-43.
[2]MAO L M,ZHU P Y,LU Z L,et al.Recognition of Gobang Robot Chessboard Based on LabVIEW [J].Computer Engineering and Design,2017,38(1):242 246.
[3]GUI Y,WU Y,WANG Y,et al.Visual Image Processing of Humanoid Go Game Robot Based on OPENCV[C]//2020 Chinese Control And Decision Conference(CCDC).Hefei,2020:3713-3716.
[4]WANG Y J,ZHANG Y B,WU Y Y,et al.A General Chess Po-sitioning Method under Uneven Illumination [J].Computer Applications,2020,40(12):3490-3498.
[5]ZHANG Y,GU F.A Compact and Low-cost gobangg Robot[C]//2022 International Conference on Service Robotics(ICoSR).Chengdu,2022:62-66.
[6]LIU W,ANGUELOV D,ERHAN D,et al.Ssd:Single shotmultibox detector[C]//Computer Vision-ECCV 2016:14th European Conference,Amsterdam,The Netherlands,Part I 14.Springer International Publishing,2016:21-37.
[7]WU B,IANDOLA F,JINP H,et al.Squeezedet:Unified,small,low power fully convolutional neural networks for real-time object detection for autonomous driving[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops.2017:129-137.
[8]TAN M,LE Q.Efficientnetv2:Smaller models and faster trai-ning[C]//International Conference on Machine Learning.PMLR,2021:10096-10106.
[9]JIANG P,ERGU D,LIU F,et al.A Review of Yolo algorithm developments[J].Procedia Computer Science,2022,199:1066-1073.
[10]GIRSHICK R.Fast r-cnn[C]//Proceedings of the IEEE International Conference on Computer Vision.2015:1440-1448.
[11]HE K,GKIOXARI G,DOLLÁR P,et al.Mask r-cnn[C]//Proceedings of the IEEE International Conference on Computer Vision.2017:2961-2969.
[12]PURKAITP,ZHAO C,ZACH C.SPP-Net:Deep absolute pose regression with synthetic views[J].arXiv:1712.03452,2017.
[13]KONG F G,LI Z Z,LIU Q,et al.Design of the Vision System for Chinese Chess Robots [J].Mechanical Engineer,2020,347(5):1-3.
[14]LIU X,JIN J,ZHONG Q,et al.Vision-Based Chess Detection for a Robotic Companion[C]//2021 IEEE 6th International Conference on Computer and Communication Systems(ICCCS).Chengdu,2021:248-253.
[15]HOWARDA G,ZHU M,CHEN B,et al.Mobilenets:Efficient convolutional neural networks for mobile vision applications[J].arXiv:1704.04861,2017.
[16]FANG G F,MA X Y,SONG M L,et al.[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).2023:16091-16101.
[17]CHEN J,KAO S,HE H,et al.Run,don't walk:chasing higher FLOPS for faster neural networks[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:12021-12031.
[18]WANG J,CHEN K,XU R,et al.CARAFE:Content-aware reassembly of features[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2019:3007-3016.
[19]YANG L,ZHANG R Y,LI L,et al.SimAM:A simple,parameter-free attention module for convolutional neural networks[C]//International Conference on Machine Learning.PMLR,2021:11863-11874.
[20]TONG Z,CHEN Y,XU Z,et al.Wise-IoU:bounding box re-gression loss with dynamic focusing mechanism[J].arXiv:2301.10051,2023.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!