Next Article in Journal
Effects of Low-Pressure Systems on Temperature, Humidity, Egg Production, and Feed Utilization Efficiency in Large-Scale Poultry Houses during Summer
Previous Article in Journal
The Effects of Replacing Soybean Meal with Chlorella vulgaris in Laying Hen Diets on Performance and Physical Characteristics of Eggs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Cattle Body Size Measurement Based on DUOS–PointNet++

1
State Key Laboratory of Reproductive Regulation and Breeding of Grassland Livestock, Inner Mongolia University, Hohhot 010021, China
2
College of Electronic Information Engineering, Inner Mongolia University, Hohhot 010021, China
3
Research Base for Dairy Farming Engineering and Full Mechanization of Equipment, Ministry of Agriculture and Rural Affairs, Inner Mongolia Agricultural University, Hohhot 010018, China
*
Author to whom correspondence should be addressed.
Animals 2024, 14(17), 2553; https://doi.org/10.3390/ani14172553
Submission received: 29 July 2024 / Revised: 22 August 2024 / Accepted: 24 August 2024 / Published: 2 September 2024
(This article belongs to the Section Cattle)

Abstract

:

Simple Summary

In intelligent agriculture, non-contact, automatic body size measurement is widely used for livestock. However, the common measurement methods based on the whole point cloud are complex and prone to errors because of the positions of the cattle. To measure the body sizes of livestock more accurately, a cattle body measuring system is proposed. The system includes a new algorithm called dynamic unbalanced octree grouping (DUOS), based on PointNet++, and an efficient method of body size measurement based on segmentation results. The network divides the cow into the following seven parts: body length, withers height, hip height, thoracic circumference, abdominal circumference, and cannon circumference. Compared with some of the other models, the system has higher segmentation accuracy and lower measurement errors. The system can be widely applied in the non-contact body measurement of livestock; in addition, it can increase efficiency and reduce costs. It also has broad prospects in the intelligent livestock industry.

Abstract

The common non-contact, automatic body size measurement methods based on the whole livestock point cloud are complex and prone to errors. Therefore, a cattle body measuring system is proposed. The system includes a new algorithm called dynamic unbalanced octree grouping (DUOS), based on PointNet++, and an efficient method of body size measurement based on segmentation results. This system is suitable for livestock body feature sampling. The network divides the cow into seven parts, including the body and legs. Moreover, the key points of body size are located in the different parts. It combines density measurement, point cloud slicing, contour extraction, point cloud repair, etc. A total of 137 items of cattle data are collected. Compared with some of the other models, the DUOS algorithm improves the accuracy of the segmentation task and mean intersection by 0.53% and 1.21%, respectively. Moreover, compared with the manual measurement results, the relative errors of the experimental measurement results are as follows: withers height, 1.18%; hip height, 1.34%; body length, 2.52%; thoracic circumference, 2.12%; abdominal circumference, 2.26%; and cannon circumference, 2.78%. In summary, the model is proven to have a good segmentation effect on cattle bodies and is suitable for cattle body size measurement.

1. Introduction

In evaluating cattle indicators, body size parameters are essential [1]. In the past, livestock data were measured manually [2,3], resulting in detrimental effects related to animal welfare protection [4]. Non-contact measurement is the key aspect of the integration of intelligence into animal husbandry, and previous studies have reported many successful cases [5].
A two-dimensional (2D) image acquisition measurement system was established to calculate the size data of cows [6]. A foreground extraction algorithm based on SLI and FCM and a point extraction measurement algorithm were proposed to extract and calculate the body size of sheep [7].
However, the two-dimensional image processing method requires strict calibration and only measures partial body sizes accurately, while lacking precision for three-dimensional (3D) spatial data. To solve these problems, several researchers have used the Kinect series of depth cameras for depth data collection [8,9,10]. In [11,12], multiple depth cameras were used to obtain the point cloud and perform 3D reconstruction, which is a common method. Subsequently, the Poisson surface reconstruction algorithm was used to complete the measurements [13]. The symmetry properties of unilateral or bilateral point clouds have been applied [14,15]. With registration using a cuboid and the polar coordinate transformation algorithm, it was possible to calculate the parameters more accurately [16]. Kinect v4 and YOLOv5 were used to remove cattle from the environment to measure body size [17]. Subsequently, fusion processing methods based on 2D and 3D data were proposed [18]. Depth-based camera features were used to classify and transform a pig’s posture based on its skeleton [19]. An acquisition method with a single depth camera placed on a rod was proposed [20]. In addition, an improved segmentation model to measure pig body size using part of the body was proposed [21]. Machine learning algorithms were used to measure the body size and weight of cows [22,23]. Depth images were used for cattle body condition scoring [24].
At present, most of cattle body size measurements based on a point cloud use the complete cattle point cloud after registration. The relationship between body size parameters and genome-wide association studies was investigated [25]. A measurement method involving the extraction of key points from the point cloud of the entire body of the cow was used to measure body size [26].
The advantage of this method is that it reduces the number of data processing steps and ensures the continuity of the data. However, due to the large number of points in the collected and processed cow’s complete point cloud, along with the varying positions and occlusions of different body parts, considerable time is consumed in model calculation. This also results in interference from the point clouds originating from other parts of the body, resulting in the positioning error of key points. Moreover, for nonrigid objects such as cattle, the traditional point cloud segmentation network model causes inaccurate segmentation, low evaluation parameters, poor robustness, and other problems.
To solve these problems, an improved deep learning model based on the improved octree algorithm and the segmentation model of PointNet++ is proposed. The proposed method can segment each part of the cattle point cloud, then locate the key points of cattle body measurement according to the geometric features, effectively improving the accuracy of the subsequent body measurement of cattle. Simultaneously, a measurement method is proposed to measure cattle body size based on the segmented body of the cow. The proposed method makes it easier to extract the key points of measurement, achieving higher accuracy.

2. Materials and Methods

In this study, no animals were used or cared for. Moreover, no animal care or ethics committee approval was required because the data used in the study were obtained from routine cattle herd management practices.

2.1. Data Collection

The cattle data collection was completed in 2023 in the pasture of Shengquan Animal Husbandry Co., Ltd., located in Wengniute Banner, Chifeng City, Inner Mongolia Autonomous Region, China. Kinect V2 was chosen because it is one of the most widely used cameras. It is able to cope with the body size measurement requirements in most cases. Three KinectV2 cameras were installed directly above and on the left and right sides, 1.2 m from the channel. When a target cow entered, each camera detected and collected the data synchronously, and the data were then saved to the computer. A field image is shown in Figure 1.

2.2. Point Cloud Preprocessing

Following the storage of the 3D cattle body point cloud data, RANSAC [27] and ICP [28] were used to register the data as a complete point cloud. The algorithms are simple, commonly used, and relatively effective registration algorithms. Filtering is used to remove the background point clouds, and part of the background point cloud noise is removed using CloudCompare software 2. 13. alpha. Outlier points are removed through radius filtering. The point cloud preprocessing is shown in Figure 2.
The point cloud data are normalized in the model before sampling, and the specific steps are as follows:
  • Take the average of each row of data in the point cloud to obtain the centroids;
  • Translate the point cloud so that the centroid is located at the origin;
  • Calculate the maximum norm of the point cloud data and normalize the data according to the maximum norm, so that the range of the point cloud data is between [−1, 1].

2.3. Data Marking

According to the real requirements of cattle body size measurement, the whole point cloud of the cow’s body is segmented to facilitate the follow-up body size measurement. Given that the head and tail of the cow play a minimal role in body size measurement in this study, they are excluded from the point cloud. The multiple complete point clouds of the cow are divided into several parts using CloudCompare software. Specifically, the legs and body of the cow are separated into seven distinct parts using CloudCompare, with each part being labeled accordingly. In addition, the cow’s legs are subdivided into four parts labeled 0–3, while the body of the cow is subdivided into three parts labeled 4–6, representing the front, middle, and back.

2.4. Improved Model

2.4.1. Overall Framework

Previous studies have proposed using the PointNet [29] and PointNet++ [30] methods to process point clouds and make improvements. The PointNet++ model uses the farthest point sampling (FPS) algorithm, which captures rigid deformation well. However, it does not perform well for nonrigid objects such as cattle. Therefore, in this study, an improved dynamic unbalanced octree sampling method is proposed to replace FPS in order to improve cattle segmentation using PointNet++. The specific architecture of the improved model is shown in Figure 3.
  • The processed cattle point cloud data, including the total number of data, the number of single data, and the data dimensions, are input;
  • The cow’s body point cloud is sampled and grouped based on the dynamic unbalanced octree grouping (DUOS) algorithm, and the maximum point that the number of leaf nodes can accommodate is n, where n 1 is defined as the number of sampling centers;
  • After sampling and grouping, the local point cloud is processed using PointNet;
  • Steps 2 and 3 are repeated;
  • The feature vectors are processed using PointNet.
The following inverse distance-weighted interpolation (Formula (1)) is used to calculate the weight according to the reciprocal of the distance; the attribute value of the unknown position is estimated, and the data are obtained. Hence, the characteristics of the point cloud ignored in the downsampling process and the labels of each point in the complete point cloud are obtained.
f ( j ) ( x ) = i = 1 k ω i x f i j i = 1 k ω i x ,   i f   d x , x i p 0   f o r   a l l   i f i j ,   i f   d x , x i p 0   f o r   a l l   i   where   ω i ( x ) = 1 d x , x i p , j = 1 , , C
6.
Seven classification values are obtained after processing. The maximum value is taken as the output result to complete the target cow’s point cloud segmentation. The cross-entropy loss function (Formula (2)) is used as the loss function for the network.
L o s s = 1 N i = 0 N 1 k = 0 N 1 y i , k ln p i , k
where y i , k means the true label, K is the number of label values, and p i , k is the probability of y i , k . The algorithm flow chart is shown in Figure 4.

2.4.2. Dynamic Unbalanced Octree Grouping

The proposed algorithm (1) constrains the number of points allowed in a leaf node instead of setting layers and (2) adds density determination to the sampling point selection in each leaf node.
Traditional octree segmentation is based on the number of layers, but cattle point clouds are characteristically dense in the body and sparse in the limbs. If the number of layers is fixed, the point cloud of the legs cannot properly fill the leaf node, which affects the feature weights in subsequent sampling. The DUOS algorithm determines whether to continue layering by controlling the amount of data in each leaf node and then constructs a non-balanced octree that better deals with the density of the point cloud in different regions.
To avoid noise points and extract richer feature points, a near-point dynamic collection system of adjacent points is set up to filter the noise points. The process is mainly divided into the following steps: (1) Select the node center point and take the point closest to the center point. (2) Establish the corresponding weights in each leaf node according to the number of points; then, the number of points from different leaves is dynamically extracted. (3) Set up the density measurement algorithm. When the number of target points extracted by each leaf remains unchanged, the density in a circle with a certain radius around each extraction point is measured. When the density is less than the threshold value, this point is removed and replaced by the next point until sufficient target points are extracted or all the points are looped.

2.5. Cattle Body Size Measurement

The entire point cloud of the cow is segmented; then, key points based on different parts are located and calculated to eliminate interference from other parts. Figure 5 shows the measurement methods, in which the parameters are abbreviated as follows: body length (BL), withers height (WH), hip height (HH), thoracic circumference (TC), abdominal circumference (AC), and cannon circumference (CC).

2.5.1. Body Height Measurement

To determine the cow’s WH and HH, (i) the front body point cloud and front leg point cloud and (ii) the back side point cloud and hind leg point cloud are used, respectively. The yellow areas are local extreme values selected from the upper part of the point cloud of the hind legs. Then, the midpoints p 0 and p 1 of the yellow areas and the midpoint p c of the two points are calculated. The plane parallel to the Y-axis is determined by p c . A body slice A is obtained, and the point with the maximum z value in A is taken as the HH key point p hip . The vertical distance from p hip to the ground is the cow’s HH.

2.5.2. Circumference Measurement

The two front legs and the front body are used to determine TC. Then, p 2 and p 3 of the left and right front legs, respectively, are selected as the key points for measurement. The plane parallel to the Y-axis is determined by p 2 and p 3 . A body slice B is obtained. The alpha shape is used to extract the measurements. The circumference comprises a point set E = { e 1 , e 2 , , e n t } , ( e i = ( x e i , y e i , z e i ) , i = 1,2 , , n t ) , and the P thoracic of the tested cow is expressed as follows (Formula (3)); the following calculation is similar.
P thoracic = e 1 e n t + i = 1 n t 1 e 1 e n t 2
The mid-body area is used to determine AC. The smallest point p 4 of the Z-axis in the middle body is selected, and a plane is constructed from this point. The plane is extended along the Y-axis to obtain the body point cloud slice C, which forms the outline of AC. Considering the environment at the time of the shooting, one side of the body was shielded by the fence, resulting in incomplete point cloud data. Hence, a repair algorithm is proposed in this study. The proposed algorithm can reduce the calculation error caused by the absence of a unilateral point cloud. (1) The binary norm between all the contour key points ( α x , α y ) , ( β x , β y ) is calculated, and all the points between the farthest neighboring points are extracted to form set A. (2) The maximum point of the Y-axis is taken as the origin, and the axis of symmetry is parallel to the Y-axis. Moreover, set B is obtained by symmetrizing set A. (3) The distance to α x is calculated by taking the minimum value of the Y-axis in set B as the endpoint. Then, the points in set B are shifted to α by the arithmetic value, resulting in a repaired point cloud.

2.5.3. Cannon Circumference Measurement

CC is measured in the smallest dimension of the front leg of the cow’s body by extracting the boundary point in the contour of the leg point cloud. The two points with the closest X-axis distance are extracted, and the leg point cloud is sliced to form the outline of the CC. The linear interpolation algorithm is applied to find the point on the other side of the base side.

2.5.4. Body Length Measurement

The front and back of the body were used to determine BL. Moreover, the point cloud density algorithm proposed in this study to extract key points was used twice to extract the low-density regions and unwanted points at the edge of the point cloud. The threshold of the density was determined based on the location of the collected cattle point cloud data. After extraction, K-means clustering was conducted to cluster the shoulder-end cloud and the ischiatic-end cloud. Finally, two parts of point clouds D and E were obtained. The point p 5 with the smallest x value in D and the point p 6 in E were extracted as the key points, and the distance between the two points was the BL.

3. Results

3.1. Experimental Environment

In this study, a self-built dataset was used as the training and test data for the experiment. A total of 137 cattle of different breeds were collected in the pasture, and 150–200 frames of point cloud data were collected on each side of each cow with different body positions. The point cloud data were processed using translation, rotation, etc., for data augmentation. The dataset was constructed after selection. The data were divided into the training set, validation set, and test set in a ratio of 8:1:1. All training and testing were conducted using Windows 10 and A6000 devices. The programming software was Pycharm 2022.1.2, and the environment was Python 3.9.

3.2. Evaluation Indicators of Segmentation Results

Overall accuracy (OA) and mean intersection (mIoU) are used to evaluate performance. OA is the proportion of correctly segmented points relative to the total number of points (Formula (4)):
OA = i = 0 k p i i i = 0 k j = 0 k p i j
The mean intersection (mIoU) is the ratio of the intersection size to the union size between the predicted and ground truth results, as follows (Formula (5)):
mIoU = 1 k + 1 i = 0 k p i i j = 0 k p i j + j = 0 k p i j p i i
In Formulas (4) and (5), k + 1 is the number of classes. p i i represents the amount correctly predicted; p i j and p j i represent the number of false negatives and false positives, respectively.

3.3. Cattle Body Point Cloud Segmentation Results

The proposed FPS [30], octree–PointNet++ [21], and DUOS were trained to compare the results. A comparison between the training results is shown in Figure 6. The proposed model achieved higher accuracy and mIoU in the training and testing sets than the other models. The model had good fitting ability and generalization. DUOS could provide more accurate segmentation results; it was better at performing the cattle body segmentation task, and it had the ability to meet the requirements of main point location in body size measurement. This is necessary for our application of cattle body segmentation, which can effectively improve the accuracy of subsequent body size calculations. The successful and unsuccessful segmentation results are displayed in Figure 7a–c. The segmentation results of the standard positions and the nonstandard positions of body bending and bowing are shown in (a) and (b), indicating that the model still maintains stability when applied to different positions. In a small number of the segmentation results, jagged edges or slight offsets appeared at the junction of the parts of the body, as shown in Figure 7c; this was due to registration errors and manual segmentation errors. Fortunately, these issues had little impact on the key point extraction. Given that this study aims to be applicable to cattle farms, it is essential to automatically segment the preprocessed cattle after field collection to achieve automatic body size measurement in animal husbandry. Figure 7d shows that the model can also complete the segmentation task well for unsegmented individuals, which has great advantages for practical applications. Furthermore, the model can accurately segment cattle data collected in the pasture. Figure 8 shows the comparison results between different models, and it is clear that DUOS has higher segmentation accuracy and smoothness.

3.4. Body Measurement Results

The cattle in the standard position were chosen for manual body size calculation. We measured the real body size data of cattle in the same environment. Figure 9 shows that the same person measured the same body size parameters. To evaluate the quality of the measurement algorithm, manual measurement parameters were used as benchmarks. A comparison of our results with the two conventional algorithms is shown in Table 1, where RE represents the relative error between each parameter and the true value. Each parameter is compared to two traditional methods based on the overall point cloud, expressed as traditional first and traditional second. The purpose of the linear measurements is to locate the extreme and curvature key points under the whole point cloud. Circumference measurements are circumference calculations that locate extreme points to fit the surface and slicing algorithm under the whole point cloud [18,25,31]. The values in bold in the table indicate the results that are closer to the manual measurement results.
The average BL measurement error was 2.52%. The error in the result was affected by the shielding of the vertical fence. The error values of the height were lower because the point cloud of the back side was less occluded, and the calculation was easier. The segmented method could locate the key points more accurately, regardless of whether the parts were considered individually or jointly. The accuracy of the three body measurement parameters improved slightly, with average values of 2.12%, 2.26%, and 2.78%. The AC positioning was more accurate because the segmented part could find the key points of the abdomen more accurately, and the point cloud repair could effectively improve the calculation accuracy. The precision error of the CC was higher than that of the other parameters. As it is a new CC measurement method, there is still room for further research. The relative error of the measurement result depended on the needs of the ranch, but it did not exceed 5%. The results are acceptable. In general, the relative error of most of the cattle body size parameters measured using this method is closer to the true value than those measured using the whole point cloud and traditional key point measurement algorithms.

4. Discussion

In the cattle segmentation experiment, compared with the traditional model, the proposed method is more accurate in terms of the mIoU parameters. The proposed model is robust in terms of adaptability to point cloud shape and noise processing. Thus, it was effectively applied to segmented cattle bodies. The model accurately divided the cow’s body into seven parts, which was very helpful for the subsequent experiments conducted to locate the key points of each part and measure the body size.
Regarding BL and CC, extracting the whole point cloud will yield many redundant points, affecting the subsequent clustering. The partitioned body part point cloud can completely eliminate the point cloud of the excess part, making it easier to locate the target area. When the maximum body is extracted directly, it will cause a significant deviation. Because of the different postures that affect the result, the distribution of the morphological features in the point cloud data will change. In contrast, after segmentation, the key points can be extracted according to the density value. The BL measurement can be accurately obtained by extracting the area of a certain density at the front of the shoulder and hip, which is less affected by the nonstandard stance of the cow. With the use of the proposed new measurement method, the combination of segmentation algorithms can make the calculation results more accurate. Hence, a method measuring the narrowest point is proposed; the method can be used to accurately locate the key point and measure the circumference, and the contour point extraction algorithm can effectively reduce the calculation time without affecting the calculation accuracy. The segmented data of the front leg can be directly selected without considering the impact of the hind leg. Regarding AC, when the cattle are in a nonstandard position, the body shows a C shape at the top of the viewing angle, affecting the positioning accuracy. Instead, our method requires only a slice of the abdominal area and does not need to consider the other parts. Regarding body height, the midpoint of the two front legs can be used to avoid the key point deviation problem caused by the legs being in a nonstandard position. Thus, this method is different from the methods based on the whole point cloud, which are used to directly find the extreme curvature value of the back side.

5. Conclusions

To solve the problem of the inaccurate positioning of key points in the automatic measurement of cattle body sizes based on the whole point cloud data, a measurement method based on the segmentation results of the cattle body point cloud is proposed. Compared with other traditional algorithms, the proposed DUOS algorithm improved the sampling and grouping methods. The proposed method can provide better results in the cattle point cloud data: 92.87% in OA and 85.91% in mIoU. Compared to octree–PointNet++ and PointNet++, the model improved the results by 0.53% and 1.21%, respectively. Moreover, the proposed method can automate the body size measurement of parts using body size segmentation. The algorithm has higher accuracy and practicability than other methods based on the whole point cloud. Specifically, secondary local density detection and clustering algorithms are used for BL. For TC and AC, the key points are collected according to the segmented point cloud, from which the point cloud slice is extracted. The key point compensation algorithm is used to deal with unilateral point cloud voids caused by the AC barrier. For CC, a new method for measuring the minimum distance of the corresponding points is proposed to find the thinnest part. The experimental results of the cattle body size measurements show that, compared with the whole point cloud measurement method, the proposed method based on point cloud segmentation is more consistent with the actual measurement results. The study had some limitations. Computational correction methods were used to reduce the measurement errors, but the errors still exist. The data sample size is small. We will try to address these issues in future studies. Therefore, the proposed DUOS–PointNet++ model can better complete the cattle body size segmentation task. The research can be applied to body size measurement, and it can also be extended to weight estimation or to scoring the body condition of individual parts. Additionally, it can be applied to other medium- and large-sized livestock; thus, it has good prospects and applicability in the development of intelligent animal husbandry.

Author Contributions

Conceptualization, Z.W.; methodology, Z.W.; software, W.L.; validation, W.L.; formal analysis, Z.W.; investigation, W.L.; resources, W.L.; data curation, Z.W.; writing—original draft preparation, Z.W.; writing—review and editing, Z.W.; visualization, W.L.; supervision, Z.Z.; project administration, Z.W.; funding acquisition, Z.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Program for Young Talents of Science And Technology In Universities of Inner Mongolia Autonomous Region Grant NJYT23063, the Natural Science Foundation of Inner Mongolia under Grant 2021MS06014, and in part by the National Natural Science Foundation of China under Grant 61966026.

Institutional Review Board Statement

Not applicable for studies not involving humans or animals.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

The authors do not have permission to share the data.

Acknowledgments

The authors would like to thank Chifeng Shengquan Ecological Husbandry Co., Ltd. and all those who helped us obtain data and measure cattle manually. The authors appreciate the funding organization for their financial support and State Key Laboratory of Reproductive Regulation and Breeding of Grassland Livestock, P.R. China.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Stephansen, R.B.; Manzanilla-Pech, C.I.V.; Gebreyesus, G.; Sahana, G.; Lassen, J. Prediction of body condition in Jersey dairy cattle from 3D-images using machine learning techniques. J. Anim. Sci. 2023, 101, skad376. [Google Scholar] [CrossRef]
  2. Doeschl-Wilson, A.B.; Green, D.M.; Fisher, A.V.; Carroll, S.M.; Schofield, C.P.; Whittemore, C.T. The relationship between body dimensions of living pigsand their carcass composition. Meat Sci. 2005, 70, 229–240. [Google Scholar] [CrossRef]
  3. Roche, J.R.; Friggens, N.C.; Kay, J.K.; Fisher, M.W.; Stafford, K.J.; Berry, D.P. Invited review: Body condition score and its association with dairy cow productivity, health, and welfare. J. Dairy Sci. 2009, 92, 5769–5801. [Google Scholar] [CrossRef] [PubMed]
  4. Yang, G.; Xu, X.; Song, L.; Zhang, Q.; Duan, Y.; Song, H. Automated measurement of dairy cows body size via 3D point cloud data analysis. Comput. Electron. Agric. 2022, 200, 107218. [Google Scholar] [CrossRef]
  5. Dohmen, R.; Catal, C.; Liu, Q.Z. Computer vision-based weight estimation of livestock: A systematic literature review. N. Z. J. Agric. Res. 2021, 65, 227–247. [Google Scholar] [CrossRef]
  6. Tasdemir, S.; Urkmez, A.; Inal, S. Determination of body measurements on the Holstein cows using digital image analysis and estimation of live weight with regression analysis. Comput. Electron. Agric. 2011, 76, 189–197. [Google Scholar] [CrossRef]
  7. Zhang, A.L.; Wu, B.P.; Wuyun, C.T.; Jiang, D.X.; Xuan, E.C.; Ma, F.Y. Algorithm of sheep body dimension measurement and its applications based on image analysis. Comput. Electron. Agric. 2018, 153, 33–45. [Google Scholar] [CrossRef]
  8. Alvarez, J.R.; Arroqui, M.; Mangudo, P.; Toloza, J.; Jatip, D.; Rodríguez, J.M.; Teyseyre, A.; Sanz, C.; Zunino, A.; Machado, C.; et al. Body condition estimation on cows from depth images using Convolutional Neural Networks. Comput. Electron. Agric. 2018, 155, 12–22. [Google Scholar] [CrossRef]
  9. Wang, Y.; Mücher, S.; Wang, W.; Guo, L.; Kooistra, L. A review of three-dimensional computer vision used in precision livestock farming for cattle growth management. Comput. Electron. Agric. 2023, 206, 107687. [Google Scholar] [CrossRef]
  10. Ositanwosu, O.E.; Huang, Q.; Liang, Y.; Nwokoye, C.H. Automatic measurement and prediction of Chinese Grown Pigs weight using multilayer perceptron neural networks. Sci. Rep. 2023, 13, 2573. [Google Scholar] [CrossRef]
  11. Kawasue, K.; Win, K.D.; Yoshida, K.; Tokunaga, T. Black cattle body shape and temperature measurement using thermography and KINECT sensor. Artif. Life Robot. 2017, 22, 464–470. [Google Scholar] [CrossRef]
  12. Nir, O.; Parmet, Y.; Werner, D.; Adin, G.; Halachmi, I. 3D Computer-vision system for automatically estimating heifer height and body mass. Biosyst. Eng. 2018, 173, 4–10. [Google Scholar] [CrossRef]
  13. Le Cozler, Y.; Allain, C.; Caillot, A.; Delouard, J.M.; Delattre, L.; Luginbuhl, T.; Faverdin, P. High-precision scanning system for complete 3D cow body shapeimaging and analysis of morphological traits. Comput. Electron. Agric. 2019, 157, 447–453. [Google Scholar] [CrossRef]
  14. Guo, H.; Li, Z.; Ma, Q.; Zhu, D.; Su, W.; Wang, K.; Marinello, F. A bilateral symmetry based pose normalization framework applied to livestock body measurement in point clouds. Comput. Electron. Agric. 2019, 160, 59–70. [Google Scholar] [CrossRef]
  15. Zhang, X.; Liu, G.; Jing, L.; Chen, S. Automated Measurement of Heart Girth for Pigs Using Two Kinect Depth Sensors. Sensors 2020, 20, 3848. [Google Scholar] [CrossRef]
  16. Shuai, S.; Yin, L.; Liang, S.; Zhong, H.; Tian, X.; Liu, C.; Sun, A.; Liu, H. Research on 3D surface reconstruction and body size measurement of pigs based on multi-view RGB-D cameras. Comput. Electron. Agric. 2020, 175, 105543. [Google Scholar] [CrossRef]
  17. Zhao, J.; Zhao, C.; Xia, H. Cattle body size measurement method based on Kinect v4. J. Comput. Appl. 2022, 42, 1598–1606. [Google Scholar] [CrossRef]
  18. Du, A.; Guo, H.; Lu, J.; Su, Y.; Ma, Q.; Ruchay, A.; Marinello, F.; Pezzuolo, A. Automatic livestock body measurement based on keypoint detection with multiple depth cameras. Comput. Electron. Agric. 2022, 198, 107059. [Google Scholar] [CrossRef]
  19. Yin, L.; Zhu, J.; Liu, C.; Tian, X.; Zhang, S. Point cloud-based pig body size measurement featured by standard and non-standard postures. Comput. Electron. Agric. 2022, 199, 107135. [Google Scholar] [CrossRef]
  20. Li, G.; Liu, X.; Ma, Y.; Wang, B.; Zheng, L.; Wang, M. Body size measurement and live body weight estimation for pigs based on back surface point clouds. Biosyst. Eng. 2022, 218, 10–22. [Google Scholar] [CrossRef]
  21. Hu, H.; Yu, J.; Yin, L.; Cai, G.; Zhang, S.; Zhang, H. An improved PointNet++ point cloud segmentation model applied to automatic measurement method of pig body size. Comput. Electron. Agric. 2023, 205, 107560. [Google Scholar] [CrossRef]
  22. Gritsenko, S.; Ruchay, A.; Kolpakov, V.; Lebedev, S.; Guo, H.; Pezzuolo, A. On-Barn Forecasting Beef Cattle Production Based on Automated Non-Contact Body Measurement System. Animals 2023, 13, 611. [Google Scholar] [CrossRef] [PubMed]
  23. Gebreyesus, G.; Milkevych, V.; Lassen, J.; Sahana, G. Supervised learning techniques for dairy cattle body weight prediction from 3D digital images. Front. Genet. 2023, 13, 947176. [Google Scholar] [CrossRef] [PubMed]
  24. Liu, D.; He, D.; Norton, T. Automatic estimation of dairy cattle body condition score from depth image using ensemble model. Biosyst. Eng. 2020, 194, 16–27. [Google Scholar] [CrossRef]
  25. Ruchay, A.; Kolpakov, V.; Kosyan, D.; Rusakova, E.; Dorofeev, K.; Guo, H.; Ferrari, G.; Pezzuolo, A. Genome-Wide Associative Study of Phenotypic Parameters of the 3D Body Model of Aberdeen Angus Cattle with Multiple Depth Cameras. Animals 2022, 12, 2128. [Google Scholar] [CrossRef]
  26. Martins, B.M.; Mendes, A.L.C.; Silva, L.F.; Moreira, T.R.; Costa, J.H.C.; Rotta, P.P.; Chizzotti, M.L.; Marcondes, M.I. Estimating body weight, body condition score, and type traits in dairy cows using three dimensional cameras and manual body measurements. Livest. Sci. 2020, 236, 104054. [Google Scholar] [CrossRef]
  27. Schnabel, R.; Wahl, R.; Klein, R. Efficient RANSAC for point-cloud shape detection. Comput. Graph. Forum. 2007, 26, 214–226. [Google Scholar] [CrossRef]
  28. Ying, S.; Peng, J.; Du, S.; Qiao, H. A Scale Stretch Method Based on ICP for 3D Data Registration. IEEE Trans. Autom. Sci. Eng. 2009, 6, 559–565. [Google Scholar] [CrossRef]
  29. Qi, C.R.; Su, H.; Mo, K.; Guibas, L.J. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 652–660. [Google Scholar]
  30. Qi, C.R.; Yi, L.; Su, H.; Guibas, L.J. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017. [Google Scholar] [CrossRef]
  31. Ruchay, A.; Kober, V.; Dorofeev, K.; Kolpakov, V.; Miroshnikov, S. Accurate body measurement of live cattle using three depth cameras and non-rigid 3D shape recovery. Comput. Electron. Agric. 2020, 179, 105821. [Google Scholar] [CrossRef]
Figure 1. Experimental data acquisition site.
Figure 1. Experimental data acquisition site.
Animals 14 02553 g001
Figure 2. Point cloud preprocessing: (a) registered point cloud; (b) preprocessed point cloud.
Figure 2. Point cloud preprocessing: (a) registered point cloud; (b) preprocessed point cloud.
Animals 14 02553 g002
Figure 3. Specific architecture of improved PointNet++ segmentation network based on DUOS.
Figure 3. Specific architecture of improved PointNet++ segmentation network based on DUOS.
Animals 14 02553 g003
Figure 4. Algorithm flow chart.
Figure 4. Algorithm flow chart.
Animals 14 02553 g004
Figure 5. Schematic diagram of body size measurement.
Figure 5. Schematic diagram of body size measurement.
Animals 14 02553 g005
Figure 6. Comparison of the results of training sets and test sets: (a) Acc; (b) mIoU; (c) loss.
Figure 6. Comparison of the results of training sets and test sets: (a) Acc; (b) mIoU; (c) loss.
Animals 14 02553 g006
Figure 7. Segmentation results of networks: (a) standard posture; (b) nonstandard posture; (c) unsuccessful segmentation; (d) undivided individual.
Figure 7. Segmentation results of networks: (a) standard posture; (b) nonstandard posture; (c) unsuccessful segmentation; (d) undivided individual.
Animals 14 02553 g007
Figure 8. Segmentation results comparison: (a) manual segmentation; (b) FPS segmentation; (c) octree segmentation; (d) ours.
Figure 8. Segmentation results comparison: (a) manual segmentation; (b) FPS segmentation; (c) octree segmentation; (d) ours.
Animals 14 02553 g008
Figure 9. Manual measurement of cattle body size parameters.
Figure 9. Manual measurement of cattle body size parameters.
Animals 14 02553 g009
Table 1. Comparison between the proposed method and traditional measurement methods.
Table 1. Comparison between the proposed method and traditional measurement methods.
CattleWithers HeightHip Height
ManualWFWSOursREManualWFWSOursRE
1125120.65125.98124.220.62%132.5130.81134.32133.330.63%
2143140.50141.22142.320.48%145.5144.23147.10144.450.72%
3138.5136.86140.76138.010.35%146.5145.10150.57147.740.85%
4134133.21132.34133.350.49%136130.27138.56137.210.89%
5131.5132.44135.27131.910.31%134.2136.88139.77135.991.33%
6146148.18148.37146.340.23%150147.80154.79151.871.25%
7131.5134.58132.93130.121.05%134.2140.02141.34135.210.75%
8125.5130.62130.65127.161.32%132134.46139.21133.280.97%
9138135.24139.16138.790.57%142146.94151.70144.151.51%
10140138.92141.02139.210.56%146150.61153.76148.281.56%
CattleBody LengthThoracic Circumference
ManualWFWSOursREManualWFWSOursRE
1139.5142.46134.12139.700.14%188177.68187.56187.630.20%
2165168.51168.49163.051.18%216231.86224.48220.572.12%
3173.5176.26169.91171.111.38%217207.22216.95216.950.02%
4173.5170.15170.66171.201.33%178178.95176.62178.800.45%
5150153.12146.11151.470.98%206191.23200.25205.250.36%
6170166.89164.32168.620.81%220242.56218.54222.281.04%
7149.5140.09147.74148.480.68%203190.48191.08206.791.87%
8146138.55139.24142.612.32%181169.15176.21176.362.56%
9173168.20166.96169.791.86%230225.44233.49234.401.91%
10151159.94152.94152.100.73%205204.85195.07198.113.36%
CattleAbdominal CircumferenceCannon Circumference
ManualWFWSOursREManualWFWSOursRE
1219215.16200.38215.931.40%19.522.3118.3618.365.85%
2257266.92255.66255.660.52%2124.0520.5620.562.10%
3258263.09253.35257.400.23%2223.2924.4122.793.59%
4211242.98211.45211.450.21%1820.5718.9718.975.39%
5241246.54224.94238.531.02%2019.9322.8520.060.30%
6256265.46247.32252.201.48%2323.4621.0923.231.00%
7233221.00224.36230.671.00%2023.7519.0319.602.00%
8234205.27221.62234.880.38%2020.8821.4419.422.90%
9257254.98252.31258.480.58%2426.3826.0725.325.50%
10248235.74238.50240.063.20%20.522.0019.7619.763.61%
The values in bold indicate the results that are closer to the manual measurement results.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Weng, Z.; Lin, W.; Zheng, Z. Cattle Body Size Measurement Based on DUOS–PointNet++. Animals 2024, 14, 2553. https://doi.org/10.3390/ani14172553

AMA Style

Weng Z, Lin W, Zheng Z. Cattle Body Size Measurement Based on DUOS–PointNet++. Animals. 2024; 14(17):2553. https://doi.org/10.3390/ani14172553

Chicago/Turabian Style

Weng, Zhi, Wenzhi Lin, and Zhiqiang Zheng. 2024. "Cattle Body Size Measurement Based on DUOS–PointNet++" Animals 14, no. 17: 2553. https://doi.org/10.3390/ani14172553

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop