{'fraction_non_alphanumeric': 0.029193205944798302, 'fraction_numerical': 0.018046709129511677, 'mean_word_length': 4.746951219512195, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
242 Development of image analysis pipeline to predict body weight in pigs


 Average daily gain can reflect the growth rates, diet efficiency, and current health status of livestock species such as pigs. However, labor-based measurement of body weights (BW) is intensive and may induce stress to pigs. Therefore, we developed an automatic 3D image-based computer vision system to predict BW. We employed the Intel RealSense depth camera D435 to capture the RGB and depth images of eight pigs from nursery to finishing phases across two months. During the experiment, each pig was video recorded for around 3 mins per day, with six frames per second, and manually weighed using an electronic scale. The recording resulted in around 1,080 images for each pig per day. We developed an image processing pipeline using OpenCV-Python. Specifically, each pig within the image was segmented by a thresholding algorithm, and a contour box of the pig was identified to extract width and length. The depth of the pig was captured by an active infrared stereo sensor using the Intel RealSense software development kit 2.0. The volume of the pig was derived by multiplying length, width, and depth. We processed frame by frame, and the third quantile of these morphological image descriptors was used as the image-derived measures for each pig. The Pearson correlation coefficients between scale-based BW records and morphological image descriptors were 0.314 (length), 0.512 (width), 0.881 (depth), and 0.579 (volume). A goodness of fit obtained by fitting multiple linear regression by regressing the BW records from the electronic scale on the morphological image descriptors was 0.8 in R2. Overall, depth, width, and volume seem to be more correlated with BW records. We conclude that our proposed 3D computer vision system could potentially provide an effective way to predict the BW of pigs.