A Hybrid Deep Learning Model for Spotted Buffalo Image Detection and Segmentation Using YOLO, VGGNet, and Canny Edge Detection
Corresponding author: Syafruddin Syarif
Abstract
This study addresses the research gap in the visual recognition of Toraja buffalo, particularly the two main classes, Bonga and Saleko, which exhibit complex morphological variations and diverse coat patterns. Conventional methods often suffer from misclassification under extreme lighting conditions or when the background closely resembles the object. To bridge this gap, a hybrid model is proposed by integrating You Only Look Once (YOLO) for object detection, Visual Geometry Group 16 (VGG16) for deep feature extraction, and Canny edge detection for precise segmentation. The model was evaluated on a dataset of 200 Toraja buffalo images, divided into 70% training, 15% validation, and 15% testing. Experimental results indicate competitive detection performance with mean Average Precision (mAP)@0.5 of 0.84, a Dice coefficient of 0.933, and classification accuracy close to 95% on the confusion matrix. The reliability diagram further confirms that the model's confidence scores are well calibrated, with an Expected Calibration Error (ECE) of 0.03, indicating that the model's predictions align well with empirical accuracy across various confidence levels. The novelty of this research lies in the hybrid approach that combines detection, feature extraction, and edge-based segmentation into a unified framework tailored for Toraja buffalo recognition, a domain rarely explored in previous works. This study contributes not only to the cultural conservation and documentation of Toraja traditions but also offers practical implications for livestock identification systems in complex real-world environments.
Keywords:
Canny edge detection, hybrid model, object detection, segmentation, Toraja buffalo, VGG16, YOLOReferences
Y. Qiao, Y. Guo, and D. He, "Cattle body detection based on YOLOv5-ASFF for precision livestock farming," Computers and Electronics in Agriculture, vol. 204, Jan. 2023, Art. no. 107579.
Z. Su, J. Yu, H. Tan, X. Wan, and K. Qi, "MSA-YOLO: A Remote Sensing Object Detection Model Based on Multi-Scale Strip Attention," Sensors, vol. 23, no. 15, July 2023, Art. no. 6811.
W. Hao, C. Ren, M. Han, L. Zhang, F. Li, and Z. Liu, "Cattle Body Detection Based on YOLOv5-EMA for Precision Livestock Farming," Animals, vol. 13, no. 22, Nov. 2023, Art. no. 3535.
Q. Guan et al., "Deep convolutional neural network VGG-16 model for differential diagnosing of papillary thyroid carcinomas in cytological images: a pilot study," Journal of Cancer, vol. 10, no. 20, pp. 4876–4882, Aug. 2019.
M. Ariza-Sentís, S. Vélez, R. Martínez-Peña, H. Baja, and J. Valente, "Object detection and tracking in Precision Farming: a systematic review," Computers and Electronics in Agriculture, vol. 219, Apr. 2024, Art. no. 108757.
Y. LeCun, Y. Bengio, and G. Hinton, "Deep learning," Nature, vol. 521, no. 7553, pp. 436–444, May 2015.
J. Redmon and A. Farhadi, "YOLOv3: An Incremental Improvement." arXiv, Apr. 08, 2018.
P. Digambar Pathak and S. Prakash, "Enhancing digital cattle identification with fine-grained image analysis," Expert Systems with Applications, vol. 297, Feb. 2026, Art. no. 129409.
K. Simonyan and A. Zisserman, "Very Deep Convolutional Networks for Large-Scale Image Recognition," in 3rd International Conference on Learning Representations, San Diego, CA, USA, 2015, pp. 1–14.
J. Canny, "A Computational Approach to Edge Detection," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-8, no. 6, pp. 679–698, Nov. 1986.
D. Yang, B. Peng, Z. Al-Huda, A. Malik, and D. Zhai, "An overview of edge and object contour detection," Neurocomputing, vol. 488, pp. 470–493, June 2022.
W. Zhang, W. Chen, Y. Ni, S. Wang, and B. Dang, "YOLO-VCL: a lightweight and high-precision PCB defect detection network model," Journal of Real-Time Image Processing, vol. 23, no. 2, Feb. 2026, Art. no. 61.
Z. Yu et al., "Automatic Detection Method of Dairy Cow Feeding Behaviour Based on YOLO Improved Model and Edge Computing," Sensors, vol. 22, no. 9, Apr. 2022, Art. no. 3271.
M. L. Ali and Z. Zhang, "The YOLO Framework: A Comprehensive Review of Evolution, Applications, and Benchmarks in Object Detection," Computers, vol. 13, no. 12, Dec. 2024, Art. no. 336.
R. A. Rajagukguk et al., "Deep learning for visual animal monitoring (detection, tracking, pose estimation, and behavior classification): A comprehensive review," Smart Agricultural Technology, vol. 12, Dec. 2025, Art. no. 101539.
N. L. Kirana, D. Kurnianingtyas, and Indriati, "A Deep Learning Approach to Plastic Bottle Waste Detection on the Water Surface using YOLOv6 and YOLOv7," Engineering, Technology & Applied Science Research, vol. 14, no. 6, pp. 18623–18630, Dec. 2024.
J. R. Thota and A. Padala, "Human Remains Detection in Natural Disasters using YOLO: A Deep Learning Approach," Engineering, Technology & Applied Science Research, vol. 14, no. 6, pp. 17678–17682, Dec. 2024.
R. Mao et al., "EBS-YOLO: edge-optimized bidirectional spatial feature augmentation for in-field detection of wheat Fusarium head blight epidemics," Plant Methods, vol. 21, no. 1, Oct. 2025, Art. no. 133.
M. Tandililing, "buffalos_saleko_Bonga_Toraja dataset." Kaggle, May 2025, [Online]. Available: https://www.kaggle.com/datasets/mikatandililing/buffalos-saleko-bonga-toraja-dataset.
Downloads
How to Cite
License
Copyright (c) 2026 Mika Tandililing, Syafruddin Syarif, Ingrid Nurtanio, Zahir Zainuddin

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
