Individual identification of dairy cows based on convolutional neural networks

  • Weizheng Shen
  • Hengqi Hu
  • Baisheng DaiEmail author
  • Xiaoli Wei
  • Jian Sun
  • Li Jiang
  • Yukun Sun


Individual identification of each cow is significant for precision livestock farming. In this paper, we propose a novel contactless cow identification method based on convolutional neural networks. We first collected a set of side-view images of dairy cows, then employed the YOLO model to detect the cow object in the side-view image, and finally fine-tuned a convolutional neural network model to classify each individual cow. In our experiments, a total of 105 side-view images of cows were collected, and the proposed method achieved an accuracy of 96.65% in cow identification, which outperformed existing experiments. Experimental results demonstrate the effectiveness of the proposed method for cow identification and the potential for our method to be applied to other livestock.


Cow identification Precision livestock farming Computer vision Convolutional neural networks Object detection 



This work was supported in part by the National Key Research and Development Program of China under Grant 2016YFD0700204-02, in part by the Dong Nong Scholar Program of Northeast Agricultural University under Grant 17XG20, in part by the Natural Science Foundation of Heilongjiang Province of China under Grant QC2018074, in part by the Key Laboratory of Agricultural Internet of Things, Ministry of Agriculture and Rural Affairs under Grant 2018AIOT-02, and in part by the China Agriculture Research System under Grant CARS-36.


  1. 1.
    Chen X, Li Q, Song Y, Jin X, Zhao Q (2012) Supervised geodesic propagation for semantic label transfer. In: European Conference on Computer Vision, 2012. Springer, 553–565Google Scholar
  2. 2.
    Girshick R (2015) Fast r-cnn. In: Proceedings of the IEEE international conference on computer vision, 2015. 1440–1448Google Scholar
  3. 3.
    Girshick R, Donahue J, Darrell T, Malik J (2014) Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE conference on computer vision and pattern recognition, 2014. pp 580–587Google Scholar
  4. 4.
    He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition, 2016. pp 770–778Google Scholar
  5. 5.
    Huang G, Liu Z, Van Der Maaten L, Weinberger KQ (2017) Densely connected convolutional networks. In: CVPR, 2017. vol 2. p 3Google Scholar
  6. 6.
    Jin X, Wu L, Li X, Chen S, Peng S, Chi J, Ge S, Song C, Zhao G (2018) Predicting aesthetic score distribution through cumulative jensen-shannon divergence. In: AAAI Conference on Artificial Intelligence (AAAI), New Orleans, Lousiana, USAGoogle Scholar
  7. 7.
    Johnston A, Edwards D, Hofmann E, Wrench P, Sharples F, Hiller R, Welte W, Diederichs K (1996) 1418001. Welfare implications of identification of cattle by ear tags. Vet Record 138(25):612–614CrossRefGoogle Scholar
  8. 8.
    Kaixuan Z, He D (2015) Recognition of individual dairy cattle based on convolutional neural networks. Trans Chin Soc Agric Eng (Trans CSAE) 31(5):181–187Google Scholar
  9. 9.
    Krizhevsky A, Sutskever I, Hinton GE (2012) Imagenet classification with deep convolutional neural networks. In: Advances in neural information processing systems, 2012. pp 1097–1105Google Scholar
  10. 10.
    Kühl HS, Burghardt T (2013) Animal biometrics: quantifying and detecting phenotypic appearance. Trends Ecol Evol 28(7):432–441CrossRefGoogle Scholar
  11. 11.
    Kumar S, Tiwari S, Singh SK (2016) Face recognition of cattle: can it be done? Proc Ntnl Acad Sci, India Sect A: Phys Sci 86(2):137–148CrossRefGoogle Scholar
  12. 12.
    Kumar S, Pandey A, Satwik KSR, Kumar S, Singh SK, Singh AK, Mohan A (2018) Deep learning framework for recognition of cattle using muzzle point image pattern. Measurement 116:1–17CrossRefGoogle Scholar
  13. 13.
    Li Q, Chen X, Song Y, Zhang Y, Jin X, Zhao Q (2014) Geodesic propagation for semantic labeling. IEEE Trans Image Process 23(11):4812–4825MathSciNetCrossRefGoogle Scholar
  14. 14.
    Lin T-Y, Maire M, Belongie S, Hays J, Perona P, Ramanan D, Dollár P, Zitnick CL (2014) Microsoft coco: Common objects in context. In: European conference on computer vision, 2014. Springer, pp 740–755Google Scholar
  15. 15.
    Lu H, Li B, Zhu J, Li Y, Li Y, Xu X, He L, Li X, Li J, Serikawa S (2017) Wound intensity correction and segmentation with convolutional neural networks. Concur Comput: Pract Exp 29(6):e3927CrossRefGoogle Scholar
  16. 16.
    Lu H, Li Y, Uemura T, Kim H, Serikawa S (2018) Low illumination underwater light field images reconstruction using deep convolutional neural networks. Futur Gener Comput Syst 82:142–148CrossRefGoogle Scholar
  17. 17.
    Lu H, Li Y, Mu S, Wang D, Kim H, Serikawa S (2018) Motor anomaly detection for unmanned aerial vehicles using reinforcement learning. IEEE Internet Things J 5(4):2315–2322CrossRefGoogle Scholar
  18. 18.
    Lu H, Li Y, Chen M, Kim H, Serikawa S (2018) Brain intelligence: go beyond artificial intelligence. Mob Netwo Appl 23(2):368–375CrossRefGoogle Scholar
  19. 19.
    Redmon J, Farhadi A (2017) YOLO9000: better, faster, stronger. arXiv preprintGoogle Scholar
  20. 20.
    Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: unified, real-time object detection. Proc IEEE Conf Comput Vis Pattern Recognit 2016:779–788Google Scholar
  21. 21.
    Ren S, He K, Girshick R, Sun J (2015) Faster r-cnn: towards real-time object detection with region proposal networks. Adv Neural Inf Proces Syst 2015:91–99Google Scholar
  22. 22.
    Serikawa S, Lu H (2014) Underwater image dehazing using joint trilateral filter. Comput Electr Eng 40(1):41–50CrossRefGoogle Scholar
  23. 23.
    Simonyan K, Zisserman A (2014) Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:14091556Google Scholar
  24. 24.
    Viola P, Jones MJ (2004) Robust real-time face detection. Int J Comput Vis 57(2):137–154CrossRefGoogle Scholar
  25. 25.
    Voulodimos AS, Patrikakis CZ, Sideridis AB, Ntafis VA, Xylouri EM (2010) A complete farm management system based on animal identification using RFID technology. Comput Electron Agric 70(2):380–388CrossRefGoogle Scholar
  26. 26.
    Zhang L, Yang Y, Gao Y, Yu Y, Wang C, Li X (2014) A probabilistic associative model for segmenting weakly supervised images. IEEE Trans Image Process 23(9):4150–4159MathSciNetCrossRefGoogle Scholar
  27. 27.
    Zhang Y, Gravina R, Lu H, Villari M, Fortino G (2018) PEA: parallel electrocardiogram-based authentication for smart healthcare systems. J Netw Comput Appl 117:10–16CrossRefGoogle Scholar
  28. 28.
    Zin TT, Phyo CN, Tin P, Hama H, Kobayashi I (2018) Image Technology based Cow Identification System Using Deep Learning. In: Proceedings of the International MultiConference of Engineers and Computer ScientistsGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  • Weizheng Shen
    • 1
  • Hengqi Hu
    • 1
  • Baisheng Dai
    • 1
    • 2
    Email author
  • Xiaoli Wei
    • 1
  • Jian Sun
    • 1
  • Li Jiang
    • 1
    • 3
  • Yukun Sun
    • 4
  1. 1.School of Electrical Engineering and InformationNortheast Agricultural UniversityHarbinChina
  2. 2.Key Laboratory of Agricultural Internet of ThingsMinistry of Agriculture and Rural AffairsYanglingChina
  3. 3.School of Electrical Engineering and InformationHeilongjiang Bayi Agricultural UniversityDaqingChina
  4. 4.School of Animal Science and TechnologyNortheast Agricultural UniversityHarbinChina

Personalised recommendations