Real-time behavior detection and judgment of egg breeders based on YOLO v3

  • Juan Wang
  • Nan Wang
  • Lihua Li
  • Zhenhui RenEmail author
ATCI 2019


In order to detect the behavior of egg breeders in self-breeding cages rapidly, a method of target location and behavior recognition based on visual images was proposed. In this study, Hy-Line Gray chickens were bred as objects. Through manual marking, the training set, validation set and test set were established, and YOLO v3 model was adopted to detect the collected images. The value of subdivision and batch size were determined by experiment. The learning rate was dynamically adjusted according to the change of loss value in the training model. Finally, the mean average precision of the trained model on the validation set was 92.09%. In this paper, the recognition rates of six kinds of behaviors in the morning and in the afternoon and under different densities were analyzed. Furthermore, a kind of welfare indicator was tested and abnormal behavior was evaluated. The results showed that: The mean precision rate of the six behaviors was followed by mating (94.72%), stand (94.57%), feed (93.10%), spread (92.02%), fight (88.67%) and drink (86.88%). The mean false rate ranged from low to high was spread (0.11%), mating (0.14%), fight (0.20%), drink (0.25%), feed (1.17%) and stand (8.62%). The mean missing rate ranged from low to high was mating (4.65%), stand (5.01%), feed (5.15%), spread (6.25%), fight (14.69%) and drink (15.79%). The method presented in this paper has a good effect on identifying the behavior of egg breeders, which can provide technical support for the promotion of the self-breeding mode.


YOLO v3 Self-breeding Egg breeders Behavior recognition Mating rate Abnormal judgment 



The authors would like to thank for the fund (2018YFD0500700) (19227213D), (16236605D-2 (2018)) and (HBCT2018150208).

Author contributions

Juan Wang contributed to methodology and wrote the original draft; Nan Wang performed data curation; Lihua Li performed formal analysis; Zhenhui Ren contributed to conceptualization and wrote the review.


This work was funded by the National Key R&D Program of China (2018YFD0500700), the Key Science and Technology Research and Development Program of Hebei Province (19227213D, 16236605D-2 (2018)) and the two-stage innovation team of the Modern Agricultural Industry Technology System in Hebei (HBCT2018150208).

Compliance with ethical standards

Conflict of interest

The authors declare no conflict of interest. No conflict of interest exists in the submission of this manuscript, and manuscript is approved by all authors for publication. We would like to declare that the work described was original research that has not been published previously and not under consideration for publication elsewhere, in whole or in part. All the authors listed have approved the manuscript that is enclosed.


  1. 1.
    Appleby MC (2003) The European Union ban on conventional cages for laying hens: history and prospects. J Appl Anim Welf Sci 6(2):103–121CrossRefGoogle Scholar
  2. 2.
    Hartcher KM, Jones B (2017) The welfare of layer hens in cage and cage-free housing systems. World’s Poult Sci J 73(4):767–782CrossRefGoogle Scholar
  3. 3.
    Zaninelli M, Redaelli V, Luzi F, Mitchell M, Bontempo V (2018) Development of a machine vision method for the monitoring of laying hens and detection of multiple nest occupations. Sensors 18(2):132CrossRefGoogle Scholar
  4. 4.
    Thuy Diep A, Larsen H, JL Rault (2018) Behavioural repertoire of free-range laying hens indoors and outdoors, and in relation to distance from the shed. Aust Vet J 96:127–131CrossRefGoogle Scholar
  5. 5.
    Riddle ER, Ali ABA, Campbell DLM, Siegford JM (2018) Space use by 4 strains of laying hens to perch, wing flap, dust bathe, stand and lie down. PLoS ONE 13(1):e0190532CrossRefGoogle Scholar
  6. 6.
    Zaninelli M, Redaelli V, Luzi F, Bontempo V, Dell’Orto V (2017) A monitoring system for laying hens that uses a detection sensor based on infrared technology and image pattern recognition. Sensors 17:1195CrossRefGoogle Scholar
  7. 7.
    Pereira DF, Miyamoto BCB, Maia GDN, Tatiana Sales G, Magalhães MM, Gates RS (2013) Machine vision to identify broiler breeder behavior. Comput Electron Agric 99:194–199CrossRefGoogle Scholar
  8. 8.
    Mehdizadeh SA, Neves DP, Tscharke M, Nääs IA, Banhazi TM (2015) Image analysis method to evaluate beak and head motion of broiler chickens during feeding. Comput Electron Agric 114:88–95CrossRefGoogle Scholar
  9. 9.
    Gitoee A, Faridi A, France J (2018) Mathematical models for response to amino acids: estimating the response of broiler chickens to branched-chain amino acids using support vector regression and neural network models. Neural Comput Appl 30(8):2499–2508CrossRefGoogle Scholar
  10. 10.
    Aydin A (2017) Development of an early detection system for lameness of broilers using computer vision. Comput Electron Agric 136:140–146CrossRefGoogle Scholar
  11. 11.
    Tullo E, Fontana I, Fernandez AP, Vranken E, Norton T, Berckmans D, Guarino M (2017) Association between environmental predisposing risk factors and leg disorders in broiler chickens. J Anim Sci 95(4):1512–1520Google Scholar
  12. 12.
    Dawkins MS, Roberts SJ, Cain RJ, Nickson T, Donnelly CA (2017) Early warning of footpad dermatitis and hockburn in broiler chicken flocks using optical flow, bodyweight and water consumption. Vet Rec 180(20):499CrossRefGoogle Scholar
  13. 13.
    Fengdan LAO, Guanghui TENG, Jun LI, Ligen YU, Zhuo LI (2012) Behavior recognition method for individual laying hen based on computer vision. Trans Chin Soc Agric Eng (Trans CSAE) 28(24):157–163Google Scholar
  14. 14.
    Fengdan LAO, Guanghui TENG, Zhuo LI et al (2013) Recognition and conglutination separation of individual hens based on machine vision in complex environment. Trans Chin Soc Agric Mach 44(04):213–216 + 227Google Scholar
  15. 15.
    Fengdan LAO, Xiaodong DU, Guanghui TENG (2017) Automatic recognition method of laying hen behaviors based on depth image processing. Trans Chin Soc Agric Mach 48(01):155–162Google Scholar
  16. 16.
    Fraess GA, Bench CJ, Tierney KB (2016) Automated behavioural response assessment to a feeding event in two heritage chicken breeds. Appl Anim Behav Sci 179:74–81CrossRefGoogle Scholar
  17. 17.
    Hunniford ME, Widowski TM (2017) Nest alternatives: adding a wire partition to the scratch area affects nest use and nesting behaviour of laying hens in furnished cages. Appl Anim Behav Sci 186:29–34CrossRefGoogle Scholar
  18. 18.
    Kashiha M, Pluk A, Bahr C, Vranken E, Berckmans D (2013) Development of an early warning system for a broiler house using computer vision. Biosys Eng 116(1):36–45CrossRefGoogle Scholar
  19. 19.
    Fernández AP, Norton T, Tullo E, van Hertem T, Youssef A, Exadaktylos V, Vranken E, Guarino M, Berckmans D (2018) Real-time monitoring of broiler flock’s welfare status using camera-based technology. Biosys Eng 173:103–114CrossRefGoogle Scholar
  20. 20.
    Teresa C, Jose P (2019) Effect of conducive environment on the egg production of hen. Revis Cient 29(1):52–56Google Scholar
  21. 21.
    Van Hertem T, Norton T, Berckmans D, Vranken E (2018) Predicting broiler gait scores from activity monitoring and flock data. Biosys Eng 173:93–102CrossRefGoogle Scholar
  22. 22.
    Mortensen AK, Lisouski P, Ahrendt P (2016) Weight prediction of broiler chickens using 3D computer vision. Comput Electron Agric 123:319–326CrossRefGoogle Scholar
  23. 23.
    Zhuang X, Bi M, Guo J, Wu S, Zhang T (2018) Development of an early warning algorithm to detect sick broilers. Comput Electron Agric 144:102–113CrossRefGoogle Scholar
  24. 24.
    BI M, Zhang T, Zhuang X, Jiao P (2018) Recognition method of sick yellow feather chicken based on head features. Trans Chin Soc Agric Mach 49(01):51–57Google Scholar
  25. 25.
    Gao Y, Guo J, Li X, Lei M, Lu J, Tong Y (2019) Instance-level segmentation method for group pig images based on deep learning. Trans Chin Soc Agric Mach.
  26. 26.
    Zhuang X, Zhang T (2019) Detection of sick broilers by digital image processing and deep learning. Biosys Eng 179:106–116CrossRefGoogle Scholar
  27. 27.
    Redmon J, Farhadi A (2018) YOLOv3: an incremental improvement. arXiv:1804.02767

Copyright information

© Springer-Verlag London Ltd., part of Springer Nature 2019

Authors and Affiliations

  1. 1.College of Mechanical and Electrical EngineeringHebei Agricultural UniversityBaodingChina

Personalised recommendations