Image-Based Classification of Healthy and Unhealthy Goats Using ResNet-18 Deep Learning Model

Authors

  • Nurrochim Amin Putra Amin Universitas Amikom Yogyakarta
  • Ajie Kusuma Wardhana Universitas Amikom Yogyakarta

DOI:

https://doi.org/10.30871/jaic.v9i5.10267

Keywords:

Deep Learning, Healthy and Unhealthy Goats, Image Classification, CNN ResNet-18, Model Evaluation

Abstract

Early detection of livestock health conditions is a critical factor in maintaining animal productivity and welfare. This study aims to develop an image-based classification system for identifying healthy and unhealthy goats using deep learning techniques. The dataset of goat images was obtained from Roboflow and processed through a series of augmentation, normalization, and feature extraction stages using the ResNet-18 convolutional neural network architecture pretrained on ImageNet. The dataset was divided into training and testing sets with a 70:30 stratified split to ensure balanced class distribution. To address class imbalance, a random undersampling technique was applied. The model was trained using optimally tuned hyperparameters, including the Adam optimizer, cross-entropy loss function, a batch size of 32, and 20 epochs. Evaluation results showed that the model achieved an accuracy of 95.97%, with a precision of 96.22%, recall of 95.97%, and F1-score of 95.92%. The confusion matrix and evaluation curves demonstrated that the model is both stable and reliable. These findings indicate that the proposed system has strong potential to be implemented in automated and real-time livestock health monitoring applications, providing a fast, accurate, and non-invasive solution for precision livestock farming.

Downloads

Download data is not yet available.

References

[1] A. Rohan, M. S. Rafaq, M. J. Hasan, F. Asghar, A. K. Bashir, and T. Dottorini, “Application of deep learning for livestock behaviour recognition: A systematic literature review,” Comput Electron Agric, vol. 224, pp. 1–24, 2024, doi: 10.1016/j.compag.2024.109115.

[2] S. D. Scott et al., “Systematic Literature Review of Vision-Based Approaches to Outdoor Livestock Monitoring with Lessons from Wildlife Wildlife Studies,” 2024, [Online]. Available: http://www.mendeley.com

[3] and A. S. R. Mehta, S. Agrawal, “Deep Learning-Based Animal Health Monitoring: A Survey of Techniques and Applications,” IEEE Access, vol. 10, pp. 132456–132471, 2022, doi: https://doi.org/10.1109/ACCESS.2022.3220534.

[4] and X. C. Z. Chen, Y. Lin, “Lightweight CNN Models for Livestock Disease Detection in Real-time Applications,” Comput Electron Agric, vol. 208, p. 107748, Apr. 2023, [Online]. Available: https://linkinghub.elsevier.com/retrieve/pii/S0168169923001369

[5] B. L. S. and V. A. M. R. Lamani, K. Padmaja, “Enhanced Lumpy Cattle Skin Disease Prognosis via Deep Learning Methods,” 2024 Second International Conference on Networks, Multimedia and Information Technology (NMITCON), Bengaluru, India, pp. 1–6, 2024, doi: https://doi.org/10.1109/NMITCON62075.2024.10699233.

[6] N. Reza, S. Kabir, A. Haque, and H. Jin, “Instance segmentation and automated pig posture recognition for smart health management,” vol. 67, no. 3, pp. 677–700, 2025.

[7] et al. X. Wang, W. Peng, Z. Chen, “GSCW-YOLO: A Real-Time Lightweight Behavior Recognition Model for Multiple Dairy Goats,” Animals, vol. 14, no. 24, p. 3667, 2024, [Online]. Available: https://www.mdpi.com/2076-2615/14/24/3667

[8] et al. Y. Zhang, Y. Fu, B. Song, “An Integrated Goat Head Detection and Automatic Counting Method Based on Deep Learning,” Animals, vol. 12, no. 14, p. 1810, 2022, [Online]. Available: https://www.mdpi.com/2076-2615/12/14/1810

[9] and B. J. R. S. Thakur, M. R. Rahman, “Convolutional Neural Network for Disease Detection in Small Ruminants: A Comparative Study,” Procedia Comput Sci, vol. 219, pp. 447–454, 2023.

[10] and G. A. A.-R. F. B. Mahama, A. Alhassan, “Goat Disease Classification Using VGG16 Deep Learning Model,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 32, no. 1, pp. 100–108, 2024.

[11] R. Y. Kusuma and L. M. Hidayat, “Klasifikasi Penyakit Kambing Berdasarkan Citra Kulit Menggunakan Ekstraksi Warna dan K-Nearest Neighbor,” Jurnal Teknologi Informasi, vol. 10, no. 2, pp. 115–122, 2023.

[12] and D. J. A. Gebremariam, F. Zewdu, “Classification of Goat Skin Diseases Using CNN Models: A Case Study in East Africa,” Heliyon, vol. 9, no. 4, 2023.

[13] “Goat”, [Online]. Available: https://app.roboflow.com/goat-dataset-zahyx/goat-qi1cu/models

[14] and J. W. F. Li, Y. Wang, “Lightweight Residual CNNs for Efficient Animal Disease Detection in Low-Resource Environments,” Neurocomputing, vol. 460, pp. 336–348, Oct. 2021, doi: 10.1016/j.neucom.2021.06.011.

[15] A. A.-A. et Al., “Data-driven livestock classification using deep CNNs with augmented goat face images,” Biosyst Eng, vol. 217, pp. 171–183, Jun. 2022, doi: 10.1016/j.biosystemseng.2022.03.010.

[16] S. Howard, J., & Gugger, “Fastai: A layered API for deep learning,” IEEE Access, vol. 9, pp. 102153–102163, 2021, doi: https://doi.org/10.1109/ACCESS.2021.3059362.

[17] et al. Dosovitskiy, A., Beyer, L., Kolesnikov, A., “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,” ICLR, 2021, doi: https://doi.org/10.48550/arXiv.2010.11929.

Downloads

Published

2025-10-08

How to Cite

[1]
N. A. P. Amin and A. K. Wardhana, “Image-Based Classification of Healthy and Unhealthy Goats Using ResNet-18 Deep Learning Model”, JAIC, vol. 9, no. 5, pp. 2357–2363, Oct. 2025.

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.