Abstract
Accurate breed identification in dairy cattle is essential for optimizing herd management and improving genetic standards. A smart method for correctly identifying phenotypically similar breeds can empower farmers to enhance herd productivity. A convolutional neural network (CNN) based model was developed for the identification of Sahiwal and Red Sindhi cows. To increase the classification accuracy, first, cows’s pixels were segmented from the background using CNN model. Using this segmented image, a masked image was produced by retaining cows' pixels from the original image while eliminating the background. To improve the classification accuracy, models were trained on four different images of each cow: front view, side view, grayscale front view, and grayscale side view. The masked images of these views were fed to the multi-input CNN model which predicts the class of input images. The segmentation model achieved intersection-over-union (IoU) and F1-score values of 81.75% and 85.26%, respectively with an inference time of 296 ms. For the classification task, multiple variants of MobileNet and EfficientNet models were used as the backbone along with pre-trained weights. The MobileNet model achieved 80.0% accuracy for both breeds, while MobileNetV2 and MobileNetV3 reached 82.0% accuracy. CNN models with EfficientNet as backbones outperformed MobileNet models, with accuracy ranging from 84.0% to 86.0%. The F1-scores for these models were found to be above 83.0%, indicating effective breed classification with fewer false positives and negatives. Thus, the present study demonstrates that deep learning models can be used effectively to identify phenotypically similar-looking cattle breeds. To accurately identify zebu breeds, this study will reduce the dependence of farmers on experts.
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig1_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig2_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig3_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig4_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig5_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig6_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig7_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig8_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig9_HTML.png)
![](https://cdn.statically.io/img/media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11250-024-04050-7/MediaObjects/11250_2024_4050_Fig10_HTML.png)
Similar content being viewed by others
Data availability
The data that support this study will be shared upon reasonable request to the corresponding author.
References
Alzubaidi L, Zhang J, Humaidi AJ, Al-Dujaili A, Duan Y, Al-Shamma O, Santamaría J, Fadhel MA, Al-Amidie M, Farhan L (2021) Review of deep learning: concepts CNN architectures, challenges, applications. Future Dir J Big Data 8:53
Bosilj P, Aptoula E, Duckett T, Cielniak G (2020) Transfer learning between crop types for semantic segmentation of crops versus weeds in precision agriculture. Journal of Field Robotics 37:7–19
Breed-wise report of livestock and poultry (based on 20th Livestock Census) (2020) Ministry of Fisheries, Animal Husbandry and Dairying. Department of Animal Husbandry, Dairying and Fisheries (Animal Husbandry Statistics Division), Krishi Bhawan, New Delhi -110 001. India. pp 1–263
Chollet F (2015) Keras (https://github.com/fchollet/keras). Accessed 20 Dec 2023
Deng J, Dong W, Socher R, Li L-J, Li K, Fei-Fei L (2009) ImageNet: A large-scale hierarchical image database. Conference Paper. In Proceedings: IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA pp 248–255. https://doi.org/10.1109/CVPR.2009.5206848
Diwan T, Anirudh G, Tembhurne JV (2023) Object detection using YOLO: challenges, architectural successors, datasets and applications. Multimed Tools App 82:9243–9275. https://doi.org/10.1007/s11042-022-13644-y
FAO (2012) Phenotypic characterization of animal genetic resources. FAO Animal Production and Health Guidelines No. 11. Rome, Italy pp 1–134
Fu Y, Huang X, Li Y (2020) Horse Breed Classification Based on Transfer Learning In:, 2020 4th International Conference on Advances in Image Processing, (ACM: Chengdu China)
Ghosh P, Mustafi S, Mandal SN (2020) Image-based goat breed identification and localization using deep learning. Int J Comput Vision Image Process 10(4):74–96
Gonzalez-Huitron V, León-Borges JA, Rodriguez-Mata AE, Amabilis-Sosa LE, Ramírez-Pereda B, Rodriguez H (2021) Disease detection in tomato leaves via CNN with lightweight architectures implemented in Raspberry Pi 4. Comput Electron Agric 181:105951. https://doi.org/10.1016/j.compag.2020.105951
Google Colaboratory (2021) Google Colaboratory [WWW Document]. URL https://colab.research.google.com/notebooks/basic_features_overview.ipynb. Accessed 20 Dec 2023
Hinton GE, Osindero S, Teh YW (2006) A fast learning algorithm for deep belief nets. Neural Comput 18(7):1527–1554
ICAR Handbook of Animal Husbandry (2011) Directorate of Knowledge Management in Agriculture. Indian Council of Agricultural Research (ICAR). Ed (3rd Revised). New Delhi. India pp 6-7
Jwade SA, Guzzomi A, Mian A (2019) On farm automatic sheep breed classification using deep learning. Comput Electron Agric 167:105055
Kingma DP and Ba J (2015) Adam: A Method for Stochastic Optimization. arXiv:1412.6980 [cs. LG]. Conference paper, In: Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015). San Diego, CA
Krizhevsky A, Sutskever I, Hinton GE (2012) ImageNet classification with deep convolutional neural networks. Adv Neural Inf Process Syst 25:1097–1105
Kumar P, Freeman AR, Loftus RT, Gaillard C, Fuller DQ, Bradley DG (2003) Admixture analysis of South Asian cattle. Heredity 91:43–50
Lin C, Yang P, Wang Q, Qiu Z, Lv W, Wan Z (2023) Efficient and accurate compound scaling for convolutional neural networks. Neural Networks 167:787–797. https://doi.org/10.1016/j.neunet.2023.08.053
Livestock Census- All India Report (2019) Ministry of Fisheries, Animal Husbandry and Dairying. Department of Animal Husbandry, Dairying and Fisheries (Animal Husbandry Statistics Division), Krishi Bhawan, New Delhi -110 001. India pp 1–43
NBAGR Database (2023) ICAR-National bureau of Animal Genetic Resources, Database. Information System of Animal Genetics Resources of India
Pan Y, Jin H, Gao J, Rauf HT (2022) Identification of Buffalo Breeds Using Self-Activated-Based Improved Convolutional Neural Networks. Agriculture 12:1386
Qian S, Ning C and Hu, Y (2021) MobileNetV3 for Image Classification. In:, 2021 IEEE 2nd International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), Nanchang, China pp 490–497. https://doi.org/10.1109/ICBAIE52039.2021.9389905
Rauf HT, Lali MIU, Zahoor S, Shah SZH, Rehman AU, Bukhari SAC (2019) Visual features based automated identification of fish species using deep convolutional neural networks. Comput Electron Agric 167:105075
Redmon J, Divvala S, Girshick R, Farhadi A (2015) You Only Look Once: Unified. Real-Time Object Detection. https://doi.org/10.48550/ARXIV.1506.02640
Sandler M, Howard A, Zhu M, Zhmoginov A and Chen L-C (2018) MobileNetV2: Inverted Residuals and Linear Bottlenecks. IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, pp 4510–4520. https://doi.org/10.1109/CVPR.2018.00474
Singh N, Tewari VK, Biswas PK, Dhruw LK, Pareek CM, Singh HD (2022) Semantic segmentation of in-field cotton bolls from the sky using deep convolutional neural networks. Smart Agric Technol 2:100045
Tan M, Le QV (2019) EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In: Proceedings of the 36th International Conference on Machine Learning, Long Beach, California, PMLR 97. https://doi.org/10.48550/ARXIV.1905.11946
TensorFlow Developers, 2021. TensorFlow (Zenodo)
Weber FDL, Weber VADM, Menezes GV, Oliveira Junior ADS, Alves DA, de Oliveira MVM, Matsubara ET, Pistori H, Abreu UGPD (2020) Recognition of Pantaneira cattle breed using computer vision and convolutional neural networks, Comput Electronics Agric 175:105548. https://doi.org/10.1016/j.compag.2020.105548
Woo S, Park J, Lee J-Y, Kweon IS (2018) CBAM: Convolutional Block Attention Module. In: Ferrari V, Hebert M, Sminchisescu C, Weiss Y (eds) Computer Vision – ECCV 2018. Springer International Publishing, Cham, pp 3–19
Acknowledgements
The authors sincerely acknowledge the financial support and facilities provided by the Director, ICAR-National Dairy Research Institute, Karnal, Haryana, and the Director, Animal Breeding Farm, Kalsi, Dehradun, India to carry out this work successfully.
Funding
This research was funded by ICAR-NePPA under ‘ICAR-Network Programme on Precision Agriculture’ project.
Author information
Authors and Affiliations
Contributions
R.W.: Image dataset preparation of Sahiwal cows. I.D.: Conceptualization, writing – original draft. N.S.: Conceptualization, image processing, CNN model development, manuscript drafting. S.A: Image dataset preparation of Red Sindhi cows. K.D.: Writing, review and editing of manuscript. S.S.L.: Finalization of manuscript, overall herd management and supervision. D.S.T: Manuscript writing, editing and visualization of data.
Corresponding author
Ethics declarations
Conflicts of interest
The authors declare they have no conflicts of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Warhade, R., Devi, I., Singh, N. et al. Attention module incorporated transfer learning empowered deep learning-based models for classification of phenotypically similar tropical cattle breeds (Bos indicus). Trop Anim Health Prod 56, 192 (2024). https://doi.org/10.1007/s11250-024-04050-7
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11250-024-04050-7