Group-housed pigs and their body parts detection with Cascade Faster R-CNN

Deqin Xiao, Sicong Lin, Youfu Liu, Qiumei Yang, Huilin Wu

Abstract


The detection of individual pigs and their parts is a key step to realizing automatic recognition of group-housed pigs’ behavior by video monitoring. However, it is still difficult to accurately locate each individual pig and their body parts from video images of groups-housed pigs. To solve this problem, a Cascade Faster R-CNN Pig Detector (C-FRPD) was designed to detect the individual pigs and different parts of their body. Firstly, the features were extracted by 101-layers Residual Networks (ResNet-101) from video images of group-housed pigs, and the features were input into the region proposal networks (RPN) to obtain the region proposals. Then classification and bounding box regression on region proposals were performed to get the location of each pig. Finally, the body parts of the pig were determined by using the Cascade structure to search on the feature map of the pig body area. These operations completed the detection of the whole body of each pig and its different parts of the body, and established the association between the whole and parts of the body in the end-to-end detection. In this study, 1500 pig pen images were trained and tested. The test results showed that the detection accuracy of C-FRPD reached 98.4%. Compared with the Faster R-CNN without cascade structure, the average detection accuracy was increased by 4.3 percentage points. The average detection time of a single image was 259 ms. The method in this study could accurately detect and correlate the individual pig with its head, back, and tail in the image. This method can provide a technical reference for recognizing the behavior of group-housed pigs.
Keywords: group-housed pigs, body parts detection, Faster R-CNN, Cascade structure
DOI: 10.25165/j.ijabe.20221503.6286

Citation: Xiao D Q, Lin S C, Liu Y F, Yang Q M, Wu H L. Group-housed pigs and their body parts detection with Cascade Faster R-CNN. Int J Agric & Biol Eng, 2022; 15(3): 203–209.

Keywords


group-housed pigs, body parts detection, Faster R-CNN, Cascade structure

Full Text:

PDF

References


Guo Y, Corke P, Poulton G, Wark T, Bishop-Hurley G, Swain D. Animal behaviour understanding using wireless sensor networks. In: Proceedings of 2006 31st IEEE Conference on Local Computer Networks, Tampa, FL,

USA: IEEE, 2006; pp.607–614. doi: 10.1109/LCN.2006/322023.

Shen M X, Liu L S, Yan L, Lu M Z, Yao W, Yang X J. Review of monitoring technology for animal individual in animal husbandry. Transactions of the CSAM, 2014; 45(10): 245–251. (in Chinese)

Andrea S, Paolo B, Riccardo T, Torben G, Kristof M, Jarissa M, et al. The PigWise project: A novel approach in livestock farming through synergistic performances monitoring at individual level. In: Proceedings of the EFITA 2013 Conference, 2013; pp.1–8.

Yu H A, Gao Y, Li X, Tong Y, Lei M G, Wang J J. Research review of animal behavior monitoring technologies: Commercial pigs as realistic example. Chinese Journal of Animal Science, 2015; 51(20): 66–70, 75. (in Chinese)

Nasirahmadi A, Edwards S A, Sturm B. Implementation of machine vision for detecting behaviour of cattle and pigs. Livestock Science, 2017; 202: 25–38.

Ott S, Moons C P H, Kashiha M A, Bahr C, Tuyttens F A M, Berckmans D, et al. Automated video analysis of pig activity at pen level highly correlates to human observations of behavioural activities. Livestock Science, 2014; 160: 132–137.

Nasirahmadi A, Edwards S A, Matheson S M, Sturm B. Using automated image analysis in pig behavioural research: assessment of the influence of enrichment substrate provision on lying behaviour. Applied Animal Behaviour Science, 2017; 196: 30–35.

Zhu W X, Guo Y Z, Jiao P P, Ma C H, Chen C. Recognition and drinking behaviour analysis of individual pigs based on machine vision. Livestock Science, 2017; 205: 129–136.

Nasirahmadi A, Sturm B, Olsson A C, Jeppsson K H, Müller S, Edwards S, et al. Automatic scoring of lateral and sternal lying posture in grouped pigs using image processing and Support Vector Machine. Computers and Electronics in Agriculture, 2019; 156: 475–481.

Kashiha M, Bahr C, Haredasht S A, Ott S, Moons C P H, Niewold T A, et al. The automatic monitoring of pigs water use by cameras. Computers and Electronics in Agriculture, 2013; 90:164–169.

Nasirahmadi A, Hensel O, Edwards S A, Sturm B. Automatic detection of mounting behaviours among pigs using image analysis. Computers and Electronics in Agriculture, 2016; 124: 295–302.

Yang X, Zhu W X. A recognition method for head and tail of adhesive pigs based on generalized Hough clustering. Jiangsu Agricultural Sciences, 2018; 46(9): 230–235.

Guo Y Z. Study on individual recognition and drinking behaviour analysis of topview group-housed pigs based on machine vision. Doctoral dissertation. Zhenjiang, China: Jiangsu University, 2018; 124p. (in Chinese)

Gao Y, Yu H A, Lei M G, Li X, Guo X, Diao Y P. Trajectory tracking for group housed pigs based on locations of head/tail. Transactions of the CSAE, 2017; 33(2): 220–226.

Chen C, Zhu W X, Norton T. Behaviour recognition of pigs and cattle: Journey from computer vision to deep learning. Computers and Electronics in Agriculture, 2021; 187: 106255. doi: 10.1016/j.compag. 2021.106255.

Chen C, Zhu W X, Steibel J, Siegford J, Han J J. Recognition of feeding behaviour of pigs and determination of feeding time of each pig by a video-based deep learning method. Computers and Electronics in Agriculture, 2020; 176:105642. doi: 10.1016/j.compag.2020.105642.

Yang Q M, Xiao D Q, Cai J H. Pig mounting behaviour recognition based on video spatial-temporal features. Biosystems Engineering, 2021; 206: 55–66.

Alameer A, Kyriazakis I, Dalton H A, Miller A L, Bacardit J. Automatic recognition of feeding and foraging behaviour in pigs using deep learning. Biosystems Engineering, 2020; 197: 91–104.

Yang Q M, Xiao D Q, Lin S C. Feeding behavior recognition for group-housed pigs with the Faster R-CNN. Computers and Electronics in Agriculture, 2018; 155: 453–460.

Yang Q M, Xiao D Q, Zhang G X. Automatic pig drinking behavior recognition with machine vision. Transactions of the CSAM, 2018; 49(6): 232–238. (in Chinese)

Lu H T, Zhang Q C. Applications of deep convolutional neural networks in computer vision. Journal of Data Acquisition and Processing, 2016; 31(1): 1–17. (in Chinese)

Liu W B, Wang Z D, Liu X H, Zeng N Y, Liu Y R, Alsaadi F E. A survey of deep neural network architectures and their applications. Neurocomputing, 2016; 234: 11–26.

Zhang S, Gong Y H, Wang J J. The development of deep convolution

neural network and its applications on computer vision. Chinese Journal of Computers, 2019; 42(3): 453–482. (in Chinese)

Yao Z Y. Research on the application of object detection technology based on deep learning algorithm. Master dissertation. Beijing: Beijing University of Posts and Telecommunications, 2019; 58p. (in Chinese)

Girshick R, Donahue J, Darrell T, Malik J. Rich feature hierarchies for accurate object detection and semantic segmentation. In: 2014 IEEE Conference on Computer Vision and Pattern Recognition, Columbus, USA: IEEE, 2014; pp.580–587. doi: 10.1109/CVPR.2014.81.

Girshick R. Fast R-CNN. In: 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile: IEEE, 2015; pp.1440–1448. doi: 10.1109/ICCV.2015.169.

Ren S Q, He K M, Girshick R, Sun J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2015; 39(6): 1137–1149.

Everingham M, Eslami S M, Gol L V, Williams C K I, Winn J, Zisserman A. The Pascal visual object classes challenge: A retrospective. International Journal of Computer Vision, 2015; 111(1): 98–136.

He K M, Zhang X Y, Ren S Q, Sun J. Identity mappings in deep residual networks. In: Computer Vision - ECCV 2016, Springer, 2016; pp.630–645. doi: 10.1007/978-3-319-46493-0_38.

Neubeck A, Van Gool L. Efficient non-maximum suppression. In: 18th International Conference on Pattern Recognition (ICPR'06), Hong Kong, China: IEEE, 2006; pp.850–855. doi: 10.1109/ICPR.2006.479.




Copyright (c) 2022 International Journal of Agricultural and Biological Engineering

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

2023-2026 Copyright IJABE Editing and Publishing Office