ResNet-based dairy daily behavior recognition




Behavior recognition, ResNet, Cow Daily Behavior Dataset


With the rapid development of China ’s dairy farming industry, it becomes difficult to breed and manage the increasing number of dairy cows. The smart agricultural enabled by edging techniques such as smart sensor, IoT, machine learning, etc. shows great potential to improve the scientific breeding and management of dairy cows. Using machine learning assisted computer vision to identify and classify the behavior of dairy cows can quickly determine the health status of dairy cows and improve management efficiency. However, there are still some challenges need to be addressed in the current behavior recognition of dairy cows. Due to the more complex background of dairy farms, the increase in the number of cows makes the mutual shading problem of dairy cows serious, which leads to the low efficiency of dairy cow behavior recognition. To address this challenge, this paper collected and labeled four types of 1,660 dairy daily behavior datasets and proposed a residual neural network (ResNet)-based dairy daily behavior recognition model. Experiments show that the proposed method is far superior to the baseline method in accuracy performance, and it provides inspiration for the behavior recognition of cows.


Download data is not yet available.
<br data-mce-bogus="1"> <br data-mce-bogus="1">


Meng Fanchang. Basic calf behavior identification based on video analysis [D]. Northwest Agriculture and Forestry University of Science and Technology, 2016.

Liu Zhongchao, He Dongjian,Convolutional neural network-based method for cow estrus behavior identification[J],Journal of Agricultural Machinery.2019(07).

He K M,Zhang X Y,Ren S Q et al. Deep residual learning for image recognition[M]. IEEE Conference on Computer Vision and Pattern Recognition . 2016 DOI:

Diosdado JAV, Barker ZE, Hodges HR, Amory JR, Croft DP, Bell NJ, Codling EA. Classification of behaviour in housed dairy cows using an accelerometer-based activity monitoring system[J]. Animal Biotelemetry, 2015; 3: 15. DOI:

Arcidiacono C, Porto SMC, Mancino M, Cascone G. Development of a threshold-based classifier for real-time recognition of cow feeding and standing behavioural activities from accelerometer data[J]. Computers and Electronics in Agriculture, 2017; 134: 124–134. DOI:

Wang Jun; He Zhitao; Zheng Guoqiang; Gao Song; Zhao Kaixuan,Development and validation of an ensemble classifier for real-time recognition of cow behavior patterns from accelerometer data and location data[J]. PubMed. 2018 DOI:

Marian Stamp Dawkins,Hyoung-joo Lee,Corri D. Waitt,Stephen J. Roberts. Applied Animal Behaviour Optical flow patterns in broiler chicken flocks as automated measures of behaviour and gait[J] . Science . 2009 (3) DOI:

Elsbeth A .van Dam,Lucas P.J.J. Noldus,Marcel A.J. van Gerven.Deep learning improves automated rodent behavior recognition within a specific experimental setup[J].Journal of Neuroscience Methods.2019(12) DOI:

Haley D B,de Passill6 A M,Rushen J.Assessing Cow Comfort;Effects of Two Floor Types and Two Tie Stall Designs on the Behaviour of Lactating Dairy Cows[J].Applied Animal Behaviour Science,2001,71(2):105-117 DOI:

Han B,Davis L S.Density-Based Multifeature Background Subtraction with Support Vector Machine[M],IEEE Computer Society,2012

Brox T,Malik J.Large Displacement Optical Flow:Descriptor Matching in Variational Motion Estimation[J].IEEE Transactions on Pattern Analysis &Machine Intelligence,2011,33(3):500-13. DOI:

Simona M.C. Porto,Claudia Arcidiacono,Umberto Anguzaa,Giovanni Cascoe.A computer vision-based system for the automatic detection of lying behavior of daily cows in free-satll barns[J].Biosystems Engineering,2013,115(2). DOI:

Qiang Cai, Yibiao Deng, Haisheng Li, Le Yu, Shaofeng Ming. A review of human behavior recognition methods based on deep learning [J]. Computer Science.2019(12)

Wen Changji,Wang Shengsheng,Zhao Xin,Wang Man,Ma Li,Liu Yiting. Identification of prenatal behavior of female cows based on visual dictionary method[J]. Journal of Agricultural Machinery.2014(01)

Tian Fuyang,Wang Ranran,Liu Mochen,Wang Zhen,Li Fade,Wang Zhonghua. Research on identification and prediction of cow estrus behavior based on neural network[J]. Journal of Agricultural Machinery.2013(S1)

Zhang Chi, Shen Mingxia, Liu Longshen, et al. Research and implementation of target recognition method for newborn piglets based on machine vision [J]. Journal of Nanjing Agricultural University, 2017,40(1):169-175.

Xu Lei. The development status and prospect of machine vision technology fear [J]. Equipment management and maintenance, 2016(09):7-9

Zhao Kaixuan. Analysis of individual information perception and behavior of cows based on machine vision [D]. Northwest Agriculture and Forestry University of Science and Technology, 2017.

Zhu Jianzhang. Several studies on real-time visual target tracking in complex scenes [D]. Wuhan University, 2014.

Yang Qiumei, Xiao Deqin, Zhang Genxing. Automatic machine vision recognition of pig drinking behavior [J/OL]. Journal of Agricultural Machinery, 2018, 49(6):232-238.

Zhang Z-Ru. Research on the detection method of cow estrus information based on video analysis [D]. Northwest Agriculture and Forestry University of Science and Technology, 2018.




How to Cite

L. Cheng, C. Jing, T. H. Duan, and F. Z. Li, “ResNet-based dairy daily behavior recognition”, EAI Endorsed Trans IoT, vol. 9, no. 2, p. e5, Jul. 2023.