Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
IJSREM62902
Volume:
10 |
5 |
May 2026
Pages:
1-8
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.
Department of Computer Science and Engineering
Lovely Professional University
Department of Computer Science and Engineering
Lovely Professional University
Department of Computer Science and Engineering
Lovely Professional University
Department of Computer Science and Engineering
Lovely Professional University
Telling a cow apart from a buffalo sounds like something any farmer can do at a glance, but building a machine that does it reliably from a photograph is a harder problem than it first appears. Both species share similar body sizes, live in the same farm environments, and are photographed under the same inconsistent lighting and angles. In regions like South Asia where both animals are kept on the same farms, automated species identification would directly support livestock registration, veterinary management, and supply chain verification — yet no published study has tackled this binary classification problem head-on with a controlled multi-model comparison. This paper does exactly that. We evaluated five deep learning architectures — a Baseline CNN trained from scratch, MobileNetV2, ResNet50, a CNN with Morphological Feature Fusion, and an Attention-Based CNN using the Convolutional Block Attention Module (CBAM) — on a cleaned and balanced dataset of 1,713 outdoor cow and buffalo images curated from two Kaggle sources covering eleven Indian breeds. Every model was trained under the same conditions: same dataset split, same optimizer, same batch size, same image normalization. ResNet50 achieved the best overall performance with 99.22 % accuracy, 99.26% precision, 99.26% recall, 99.26% F1-score, and 99.96% AUC-ROC, outperforming both the MobileNetV2 baseline and the CBAM attention model. An ablation study confirmed that CBAM did not improve results over ResNet50 alone, indicating that the deep pretrained features extracted by ResNet50 are already sufficient for this classification task without additional attention complexity. Grad-CAM maps revealed that the model focuses on horn shape, the dewlap, and body silhouette — the exact anatomical features that separate the two species — rather than background elements like fencing or ground texture.
KEYWORDS
This study set out to answer a straightforward question: can a deep learning model reliably tell a cow from a buffalo in an ordinary outdoor photograph, and which architecture does it best? We curated a 1,713-image dataset from two Kaggle sources covering eleven Indian breeds, cleaned it through a rigorous multi-stage pipeline, and trained five different architectures under identical conditions. The answer is clear. ResNet50 achieved the best performance with 99.22% accu- racy and 99.96% AUC-ROC, making it the strongest model for this task and practical enough for real deployment. The ablation study showed that adding CBAM attention on top of ResNet50 did not improve results — accuracy dropped slightly to 98.83% — confirming that deep pretrained features are already sufficient for this binary classification problem. Grad-CAM maps confirmed the model attends to horn shape, the dewlap region, and body silhouette rather than background elements, showing the learned representation is anatomically grounded. Three concrete outputs came out of this work. First, a cleaned and documented 1,713-image dataset for binary cow-vs-buffalo classification. Second, a controlled benchmark showing what five architectures achieve on this task. Third, a clear finding that transfer learning with a deep pretrained backbone is sufficient for this problem. The next steps include breed-level classification, video-based analysis, and deploy- ment on low-power edge devices.
[1] Y. Pan, H. Jin, J. Gao, and H. T. Rauf, “Identification of Buffalo Breeds Using Self-Activated-Based Improved Convolutional Neural Networks,” Agriculture, vol. 12, p. 1386, 2022. Available at: https://doi.org/10.3390/ agriculture12091386 [2] N. Naik, N. Jagadisha, and S. Ramu, “Buffalo Identification in Mixed- Species Environments: A Comparative Deep Learning Approach Using ResNet50 and EfficientNetB3,” Journal of Buffalo Science, vol. 14, 2025. Available at: https://doi.org/10.6000/1927-520X.2025.14.08 [3] R. Warhade, I. Devi, N. Singh et al., “Attention Module Incorporated Transfer Learning for Classification of Phenotypically Similar Tropical Cattle Breeds (Bos indicus),” Tropical Animal Health and Production, 2024. Available at: https://doi.org/10.1007/s11250-024-04050-7 [4] S. Li, L. Fu, Y. Sun, Y. Mu, and L. Chen, “Individual Dairy Cow Identification Based on Lightweight CNN with Attention Mechanism,” PLOS ONE, vol. 17, e0260510, 2022. Available at: https://doi.org/10. 1371/journal.pone.0260510 [5] N. R. Duraiswami et al., “Cattle Breed Detection and Categoriza- tion Using Image Processing and Machine Learning (ResNet50 vs MobileNetV2),” in Proc. IEEE ASSIC, 2022. Available at: 10.1109/ ASSIC55218.2022.10088381 [6] M. H. Kang and S. H. Oh, “Research Trends in Livestock Facial Identification: A Review of CNN-Based Deep Learning,” Journal of Animal Science and Technology, 2025. Available at: https://doi.org/10. 5187/jast.2025 [7] X. Zhang et al., “CNN-Bi-LSTM: A Complex Environment-Oriented Cattle Behavior Classification Network,” Animals, vol. 13, p. 3280, 2023. Available at: https://doi.org/10.3390/ani13203280 [8] X. Du, Y. Qi, J. Zhu, Y. Li, and L. Liu, “AI-Powered Cow Detection in Complex Farm Environments Using YOLOv8-CBAM,” Smart Agri- cultural Technology, 2025. Available at: https://doi.org/10.1016/j.atech. 2025.100xxx [9] H. Chen, G. Zhou, W. He et al., “Classification and Identifica- tion of Agricultural Products Based on Improved MobileNetV2,” Sci- entific Reports, vol. 14, 2024. Available at: https://doi.org/10.1038/ s41598-024-53349-w [10] Multiple Authors, “Transfer Learning in Agriculture: A Systematic Review (2022–2024),” Artificial Intelligence Review, 2025. Available at: https://doi.org/10.1007/s10462-024-11081-x
Publication Date
5/8/2026
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
3
Total views since publication
PDF Downloads
7
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...