为了提高羊只计数的准确性和实用性,本文结合计算机视觉技术,提出了一种基于Mask R-CNN轻量级羊只计数算法。针对数据集的制作,前往内蒙古呼和浩特白塔村的养殖户进行数据采集,制作了羊只图像分割数据集。在对模型的轻量化部分,首先,将...为了提高羊只计数的准确性和实用性,本文结合计算机视觉技术,提出了一种基于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更适合实际应用中的高效羊只计数。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轻量级羊只计数算法。针对数据集的制作,前往内蒙古呼和浩特白塔村的养殖户进行数据采集,制作了羊只图像分割数据集。在对模型的轻量化部分,首先,将特征提取网络的部分替换为 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更适合实际应用中的高效羊只计数。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.