Weight prediction in weaning pigs using Deep Learning techniques - Cruz, Erika Fernanda Lozano (2024)
Estimating the weight of pigs in the weaning phase is an important process in the management of pig farms due to the adaptation conditions that the animals are exposed to. Pig farming includes several phases with very specific environmental variables such as temperature for sows and piglets before weaning. For this reason, the weaning phase is a crucial moment to guarantee an optimal weight for future phases (finisher pigs), which becomes a better income for the producers. Therefore, an automatic individual pig detection and weight prediction model was applied to detect individuals housed in groups of 10 males and 10 females under real production conditions in a naturally ventilated structure, with initial weights of 8 kg to reach around 32-40 kg. For individual detection, the Yolov7 algorithm was used together with the VGG Image Annotator, obtaining a precision of 98.3% in natural behavior (all postures and lighting conditions were included). For weight prediction, three pre-established architectures (MobileNet, ResNet50, DenseNet121) and an own created architecture (CustomNet) were compared, together with four optimizers (SGD, RMSprop, Adam and Nadam), and was selected the best architecture's performance and then, was applied optimizers to find the minimum error in weight prediction. The model with the best performance was DenseNet121 with Adam optimizer, obtaining as a result a minimum coefficient of determination R2 of 0.96 for the analysis of males. Females and Males - Females cases obtained a R2 of 0.98. The deep learning techniques applied, and the results obtained show the feasibility of this method and allow to optimize resources in the management of pig farms under real and challenging conditions. Keywords: Pig’s individual detection; Yolov7; VGG Image Annotator; DenseNet121; Growth curve in pigs.