August 26, 2025 | 14:52 GMT +7

  • Click to copy
Tuesday- 11:20, 05/09/2023

Researchers test automatic detection of aggressive pig behaviour

(VAN) Researchers from China recently tested a hybrid model that combines a convolutional neural network and a gated recurrent unit to identify aggressive behaviour of group-housed pigs.

They also integrated a spatio-temporal attention mechanism in the model to improve the effect of aggressive behaviour recognition.

Researchers looked at agressive behaviour in group-housed pigs. Photo: Michel Velderman

Researchers looked at agressive behaviour in group-housed pigs. Photo: Michel Velderman

The convolutional neural network acted as a spatial feature extractor to learn appearance representations of behaviour in each individual video frame. The gated recurrent unit network functioned as a temporal feature extractor to learn motion representations of behaviour in a behaviour episode.

Data collection

The researchers defined aggressive behaviour of group-housed pigs as biting, knocking, trampling and chasing. They defined mounting, playing, lying, feeding, and drinking as non-aggressive behaviour. The team observed 541 video recordings of aggressive behaviour with a duration of 3 seconds, and 565 video recordings of non-aggressive behaviour with a duration of 3 seconds.

The researchers integrated the video frames to the model. Spatial feature extractors, integrated with a spatial attention mechanism extracted behavourial representations from each individual frame. The role of the spatial attention model is to improve the feature expression of local areas, thereby enhancing the feature expression of the area where aggressive behaviour occurs and weakening the feature expression of irrelevant areas. The temporal feature extractor integrating with a temporal attention mechanism extracted motion representations of behaviour from spatial features over different frames. The team identified aggressive and non-aggressive behaviour based on these features.

The effectiveness of models

The baseline model had the lowest recognition accuracy. However, adding the spatial attention mechanism improved the recognition accuracy in the test dataset by 2.2% and optimised the spatial feature extraction. Adding temporal attention improved the performance of the model compared to the baseline model, but it did not optimise the spatial feature extractor part. Integrating both spatial and temporal attention mechanisms to the model increased the recognition accuracy to 94.8%, proving that the spatio-temporal attention model is valid.

Hybrid model works best

The authors concluded that the variant model that combines spatial and temporal attention mechanisms in a hybrid model of convolutional neural network and gated recurrent unit has the best recognition performance, which proves the effectiveness of the model in this paper.

However, further research is required to clearly capture information such as the body parts used by pigs with aggressive behaviour with a multi-camera data collection method.

HD

(PP)

Replacing maize with fruit peels in broiler diets could benefit poultry farmers

Replacing maize with fruit peels in broiler diets could benefit poultry farmers

(VAN) Researchers have discovered that replacing 50g/kg maize with a 50:50 mix of pineapple and orange peels could offer poultry producers a sustainable feed option.

Thai farmers fear price drop as India plans to release 20m tonnes of rice

Thai farmers fear price drop as India plans to release 20m tonnes of rice

(VAN) Global rice markets are bracing for turbulence after reports that India, the world’s largest rice exporter, is preparing to release around 20 million tonnes of stockpiled rice in September.

Famine confirmed for first time in Gaza

Famine confirmed for first time in Gaza

(VAN) FAO, UNICEF, WFP and WHO reiterate call for immediate ceasefire and unhindered humanitarian access to curb deaths from hunger and malnutrition.

Farmers across Europe struggle to adapt to the climate crisis

Farmers across Europe struggle to adapt to the climate crisis

(VAN) As wildfires rage in southern Europe and crop losses only set to increase in the coming years, producers are getting creative to beat the heat.

Avian influenza outbreak confirmed in commercial layer farm in Argentina

Avian influenza outbreak confirmed in commercial layer farm in Argentina

(VAN) A new outbreak of highly pathogenic avian influenza (HPAI) has been confirmed by Argentinian authorities at a layer farm in Buenos Aires, Argentina.

German Govt supports climate-smart rice farming in three states

German Govt supports climate-smart rice farming in three states

(VAN) The German Government has inaugurated the Carbon Offsetting Rice Emissions (CORE) Project to support 12,000 smallholder farmers in climate-smart rice production across Benue, Nasarawa, and Kano States.

Farmers in southwest France express growing concern over the ongoing heatwave

Farmers in southwest France express growing concern over the ongoing heatwave

(VAN) Orchardists, winegrowers and livestock farmers fear the negative impact of the current heatwave on their production.

Read more