Comparison of Dairy Cow on Morphological Image Segmentation Model with Support Vector Machine Classification

  • Amril Mutoi Siregar Universitas Buana Perjuangaan karawang
  • Y Aris Purwanto IPB University
  • Sony Hartono Wijaya IPB University
  • Nahrowi IPB University
Keywords: Canny, classification, computer vision, Dairy cow, K-Means, SVM, Mask R-CNN


Pattern recognition is viral in object recognition and classification, as it can cope with the complexity of problems related to the object of the image. For example, the category of dairy cows is essential for farmers to distinguish the quality of dairy cows for motherhood. The current problem with breeders is still using the selection process manually. If the selection process using the morphology of dairy cows requires the presence of computer vision. The purpose of this study is to make it easier for dairy farmers to choose the mothers to be farmed. This work uses several processes ranging from preprocessing, segmentation, and classification of images. This study used the classification of three segmentation algorithms, namely Canny, Mask Region-Based Convolutional Neural Networks (R-CNN), and K-Means. This method aims to compare the results of the segmentation algorithm model with SVM); the model is measured with accuracy, precision, recall, and F1 Score. The expected results get the most optimal model by using multiple resistant segmentation. The most optimal model testing achieved 90.29% accuracy, 92.49% precision, 89.39% recall, and 89.95% F1 Score with a training and testing ratio of 90:10. So the most optimal segmentation method uses the K-Means algorithm with a test ratio of 90:10.


Download data is not yet available.


T. Vipin, Understanding Digital Image Processing. Taylor and Francis CRC Press, 2018.

N. V Andreyanov, A. S. Sytnik, and M. P. Shleymovich, “Object Detection in Images Using Deep Neural Networks for Agricultural Machinery,” IOP Conf. Ser. Earth Environ. Sci., vol. 988, no. 3, p. 032002, Feb. 2022, doi: 10.1088/1755-1315/988/3/032002.

O. Guzhva, H. Ardö, M. Nilsson, A. Herlin, and L. Tufvesson, “Now You See Me: Convolutional Neural Network Based Tracker for Dairy Cows,” Front. Robot. AI, vol. 5, Sep. 2018, doi: 10.3389/frobt.2018.00107.

D. W. Solechah, D. W. Harjanti, and R. Hartanto, “Hubungan antara Morfologi Ambing, Produksi Susu dan Komponen Susu pada Sapi Friesian Holstein,” J. Agripet, vol. 19, no. 2, pp. 91–98, Oct. 2019, doi: 10.17969/agripet.v19i2.14713.

D. Ratnasari, A. Atabany, B. P. Purwanto, and L. B. Salma, “Model Pertumbuhan Sapi Perah Friesian Holstein (FH) dari Lahir sampai Beranak Pertama di BBPTU-HPT Sapi Perah Baturraden Menggunakan Model Matematik Logistic,” J. Ilmu Produksi dan Teknol. Has. Peternak., vol. 7, no. 1, pp. 18–21, Jan. 2019, doi: 10.29244/jipthp.7.1.18-21.

R. L. Damayanti, R. Hartanto, and P. Sambodho, “Hubungan Volume Ambing dan Ukuran Puting dengan Produksi Susu Sapi Perah Friesian Holstein di PT. Naksatra Kejora, Kabupaten Temanggung,” J. Sain Peternak. Indones., vol. 15, no. 1, pp. 75–83, Mar. 2020, doi: 10.31186/

A. Hakim, H. Nuraini, R. Priyanto, and T. Harsi, “Dimensi Tubuh Sapi Friesian Holstein dan Limousin Betina Berdasarkan Morfometrik dengan Citra Digital,” J. Ilmu Produksi dan Teknol. Has. Peternak., vol. 7, no. 2, pp. 47–56, Jul. 2019, doi: 10.29244/jipthp.7.2.47-56.

K. He, G. Gkioxari, P. Dollár, and R. Girshick, “Mask R-CNN,” Mar. 2017, [Online]. Available:

L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille, “DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 40, no. 4, pp. 834–848, Apr. 2018, doi: 10.1109/TPAMI.2017.2699184.

D. Riana, M. Wahyudi, and A. N. Hidayanto, “Comparison of nucleus and inflammatory cell detection methods on Pap smear images,” in 2017 Second International Conference on Informatics and Computing (ICIC), Nov. 2017, pp. 1–5, doi: 10.1109/IAC.2017.8280540.

R. Bello, A. Z. H. TALIB, and A. S. A. Bin Mohamed, “Deep Learning-Based Architectures for Recognition of Cow Using Cow Nose Image Pattern,” GAZI Univ. J. Sci., pp. 1–1, Jun. 2020, doi: 10.35378/gujs.605631.

J. Salau and J. Krieter, “Instance Segmentation with Mask R-CNN Applied to Loose-Housed Dairy Cows in a Multi-Camera Setting,” Animals, vol. 10, no. 12, p. 2402, Dec. 2020, doi: 10.3390/ani10122402.

F. T. Anggraeny, M. S. Munir, and U. W. Atmojo, “Segmentasi K-Means Clustering Pada Citra Warna Daun Tunggal Menggunakan Model Warna L*a*b,” SCAN - J. Teknol. Inf. dan Komun., vol. 14, no. 2, Jun. 2019, doi: 10.33005/scan.v14i2.1485.

O. Maimon and L. Rokach, Data Mining and Knowledge Discovery Handbook. New York: Springer-Verlag New York, Inc, 2005.

A. Nurkholis, D. Alita, and A. Munandar, “Comparison of Kernel Support Vector Machine Multi-Class in PPKM Sentiment Analysis on Twitter,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 2, pp. 227–233, Apr. 2022, doi: 10.29207/resti.v6i2.3906.

J. D. Prusa and T. M. Khoshgoftaar, “Improving deep neural network design with new text data representations,” J. Big Data, vol. 4, no. 1, p. 7, Dec. 2017, doi: 10.1186/s40537-017-0065-8.

S. Sakr et al., “Using machine learning on cardiorespiratory fitness data for predicting hypertension: The Henry Ford ExercIse Testing (FIT) Project,” PLoS One, vol. 13, no. 4, p. e0195344, Apr. 2018, doi: 10.1371/journal.pone.0195344.

How to Cite
Amril Mutoi Siregar, Y Aris Purwanto, Sony Hartono Wijaya, & Nahrowi. (2022). Comparison of Dairy Cow on Morphological Image Segmentation Model with Support Vector Machine Classification. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 6(4), 670 - 676.
Information Systems Engineering Articles