Original papersImage motion feature extraction for recognition of aggressive behaviors among group-housed pigs
Introduction
Since group-housed pigs are confronted with capacity limited, poor environment, low fiber diet and repeated changes of group composition in the intensive farming conditions, they express higher levels of aggression than they do in the natural environment (Stukenborg et al., 2012). Aggression usually occurs in the artificial pigpen allocation after weaning and at the beginning of the fattening period, the mixed pigs will frequently attack each other within 2 days until the new hierarchy is established (Keeling and Gonyou, 2001). The aggression among pigs can cause skin trauma, infection and even fatal injuries (Turner et al., 2006). The injured pigs intake food more difficultly, thereby the growth rate is getting low, which influences pork production (Stookey and Gonyou, 1994). Additionally, the stress produced by aggression will reduce the reproductive performance of the surrounding sows (Kongsted, 2004). Therefore, aggressive behaviors are regarded as one of the most important health, welfare and economic problems in modern production systems (D’Eath and Turner, 2009). Currently, the recognition of aggression among pigs mainly depends on manual observation and video surveillance, these means are time-consuming, laborious and hysteretic, it is difficult to achieve the real-time aggression detection in large-scale farms. Using computer vision technology to recognize aggressive behaviors will improve the efficiency of recognition, increase animal welfare and reduce the economic losses of farms (Faucitano, 2001, Bracke et al., 2002).
The pigs aggression is a complex interactive behavior which has continuous and large-proportion adhesion of pig-body, it can last from a few seconds to a few minutes (McGlone, 1985). The process of animal mating has the similar phenomenon of continuous adhesion, the computer vision-based mating recognition has been achieved mainly by analyzing the shape of animals in mating. For instance, Tsai and Huang (2014) used the length of circumscribed rectangle of cattles in mating as the feature, when this length lasted about 2 s and 2 times of cattle length then turned into about 2 s and 1.5 times of cattle length, this process was recognized as a mating event. Nasirahmadi et al. (2016) used the pixel area of the fitted ellipse of pigs in mating as the feature, when this ellipse area changed into 1.3–2 times of pig-body area, it was recognized as mating behavior. Compared with the mating behavior, although the geometry shape and displacement of the two pigs in high and medium aggression have the mutation, they always maintain adhesion or a very small distance. Thus, the aggressive pigs are regarded as a whole for motion analysis in this paper.
Recently, computer vision technology has been widely used for animal behavior analysis such as pigs comfort discrimination (Shao and Xin, 2008), pigs drinking water detection (Kashiha et al., 2013), pigs tripping and stepping behavior recognition (Gronskyte et al., 2015). However, the computer vision-based research for recognizing pigs aggressive behaviors has still been few. In order to detect pigs aggression using motion history image (MHI), the moving pixels of all individuals were extracted as the mean intensity, and the ratios of moving pixels account for all pixels of pig-body were extracted as the occupation index. Linear discriminant analysis (LDA) was used to classify these two categories of features and to recognize aggression with an accuracy of 89% (Viazzi et al., 2014). In order to classify aggression, the average, maximum, minimum, sum and deviation of the occupation index were extracted as features, a multilayer feed forward neural network was used to train these features and to classify the high and medium aggression with an average accuracy of 99.2% (Oczak et al., 2014). In the above methods, the number or proportion of the moving pixels of all individuals was selected as the feature, while these features contained the moving pixels of not aggressive individuals, it would increase the data amount of feature and the computation amount of algorithm. Additionally, using the mean in a period of time as the feature will lose the aggression details of each frame in this period.
Hence, the objective of this paper is to develop a computer vision-based method to further separate the aggressive pigs from all the moving individuals and to automatically recognize aggressive behaviors by analyzing their acceleration between adjacent frames. Connected area and adhesion index were used to locate aggressive pigs and to extract key frame sequences. Among them, the diagonal length of circumscribed rectangle of aggressive pigs in the former frame was used to predict the aggression range in the latter frame to achieve the continuous tracking of aggressive pigs. The aggressive pigs were regarded as an entirety to analyze their motion between adjacent frames and to extract the acceleration feature. Hierarchical clustering was used to calculate the threshold of acceleration. Based on this feature, the recognition rules of medium and high aggression were designed. Accuracy, sensitivity and specificity were used to evaluate the effectiveness of this method.
Section snippets
Video acquisition
The videos used in this study were collected from pig farms of the Danyang Rongxin Nongmu Development Co., Ltd., which is the experimental base for key disciplines of the Agricultural Electrification and Automation of Jiangsu University. The pigs were monitored in a reconstructed experimental pigsty. The pigsty was 1 m high, 3.5 m long and 3 m wide. A camera was located above the pigsty at the height of 3 m relative to the ground. The camera was the Canadian point grey industrial camera
Results in training set
In the stage of extracting key frame sequences, the pig standard area was set to 61,700 pixels and the range of adhesion index was set as according to the labelled frames with aggression in all the 60 h. The 80 episodes of key frame sequences (15,137 frames) were extracted from the training set (43,200 frames). Among them, the 62 episodes with aggression were extracted, and 71.43% episodes without aggression were removed. The results show that all the episodes with aggression can be
Discussion
The computer vision-based algorithm proposed in this paper was used to continuously and automatically recognize pigs high and medium aggression. Compared with previous studies, the innovation and advantage of this paper are as follows.
In the aspect of target tracking, all the moving pig individuals were taken as the investigated objects in previous studies (Oczak et al., 2014, Viazzi et al., 2014). Only the aggressive individuals are continuously extracted from the pig group in this paper, the
Conclusion
A computer vision-based method was used to automatically recognize aggressive behaviors among group-housed pigs. Connected area and adhesion index were used to locate aggressive pigs and to extract key frame sequences. The two aggressive pigs were regarded as an entirety to extract the acceleration of this entirety between adjacent frames. The results show that the acceleration feature can be used to recognize pigs high and medium aggression with higher accuracy, sensitivity and specificity.
Acknowledgements
This work was part of a project funded by the “National Natural Science Foundation of China” (grant number: 31172243), the “Doctoral Program of the Ministry of Education of China” (grant number: 2010322711007), the “Priority Academic Program Development of Jiangsu Higher Education Institutions” and the “Graduate Student Scientific Research Innovation Projects of Jiangsu Ordinary University” (grant number: CXLX13_664).
References (28)
- et al.
Individual aggressiveness of pigs can be measured and used to reduce aggression after mixing
Appl. Anim. Behav. Sci.
(1997) - et al.
Foreground detection of group-housed pigs based on the combination of Mixture of Gaussians using prediction mechanism and threshold segmentation
Biosyst. Eng.
(2014) - et al.
Pig herd monitoring and undesirable tripping and stepping prevention
Comput. Electron. Agric.
(2015) - et al.
Multi-object extraction from topview group-housed pig images based on adaptive partitioning and multilevel thresholding segmentation
Biosyst. Eng.
(2015) - et al.
Aggression between unacquainted pigs—sequential assessment and effects of familiarity and weight
Appl. Anim. Behav. Sci.
(1998) - et al.
The automatic monitoring of pigs water use by cameras
Comput. Electron. Agric.
(2013) - et al.
Automatic recognition of lactating sow behaviors through depth image processing
Comput. Electron. Agric.
(2016) - et al.
Automatic detection of mounting behaviours among pigs using image analysis
Comput. Electron. Agric.
(2016) - et al.
Classification of aggressive behaviour in pigs by activity index and multilayer feed forward neural network
Biosyst. Eng.
(2014) - et al.
Influence of regrouping strategy on performance, behaviour and carcass parameters in pigs
Livestock Prod. Sci.
(2005)