新浪财经

猪三维点云体尺自动计算模型Pig Back Transformer(《智慧农业(中英文)》2024年第4期)

市场资讯 2025.01.06 18:30

引用格式

王宇啸, 石源源, 陈招达, 吴珍芳, 蔡更元, 张素敏, 尹令. 猪三维点云体尺自动计算模型Pig Back Transformer[J]. 智慧农业(中英文), 2024, 6(4): 76-90.

Citation:WANG Yuxiao, SHI Yuanyuan, CHEN Zhaoda, WU Zhenfang, CAI Gengyuan, ZHANG Sumin, YIN Ling. Pig Back Transformer: Automatic 3D Pig Body Measurement Model[J]. Smart Agriculture, 2024, 6(4): 76-90.

猪三维点云体尺自动计算模型Pig Back Transformer

王宇啸2, 石源源1, 陈招达1, 吴珍芳2,3,4, 蔡更元2,3,4, 张素敏1, 尹令1,2,4*

(1.华南农业大学 数学与信息学院,广东广州 510642,中国;2.国家生猪种业工程技术研究中心,广东广州 510642,中国;3.华南农业大学 动物科学学院,广东广州 510642,中国;4.猪禽种业全国重点实验室,广东广州510640,中国)

摘要:[目的/意义]为了提高体尺关键点定位准确率,猪三维点云体尺自动测量方法会采用点云分割,在各个分割后局部点云定位测量关键点,以减少点云之间相互干扰。然而点云分割网络通常需要消耗较大计算资源,且现有测量点定位效果仍有待提升空间。本研究旨在通过设计关键点生成网络从猪体点云中提取出各体尺测量所需关键点。在降低显存资源需求的同时提高测量关键点定位效果,提高体尺测量的效率和精度。

[方法]针对猪三维表面点云进行体尺测量,提出了一种定位猪体尺关键点的模型Pig Back Transformer。模型分为两个模块,分别设计了两种改进的Transformer自注意力编码器,第一模块为全局关键点模块,首先设计了一种猪背部边缘点提取算法用于获取边缘点,再使用edge encoder编码器以边缘点集合作为输入,edge encoder的edge attention中加入了边缘点和质点的偏移距离信息;第二模块为关键点生成模块,使用了back attention机制的back encoder,其中加入了与质心和第一模块生成的全局关键点的偏移量,并将偏移量与点云注意力通过按位max pooling操作结合,最后通过生成猪的体尺测量关键点和背脊走向点。最后设计了使用关键点和背脊走向点作为输入的体尺算法。

[结果和讨论]对比关键点和背脊走向点生成任务上Pig Back Transformer表现最佳,并对比体尺计算结果与人工测量结果,体长相对误差为0.63%,相对PointNet++、Point Transformer V2、Point Cloud Transforme、OctFormer PointTr等模型有较大提升。

[结论]Pig Back Transformer能相对准确地生成猪体尺关键点,提高体尺测量数据准确度,并且通过点云特征定位体尺关键点节省了计算资源,为无接触牲畜体尺测量提供了新思路。

关键词: Pig Back Transformer;三维点云;体尺自动测量;测量关键点定位;深度相机;自注意力机制

文章图片

Fig. 1  Process flow diagram of pig's point cloud body size calculation

Fig. 2  Tunnel for pig's point cloud collect using Azure Kinect

Fig. 3  Registration process of the rigid registration box in Pig Back Transformer model

Fig. 4  The smoothing effect of point cloud using local range moving least squares method

Fig. 5  Origin point cloud & trimmed point cloud

Fig. 6  The transformation process of the fitted plane in edge point extraction

Fig. 7  The projectiles of k nearest in polar coordinate system in edge detection algorithm

Fig. 8  The Pig Back Transformer's structure proposed in this research

Fig. 9  Structures of Edge Embedding & Edge Transformer

Fig. 10  Structures of Back Embedding & Back Transformer 

Fig. 11  Key points generated by Pig Back Transformer

Fig. 12  Human marked measurement key points and spine direction points

Fig. 13  Key points for pig body length calculating & the fitting curve in Pig Back Transformer model

Fig. 14  Key points & slicing area for height, width, chest circumstance and abdomen circumstance in body size calculation algorithm

Fig. 15  Slice for shoulder,abdomen and hip width calculation in width calculation process

Fig. 16  Fitting results of chest circumference

Fig. 17  Fitting curve of pig's abdomen circumference 

Fig. 18  Results of edge detection for pig back's point cloud captured from top angle

Fig. 19  Side view of the result of edge detection for pig back's point cloud captured from top angle

Fig. 20  Edge detection result after trimmed for pig back's point cloud captured from top angle

图 21 Point++, OctFormer, Pig Back Transformer关键点和猪背脊走向点拟合效果和人工标记对比图

Fig. 21  Key points & pig spine direction points generated by PointNet++, OctFormer, Pig Back Transformer compare with manual labeling

Fig. 22  Ablation experiment of edge detection and point cloud trim

Fig. 23  The distributed of body length and abdomen width when pig's posture changed significantly

作者介绍

尹令  教授

尹令,华南农业大学教授,猪禽种业全国重点实验室、国家生猪种业工程技术研究中心和广州市智慧农业重点实验室成员。主要研究方向为种畜生长、繁殖、行为等表型自动获取技术和产业化配套工程技术方向。

来源:《智慧农业(中英文)》2024年第4期

(转自:智慧农业期刊)

加载中...