Crossref DOIMemberCiteFactoropen accessissn
SJIF Impact Factor 8.659 | ISSN: 2582-3930
IJSREM Logo

International Journal of Scientific Research in Engineering and Management

(Gateway to Global Scholars - An International, Scholarly, Multi-Disciplinary, Open Access Journal)

Peer-Reviewed Journal Designed to Meet UGC's Quality Parameters

HomeCurrent IssuePast IssuesPay OnlineConferencesEditorial BoardAbout UsContact Us
IJSREM

Loading article...

Follow Us

  • Google Scholar
  • ResearchGate
  • Academia.edu
  • Mendeley
  • LinkedIn
  • Facebook
  • Instagram

Journal Policies

  • Peer Review Policy
  • Publication Ethics
  • Copyright Infringement
  • Refund & Cancellation Policy
  • Terms and Conditions
  • Privacy Policy

Journal Identifiers & Licenses

  • ISSN Verified: 2582-3930ISSN Verified: 2582-3930
  • Crossref DOI: 10.55041Crossref DOI: 10.55041
  • SJIF Ranking: 08.659SJIF Ranking: 08.659
  • Licensed under CC BY 4.0Licensed under CC BY 4.0
  • ISO Certification: 9001:2015ISO Certification: 9001:2015
  • Indexed & Cited In: Google ScholarIndexed & Cited In: Google Scholar

Contact Us

International Journal of Scientific Research in Engineering and Management (IJSREM)

#62/1, New No 7, 1st Cross, 2nd Main, Ganganagar, R T Nagar, Bangalore North, Bangalore, Karnataka, India – 560032
[email protected]+91 93911 67991
logos
logos
Working Hours

Mon – Sat: 9:00 AM – 6:00 PM

Sunday: 10:00 AM – 4:00 PM

+91 93911 67991

© 2026 IJSREM – International Journal of Scientific Research in Engineering and Management. This is an open-access journal. Articles are published under the Creative Commons Attribution (CC BY 4.0) License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

DisclaimerPrivacy PolicyTerms and Conditions
ArticlePeer ReviewedOpen AccessPlagiarism Passed
Paper ID:IJSREM62902

Comparative Deep Learning Models for Cow and Buffalo Classification Using CNN and Attention Mechanisms

Stream/Area:

-

Subject:

-

Paper ID:

IJSREM62902

Volume:

10 |

5 |

May 2026

Pages:

1-8

Publication Frequency:

Monthly (12 issues per year)

DOI
Digital Object Identifier
10.55041/IJSREM62902

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.

Share this article:

Authors

AKG

Ankit Kumar Gupta

Department of Computer Science and Engineering

Lovely Professional University

Download Author Certificate
AR

Ayush Ranjan

Department of Computer Science and Engineering

Lovely Professional University

Download Co-Author Certificate
GK

Gulshan Kumar

Department of Computer Science and Engineering

Lovely Professional University

Download Co-Author Certificate

Mentors

AK

Anchal Kaundal

Department of Computer Science and Engineering

Lovely Professional University

Download Mentor Certificate

Author Services & Downloads

Full ArticlesAcceptance Certificate

Abstract

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

Index Terms—Cow and Buffalo Classification Convolu- tional Neural Networks Transfer Learning CBAM Attention ResNet50 Precision Livestock Farming

Cite This Article

Ankit Kumar Gupta, Ayush Ranjan, Gulshan Kumar, Anchal Kaundal, "Comparative Deep Learning Models for Cow and Buffalo Classification Using CNN and Attention Mechanisms," International Journal of Scientific Research in Engineering and Management, vol. 10, no. 5, pp. 1-8, May 2026. https://doi.org/10.55041/IJSREM62902

Full Article/Conclusion

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.

References

[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

Editorial & Review Transparency

Publication Date

5/8/2026

Peer Review Type

Double-Blind Peer Review

Review Rounds: 2

Documents

Review Report (Confidential)
Copyright Form (Office)

Article Metrics & Impact

Article Views

3

Total views since publication

PDF Downloads

7

Total downloads since publication

Geographic Reach

5

Indexing, Archiving & Preservation

Google Scholar
Academia
ResearchGate
Crossref
SSRN
Semantic Scholar
Thomson Reuters
WorldCat
Mendeley
OpenAlex
EBSCO
Zenodo

Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.

Ethics, Compliance & Transparency

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.

Similar & Recommended Articles

Similar Articles by Topic

Related research in the same subject area

Loading similar articles...