Journal of Mechanical Science and Technology

, Volume 33, Issue 4, pp 1869–1874 | Cite as

Teat detection algorithm: YOLO vs. Haar-cascade

  • Akanksha RastogiEmail author
  • Beom Sahng Ryuh


In this study we have developed and experimented with two methods of teat detection based on machine learning approach in image recognition and object detection. Automatic milking systems rely strongly on the vision system for successful milking operation initiation which is the attachment of the teat cups correctly. Teat detection method currently employed in the industry is based on laser assisted edge detection mechanism, making the current systems less advanced than the existing methods in the field of image processing and robotic vision. By experimenting on a basic object detection method based on Haar-like features, viz. Haar cascade classification method and a latest state-of-the-art method based on convolutional neural nets, viz. YOLO-object detection method, we have compared the results of detection on a fake teat model casted from silicon, especially for indoor environments. This study is in extension to the successful real time detection in a cow farm using Haar-cascade based algorithm.


Automatic milking systems Haar-cascade Teat detection YOLO 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    F. Marinello, A. Pezzuolo, F. Gasparini, J. Arvidsson and L. Sartori, Application of Kinect sensor for dynamic soil surface characterization, Precision Agriculture, 5 (2015) 1–12.Google Scholar
  2. [2]
    K. De Koning, Y. van der Vost and A. Meijering, Automatic Milking Experience and Development in Europe, Wageningen Academic Publishers, Wageningen, the Netherlands (2002) 1–11.Google Scholar
  3. [3]
    H. Hofman, C. Rujiter, M. Koekoek and P. Williem ver der Sluis, milking box with robotic attacher and vision system, US 2012/0272914 A1, USA (2012).Google Scholar
  4. [4]
    DeLaval. AMR System Overview, Accessed on: 12th Sept. 2015,
  5. [5]
    M. A. Akhloufi, 3D vision system for intelligent milking robot automation, SPIE, Proceedings of the International Society for Optical Engineering, December (2013).Google Scholar
  6. [6]
    Gartner’s Inc Gartner Hype Cycle for Emerging Technologies, Gartner’s Inc Connecticut (2016).Google Scholar
  7. [7]
    Gil Press, 5 Top Technologies for Digital Disruption.Google Scholar
  8. [8]
    Martinus Petrus Kortekaas, Milking Robot for Attaching a Teat Cup, August (2015).Google Scholar
  9. [9]
    P. I. Wilson and J. Fernandez, Facial feature detection using Haar classifiers, Journal of Computing Science in Colleges, 21(4) April (2006) 127–133.Google Scholar
  10. [10]
    P. Viola and M. Jones, Rapid object detection using boosted cascade of simple features, IEEE Conference on Computer Vision and Pattern Recognition (2001).Google Scholar
  11. [11]
    Y. Freund and R. E. Schapire, A decision-theoretic generalization of on-line learning and an application to boosting, Journal of Computer and System Science, 55(1) (1997) 119–139.MathSciNetCrossRefzbMATHGoogle Scholar
  12. [12]
    M. Rezaei, Creating a Cascade of Haar Like Classifiers Step by Step (2014) [online] Available: Scholar
  13. [13]
    A. Rastogi, A. Pal and B. S. Ryuh, Real-time teat detection using haar cascade classifier in smart automatic milking system, 2017 7th IEEE International Conference on Control System, Computing and Engineering (ICCSCE), Penang (2017) 74–79.CrossRefGoogle Scholar
  14. [14]
    J. Redmon, S. Divvala, R. Girshick and A. Farhadi, You Only Look Once: Unified, Real-time Object Detection, arXiv preprint arXiv:1506.02640 (2015).Google Scholar
  15. [15]
    J. Redmon and A. Farhadi, Yolo9000: Better, Faster, Stronger, arXiv preprint arXiv:1612.08242 (2016).Google Scholar
  16. [16]
    T. H. Trieu, Darkflow, Accessed on: 11th Oct. (2016) Scholar
  17. [17]
    M. Jay, YOLO Series, Accessed on: 11th Oct. (2016) Scholar

Copyright information

© KSME & Springer 2019

Authors and Affiliations

  1. 1.School of Mechanical Systems EngineeringChonbuk National UniversityJeonjuKorea

Personalised recommendations