| Literature DB >> 32290316 |
Jayme Garcia Arnal Barbedo1, Luciano Vieira Koenigkan1, Patrícia Menezes Santos2, Andrea Roberto Bueno Ribeiro3.
Abstract
The management of livestock in extensive production systems may be challenging, especially in large areas. Using Unmanned Aerial Vehicles (UAVs) to collect images from the area of interest is quickly becoming a viable alternative, but suitable algorithms for extraction of relevant information from the images are still rare. This article proposes a method for counting cattle which combines a deep learning model for rough animal location, color space manipulation to increase contrast between animals and background, mathematical morphology to isolate the animals and infer the number of individuals in clustered groups, and image matching to take into account image overlap. Using Nelore and Canchim breeds as a case study, the proposed approach yields accuracies over 90% under a wide variety of conditions and backgrounds.Entities:
Keywords: Canchim breed; Nelore breed; convolutional neural networks; mathematical morphology; unmanned aerial vehicles
Mesh:
Year: 2020 PMID: 32290316 PMCID: PMC7181249 DOI: 10.3390/s20072126
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Steps adopted to generate the binary masks used for animal segmentation.
Figure 2Examples of images resulting from each processing step shown in Figure 1. (A) Original image; (B) region of interest; (C) quadrants of the image; (D) color channels used in the algorithm; (E) masks associated to each channel; (F) six resulting masks with all quadrants united.
Figure 3Mask combination and estimation of the number of animals.
Tunable parameters used in this study.
| Parameter | Value Adopted | Adaptation to Different Conditions |
|---|---|---|
|
|
| Should work under any condition |
| Minimum number of active pixels in a quadrant | 50,000 | Should work under any condition |
| Threshold for the C channel |
| This parameter was set to detect darker animals under poorly lit conditions; it may be discarded if such conditions are not present |
| Threshold for the M channel | 30 | This parameter was included to address the problem of redish soil being identified as animals; it may be discarded if such conditions are not present |
| Threshold for the Y channel | Variable | This channel showed the best discriminative potential for light animals; with darker animals, the C channel may be more suitable as the main source |
| Threshold for the custom channel |
| This channel was used to resolve animals when contrast with the background was poor; this parameter may change when breeds with different coat colors |
| Size rules | Varied | All size rules were derived considering a GSD of 1 cm/pixel; the adopted values should be rescaled according to the GSD adopted in each case |
| Solidity rules | Varied | Should work under any condition |
Figure 4Confusion matrix crossing actual and estimated counts for different cluster sizes.
Precision, recall and F1-scores for each cluster size.
| Cluster Size | Precision | Recall | F1-Score |
|---|---|---|---|
| 1 | 99.1 | 99.2 | 99.1 |
| 2 | 100.0 | 95.0 | 97.4 |
| 3 | 97.6 | 96.2 | 96.9 |
| 4 | 96.2 | 83.3 | 89.3 |
| 5 | 85.9 | 95.7 | 90.5 |
| 6 | 98.2 | 95.6 | 96.9 |
| 7 | 92.9 | 91.9 | 92.4 |
| 8 | 86.3 | 93.8 | 89.9 |
| All | 97.4 | 97.4 | 97.4 |
Results for images containing different types of structures.
| Structure | Precision | Recall | F1-Score | Mean Dev. | Std. Dev. | Min. Dev. | Max. Dev |
|---|---|---|---|---|---|---|---|
| All | 97.4 | 97.4 | 97.4 | 0 | 0.73 | −20 | +3 |
| Trees | 97.4 | 93.4 | 95.4 | −0.42 | 0.80 | −2 | +1 |
| Sheds | 87.1 | 98.4 | 92.4 | +1.11 | 1.32 | −1 | +3 |
| Feeders | 94.9 | 96.7 | 95.8 | +0.49 | 0.99 | −2 | +2 |
Count estimates for the whole areas imaged.
| Date | Estimated | Actual |
|---|---|---|
| January 9, 2018 | 86 | 88 |
| February 9, 2018 | 105 | 112 |
| March 14, 2018 | 80 | 83 |
| April 16, 2018 | 74 | 78 |
| April 17, 2018 | 144 | 142 |
| May 17, 2018 | 43 | 43 |
| June 18, 2018 | 29 | 29 |
| June 22, 2018 | 43 | 44 |
| July 20, 2018 | 31 | 30 |
| August 21, 2018 | 22 | 22 |
| November 29, 2018 | 79 | 76 |
| September 9, 2019 | 199 | 242 |
| Total | 935 | 989 |
Figure 5Example of image containing many calves.
Figure 6Examples of images containing trees (A), shed (B) and feeder (C).
Figure 7Examples of animals in different positions.
Figure 8Examples of images with underexposure (A) and overexposure (B).