Back to Search
Start Over
Optimized BottleNet Transformer model with Graph Sampling and Counterfactual Attention for cow individual identification.
- Source :
-
Computers & Electronics in Agriculture . Mar2024, Vol. 218, pN.PAG-N.PAG. 1p. - Publication Year :
- 2024
-
Abstract
- In modern dairy farms, accurate and reliable identification of each individual cow is of great significance for precision livestock farming. Individual cow identification is the basis for applications such as disease detection, automatic behaviour analysis, intelligent milking, and individual counting and is crucial for improving the welfare and breeding efficiency of dairy cows. Computer vision-based method is a low-cost, non-contact, automatic, and efficient way. To improve the accuracy and efficiency of cow recognition in different large-scale dairy farms, we proposed a BottleNet Transformer (BoTNet) model based on Graph Sampling and Counterfactual Attention Learning for cow surveillance videos. First, we replace the 3 × 3 spatial convolution with Multi-Head Attention in the final three bottleneck blocks of the ResNet. The BoT block module combines attention mechanisms and residual connection to enhance the global representation of cow images, which in turn better captures the features of the cow's back pattern region and ignores the influence of irrelevant information, such as the background of the dairy barn. Subsequently, counterfactual learning measures the quality of attention by comparing the difference between the generated output and the true label. The difference can be used to enhance the causal relationship between prediction results and cow feature attention, allowing the model to obtain more comprehensive cow appearance features. Finally, we added a Graph Sampling module before the feature extraction phase to produce small batches of samples for training. The GS sampler improves the learning efficiency while reducing the memory and computation consumption compared with the usual adopted PK sampling. We conducted comparison experiments on the public dataset Dataset1, and the experimental results reveal that the Rank-1, Rank-5, and mAP values of this study's method are 4%, 3.2%, and 5.3% higher than the optimal results, respectively, when compared with the existing state-of-the-art methods for animal individual recognition. In particular, we construct a challenging dataset by intercepting individual cow images from videos in the public dataset of farms. Experimental results indicate that the proposed method has better generalization performance. • We propose a cost-efficient cow individual recognition method for large dairy farms. • Bottleneck Transformer is used to capture the global and Local features of cow backs. • Counterfactual learning pays more attention to cow backs and ignores backgrounds. • Graph Sampling is adopted to reduce memory and computation during training. [ABSTRACT FROM AUTHOR]
Details
- Language :
- English
- ISSN :
- 01681699
- Volume :
- 218
- Database :
- Academic Search Index
- Journal :
- Computers & Electronics in Agriculture
- Publication Type :
- Academic Journal
- Accession number :
- 175793500
- Full Text :
- https://doi.org/10.1016/j.compag.2024.108703