基于Mask R-CNN的轻量化羊只计数研究
Lightweight Sheep Counting Study Based on Mask R-CNN
DOI: 10.12677/airr.2024.134094, PDF,    科研立项经费支持
作者: 杨雯茜, 李 婷, 李美安*:内蒙古农业大学计算机与工程学院,内蒙古 呼和浩特
关键词: Mask R-CNNSE注意力机制ASPP羊只技术Mask R-CNN SE Attention Mechanism ASPP Sheep Counting
摘要: 为了提高羊只计数的准确性和实用性,本文结合计算机视觉技术,提出了一种基于Mask R-CNN轻量级羊只计数算法。针对数据集的制作,前往内蒙古呼和浩特白塔村的养殖户进行数据采集,制作了羊只图像分割数据集。在对模型的轻量化部分,首先,将特征提取网络的部分替换为 Inverted Residual模块并加入SE注意力机制,在保证模型分割准确度不下降的情况下降低模型的规模。其次,使用空间卷积池化金字塔ASPP进一步对模型的特征融合部分进行优化,最后利用改进后Mask R-CNN生成的掩膜进行计数。结果表明:改进后的Mask R-CNN-InvertedResidual-SE-ASPP羊只计数模型,计数准确率达到96.27%,较基准模型参数量减少38.46%,计算量减小26.14%,体积减小34.52%,单帧推理速度提升22.12%。说明,改进后的Mask R-CNN更适合实际应用中的高效羊只计数。
Abstract: To enhance the accuracy and practicality of sheep counting, this paper proposes a lightweight sheep counting algorithm based on Mask R-CNN combined with computer vision technology. For data set creation, we collected sheep images from local farms in Baita Village, Hohhot, Inner Mongolia, to create a sheep image segmentation dataset. To lighten the model, we replaced parts of the feature extraction network with Inverted Residual modules and incorporated Squeeze-and-Excitation (SE) attention mechanisms to maintain segmentation accuracy while reducing the model’s size. Additionally, we optimized the model’s feature fusion part using the Atrous Spatial Pyramid Pooling (ASPP) structure. Finally, we used the masks generated by the improved Mask R-CNN for counting. The results show that the improved Mask R-CNN-Inverted Residual-SE-ASPP sheep counting model achieved an accuracy rate of 96.27%, reduced the number of parameters by 38.46%, decreased computational complexity by 26.14%, reduced the model size by 34.52%, and increased single-frame inference speed by 22.12%. This indicates that the improved Mask R-CNN is more suitable for efficient sheep counting in practical applications.
文章引用:杨雯茜, 李婷, 李美安. 基于Mask R-CNN的轻量化羊只计数研究[J]. 人工智能与机器人研究, 2024, 13(4): 920-929. https://doi.org/10.12677/airr.2024.134094

参考文献

[1] 中华人民共和国国家统计局. 中国统计年鉴[M]. 北京: 中国统计出版社, 2023.
[2] Saleem, M.H., Potgieter, J. and Arif, K.M. (2021) Automation in Agriculture by Machine and Deep Learning Techniques: A Review of Recent Developments. Precision Agriculture, 22, 2053-2091. [Google Scholar] [CrossRef
[3] 王毅恒, 许德章. 基于YOLOv3算法的农场环境下奶牛目标识别[J]. 广东石油化工学院学报, 2019, 29(4): 31-35.
[4] 宁远霖, 杨颖, 李振波, 等. 基于改进YOLOv5的复杂跨域场景下的猪个体识别与计数[J]. 农业工程学报, 2022, 38(17): 168-175.
[5] Zhang, G., Zhao, Y., Fu, P., Luo, W., Shao, Q., Zhang, T., et al. (2024) A Reliable Unmanned Aerial Vehicle Multi-Target Tracking System with Global Motion Compensation for Monitoring Procapra przewalskii. Ecological Informatics, 81, Article 102556. [Google Scholar] [CrossRef
[6] Chen, X., Pu, H., He, Y., Lai, M., Zhang, D., Chen, J., et al. (2023) An Efficient Method for Monitoring Birds Based on Object Detection and Multi-Object Tracking Networks. Animals, 13, Article 1713. [Google Scholar] [CrossRef] [PubMed]
[7] Zheng, Z., Li, J. and Qin, L. (2023) YOLO-BYTE: An Efficient Multi-Object Tracking Algorithm for Automatic Monitoring of Dairy Cows. Computers and Electronics in Agriculture, 209, Article 107857. [Google Scholar] [CrossRef
[8] Xu, B., Wang, W., Falzon, G., Kwan, P., Guo, L., Sun, Z., et al. (2020) Livestock Classification and Counting in Quadcopter Aerial Images Using Mask R-CNN. International Journal of Remote Sensing, 41, 8121-8142. [Google Scholar] [CrossRef
[9] Liu, S., Zhao, C., Zhang, H., Li, Q., Li, S., Chen, Y., et al. (2024) ICNet: A Dual-Branch Instance Segmentation Network for High-Precision Pig Counting. Agriculture, 14, Article 141. [Google Scholar] [CrossRef
[10] Huang, E., Mao, A., Gan, H., Camila Ceballos, M., Parsons, T.D., Xue, Y., et al. (2021) Center Clustering Network Improves Piglet Counting under Occlusion. Computers and Electronics in Agriculture, 189, Article 106417. [Google Scholar] [CrossRef
[11] He, K., Gkioxari, G., Dollar, P. and Girshick, R. (2017) Mask R-CNN. 2017 IEEE International Conference on Computer Vision (ICCV), Venice, 22-29 October 2017, 2980-2988. [Google Scholar] [CrossRef
[12] Ultralytics (n.d.) YOLOv5.
https://github.com/ultralytics/yolov5
[13] Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C., et al. (2016) SSD: Single Shot MultiBox Detector. Computer VisionECCV 2016, Amsterdam, 11-14 October 2016, 21-37. [Google Scholar] [CrossRef
[14] Chen, L., Zhu, Y., Papandreou, G., Schroff, F. and Adam, H. (2018) Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation. Computer VisionECCV 2018, Munich, 8-14 September 2018, 833-851. [Google Scholar] [CrossRef