Novel method for real-time detection and tracking of pig body and its different parts

Fuen Chen, Xiaoming Liang, Longhan Chen, Baoyuan Liu, Yubin Lan

Abstract


Detection and tracking of all major parts of pig body could be more productive to help to analyze pig behavior. To achieve this goal, a real-time algorithm based on You Only Look At CoefficienTs (YOLACT) was proposed. A pig body was divided into ten parts: one head, one trunk, four thighs and four shanks. And the key points of each part were calculated by the novel algorithm, which was based mainly on combination of the Zhang-Suen thinning algorithm and Gravity algorithm. The experiment results showed that these parts of pig body could be detected and tracked, and their contributions to overall pig activity could also be sought out. The detect accuracy of the algorithm in the data set could reach up to 90%, and the processing speed to 30.5 fps. Furthermore, the algorithm was robust and adaptive.
Keywords: computer vision, CNN, pig, YOLACT, detection and tracking
DOI: 10.25165/j.ijabe.20201306.5820

Citation: Chen F E, Liang X M, Chen L H, Liu B Y, Lan Y B. Novel method for real-time detection and tracking of pig body and its different parts. Int J Agric & Biol Eng, 2020; 13(6): 144–149.

Keywords


computer vision, CNN, pig, YOLACT, detection and tracking

Full Text:

PDF

References


OECD, FAO. OECD-FAO Agricultural Outlook 2019-2028. https://doi.org/10.1787/agr_outlook-2019-en.

Zhang Y F. The transformation and innovation of the management concept of the current large-scale pig farm. Feed and Animal Husbandry-Scale Pig Raising, 2011; 9: 21–25. (in Chinese)

Li Y Y, Sun L Q, Zou Y B, Li Y. Individual pig object detection algorithm based on Gaussian mixture model. Int J Agric & Biol Eng, 2017; 10(5): 186–193.

Sun L, Li Z, Duan Q, Sun X, Li J. Automatic monitoring of pig excretory behavior based on motion feature. Sensor Letters, 2014; 12(3): 673–677.

Porto S M C, Arcidiacono C, Anguzza U, Cascone G. A computer vision-based system for the automatic detection of lying behavior of dairy cows in free-stall barns. Biosystems Engineering, 2013; 115(2): 184–194.

Zuo S, Jin L, Chung Y, Park D. An index algorithm for tracking pigs in pigsty. In: International Conference on Industrial Electronics and Engineering, 2015; pp.797–804.

Ma C, Wang Y, Ying G. The pig breeding management system based on RFID and WSN. In: 2011 Fourth International Conference on Information and Computing, IEEE, 2011; pp.30–33.

Zhu W, Zhong F, Li X. Automated monitoring system of pig behavior based on RFID and ARM-LINUX. In: 2010 Third International Symposium on Intelligent Information Technology and Security Informatics. IEEE, 2010; pp.431–434.

Chen Y-R, Chao K, Kim M S. Machine vision technology for agricultural applications. Computers and Electronics in Agriculture, 2002; 36(2): 173–191.

Shao B, Xin H. A real-time computer vision assessment and control of thermal comfort for group-housed pigs. Computers and Electronics in Agriculture, 2008; 62(1): 15–21.

Nasirahmadi A, Richter U, Hensel O, Edwards S, Sturm B. Using machine vision for investigation of changes in pig group lying patterns. Computers and Electronics in Agriculture, 2015; 119: 184–190.

Kashiha M, Bahr C, Ott S, Moons C, Niewold T, Odberg F, et al. Automatic identification of marked pigs in a pen using image pattern recognition. Computers and Electronics in Agriculture, 2013; 93: 111–120.

Ahrendt P, Gregersen T, Karstoft H. Development of a real-time computer vision system for tracking loose-housed pigs. Computers and Electronics in Agriculture, 2011; 76(2): 169–174.

Xiao D Q, Feng A J, Liu J. Detection and tracking of pigs in natural environments based on video analysis. Int J Agric & Biol Eng, 2019; 12(4): 116–126.

Dong X, Shen J, Yu D, Wang W, Liu J, Huang H. Occlusion-aware real-time object tracking. IEEE Transactions on Multimedia, 2017; 19(4): 763–771.

Hua Y, Alahari K, Schmid C. Occlusion and motion reasoning for long-term tracking. Computer Vision – ECCV 2014. Springer International Publishing, 2014; pp.172–187.

Yang H, Alahari K, Schmid C. Online object tracking with proposal selection. In: IEEE International Conference on Computer Vision. IEEE, 2015; pp.3092–3100.

Girshick R, Donahue J, Darrell T, Malik J. Rich feature hierarchies for accurate object detection and semantic segmentation. In: Tech Report (v5). UC Berkeley, 2013; pp.580–587.

Ren S, He K, Girshick R, Sun J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans Pattern Anal Mach Intell, 2015; 39(6): 91–99.

Bolya D, Zhou C, Xiao F, Lee Y J. YOLACT: real-time instance segmentation. In: The IEEE International Conference on Computer Vision (ICCV), 2019, pp. 9157-9166

Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Fu C Y, et al. Ssd: single shot multibox detector. In: 14th European Conference on Computer Vision (ECCV), Proceedings, Part I, Springer, 2016; pp. 21–37.

Redmon J, Farhadi A. Yolo9000: better, faster, stronger. In: 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, Hawaii, USA, 2017; Vol.1, pp.6517–6525.

Silvera A M, Knowles T G, Butterworth A, Berckmans D, Vranken E, Blokhuis H J. Lameness assessment with automatic monitoring of activity in commercial broiler flocks. Poultry Science, 2017; 96(7): 2013–2017.

Kongsro J. Development of a computer vision system to monitor pig locomotion. Open Journal of Animal Sciences, 2013; 3(3): 254–260.

Oczak M, Viazzi S, Ismayilova G, Sonoda L, Roulston N, Fels M, Bahr C, Hartung J, Guarino M, Berckmans D, Vranken E. Classification of aggressive behavior in pigs by activity index and multilayer feed forward neural network. Biosystems Engineering, 2014; 119(4): 89–97.

Ojukwu C C, Feng Y Z, Jia G F, Zhao H T, Tan H Q. Development of a computer vision system to detect inactivity in group-housed pigs. Int J Agric & Biol Eng, 2020; 13(1): 42–46.

Anguelov D, Srinivasan P, Koller D, et al. SCAPE: shape completion and animation of people. ACM Transactions on Graphics, 2005; 24(3): 408–416.

Ma M, Li Y B. 2D human pose estimation using multi-level dynamic model. ROBOT, 2016; 38: 587. (in Chinese)

Xiao D, Feng A, Yang Q, Liu J, Zhang Z. Fast motion detection for pigs based on video tracking. Transactions of the CSAM, 2016; 47(10): 331, 351–357. (in Chinese)

Kentaro Wada. Labelme: image polygonal annotation with Python. 2016. Available: https://github.com/wkentaro/labelme. Accessed on July 5, 2019.

Abadi M. TensorFlow: learning functions at scale. ACM Sigplan Notices, 2016; 51(9): 1. doi:10.1145/3022670.2976746.

Li Y B, Hao Y J, Liu E H. Calculation method of polygon center of gravity. Computer Application, 2005; 25(S1): 391–393. (in Chinese)

Gu X D, Yu D H, Zhang L M. Image thinning using pulse coupled neural network. Pattern Recognition Letters, 2004; 25(9): 1075–1084.

Rublee E, Rabaud V, Konolige K, Bradski G. ORB: An efficient alternative to SIFT or SURF. In: 2011 International Conference on Computer Vision, Barcelona, 2011; pp. 2564–2571.

Sun L Q, Zou Y B, Li Y, Cai Z D, Li Y, Luo B, et al. Multi target pigs tracking loss correction algorithm based on Faster R-CNN. Int J Agric & Biol Eng, 2018; 11(5): 192–197.

Čehovin L, Leonardis A, Kristan M. Visual object tracking performance measures revisited. IEEE Transactions on Image Processing, 2016; 25(3): 1261–1274.

He K M, Gkioxari G, Dollár P, Girshick R. Mask R-CNN. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017; 42: 386–397.

Tian Y Y. Precision of edge detection affected by smoothing operator of image. Computer Engineering and Applications, 2009; 45(32): 161–163. (in Chinese)

Qu Y C, Deng C Y, Liu G L. The exploration on the characteristics of porcine behaviors and the improvement of pig feeding as well as management. Guizhou Animal Science and Veterinary Medicine, 2001; 25(5): 9–10. (in Chinese)

Forkman B, Furuhaug I L, Jensen P. Personality, coping patterns, and aggression in piglets. Applied Animal Behaviour, 1995; 45(1-2): 31–42.

Zhang Y F. The transformation and innovation of the current large-scale pig farm management concept. Feed and Animal Husbandry Large Scale Pig Raising, 2011; 9: 21–25. (in Chinese)




Copyright (c) 2020 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