王浩, 曾雅琼, 裴宏亮, 龙定彪, 徐顺来, 杨飞云, 刘作华, 王德麾. 改进Faster R-CNN的群养猪只圈内位置识别与应用[J]. 农业工程学报, 2020, 36(21): 201-209. DOI: 10.11975/j.issn.1002-6819.2020.21.024
    引用本文: 王浩, 曾雅琼, 裴宏亮, 龙定彪, 徐顺来, 杨飞云, 刘作华, 王德麾. 改进Faster R-CNN的群养猪只圈内位置识别与应用[J]. 农业工程学报, 2020, 36(21): 201-209. DOI: 10.11975/j.issn.1002-6819.2020.21.024
    Wang Hao, Zeng Yaqiong, Pei Hongliang, Long Dingbiao, Xu Shunlai, Yang Feiyun, Liu Zuohua, Wang Dehui. Recognition and application of pigs' position in group pens based on improved Faster R-CNN[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(21): 201-209. DOI: 10.11975/j.issn.1002-6819.2020.21.024
    Citation: Wang Hao, Zeng Yaqiong, Pei Hongliang, Long Dingbiao, Xu Shunlai, Yang Feiyun, Liu Zuohua, Wang Dehui. Recognition and application of pigs' position in group pens based on improved Faster R-CNN[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(21): 201-209. DOI: 10.11975/j.issn.1002-6819.2020.21.024

    改进Faster R-CNN的群养猪只圈内位置识别与应用

    Recognition and application of pigs' position in group pens based on improved Faster R-CNN

    • 摘要: 群养圈栏内猪只的位置分布是反映其健康福利的重要指标。为解决传统人工观察方式存在的人力耗费大、观察时间长和主观性强等问题,实现群养猪只圈内位置的高效准确获取,该研究以三原色(Red Green Blue,RGB)图像为数据源,提出了改进的快速区域卷积神经网络(Faster Region Convolutional Neural Networks,Faster R-CNN)的群养猪只圈内位置识别算法,将时间序列引入候选框区域算法,设计Faster R-CNN和轻量化CNN网络的混合体,将残差网络(Residual Network,ResNet)作为特征提取卷积层,引入PNPoly算法判断猪只在圈内的所处区域。对育成和育肥2个饲养阶段的3个猪圈进行24 h连续98 d的视频录像,从中随机提取图像25 000张作为训练集、验证集和测试集,经测试该算法识别准确率可达96.7%,识别速度为每帧0.064 s。通过该算法获得了不同猪圈和日龄的猪群位置分布热力图、分布比例和昼夜节律,猪圈饲养面积的增加可使猪群在实体地面的分布比例显著提高(P<0.05)。该方法可为猪只群体行为实时监测提供技术参考。

       

      Abstract: Pigs' positional change in the group pens is a key indicator reflecting the behavioral expression and welfare of pigs. In this study, RGB (Red Green Blue) images were used as data sources, and an improved Faster R-CNN (Faster Region Convolutional Neural Networks) algorithm for pigs' position recognition in group pen was proposed. The algorithm introduced the time series into the candidate box region algorithm, designed a hybrid of Faster R-CNN and lightweight CNN network, and improved the recognition accuracy and recognition speed. The Residual Network (ResNet) was used as the feature extraction convolutional layer to deepen the network depth, thereby improving the feature extraction ability to improve the algorithm robustness. The area of the pigs in the pen was judged by the PNPoly algorithm. The experiment was carried out 24 h of continuous 98 d of video recording on 3 pens (pen 3, 4, and 12) in 2 breeding stages (growing and fattening). Pen 3 and 4 had a smaller area and the size was 4.10 m×3.14 m. Pen 12 had a larger area and the size was 5.16 m×3.14 m. Bite chains had been equipped on the slatted floor area in pen 4 and 12. The experiment randomly extracted 25 000 pictures from the video for algorithm research, and 20 000 images from it as the training set, 3 000 as the verification set, and 2 000 as the test set. Through testing, when the network depth was 128 layers, both recognition accuracy and detection time could be considered. The recognition speed was 0.064 s/frame and the recognition accuracy was 96.7%. The optimal number of shared convolutional layers and neighborhood range rate were 128 and 0.3, respectively. The algorithm was used to obtain the heat map, position distribution ratio, and diurnal rhythm changes of the position distribution of pigs of different pens and feeding days. It was found that the locations of the pigs in all pens were significantly affected by the type of floor. There was a clear dividing line between the solid floor and the slatted floor in the heat map of all pens on all feeding days. The size of the pen had a significant effect on the position distribution of pigs. At the end of the growing stage, the proportion of pigs on the solid floor area in pen 12 was significantly increased by 8.2% and 41.7% compared with pen 3 and 4, respectively (P<0.05). At the end of the fattening stage, the proportion of pigs on the solid floor area in pen 12 was significantly increased by 7.9% and 30.4% compared with pen 3 and 4, respectively (P<0.05). And the distribution ratio of pigs on the solid floor area decreased with the increase of feeding days. From the change of diurnal rhythm, the rest period, activity period, and feeding period of the pigs were determined quickly, the night sleep time was 19:00-6:00, the lunch break time was 10:00-13:00, and the feeding time was 8:00-9:00 and 14:00-15:00 which coincided with the time of the manager added to feed. The distribution of pigs in the feeding period was affected by the installation position of the feeder, and therefore, when analyzing the free distribution pattern of pigs' position in group pens, it was recommended to exclude them or analyze them separately. Installing pig bite chains in the slatted floor area could help pigs distinguish the activity area from the lying area. This method realized the rapid and accurate identification of the position within the pigpen in the growing and fattening group mode. The result could also help to enrich the evaluation indicators of the herd behavior in the research of pigs' breeding facilities and environment control.

       

    /

    返回文章
    返回