Explore

Communities in English

Advertise on Engormix

Poultry auto-monitoring system using computer vision and machine learning

Vision-Based Dynamic Density Estimation of Laying Hens for Piling-Up Prevention

Published: January 17, 2024
By: M. CHENG 1, L. YU 1, R. SHEPHARD 2, Q. WU 1, R. JENNER 3 and J. ZHANG 1 / 1 School of Electrical and Data Engineering, University of Technology Sydney; 2 Herd Health Pty Ltd; 3 Rosetta Management Consulting Pty Ltd.
Summary

Piling-up is a behaviour that can be common in laying hens on commercial egg farms, which can result in smothering and mass mortality events. We propose to provide early warning of pileups by automated video monitoring of bird density and activity in real-time. This will allow farmers to receive early warnings and take necessary measures to prevent negative impacts. We have designed an auto-monitoring system using computer vision and machine learning to allow automated and dynamic estimates of local flock densities under both indoor and outdoor environments suitable for use on commercial egg farms. This automated monitoring system provides a low-cost intervention to pile-ups, and potentially other behavioural problems on egg farms, with egg production and animal welfare benefits and the added benefit of more efficient labour utilization.

I. INTRODUCTION

The welfare of all farmed livestock is of importance to the consuming public. Australian consumers especially have some concerns about welfare within more intensive animal production systems, such as commercial egg farms (Rachel et al., 2017). Most consider cage-free and free-range production systems to be more `natural` and associate this with `good` animal welfare (Buddle et al., 2021). Commercial egg farms experiencing smothering and mortality events as a result of pile-ups experience reduced egg production and risk social licence from compromised animal welfare. Pile-ups occur when a group of hens increasingly cluster together within a small space, which can progress to smothering and death. Recurring pile-ups seem more prevalent on some farms and in some sheds. Birds that do not die can suffer in other ways including heat stress, injury and increase fear responses (Gray et al., 2020). Risk factors for pile-ups include several environmental factors (including light and temperature), shed infrastructure, genetics and sudden disturbances resulting in the mass movement and/or attraction (Gray et al., 2020).
The monitoring of bird welfare is a challenging task on large egg farms that have tens of thousands of birds per shed. For this reason, an increasing number of Precision Livestock Farming methods have recently been developed (Dawkins, et al., 2013). Specifically, density estimation technologies provide the potential for non-intrusive and continuous monitoring and management support on egg farms by providing effective auto-analysis focused on animal welfare and egg production.
In this paper, we present our applied computer vision and machine learning techniques that operate within a video-based monitoring system to enable dynamic estimates of the local density of birds at any time and place. Using low-cost equipment, the system can work continuously giving real-time information. This means that high-density ‘problem’ areas can be effectively detected without labour, and mitigating steps taken in response in a timely fashion.

II. METHOD

Our system is based on crowd counting and automated region analysis from video streams. To effectively estimate the flock density, a top-view video camera is mounted to capture the video footage, as illustrated in Figure 1. Such a view setting can avoid occlusion and enlarge the observation area. The video camera is connected to a desktop, which provides backend computation and communication. The live video feed is analysed in real-time, providing the essential density estimates and monitoring to prevent pile-ups.
Figure 1 - The camera setting.
Figure 1 - The camera setting.
Figure 2 - An illustration of k-means on 2D coordinates.
Figure 2 - An illustration of k-means on 2D coordinates.
The backend computational model is data-driven, which requires image data collection and manual annotation. To do this, we set up two cameras on a commercial egg farm in Windsor, NSW to collect video data. One camera was mounted in the shed, and the other was mounted on a pole in the open area outside the shed with the cameras covering 15m2 and 40m2 for indoor and outdoor environments respectively. After annotation of each observable bird on sampled images, we built a simple crowd-counting model as described by Wang (Wang et al.). Given an image, the model outputs a density map of the same size, where the value of each pixel represents the probability of an object instance, i.e., a bird in our case. The summation of the values across the whole density map is the total number of observable instances. However, alone, it cannot identify the specific region within the field of vision where maximal density occurred; this is the key indicator of risk for potential pile-ups (the ratio of count and area). Hence, we applied the k-means cluster algorithm on the density map, and then counted the birds in each cluster to calculate the bird density separately. Note that the k-means requires several iterations to identify and calculate clusters, which does not support the real-time computation of frame streams. Also, when the seeds of the randomly selected centroids are initialized differently, the final clusters are different. However, given there are only minor motion differences between any two consecutive frames, we only need to update the cluster centroids once within each frame and the next iteration uses the current cluster centroid as the starting point. In the 2D clustering, each bird is allocated to a cluster, which is represented as a circle. So, the density can be estimated by the ratio between the number of observable birds within the circle and its area. When there is an observable pile-up event, the bird density becomes very high in the specific area within camera coverage. In our camera setting, the top-down camera has spatial distortions, i.e., the observation area is not an exact rectangle. We used a scale mask for each cluster, that adjusts the image according to the relative position and angle of the camera, to control spatial distortions and thereby ensure the same area is used to give more accurate density estimations.

III. RESULTS

Based on the design and development of the system, we conducted a case study for bird density estimation. Figure 3 shows the visualization of the density measured in both indoor and outdoor environments. In the two cases, the cameras are 2.5 and 3.5 metres high, covering about 15m2 and 40m2 areas, respectively. In our setting, we set the number of clusters to 5, and the realtime calculation only returns the cluster with the maximal density. The maximal densities are 5 and 7 birds per square metre for indoor and outdoor environments respectively.
Figure 3 - The visualization of density estimations in both indoor (left) and outdoor (right) environments.
Figure 3 - The visualization of density estimations in both indoor (left) and outdoor (right) environments.
The system has a very high computation performance using low-cost hardware; it can process video streams with 30 frames per second (FPS), thereby enabling real-time monitoring. In Figure 4, we show the statistics for dynamic density estimation for a given day from the sampled video streams. We did not observe any pile-ups during the video recording, however, the real-time density monitoring capability identified potential for pile-ups by flagging densities above a user-defined threshold density. If the observed density is above the threshold, the system can give an early warning to help prevent piling behaviours.
Figure 4 - The density estimation statistics in both indoor (left) and outdoor (right) environments, where the horizontal axis represents the recorded time, and the vertical axis represent the maximal density (number of birds/m2) within the observable area.
Figure 4 - The density estimation statistics in both indoor (left) and outdoor (right) environments, where the horizontal axis represents the recorded time, and the vertical axis represent the maximal density (number of birds/m2) within the observable area.

IV. DISCUSSION AND CONCLUSION

In this paper, we have proposed applying advanced computer vision and machine learning techniques to monitor bird densities in commercial egg farms. With automated observation and analysis, the system has the potential to help monitor animal welfare and improve the productivity and hen welfare on commercial egg farms in Australia.
ACKNOWLEDGEMENT: The authors are grateful to Australian Eggs for their financial support of this study.
     
Presented at the 34th Annual Australian Poultry Science Symposium 2023. For information on the next edition, click here.

Buddle EA, Bray HJ & Ankeny RA (2021) Journal of Rural Studies 83: 50-59.

Dawkins MS, Cain R, Merelie K & Roberts SJ (2013) Applied Animal Behaviour Science 145: 44-50.

Gray H, Davies R, Bright A, Rayner A & Asher L (2020) Frontiers in Veterinary Science 7: 1047.

Rachel C, Christine P & Gyorgy S (2017) Journal of Rural Studies 54: 266-275.

Wang B, Liu H, Samaras D & Nguyen MH (2020) Proceedings of the 34th International Conference on Neural Information Processing Systems 135: 1595-1607.

Content from the event:
Related topics:
Related Questions

Commercial egg farms experiencing smothering and mortality events as a result of pile-ups experience reduced egg production and risk social licence from compromised animal welfare. Pile-ups occur when a group of hens increasingly cluster together within a small space, which can progress to smothering and death.
Authors:
Jian Zhang
University of Technology, Sidney
Richard Shephard
Rod Jenner
Recommend
Comment
Share
Profile picture
Would you like to discuss another topic? Create a new post to engage with experts in the community.
Featured users in Poultry Industry
Manuel Da Costa
Manuel Da Costa
Cargill
United States
Kendra Waldbusser
Kendra Waldbusser
Pilgrim´s
United States
Phillip Smith
Phillip Smith
Tyson
Tyson
United States
Join Engormix and be part of the largest agribusiness social network in the world.