| 注册
首页|期刊导航|智慧农业(中英文)|基于改进实例分割算法的区域养殖生猪计数系统

基于改进实例分割算法的区域养殖生猪计数系统

张岩琪 周硕 张凝 柴秀娟 孙坦

智慧农业(中英文)2024,Vol.6Issue(4):53-63,11.
智慧农业(中英文)2024,Vol.6Issue(4):53-63,11.DOI:10.12133/j.smartag.SA202310001

基于改进实例分割算法的区域养殖生猪计数系统

A Regional Farming Pig Counting System Based on Improved Instance Segmentation Algorithm

张岩琪 1周硕 1张凝 1柴秀娟 1孙坦1

作者信息

  • 1. 中国农业科学院 农业信息研究所,北京 100081,中国||农业农村部农业大数据重点实验室,北京 100081,中国
  • 折叠

摘要

Abstract

[Objective]Currently,pig farming facilities mainly rely on manual counting for tracking slaughtered and stored pigs.This is not only time-consuming and labor-intensive,but also prone to counting errors due to pig movement and potential cheating.As breeding opera-tions expand,the periodic live asset inventories put significant strain on human,material and financial resources.Although methods based on electronic ear tags can assist in pig counting,these ear tags are easy to break and fall off in group housing environments.Most of the existing methods for counting pigs based on computer vision require capturing images from a top-down perspective,ne-cessitating the installation of cameras above each hogpen or even the use of drones,resulting in high installation and maintenance costs.To address the above challenges faced in the group pig counting task,a high-efficiency and low-cost pig counting method was proposed based on improved instance segmentation algorithm and WeChat public platform. [Methods]Firstly,a smartphone was used to collect pig image data in the area from a human view perspective,and each pig's outline in the image was annotated to establish a pig count dataset.The training set contains 606 images and the test set contains 65 images.Secondly,an efficient global attention module was proposed by improving convolutional block attention module(CBAM).The effi-cient global attention module first performed a dimension permutation operation on the input feature map to obtain the interaction be-tween its channels and spatial dimensions.The permuted features were aggregated using global average pooling(GAP).One-dimen-sional convolution replaced the fully connected operation in CBAM,eliminating dimensionality reduction and significantly reducing the model's parameter number.This module was integrated into the YOLOv8 single-stage instance segmentation network to build the pig counting model YOLOv8x-Ours.By adding an efficient global attention module into each C2f layer of the YOLOv8 backbone net-work,the dimensional dependencies and feature information in the image could be extracted more effectively,thereby achieving high-accuracy pig counting.Lastly,with a focus on user experience and outreach,a pig counting WeChat mini program was developed based on the WeChat public platform and Django Web framework.The counting model was deployed to count pigs using images cap-tured by smartphones. [Results and Discussions]Compared with existing methods of Mask R-CNN,YOLACT(Real-time Instance Segmentation),PolarMask,SOLO and YOLOv5x,the proposed pig counting model YOLOv8x-Ours exhibited superior performance in terms of accuracy and sta-bility.Notably,YOLOv8x-Ours achieved the highest accuracy in counting,with errors of less than 2 and 3 pigs on the test set.Specifi-cally,93.8%of the total test images had counting errors of less than 3 pigs.Compared with the two-stage instance segmentation algo-rithm Mask R-CNN and the YOLOv8x model that applies the CBAM attention mechanism,YOLOv8x-Ours showed performance im-provements of 7.6%and 3%,respectively.And due to the single-stage design and anchor-free architecture of the YOLOv8 model,the processing speed of a single image was only 64 ms,1/8 of Mask R-CNN.By embedding the model into the WeChat mini program platform,pig counting was conducted using smartphone images.In cases where the model incorrectly detected pigs,users were given the option to click on the erroneous location in the result image to adjust the statistical outcomes,thereby enhancing the accuracy of pig counting. [Conclusions]The feasibility of deep learning technology in the task of pig counting was demonstrated.The proposed method elimi-nates the need for installing hardware equipment in the breeding area of the pig farm,enabling pig counting to be carried out effortless-ly using just a smartphone.Users can promptly spot any errors in the counting results through image segmentation visualization and easily rectify any inaccuracies.This collaborative human-machine model not only reduces the need for extensive manpower but also guarantees the precision and user-friendliness of the counting outcomes.

关键词

生猪计数/深度学习/微信小程序/YOLOv8/实例分割

Key words

pig counting/deep learning/WeChat mini program/YOLOv8/instance segmentation

分类

信息技术与安全科学

引用本文复制引用

张岩琪,周硕,张凝,柴秀娟,孙坦..基于改进实例分割算法的区域养殖生猪计数系统[J].智慧农业(中英文),2024,6(4):53-63,11.

基金项目

新一代人工智能国家科技重大专项(2022ZD0115702) (2022ZD0115702)

国家自然科学基金项目(61976219) (61976219)

北京市智慧农业创新团队项目资助(BAIC10-2024) (BAIC10-2024)

中国农业科学院创新工程(CAAS-ASTIP-2023-AII) (CAAS-ASTIP-2023-AII)

中央级公益性科研院所基本科研业务费专项(JBYW-AII-2023-04,JBYW-AII-2022-14) National Science and Technology Major Project(2022ZD0115702) (JBYW-AII-2023-04,JBYW-AII-2022-14)

National Natural Science Foundation of China(61976219) (61976219)

Beijing Smart Agriculture Innovation Consortium Project(BAIC10-2024) (BAIC10-2024)

Innovation Program of Chinese Academy of Agricultural Sciences(CAAS-ASTIP-2023-AII) (CAAS-ASTIP-2023-AII)

Central Public-interest Scientific Institution Basal Research Fund(JBYW-AII-2023-04,JBYW-AII-2022-14) (JBYW-AII-2023-04,JBYW-AII-2022-14)

智慧农业(中英文)

OACSTPCD

2096-8094

访问量0
|
下载量0
段落导航相关论文