Liu Yao, Zhou Jie, Bian Yifan, Wang Taishan, Xue Hongxiang, Liu Longshen
College of Artificial Intelligence, Nanjing Agricultural University, Nanjing 210031, China.
Animals (Basel). 2024 Mar 29;14(7):1046. doi: 10.3390/ani14071046.
Pig farming is a crucial sector in global animal husbandry. The weight and body dimension data of pigs reflect their growth and development status, serving as vital metrics for assessing their progress. Presently, pig weight and body dimensions are predominantly measured manually, which poses challenges such as difficulties in herding, stress responses in pigs, and the control of zoonotic diseases. To address these issues, this study proposes a non-contact weight estimation and body measurement model based on point cloud data from pig backs. A depth camera was installed above a weighbridge to acquire 3D point cloud data from 258 Yorkshire-Landrace crossbred sows. We selected 200 Yorkshire-Landrace sows as the research subjects and applied point cloud filtering and denoising techniques to their three-dimensional point cloud data. Subsequently, a K-means clustering segmentation algorithm was employed to extract the point cloud corresponding to the pigs' backs. A convolutional neural network with a multi-head attention was established for pig weight prediction and added RGB information as an additional feature. During the data processing process, we also measured the back body size information of the pigs. During the model evaluation, 58 Yorkshire-Landrace sows were specifically selected for experimental assessment. Compared to manual measurements, the weight estimation exhibited an average absolute error of 11.552 kg, average relative error of 4.812%, and root mean square error of 11.181 kg. Specifically, for the MACNN, incorporating RGB information as an additional feature resulted in a decrease of 2.469 kg in the RMSE, a decrease of 0.8% in the MAPE, and a decrease of 1.032 kg in the MAE. Measurements of shoulder width, abdominal width, and hip width yielded corresponding average relative errors of 3.144%, 3.798%, and 3.820%. In conclusion, a convolutional neural network with a multi-head attention was established for pig weight prediction, and incorporating RGB information as an additional feature method demonstrated accuracy and reliability for weight estimation and body dimension measurement.
养猪业是全球畜牧业的一个关键部门。猪的体重和身体尺寸数据反映了它们的生长发育状况,是评估其生长进程的重要指标。目前,猪的体重和身体尺寸主要通过人工测量,这带来了诸如赶猪困难、猪的应激反应以及人畜共患病控制等挑战。为解决这些问题,本研究提出了一种基于猪背部点云数据的非接触式体重估计和身体测量模型。在一个地磅上方安装了一台深度相机,以获取258头大白长白杂交母猪的三维点云数据。我们选取了200头大白长白母猪作为研究对象,并对其三维点云数据应用了点云滤波和去噪技术。随后,采用K均值聚类分割算法提取猪背部对应的点云。建立了一个具有多头注意力的卷积神经网络用于猪体重预测,并添加RGB信息作为附加特征。在数据处理过程中,我们还测量了猪的背部身体尺寸信息。在模型评估过程中,特意选取了58头大白长白母猪进行实验评估。与人工测量相比,体重估计的平均绝对误差为11.552千克,平均相对误差为4.812%,均方根误差为11.181千克。具体而言,对于MACNN,将RGB信息作为附加特征使得均方根误差降低了2.469千克,平均绝对百分比误差降低了0.8%,平均绝对误差降低了1.032千克。肩部宽度、腹部宽度和臀部宽度的测量产生的相应平均相对误差分别为3.144%、3.798%和3.820%。总之,建立了一个具有多头注意力的卷积神经网络用于猪体重预测,并且将RGB信息作为附加特征的方法在体重估计和身体尺寸测量方面显示出准确性和可靠性。