2611005567
  • Open Access
  • Article

Boundary-Aware Semantic Segmentation of Pig Point Clouds in Commercial Housing Environments

  • Zhankang Xu 1,2,†,   
  • Fei Shi 1,3,†,   
  • Xiangyu Qi 1,   
  • Zhaoyang Wang 1,   
  • Mengxin Guo 1,   
  • Yikai Fan 1,   
  • Simon X. Yang 4,   
  • Qifeng Li 1,* and 
  • Weihong Ma 1,4,*

Received: 23 June 2026 | Revised: 15 October 2026 | Accepted: 04 November 2026 | Published: 18 November 2026

Abstract

In commercial pig-housing environments, contact between pig-body point clouds and background structures can produce blurred boundaries, local adhesion, and background misclassification, which may propagate to downstream three-dimensional phenotyping. This study proposes a boundary-aware pig point-cloud segmentation method based on an Octree Transformer backbone. The framework combines multi-scale feature fusion, soft-distance boundary pseudo-labels, and bidirectional semantic-boundary interaction. On the prespecified independent test split, the method achieved an accuracy (Acc) of 98.65%, a mean intersection over union (mIoU) of 97.36%, and a boundary intersection over union (B-IoU of 88.77%. These are single-run point estimates; inferential significance and variability across random initializations were not assessed. The evaluation was intended to examine the complete boundary-aware workflow under a fixed independent animal-level protocol rather than to establish statistical significance from small numerical margins. The observed advantage was largest for B-IoU, consistent with the method’s explicit boundary objective, and should therefore be interpreted together with Acc, mIoU, and qualitative results. The findings support the method under the two sampled farms and fixed acquisition configurations, while cross-farm and cross-device generalization remain to be established.

References 

  • 1.

    Dohmen, R.; Catal, C.; Liu, Q. Computer vision-based weight estimation of livestock: A systematic literature review. N. Z. J. Agric. Res. 2022, 65, 227–247. https://doi.org/10.1080/00288233.2021.1876107.

  • 2.

    Ma, W.; Qi, X.; Sun, Y.; et al. Computer Vision-Based Measurement Techniques for Livestock Body Dimension and Weight: A Review. Agriculture 2024, 14, 306. https://doi.org/10.3390/agriculture14020306.

  • 3.

    Ma, W.; Guo, M.; Li, Z.; et al. Computer vision-based livestock weight measurement: Principles, methods, and challenges. Intell. Robot. 2026, 6, 205–228. https://doi.org/10.20517/ir.2026.11.

  • 4.

    Wang, K.; Guo, H.; Ma, Q.; et al. A portable and automatic Xtion-based measurement system for pig body size. Comput. Electron. Agric. 2018, 148, 291–298. https://doi.org/10.1016/j.compag.2018.03.018.

  • 5.

    Shi, S.; Yin, L.; Liang, S.; et al. Research on 3D surface reconstruction and body size measurement of pigs based on multi-view RGB-D cameras. Comput. Electron. Agric. 2020, 175, 105543. https://doi.org/10.1016/j.compag.2020.105543.

  • 6.

    Guo, H.; Li, Z.; Ma, Q.; et al. A bilateral symmetry based pose normalization framework applied to livestock body measurement in point clouds. Comput. Electron. Agric. 2019, 160, 59–70. https://doi.org/10.1016/j.compag.2019.03.010.

  • 7.

    Ruchay, A.; Kober, V.; Dorofeev, K.; et al. Accurate body measurement of live cattle using three depth cameras and non-rigid 3-D shape recovery. Comput. Electron. Agric. 2020, 179, 105821. https://doi.org/10.1016/j.compag.2020.105821.

  • 8.

    Qi, C.R.; Su, H.; Mo, K.; et al. PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 652–660. https://doi.org/10.1109/cvpr.2017.16.

  • 9.

    Qi, C.R.; Yi, L.; Su, H.; et al. PointNet++: Deep hierarchical feature learning on point sets in a metric space. Adv. Neural Inf. Process. Syst. 2017, 30, 5099–5108.

  • 10.

    Wang, Y.; Sun, Y.; Liu, Z.; et al. Dynamic Graph CNN for Learning on Point Clouds. ACM Trans. Graph. 2019, 38, 1–12. https://doi.org/10.1145/3326362.

  • 11.

    Thomas, H.; Qi, C.R.; Deschaud, J.E.; et al. KPConv: Flexible and Deformable Convolution for Point Clouds. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 6410–6419. https://doi.org/10.1109/iccv.2019.00651.

  • 12.

    Zhao, H.; Jiang, L.; Jia, J.; et al. Point Transformer. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021; pp. 16239–16248. https://doi.org/10.1109/iccv48922.2021.01595.

  • 13.

    Qian, G.; Li, Y.; Peng, H.; et al. PointNeXt: Revisiting PointNet++ with improved training and scaling strategies. Adv. Neural Inf. Process. Syst. 2022, 35, 23192–23204.

  • 14.

    Wang, P.S. OctFormer: Octree-based Transformers for 3D Point Clouds. ACM Trans. Graph. 2023, 42, 1–11. https://doi.org/10.1145/3592131.

  • 15.

    Lin, R.; Hu, H.; Wen, Z.; et al. Research on denoising and segmentation algorithm application of pigs’ point cloud based on DBSCAN and PointNet. In Proceedings of the 2021 IEEE International Workshop on Metrology for Agriculture and Forestry (MetroAgriFor), Trento-Bolzano, Italy, 3–5 November 2021; pp. 42–47. https://doi.org/10.1109/metroagrifor52389.2021.9628501.

  • 16.

    Wang, S.; Jiang, H.; Qiao, Y.; et al. A Method for Obtaining 3D Point Cloud Data by Combining 2D Image Segmentation and Depth Information of Pigs. Animals 2023, 13, 2472. https://doi.org/10.3390/ani13152472.

  • 17.

    Chang, K.; Ma, W.; Xu, X.; et al. A Point Cloud Segmentation Method for Pigs from Complex Point Cloud Environments Based on the Improved PointNet++. Agriculture 2024, 14, 720. https://doi.org/10.3390/agriculture14050720.

  • 18.

    Zhao, W.; Zhang, R.; Wang, Q.; et al. BFANet: Revisiting 3D Semantic Segmentation with Boundary Feature Analysis. In Proceedings of the 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 11–15 June 2025; pp. 29395–29405. https://doi.org/10.1109/cvpr52734.2025.02737.

  • 19.

    Tang, L.; Zhan, Y.; Chen, Z.; et al. Contrastive Boundary Learning for Point Cloud Segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 8479–8489. https://doi.org/10.1109/cvpr52688.2022.00830.

  • 20.

    Lu, T.; Wang, L.; Wu, G. CGA-Net: Category Guided Aggregation for Point Cloud Semantic Segmentation. In Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 19–25 June 2021; pp. 11688–11697. https://doi.org/10.1109/cvpr46437.2021.01152.

  • 21.

    Hu, H.; Yu, J.; Yin, L.; et al. An improved PointNet++ point cloud segmentation model applied to automatic measurement method of pig body size. Comput. Electron. Agric. 2023, 205, 107560. https://doi.org/10.1016/j.compag.2022.107560.

  • 22.

    Peng, W.; Liu, Z.; Cai, J.; et al. Research and application progress of electronic ear tags as infrastructure for precision livestock industry: A review. Intell. Robot. 2025, 5, 433–449. https://doi.org/10.20517/ir.2025.22.

  • 23.

    Pagin, G.; Martello, L.S.; Tabile, R.A.; et al. Proposing a framework for body mass prediction with point clouds: A study applied in typical swine pen environments. Smart Agric. Technol. 2025, 12, 101200. https://doi.org/10.1016/j.atech.2025.101200.

  • 24.

    Zhang, Z. Flexible camera calibration by viewing a plane from unknown orientations. In Proceedings of the Seventh IEEE International Conference on Computer Vision, Kerkyra, Greece, 20–27 September 1999; Volume 1, pp. 666–673. https://doi.org/10.1109/iccv.1999.791289.

  • 25.

    Wang, P.S.; Liu, Y.; Guo, Y.X.; et al. O-CNN: Octree-based convolutional neural networks for 3D shape analysis. ACM Trans. Graph. 2017, 36, 1–11. https://doi.org/10.1145/3072959.3073608.

  • 26.

    Zhou, K.; Gong, M.; Huang, X.; et al. Data-Parallel Octrees for Surface Reconstruction. IEEE Trans. Vis. Comput. Graph. 2011, 17, 669–681. https://doi.org/10.1109/tvcg.2010.75.

  • 27.

    Wang, J.; Sun, K.; Cheng, T.; et al. Deep High-Resolution Representation Learning for Visual Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 43, 3349–3364. https://doi.org/10.1109/tpami.2020.2983686.

  • 28.

    Long, J.; Shelhamer, E.; Darrell, T. Fully convolutional networks for semantic segmentation. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 3431–3440. https://doi.org/10.1109/cvpr.2015.7298965.

  • 29.

    Milletari, F.; Navab, N.; Ahmadi, S.A. V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation. In Proceedings of the 2016 Fourth International Conference on 3D Vision (3DV), Stanford, CA, USA, 25–28 October 2016; pp. 565–571. https://doi.org/10.1109/3dv.2016.79.

  • 30.

    Peng, B.; Wu, X.; Jiang, L.; et al. OA-CNNs: Omni-Adaptive Sparse CNNs for 3D Semantic Segmentation. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; pp. 21305–21315. https://doi.org/10.1109/cvpr52733.2024.02013.

  • 31.

    Wijaya, K.T.; Paek, D.H.; Kong, S.H. Advanced Feature Learning on Point Clouds Using Multi-Resolution Features and Learnable Pooling. Remote Sens. 2024, 16, 1835. https://doi.org/10.3390/rs16111835.

  • 32.

    Wu, X.; Jiang, L.; Wang, P.S.; et al. Point Transformer V3: Simpler, Faster, Stronger. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; pp. 4840–4851. https://doi.org/10.1109/cvpr52733.2024.00463.

Share this article:
How to Cite
Xu, Z.; Shi, F.; Qi, X.; Wang, Z.; Guo, M.; Fan, Y.; Yang, S. X.; Li, Q.; Ma, W. Boundary-Aware Semantic Segmentation of Pig Point Clouds in Commercial Housing Environments. Sensors and AI 2026, 2 (1), 50–71. https://doi.org/10.53941/sai.2026.100004.
RIS
BibTex
Copyright & License
article copyright Image
Copyright (c) 2026 by the authors.
Article Metrics
45
Article Views
0
Citations