Elsevier

Biosystems Engineering

Volume 119, March 2014, Pages 89-97
Biosystems Engineering

Research Paper
Classification of aggressive behaviour in pigs by activity index and multilayer feed forward neural network

https://doi.org/10.1016/j.biosystemseng.2014.01.005Get rights and content

Highlights

  • We identify two types of aggressive interactions between pigs: medium and high.

  • We classify aggressive interactions on the video images with activity index and ANN.

  • We test the performance of 7 types of ANN architecture.

  • High aggression events are classified with better performance than medium.

  • More complex ANN performs better in classification of aggressive events.

The aim of this study was to test a method to automatically detect aggressive behaviour in pigs, by using an activity index and a multilayer feed forward neural network. An experiment was carried out on a mixed group of 11 male pigs weighing on average 23 kg. During the first 3 days after mixing, the pigs were recorded for video analysis. Out of the total video recording time (8 h or 28,800 s), 643 s were labelled as high aggression events and 1253 s as medium aggression events. Activity of the animals was measured on the videos using software that calculated activity index. Five features of activity index were calculated on the recorded videos (average, maximum, minimum, sum and variance) over 14 time intervals. A multilayer feed forward neural network was trained and validated to classify events of high aggression and medium aggression. Seven types of artificial neural network (ANN) architectures were tested in our study. The results revealed that ANNs, fed with 70 features of activity index (5 features × 14 intervals) calculated on 241 s time intervals, classified high aggression events with a sensitivity of 96.1%, specificity of 94.2% and an accuracy of 99.8% whereas medium aggression events were classified with a sensitivity of 86.8%, specificity of 94.5% and an accuracy of 99.2%. These results indicate that a combination of the activity index and multilayer feed forward neural network can be used to classify aggressive pig behaviour.

Introduction

The development of automatic monitoring systems of animal behaviour has become possible in recent years due to the evolution of new sensor technologies (Frost et al., 1997). Precision Livestock Farming (PLF) is the principal means by which ‘smart’ sensors will be used in livestock farming (Wathes, Kristensen, Aerts, & Berckmans, 2008). Using PLF technology to detect aggression among group housed pigs has not yet been explored. Aggression is one of the most significant welfare problems when group housed pigs are mixed in modern production systems. When introduced to unfamiliar conspecifics, pigs naturally engage in aggressive interactions to determine social hierarchy (D'Eath & Turner, 2009). Ordinarily, when hierarchy is established in a group, levels of aggression should be relatively low (Mendl, Zanella, & Broom, 1992). However, conditions of confined environment can result in persistent aggression (Ewbank & Bryant, 1969). Recurring aggression reduces the health and welfare status of the animals (Marchant-Forde, 2010, McGlone et al., 1981) as well as farm productivity (Arey and Edwards, 1998, Stookey and Gonyou, 1994).

Low-cost cameras, in combination with image analysis technology, can be used to quantify an animal's behaviour (Wathes et al., 2008). In order to detect aggressive behaviour in pigs using camera images, it is necessary to correctly interpret the visual scene by image analysis techniques. The purpose of image analysis is to enable some of the available information to be extracted automatically to reduce manual workload, increase objectivity and quantify changes too slight for the human eye. The difficulty for image analysis lies in separating, or segmenting, the objects of interest (specific animal behaviour). The visual characteristics of biological specimens exhibit a high variability that is not generally present in manufactured objects. The mobility and unique physique and colouring of animals contribute extra visual variability. Further difficulties are due to the relatively uncontrollable field conditions in which animals are kept: for instance, it is difficult to arrange for the animal to be present under the camera under favourable lighting conditions and against a contrasting background (Frost et al., 1997).

An image analysis technique called activity index allows segmentation and quantification of behaviour of the animals. The technique can be applied to multiple camera-based monitoring systems and allows measurement of responses of the animals to their environment (Bloemen, Aerts, Berckmans, & Goedseels, 1997). In order to classify aggressive events on the basis of an activity index, a multilayer feed forward neural network classification technique was tested in this research. An artificial neural network (ANN) is a mathematical modelling tool that is especially powerful for complex systems. In this research, a multilayer feed forward neural network was used as this type of network is the most commonly used for the function approximation problem as well as because of its strong learning capability. This type of network is able to approximate almost all kinds of functions regardless of their complexities (Gardner & Dorling, 1998). ANNs have been applied successfully in different areas such as function approximation and pattern recognition and are capable of representing complex systems (Moradi, Dehghani, Khosravian, & Arjmandzadeh, 2013) Some of the applications are: handwriting recognition (Ganapathy & Liew, 2008), autonomous robot navigation (Moussi, Von Zuben, Gudwin, & Madrid, 2002) and breast cancer risk estimation (Ayer et al., 2010).

The basic studies on aggressive pig behaviour performed by McGlone (1985) revealed that it is a complex and gradual behaviour. Aggressive contests proceed through a number of phases, each with a typical behavioural characteristic (Jensen & Yngvesson, 1998). Initial behaviours are characterised by slower movement (walking) while those occurring in the final phase are vigorous, rapid and dynamic (Fraser, 1974). The slower initial behaviours may be difficult to distinguish from non-aggressive behaviours (higher potential for false positives), whereas rapid highly aggressive movements are quite distinctive and likely to be easier to detect automatically.

The aim of this study was to test a method to automatically detect aggressive behaviour among pigs, using a combination of an activity index and a multilayer feed forward neural network.

Section snippets

Animals and housing

Our study was carried out on a commercial farm, in Heusden, the Netherlands, that housed approximately 6000 fattening pigs (Topigs 20 (large White × Landrace) × Pietrain), weighing 23–120 kg. Behaviour of 11 male uncastrated pigs, weighing on average 23.0 kg (Standard Error of the Mean = 0.41 kg) was recorded using a camera for later analysis. The pigs were housed in a pen that measured 4 m × 2.5 m. The pen was surrounded by solid, plastic wall and had a partially-slatted concrete floor. Each

Results

Out of 28,800 s of recorded video, 634 s were labelled as high aggression events (Table 3) and 1253 s as medium aggression events (Table 4). In the high aggression dataset, training accounted for 455 s while validation accounted for 179 s (Table 3). In the medium aggression dataset, 867 s was used for training and 386 s for validation dataset (Table 4).

Mean activity measured during the high aggression events (6738 pixels s−1) was higher (P < 0.01) than during medium aggression events

Discussion

Medium and high aggression events can be classified by a multilayer feed forward neural network on the basis of selected features of activity index calculated on time intervals. In this research several lengths of time interval and ANN architectures were tested in order to find the most effective method to classify aggressive events.

A more complex ANN often improves the capability of a network to learn the training patterns in the training dataset. Given training data and a network with too many

Conclusions

In this research, multilayer feed forward neural network in combination with an activity index was used in order to classify the aggressive behaviour of pigs. The network was trained and validated on a database of 28,800 s. The algorithm results indicate that high aggression can be classified with a specificity of 94.2%, sensitivity of 96.1%, and accuracy of 99.8%. Behaviours defined as medium aggression can be classified with a sensitivity of 86.8%, specificity of 94.5% and accuracy of 99.2%.

Acknowledgements

This research is a part of the BioBusiness Project and made possible by the support of the EU Commission and Marie Curie Initial Training.

References (25)

  • T. Ayer et al.

    Breast cancer risk estimation with artificial neural networks revisited: discrimination and calibration

    Cancer

    (2010)
  • H. Bloemen et al.

    Image analysis to measure activity index of animals

    Equine Veterinary Journal

    (1997)
  • Cited by (0)

    View full text