| Literature DB >> 35883357 |
Yu Zhang1, Chengjun Yu1, Hui Liu1, Xiaoyan Chen1,2, Yujie Lei1, Tao Pang3, Jie Zhang1,2.
Abstract
Goat farming is one of the pillar industries for sustainable development of national economies in some countries and plays an active role in social and economic development. In order to realize the precision and intelligence of goat breeding, this paper describes an integrated goat detection and counting method based on deep learning. First, we constructed a new dataset of video images of goats for the object tracking task. Then, we took YOLOv5 as the baseline of the object detector and improved it using a series of advanced methods, including: using RandAugment to explore suitable data augmentation strategies in a real goat barn environment, using AF-FPN to improve the network's ability to represent multi-scale objects, and using the Dynamic Head framework to unify the attention mechanism with the detector's heads to improve its performance. The improved detector achieved 92.19% mAP, a significant improvement compared to the 84.26% mAP of the original YOLOv5. In addition, we also input the information obtained by the detector into DeepSORT for goat tracking and counting. The average overlap rate of our proposed method is 89.69%, which is significantly higher than the 82.78% of the original combination of YOLOv5 and DeepSORT. In order to avoid double counting as much as possible, goats were counted using the single-line counting based on the results of goat head tracking, which can support practical applications.Entities:
Keywords: automatic counting; computer vision; deep learning; object detection; object tracking; precision farming
Year: 2022 PMID: 35883357 PMCID: PMC9312201 DOI: 10.3390/ani12141810
Source DB: PubMed Journal: Animals (Basel) ISSN: 2076-2615 Impact factor: 3.231
Figure 1Images of single sample augmentation.
Figure 2Images after Mixup augmentation processing.
Figure 3Images after Mosaic augmentation processing.
Figure 4The structure of the AF-FPN [22].
Figure 5The structure of the AAM [22].
Figure 6The structure of the FEM [22].
Figure 7The structure diagram of the Dynamic Head block [23].
Figure 8An example of applying Dynamic Head blocks to a one-stage object detector [23].
Figure 9The flow chart of goat tracking.
Figure 10The diagram of counting area.
Figure 11The schematic diagram of single-line counting method.
Figure 12Changes in mAP@0.5 during training.
Ablation study on data augmentation methods.
| Methods | mAP@0.5 (%) |
|---|---|
| YOLOv5 | 82.97 |
| YOLOv5 + Mixup | 83.32 |
| YOLOv5 + Mosaic | 83.87 |
| YOLOv5 + Mixup + Mosaic | 84.26 |
| YOLOv5 + RandAugment | 85.13 |
| YOLOv5 + Mixup + Mosaic + RandAugment | 85.35 |
Ablation study on our improvements. All of the following methods use Mixup and Mosaic by default.
| Methods | mAP@0.5 (%) | Inference Time (ms) |
|---|---|---|
| YOLOv5 | 84.26 | 23.3 |
| YOLOv5 + AF-FPN | 86.62 | 22.4 |
| YOLOv5 + DyHead | 88.21 | 26.7 |
| YOLOv5 + RandAugment | 85.13 | 23.7 |
| YOLOv5 + AF-FPN + DyHead + RandAugment | 92.19 | 25.6 |
Figure 13The combination of object detection network and object tracking network.
Comparison of object tracking algorithms.
| Methods | Average Overlap Rate (%) | Mean Center Position Error |
|---|---|---|
| YOLOv5 + DeepSORT | 82.78 | 8.56 |
| Ours | 89.69 | 5.92 |
Figure 14The results of goat tracking.
Comparison between quantity in reality and quantity calculated by the model.
| The Time Interval | 1~15 s | 16~30 s | 31~45 s | 46~60 s |
|---|---|---|---|---|
| Quantity in reality/goat | 7 | 11 | 17 | 26 |
| Quantity calculated by the model/goat | 7 | 11 | 17 | 25 |
Comparison of several animal counting methods.
| Methods | Counting Accuracy (%) |
|---|---|
| Improved SSD [ | 90.38 |
| LA-DeepLab V3+ [ | 94.23 |
| YOLOv5 + DeepSORT (tracking-based) | 96.15 |
| Ours (tracking-based) | 98.08 |