| Literature DB >> 34843562 |
Shijun Li1, Lili Fu2, Yu Sun2,3,4,5, Ye Mu2,3,4,5, Lin Chen2, Ji Li2, He Gong2,3,4,5.
Abstract
In actual farms, individual livestock identification technology relies on large models with slow recognition speeds, which seriously restricts its practical application. In this study, we use deep learning to recognize the features of individual cows. Alexnet is used as a skeleton network for a lightweight convolutional neural network that can recognise individual cows in images with complex backgrounds. The model is improved for multiple multiscale convolutions of Alexnet using the short-circuit connected BasicBlock to fit the desired values and avoid gradient disappearance or explosion. An improved inception module and attention mechanism are added to extract features at multiple scales to enhance the detection of feature points. In experiments, side-view images of 13 cows were collected. The proposed method achieved 97.95% accuracy in cow identification with a single training time of only 6 s, which is one-sixth that of the original Alexnet. To verify the validity of the model, the dataset and experimental parameters were kept constant and compared with the results of Vgg16, Resnet50, Mobilnet V2 and GoogLenet. The proposed model ensured high accuracy while having the smallest parameter size of 6.51 MB, which is 1.3 times less than that of the Mobilnet V2 network, which is famous for its light weight. This method overcomes the defects of traditional methods, which require artificial extraction of features, are often not robust enough, have slow recognition speeds, and require large numbers of parameters in the recognition model. The proposed method works with images with complex backgrounds, making it suitable for actual farming environments. It also provides a reference for the identification of individual cows in images with complex backgrounds.Entities:
Mesh:
Year: 2021 PMID: 34843562 PMCID: PMC8629223 DOI: 10.1371/journal.pone.0260510
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Fig 1Examples of individual cow images.
Fig 2Alexnet model structure.
Fig 3SE block.
Fig 4Flowchart of the dairy cow identification process.
Fig 5Structure of the model used in this research.
Fig 6Multi-scale module.
Fig 7BasicBlock + SE module.
Comparative results of module addition.
| Improvement method | Accuracy (%) | Total parameters | Parameter size (MB) |
|---|---|---|---|
| Alexnet | 87.50 | 58,314,120 | 222.45 |
| multi-scale+SE | 95.65 | 3,411,400 | 13.01 |
| BasicBlock+SE | 96.74 | 2,091,208 | 7.98 |
| Ours | 97.95 | 1,707,592 | 6.51 |
Fig 8Accuracy of the model trained on the system with the GPU.
Fig 9Comparison of the results of different network models.
Analysis of the results of different models.
| Recognition method | Accuracy (%) | Total parameters | Parameter size (MB) | Average single training time (s) |
|---|---|---|---|---|
| Alexnet | 87.50 | 58,314,120 | 222.45 | 34 |
| Vgg16 | 92.93 | 134,293,320 | 512.29 | 46.5 |
| Resnet50 | 94.33 | 23,524,424 | 89.74 | 32.45 |
| GoogLeNet | 98.61 | 5,611,179 | 21.04 | 21.28 |
| Mobilenet v2 | 96.20 | 2,234,120 | 8.52 | 21.93 |
| Ours | 97.95 | 1,707,592 | 6.51 | 5.75 |
Fig 10(a) Images of cows with a simple background, (b) accuracy and loss rate curves of the training model with the dataset with simple backgrounds.
Validation of the proposed model with two datasets.
| Dataset | Training accuracy (%) | Validation accuracy (%) |
|---|---|---|
| Complex | 99.27 | 97.95 |
| Simple | 99.58 | 98.32 |
Fig 11Example cow heat maps.