AN EXPLAINABLE VISION-BASED FRAMEWORK FOR AUTOMATED LIVESTOCK BREED IDENTIFICATION IN PRECISION LIVESTOCK FARMING
DOI:
https://doi.org/10.70917/ijcisim-2026-4404Keywords:
livestock breed identification, multi-species classification, explainable AI, Grad-CAM, precision livestock farming, ConvNeXtAbstract
Accurate breed identification underpins evidence-based decisions in livestock nutrition, vaccination, insurance, and genetic conservation, yet most existing deep-learning solutions are species-specific and fail in the mixed cattle-buffalo farm environments common across South Asia. This study presents a unified multi-species deep learning framework capable of fine-grained classification of six cattle and buffalo breeds within a single model. Five convolutional neural network architectures — ResNet-50, MobileNetV2, EfficientNet-B0, DenseNet-121, and ConvNeXt-Tiny — were evaluated under identical experimental conditions via transfer learning on a 3,344-image, six-breed dataset. ConvNeXt-Tiny achieved the highest test accuracy (90.21%) and macro F1-score (0.89), despite having the largest parameter count of the five architectures, indicating that modernised architectural design contributes more to fine-grained discrimination than raw parameter efficiency. However, McNemar's statistical testing showed that none of ConvNeXt-Tiny's pairwise accuracy advantages over the other four architectures reached significance (all p > 0.05), underscoring the need for statistical rigor rather than point-accuracy alone when benchmarking classifiers on modestly sized test sets. Per-breed analysis identified Gir and Sahiwal — both reddish-brown-coated cattle breeds — as the most visually confusable pair, while Holstein Friesian's distinctive bicoloured coat made it the most reliably classified breed across all models. Grad-CAM++ explainability confirmed that model decisions are grounded in biologically meaningful anatomical cues — horn structure, coat pattern, and body silhouette — rather than background artefacts. Measured, rather than estimated, inference latency further revealed that DenseNet-121, despite its modest parameter count, was the slowest model to run (86.93 ms/image), three to six times slower than the other four architectures, demonstrating that parameter count alone does not predict deployment efficiency. These findings establish a statistically validated, explainable, and deployment-aware foundation for real-world precision livestock farming applications.